X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fdrivers%2Fao_trng_send.c;h=adeed59028f5991e1d08e62c319affbc6e790ffc;hb=6b0754cee625c6e2c19dc70fb5be6cd2f0125d47;hp=4e02c0ce75d8c1bd04f68b3527c9e9e6dee42624;hpb=ee79a205e118ea8730a02cc327d8fb79cc5f74ff;p=fw%2Faltos diff --git a/src/drivers/ao_trng_send.c b/src/drivers/ao_trng_send.c index 4e02c0ce..adeed590 100644 --- a/src/drivers/ao_trng_send.c +++ b/src/drivers/ao_trng_send.c @@ -48,7 +48,7 @@ ao_trng_start(void) * aren't of poor quality */ ao_delay(delay); - trng_running = TRUE; + trng_running = true; } ao_mutex_put(&random_mutex); } @@ -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,16 +211,16 @@ 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; + trng_running = false; } 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);