projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
drivers/ao_quadrature: Fix -Wconversion warnings
[fw/altos]
/
src
/
drivers
/
ao_rn4678.c
diff --git
a/src/drivers/ao_rn4678.c
b/src/drivers/ao_rn4678.c
index 4ace4b78595c1a4a00743675fbe459cf670b6aa9..3983dc941598ff6e584d1e53e8b688323e7a7dd5 100644
(file)
--- a/
src/drivers/ao_rn4678.c
+++ b/
src/drivers/ao_rn4678.c
@@
-116,7
+116,7
@@
static AO_TICK_TYPE ao_rn_buf_time;
* disabled due to a firmware bug. So, this code finds those in the
* input and strips them out.
*/
* disabled due to a firmware bug. So, this code finds those in the
* input and strips them out.
*/
-int
+
static
int
_ao_wrap_rn_pollchar(void)
{
int c = AO_READ_AGAIN;
_ao_wrap_rn_pollchar(void)
{
int c = AO_READ_AGAIN;
@@
-350,11
+350,10
@@
ao_bt_panic(int where)
{
int i;
for (;;) {
{
int i;
for (;;) {
- for (i = 0; i <
50
; i++) {
- ao_led_
toggle(AO_BT_LED
);
+ for (i = 0; i <
25
; i++) {
+ ao_led_
for(AO_BT_LED, AO_MS_TO_TICKS(10)
);
ao_delay(AO_MS_TO_TICKS(10));
}
ao_delay(AO_MS_TO_TICKS(10));
}
- ao_led_off(AO_BT_LED);
ao_delay(AO_MS_TO_TICKS(500));
for (i = 0; i < where; i++) {
ao_led_for(AO_BT_LED, AO_MS_TO_TICKS(200));
ao_delay(AO_MS_TO_TICKS(500));
for (i = 0; i < where; i++) {
ao_led_for(AO_BT_LED, AO_MS_TO_TICKS(200));
@@
-368,7
+367,7
@@
static uint8_t ao_rn_stdio;
/*
* Set the stdio echo for the bluetooth link
*/
/*
* Set the stdio echo for the bluetooth link
*/
-void
+
static
void
ao_rn_echo(uint8_t echo)
{
ao_stdios[ao_rn_stdio].echo = echo;
ao_rn_echo(uint8_t echo)
{
ao_stdios[ao_rn_stdio].echo = echo;
@@
-548,7
+547,10
@@
ao_rn_factory(void)
v = 1-v;
ao_delay(AO_MS_TO_TICKS(50));
ao_gpio_set(AO_RN_P3_1_PORT, AO_RN_P3_1_PIN, v);
v = 1-v;
ao_delay(AO_MS_TO_TICKS(50));
ao_gpio_set(AO_RN_P3_1_PORT, AO_RN_P3_1_PIN, v);
- ao_led_toggle(AO_BT_LED);
+ if (v)
+ ao_led_on(AO_BT_LED);
+ else
+ ao_led_off(AO_BT_LED);
}
/* And let P3_1 float again */
}
/* And let P3_1 float again */