Skip to content

Commit

Permalink
Remove unused checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Baldanos committed Mar 25, 2020
1 parent e1a5d87 commit 0be2cbe
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/hydrabus/hydrabus_aux.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,12 @@

bsp_status_t cmd_aux_write(uint8_t aux_num, uint8_t value)
{
bsp_status_t status;

if (aux_num > AUX_PIN_MAX) {
return BSP_ERROR;
}

bsp_gpio_mode_out(AUX_PORT,
AUX_PIN_START + aux_num);
if (status != BSP_OK) {
return BSP_ERROR;
}
if (value == 0) {
bsp_gpio_clr(AUX_PORT,
AUX_PIN_START + aux_num);
Expand All @@ -49,17 +44,12 @@ bsp_status_t cmd_aux_write(uint8_t aux_num, uint8_t value)

uint8_t cmd_aux_read(uint8_t aux_num)
{
bsp_status_t status;

if (aux_num > AUX_PIN_MAX) {
return BSP_ERROR;
}

bsp_gpio_mode_in(AUX_PORT,
AUX_PIN_START + aux_num);
if (status != BSP_OK) {
return BSP_ERROR;
}
return bsp_gpio_pin_read(AUX_PORT,
AUX_PIN_START + aux_num);
}
Expand Down

0 comments on commit 0be2cbe

Please sign in to comment.