summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2018-09-11 10:40:24 -0700
committerKeith Packard <keithp@keithp.com>2018-10-13 08:23:25 -0700
commitcdaa0d7b272505c49017f409b7c0b8e3240608f0 (patch)
tree75a8777ac04f7d4cc31260a5a7fd9dc9e3576948 /src/drivers
parentf7ca88282466c271bad5e25e804729580fe83c47 (diff)
altos: Eliminate 'pin' field from GPIO functions
This was used with the 8051 bit-addressing mode to provide single-instruction access to GPIO pins. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/ao_btm.c4
-rw-r--r--src/drivers/ao_button.c5
-rw-r--r--src/drivers/ao_cc1120.c2
-rw-r--r--src/drivers/ao_cc1200.c2
-rw-r--r--src/drivers/ao_companion.c4
-rw-r--r--src/drivers/ao_mma655x.c6
-rw-r--r--src/drivers/ao_ms5607.c6
-rw-r--r--src/drivers/ao_pad.c24
-rw-r--r--src/drivers/ao_ps2.c8
-rw-r--r--src/drivers/ao_rn4678.c28
-rw-r--r--src/drivers/ao_sdcard.c4
-rw-r--r--src/drivers/ao_trng_send.c8
-rw-r--r--src/drivers/ao_watchdog.c6
13 files changed, 51 insertions, 56 deletions
diff --git a/src/drivers/ao_btm.c b/src/drivers/ao_btm.c
index 2930d00e..04bf4138 100644
--- a/src/drivers/ao_btm.c
+++ b/src/drivers/ao_btm.c
@@ -347,7 +347,7 @@ ao_btm_check_link()
);
#else
ao_arch_block_interrupts();
- if (ao_gpio_get(AO_BTM_INT_PORT, AO_BTM_INT_PIN, AO_BTM_INT) == 0) {
+ if (ao_gpio_get(AO_BTM_INT_PORT, AO_BTM_INT_PIN) == 0) {
ao_btm_connected = 1;
} else {
ao_btm_connected = 0;
@@ -455,7 +455,7 @@ ao_btm_init (void)
ao_serial_btm_set_speed(AO_SERIAL_SPEED_19200);
#ifdef AO_BTM_RESET_PORT
- ao_enable_output(AO_BTM_RESET_PORT,AO_BTM_RESET_PIN,AO_BTM_RESET,0);
+ ao_enable_output(AO_BTM_RESET_PORT,AO_BTM_RESET_PIN,0);
#endif
#ifdef AO_BTM_INT_PORT
diff --git a/src/drivers/ao_button.c b/src/drivers/ao_button.c
index f6a9676b..c8103e88 100644
--- a/src/drivers/ao_button.c
+++ b/src/drivers/ao_button.c
@@ -37,7 +37,6 @@ static struct ao_button_state ao_button_state[AO_BUTTON_COUNT];
#define port(q) AO_BUTTON_ ## q ## _PORT
#define bit(q) AO_BUTTON_ ## q
-#define pin(q) AO_BUTTON_ ## q ## _PIN
#ifndef AO_BUTTON_INVERTED
#define AO_BUTTON_INVERTED 1
@@ -45,9 +44,9 @@ static struct ao_button_state ao_button_state[AO_BUTTON_COUNT];
#if AO_BUTTON_INVERTED
/* pins are inverted */
-#define ao_button_value(b) !ao_gpio_get(port(b), bit(b), pin(b))
+#define ao_button_value(b) !ao_gpio_get(port(b), bit(b))
#else
-#define ao_button_value(b) ao_gpio_get(port(b), bit(b), pin(b))
+#define ao_button_value(b) ao_gpio_get(port(b), bit(b))
#endif
static uint8_t
diff --git a/src/drivers/ao_cc1120.c b/src/drivers/ao_cc1120.c
index aea0a3fe..b1a13778 100644
--- a/src/drivers/ao_cc1120.c
+++ b/src/drivers/ao_cc1120.c
@@ -208,7 +208,7 @@ ao_radio_fifo_write_fixed(uint8_t data, uint8_t len)
static uint8_t
ao_radio_int_pin(void)
{
- return ao_gpio_get(AO_CC1120_INT_PORT, AO_CC1120_INT_PIN, AO_CC1120_INT);
+ return ao_gpio_get(AO_CC1120_INT_PORT, AO_CC1120_INT_PIN);
}
#if CC1120_DEBUG
diff --git a/src/drivers/ao_cc1200.c b/src/drivers/ao_cc1200.c
index 45f5711e..105e0d50 100644
--- a/src/drivers/ao_cc1200.c
+++ b/src/drivers/ao_cc1200.c
@@ -192,7 +192,7 @@ ao_radio_fifo_write_fixed(uint8_t data, uint8_t len)
static uint8_t
ao_radio_int_pin(void)
{
- return ao_gpio_get(AO_CC1200_INT_PORT, AO_CC1200_INT_PIN, AO_CC1200_INT);
+ return ao_gpio_get(AO_CC1200_INT_PORT, AO_CC1200_INT_PIN);
}
static uint8_t
diff --git a/src/drivers/ao_companion.c b/src/drivers/ao_companion.c
index 3967090b..44868fb6 100644
--- a/src/drivers/ao_companion.c
+++ b/src/drivers/ao_companion.c
@@ -31,7 +31,6 @@
#define COMPANION_SELECT() do { \
ao_spi_get_bit(AO_COMPANION_CS_PORT, \
AO_COMPANION_CS_PIN, \
- AO_COMPANION_CS, \
AO_COMPANION_SPI_BUS, \
AO_SPI_SPEED_200kHz); \
} while (0)
@@ -39,7 +38,6 @@
#define COMPANION_DESELECT() do { \
ao_spi_put_bit(AO_COMPANION_CS_PORT, \
AO_COMPANION_CS_PIN, \
- AO_COMPANION_CS, \
AO_COMPANION_SPI_BUS); \
} while (0)
@@ -144,7 +142,7 @@ static struct ao_task ao_companion_task;
void
ao_companion_init(void)
{
- ao_enable_output(AO_COMPANION_CS_PORT, AO_COMPANION_CS_PIN, AO_COMPANION_CS, 1);
+ ao_enable_output(AO_COMPANION_CS_PORT, AO_COMPANION_CS_PIN, 1);
ao_cmd_register(&ao_companion_cmds[0]);
ao_add_task(&ao_companion_task, ao_companion, "companion");
}
diff --git a/src/drivers/ao_mma655x.c b/src/drivers/ao_mma655x.c
index a48c1db2..e8eeea6e 100644
--- a/src/drivers/ao_mma655x.c
+++ b/src/drivers/ao_mma655x.c
@@ -34,7 +34,6 @@ static void
ao_mma655x_start(void) {
ao_spi_get_bit(AO_MMA655X_CS_PORT,
AO_MMA655X_CS_PIN,
- AO_MMA655X_CS,
AO_MMA655X_SPI_INDEX,
AO_SPI_SPEED_FAST);
}
@@ -43,19 +42,18 @@ static void
ao_mma655x_stop(void) {
ao_spi_put_bit(AO_MMA655X_CS_PORT,
AO_MMA655X_CS_PIN,
- AO_MMA655X_CS,
AO_MMA655X_SPI_INDEX);
}
static void
ao_mma655x_restart(void) {
uint8_t i;
- ao_gpio_set(AO_MMA655X_CS_PORT, AO_MMA655X_CS_PIN, AO_MMA655X_CS, 1);
+ ao_gpio_set(AO_MMA655X_CS_PORT, AO_MMA655X_CS_PIN, 1);
/* Emperical testing on STM32L151 at 32MHz for this delay amount */
for (i = 0; i < 10; i++)
ao_arch_nop();
- ao_gpio_set(AO_MMA655X_CS_PORT, AO_MMA655X_CS_PIN, AO_MMA655X_CS, 0);
+ ao_gpio_set(AO_MMA655X_CS_PORT, AO_MMA655X_CS_PIN, 0);
}
static uint8_t
diff --git a/src/drivers/ao_ms5607.c b/src/drivers/ao_ms5607.c
index a468fee3..a00d54c8 100644
--- a/src/drivers/ao_ms5607.c
+++ b/src/drivers/ao_ms5607.c
@@ -31,12 +31,12 @@ static uint8_t ms5607_configured;
static void
ao_ms5607_start(void) {
- ao_spi_get_bit(AO_MS5607_CS_PORT, AO_MS5607_CS_PIN, AO_MS5607_CS, AO_MS5607_SPI_INDEX, AO_MS5607_SPI_SPEED);
+ ao_spi_get_bit(AO_MS5607_CS_PORT, AO_MS5607_CS_PIN, AO_MS5607_SPI_INDEX, AO_MS5607_SPI_SPEED);
}
static void
ao_ms5607_stop(void) {
- ao_spi_put_bit(AO_MS5607_CS_PORT, AO_MS5607_CS_PIN, AO_MS5607_CS, AO_MS5607_SPI_INDEX);
+ ao_spi_put_bit(AO_MS5607_CS_PORT, AO_MS5607_CS_PIN, AO_MS5607_SPI_INDEX);
}
static void
@@ -164,7 +164,7 @@ ao_ms5607_get_sample(uint8_t cmd) {
ao_spi_put(AO_MS5607_SPI_INDEX);
#endif
ao_arch_block_interrupts();
- while (!ao_gpio_get(AO_MS5607_MISO_PORT, AO_MS5607_MISO_PIN, AO_MS5607_MISO) &&
+ while (!ao_gpio_get(AO_MS5607_MISO_PORT, AO_MS5607_MISO_PIN) &&
!ao_ms5607_done)
ao_sleep((void *) &ao_ms5607_done);
ao_arch_release_interrupts();
diff --git a/src/drivers/ao_pad.c b/src/drivers/ao_pad.c
index c08798ac..85691f5c 100644
--- a/src/drivers/ao_pad.c
+++ b/src/drivers/ao_pad.c
@@ -50,7 +50,7 @@ static void
ao_siren(uint8_t v)
{
#ifdef AO_SIREN
- ao_gpio_set(AO_SIREN_PORT, AO_SIREN_PIN, AO_SIREN, v);
+ ao_gpio_set(AO_SIREN_PORT, AO_SIREN_PIN, v);
#else
#if HAS_BEEP
ao_beep(v ? AO_BEEP_MID : 0);
@@ -64,7 +64,7 @@ static void
ao_strobe(uint8_t v)
{
#ifdef AO_STROBE
- ao_gpio_set(AO_STROBE_PORT, AO_STROBE_PIN, AO_STROBE, v);
+ ao_gpio_set(AO_STROBE_PORT, AO_STROBE_PIN, v);
#else
(void) v;
#endif
@@ -589,34 +589,34 @@ ao_pad_init(void)
}
#endif
#if AO_PAD_NUM > 0
- ao_enable_output(AO_PAD_0_PORT, AO_PAD_PIN_0, AO_PAD_0, 0);
+ ao_enable_output(AO_PAD_0_PORT, AO_PAD_PIN_0, 0);
#endif
#if AO_PAD_NUM > 1
- ao_enable_output(AO_PAD_1_PORT, AO_PAD_PIN_1, AO_PAD_1, 0);
+ ao_enable_output(AO_PAD_1_PORT, AO_PAD_PIN_1, 0);
#endif
#if AO_PAD_NUM > 2
- ao_enable_output(AO_PAD_2_PORT, AO_PAD_PIN_2, AO_PAD_2, 0);
+ ao_enable_output(AO_PAD_2_PORT, AO_PAD_PIN_2, 0);
#endif
#if AO_PAD_NUM > 3
- ao_enable_output(AO_PAD_3_PORT, AO_PAD_PIN_3, AO_PAD_3, 0);
+ ao_enable_output(AO_PAD_3_PORT, AO_PAD_PIN_3, 0);
#endif
#if AO_PAD_NUM > 4
- ao_enable_output(AO_PAD_4_PORT, AO_PAD_PIN_4, AO_PAD_4, 0);
+ ao_enable_output(AO_PAD_4_PORT, AO_PAD_PIN_4, 0);
#endif
#if AO_PAD_NUM > 5
- ao_enable_output(AO_PAD_5_PORT, AO_PAD_PIN_5, AO_PAD_5, 0);
+ ao_enable_output(AO_PAD_5_PORT, AO_PAD_PIN_5, 0);
#endif
#if AO_PAD_NUM > 5
- ao_enable_output(AO_PAD_6_PORT, AO_PAD_PIN_6, AO_PAD_6, 0);
+ ao_enable_output(AO_PAD_6_PORT, AO_PAD_PIN_6, 0);
#endif
#if AO_PAD_NUM > 7
- ao_enable_output(AO_PAD_7_PORT, AO_PAD_PIN_7, AO_PAD_7, 0);
+ ao_enable_output(AO_PAD_7_PORT, AO_PAD_PIN_7, 0);
#endif
#ifdef AO_STROBE
- ao_enable_output(AO_STROBE_PORT, AO_STROBE_PIN, AO_STROBE, 0);
+ ao_enable_output(AO_STROBE_PORT, AO_STROBE_PIN, 0);
#endif
#ifdef AO_SIREN
- ao_enable_output(AO_SIREN_PORT, AO_SIREN_PIN, AO_SIREN, 0);
+ ao_enable_output(AO_SIREN_PORT, AO_SIREN_PIN, 0);
#endif
ao_cmd_register(&ao_pad_cmds[0]);
ao_add_task(&ao_pad_task, ao_pad, "pad listener");
diff --git a/src/drivers/ao_ps2.c b/src/drivers/ao_ps2.c
index 29eecea8..c7520b3a 100644
--- a/src/drivers/ao_ps2.c
+++ b/src/drivers/ao_ps2.c
@@ -91,11 +91,11 @@ ao_ps2_put(uint8_t c)
ao_arch_release_interrupts();
/* pull the clock pin down */
- ao_enable_output(AO_PS2_CLOCK_PORT, AO_PS2_CLOCK_BIT, AO_PS2_CLOCK_PIN, 0);
+ ao_enable_output(AO_PS2_CLOCK_PORT, AO_PS2_CLOCK_BIT, 0);
ao_delay(0);
/* pull the data pin down for the start bit */
- ao_enable_output(AO_PS2_DATA_PORT, AO_PS2_DATA_BIT, AO_PS2_DATA_PIN, 0);
+ ao_enable_output(AO_PS2_DATA_PORT, AO_PS2_DATA_BIT, 0);
ao_delay(0);
/* switch back to input mode for the interrupt to work */
@@ -369,7 +369,7 @@ ao_ps2_isr(void)
uint8_t bit;
if (ao_ps2_tx_count) {
- ao_gpio_set(AO_PS2_DATA_PORT, AO_PS2_DATA_BIT, AO_PS2_DATA_PIN, ao_ps2_tx&1);
+ ao_gpio_set(AO_PS2_DATA_PORT, AO_PS2_DATA_BIT, ao_ps2_tx&1);
ao_ps2_tx >>= 1;
ao_ps2_tx_count--;
if (!ao_ps2_tx_count) {
@@ -383,7 +383,7 @@ ao_ps2_isr(void)
ao_ps2_count = 0;
ao_ps2_tick = ao_tick_count;
- bit = ao_gpio_get(AO_PS2_DATA_PORT, AO_PS2_DATA_BIT, AO_PS2_DATA_PIN);
+ bit = ao_gpio_get(AO_PS2_DATA_PORT, AO_PS2_DATA_BIT);
if (ao_ps2_count == 0) {
/* check for start bit, ignore if not zero */
if (bit)
diff --git a/src/drivers/ao_rn4678.c b/src/drivers/ao_rn4678.c
index 98dc35b5..4ace4b78 100644
--- a/src/drivers/ao_rn4678.c
+++ b/src/drivers/ao_rn4678.c
@@ -335,7 +335,7 @@ ao_rn_get_name(char *name, int len)
static void
ao_rn_check_link(void)
{
- ao_rn_connected = 1 - ao_gpio_get(AO_RN_CONNECTED_PORT, AO_RN_CONNECTED_PIN, foo);
+ ao_rn_connected = 1 - ao_gpio_get(AO_RN_CONNECTED_PORT, AO_RN_CONNECTED_PIN);
}
static void
@@ -384,17 +384,17 @@ ao_rn(void)
ao_rn_dbg("ao_rn top\n");
/* Select CMD mode after the device gets out of reset */
- ao_gpio_set(AO_RN_CMD_PORT, AO_RN_CMD_PIN, foo, AO_RN_CMD_CMD);
+ ao_gpio_set(AO_RN_CMD_PORT, AO_RN_CMD_PIN, AO_RN_CMD_CMD);
for (i = 0; i < 3; i++) {
ao_rn_dbg("reset device\n");
- ao_gpio_set(AO_RN_RST_N_PORT, AO_RN_RST_N_PIN, foo, 0);
+ ao_gpio_set(AO_RN_RST_N_PORT, AO_RN_RST_N_PIN, 0);
ao_delay(AO_MS_TO_TICKS(100));
/* Reboot the RN4678 and wait for it to start talking */
ao_rn_drain();
- ao_gpio_set(AO_RN_RST_N_PORT, AO_RN_RST_N_PIN, foo, 1);
+ ao_gpio_set(AO_RN_RST_N_PORT, AO_RN_RST_N_PIN, 1);
status = ao_rn_wait_for(AO_RN_REBOOT_TIMEOUT, AO_RN_REBOOT_MSG);
if (status != AO_RN_OK) {
ao_rn_dbg("reboot failed\n");
@@ -468,7 +468,7 @@ ao_rn(void)
if (status != AO_RN_OK)
ao_bt_panic(4);
- ao_gpio_set(AO_RN_CMD_PORT, AO_RN_CMD_PIN, foo, AO_RN_CMD_DATA);
+ ao_gpio_set(AO_RN_CMD_PORT, AO_RN_CMD_PIN, AO_RN_CMD_DATA);
/* Wait for the hardware to finish sending messages, then clear the queue */
ao_delay(AO_MS_TO_TICKS(200));
@@ -530,16 +530,16 @@ ao_rn_factory(void)
*/
/* Select our target output pin */
- ao_enable_output(AO_RN_P3_1_PORT, AO_RN_P3_1_PIN, foo, v);
+ ao_enable_output(AO_RN_P3_1_PORT, AO_RN_P3_1_PIN, v);
/* Turn off the BT device using the SW_BTN pin */
printf("Power down BT\n"); flush();
- ao_gpio_set(AO_RN_SW_BTN_PORT, AO_RN_SW_BTN_PIN, foo, 0);
+ ao_gpio_set(AO_RN_SW_BTN_PORT, AO_RN_SW_BTN_PIN, 0);
ao_delay(AO_MS_TO_TICKS(1000));
/* And turn it back on */
printf("Power up BT\n"); flush();
- ao_gpio_set(AO_RN_SW_BTN_PORT, AO_RN_SW_BTN_PIN, foo, 1);
+ ao_gpio_set(AO_RN_SW_BTN_PORT, AO_RN_SW_BTN_PIN, 1);
/* Right after power on, poke P3_1 five times to force a
* factory reset
@@ -547,7 +547,7 @@ ao_rn_factory(void)
for (i = 0; i < 20; i++) {
v = 1-v;
ao_delay(AO_MS_TO_TICKS(50));
- ao_gpio_set(AO_RN_P3_1_PORT, AO_RN_P3_1_PIN, foo, v);
+ ao_gpio_set(AO_RN_P3_1_PORT, AO_RN_P3_1_PIN, v);
ao_led_toggle(AO_BT_LED);
}
@@ -556,9 +556,9 @@ ao_rn_factory(void)
printf("Reboot BT\n"); flush();
ao_delay(AO_MS_TO_TICKS(100));
- ao_gpio_set(AO_RN_RST_N_PORT, AO_RN_RST_N_PIN, foo, 0);
+ ao_gpio_set(AO_RN_RST_N_PORT, AO_RN_RST_N_PIN, 0);
ao_delay(AO_MS_TO_TICKS(100));
- ao_gpio_set(AO_RN_RST_N_PORT, AO_RN_RST_N_PIN, foo, 1);
+ ao_gpio_set(AO_RN_RST_N_PORT, AO_RN_RST_N_PIN, 1);
}
#if AO_RN_DEBUG
@@ -588,13 +588,13 @@ ao_rn4678_init(void)
ao_serial_rn_set_speed(AO_SERIAL_SPEED_115200);
/* Reset line */
- ao_enable_output(AO_RN_RST_N_PORT, AO_RN_RST_N_PIN, foo, 0);
+ ao_enable_output(AO_RN_RST_N_PORT, AO_RN_RST_N_PIN, 0);
/* SW_BTN */
- ao_enable_output(AO_RN_SW_BTN_PORT, AO_RN_SW_BTN_PIN, foo, 1);
+ ao_enable_output(AO_RN_SW_BTN_PORT, AO_RN_SW_BTN_PIN, 1);
/* P3_7 command/data selector */
- ao_enable_output(AO_RN_CMD_PORT, AO_RN_CMD_PIN, foo, AO_RN_CMD_CMD);
+ ao_enable_output(AO_RN_CMD_PORT, AO_RN_CMD_PIN, AO_RN_CMD_CMD);
ao_enable_input(AO_RN_CONNECTED_PORT, AO_RN_CONNECTED_PIN, AO_EXTI_MODE_PULL_NONE);
ao_exti_setup(AO_RN_CONNECTED_PORT, AO_RN_CONNECTED_PIN,
diff --git a/src/drivers/ao_sdcard.c b/src/drivers/ao_sdcard.c
index 45454000..9d36c397 100644
--- a/src/drivers/ao_sdcard.c
+++ b/src/drivers/ao_sdcard.c
@@ -34,8 +34,8 @@ extern uint8_t ao_radio_mutex;
#define ao_sdcard_send_fixed(d,l) ao_spi_send_fixed((d), (l), AO_SDCARD_SPI_BUS)
#define ao_sdcard_send(d,l) ao_spi_send((d), (l), AO_SDCARD_SPI_BUS)
#define ao_sdcard_recv(d,l) ao_spi_recv((d), (l), AO_SDCARD_SPI_BUS)
-#define ao_sdcard_select() ao_gpio_set(AO_SDCARD_SPI_CS_PORT,AO_SDCARD_SPI_CS_PIN,AO_SDCARD_SPI_CS,0)
-#define ao_sdcard_deselect() ao_gpio_set(AO_SDCARD_SPI_CS_PORT,AO_SDCARD_SPI_CS_PIN,AO_SDCARD_SPI_CS,1)
+#define ao_sdcard_select() ao_gpio_set(AO_SDCARD_SPI_CS_PORT,AO_SDCARD_SPI_CS_PIN,0)
+#define ao_sdcard_deselect() ao_gpio_set(AO_SDCARD_SPI_CS_PORT,AO_SDCARD_SPI_CS_PIN,1)
/* Include SD card commands */
#ifndef SDCARD_DEBUG
diff --git a/src/drivers/ao_trng_send.c b/src/drivers/ao_trng_send.c
index e8df4cea..adeed590 100644
--- a/src/drivers/ao_trng_send.c
+++ b/src/drivers/ao_trng_send.c
@@ -140,7 +140,7 @@ ao_trng_send(void)
usb_buf_id = ao_usb_alloc(buffer);
#ifdef AO_TRNG_ENABLE_PORT
- ao_gpio_set(AO_TRNG_ENABLE_PORT, AO_TRNG_ENABLE_BIT, AO_TRNG_ENABLE_PIN, 1);
+ ao_gpio_set(AO_TRNG_ENABLE_PORT, AO_TRNG_ENABLE_BIT, 1);
#endif
trng_power_time = ao_time();
@@ -211,7 +211,7 @@ static void ao_trng_suspend(void *arg)
{
(void) arg;
#ifdef AO_TRNG_ENABLE_PORT
- ao_gpio_set(AO_TRNG_ENABLE_PORT, AO_TRNG_ENABLE_BIT, AO_TRNG_ENABLE_PIN, 0);
+ ao_gpio_set(AO_TRNG_ENABLE_PORT, AO_TRNG_ENABLE_BIT, 0);
#endif
trng_running = false;
}
@@ -220,7 +220,7 @@ static void ao_trng_resume(void *arg)
{
(void) arg;
#ifdef AO_TRNG_ENABLE_PORT
- ao_gpio_set(AO_TRNG_ENABLE_PORT, AO_TRNG_ENABLE_BIT, AO_TRNG_ENABLE_PIN, 1);
+ ao_gpio_set(AO_TRNG_ENABLE_PORT, AO_TRNG_ENABLE_BIT, 1);
#endif
trng_power_time = ao_time();
}
@@ -236,7 +236,7 @@ void
ao_trng_send_init(void)
{
#ifdef AO_TRNG_ENABLE_PORT
- ao_enable_output(AO_TRNG_ENABLE_PORT, AO_TRNG_ENABLE_BIT, AO_TRNG_ENABLE_PIN, 0);
+ ao_enable_output(AO_TRNG_ENABLE_PORT, AO_TRNG_ENABLE_BIT, 0);
ao_power_register(&ao_trng_power);
#endif
ao_enable_input(AO_RAW_PORT, AO_RAW_BIT, AO_EXTI_MODE_PULL_UP);
diff --git a/src/drivers/ao_watchdog.c b/src/drivers/ao_watchdog.c
index 4d774c3a..612496bc 100644
--- a/src/drivers/ao_watchdog.c
+++ b/src/drivers/ao_watchdog.c
@@ -28,9 +28,9 @@ ao_watchdog(void)
ao_sleep(&ao_watchdog_enabled);
while (ao_watchdog_enabled) {
ao_delay(AO_WATCHDOG_INTERVAL);
- ao_gpio_set(AO_WATCHDOG_PORT, AO_WATCHDOG_BIT, AO_WATCHDOG_PIN, 1);
+ ao_gpio_set(AO_WATCHDOG_PORT, AO_WATCHDOG_BIT, 1);
ao_delay(1);
- ao_gpio_set(AO_WATCHDOG_PORT, AO_WATCHDOG_BIT, AO_WATCHDOG_PIN, 0);
+ ao_gpio_set(AO_WATCHDOG_PORT, AO_WATCHDOG_BIT, 0);
}
}
}
@@ -56,7 +56,7 @@ static struct ao_task watchdog_task;
void
ao_watchdog_init(void)
{
- ao_enable_output(AO_WATCHDOG_PORT, AO_WATCHDOG_BIT, AO_WATCHDOG, 0);
+ ao_enable_output(AO_WATCHDOG_PORT, AO_WATCHDOG_BIT, 0);
ao_cmd_register(&ao_watchdog_cmds[0]);
ao_add_task(&watchdog_task, ao_watchdog, "watchdog");
}