summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/ao_cc1120.c4
-rw-r--r--src/drivers/ao_companion.c4
-rw-r--r--src/drivers/ao_event.c2
-rw-r--r--src/drivers/ao_event.h2
-rw-r--r--src/drivers/ao_lco_cmd.c1
-rw-r--r--src/drivers/ao_lco_func.c1
-rw-r--r--src/drivers/ao_mpu6000.c16
7 files changed, 14 insertions, 16 deletions
diff --git a/src/drivers/ao_cc1120.c b/src/drivers/ao_cc1120.c
index 3429768b..31225939 100644
--- a/src/drivers/ao_cc1120.c
+++ b/src/drivers/ao_cc1120.c
@@ -509,7 +509,7 @@ static void
ao_radio_set_mode(uint16_t new_mode)
{
uint16_t changes;
- int i;
+ unsigned int i;
if (new_mode == ao_radio_mode)
return;
@@ -563,7 +563,7 @@ static uint8_t ao_radio_configured = 0;
static void
ao_radio_setup(void)
{
- int i;
+ unsigned int i;
ao_radio_strobe(CC1120_SRES);
diff --git a/src/drivers/ao_companion.c b/src/drivers/ao_companion.c
index 0f405253..570b9e40 100644
--- a/src/drivers/ao_companion.c
+++ b/src/drivers/ao_companion.c
@@ -67,8 +67,8 @@ ao_companion_get_setup(void)
ao_companion_send_command(AO_COMPANION_SETUP);
ao_spi_recv(&ao_companion_setup, sizeof (ao_companion_setup), AO_COMPANION_SPI_BUS);
COMPANION_DESELECT();
- return (ao_companion_setup.board_id ==
- (uint16_t) ~ao_companion_setup.board_id_inverse);
+ return ((int16_t) ao_companion_setup.board_id ==
+ (int16_t) (uint16_t) (~ao_companion_setup.board_id_inverse));
}
static void
diff --git a/src/drivers/ao_event.c b/src/drivers/ao_event.c
index c428125d..5c0d2863 100644
--- a/src/drivers/ao_event.c
+++ b/src/drivers/ao_event.c
@@ -30,7 +30,7 @@ uint8_t ao_event_queue_insert;
uint8_t ao_event_queue_remove;
-uint8_t
+void
ao_event_get(struct ao_event *ev)
{
ao_arch_critical(
diff --git a/src/drivers/ao_event.h b/src/drivers/ao_event.h
index ed9a7433..584a845a 100644
--- a/src/drivers/ao_event.h
+++ b/src/drivers/ao_event.h
@@ -29,7 +29,7 @@ struct ao_event {
int32_t value;
};
-uint8_t
+void
ao_event_get(struct ao_event *ev);
void
diff --git a/src/drivers/ao_lco_cmd.c b/src/drivers/ao_lco_cmd.c
index 9c35b324..acbf589a 100644
--- a/src/drivers/ao_lco_cmd.c
+++ b/src/drivers/ao_lco_cmd.c
@@ -119,7 +119,6 @@ lco_report_cmd(void) __reentrant
static void
lco_fire_cmd(void) __reentrant
{
- static __xdata struct ao_pad_command command;
uint8_t secs;
uint8_t i;
int8_t r;
diff --git a/src/drivers/ao_lco_func.c b/src/drivers/ao_lco_func.c
index 99e58b76..a5d28e61 100644
--- a/src/drivers/ao_lco_func.c
+++ b/src/drivers/ao_lco_func.c
@@ -26,7 +26,6 @@ static __xdata uint8_t ao_lco_mutex;
int8_t
ao_lco_query(uint16_t box, struct ao_pad_query *query, uint16_t *tick_offset)
{
- uint8_t i;
int8_t r;
uint16_t sent_time;
diff --git a/src/drivers/ao_mpu6000.c b/src/drivers/ao_mpu6000.c
index 0689d7a7..c0458027 100644
--- a/src/drivers/ao_mpu6000.c
+++ b/src/drivers/ao_mpu6000.c
@@ -132,7 +132,7 @@ ao_mpu6000_gyro(int16_t v)
#endif
static uint8_t
-ao_mpu6000_accel_check(int16_t normal, int16_t test, char *which)
+ao_mpu6000_accel_check(int16_t normal, int16_t test)
{
int16_t diff = test - normal;
@@ -146,7 +146,7 @@ ao_mpu6000_accel_check(int16_t normal, int16_t test, char *which)
}
static uint8_t
-ao_mpu6000_gyro_check(int16_t normal, int16_t test, char *which)
+ao_mpu6000_gyro_check(int16_t normal, int16_t test)
{
int16_t diff = test - normal;
@@ -292,13 +292,13 @@ _ao_mpu6000_setup(void)
ao_delay(AO_MS_TO_TICKS(200));
_ao_mpu6000_sample(&normal_mode);
- errors += ao_mpu6000_accel_check(normal_mode.accel_x, test_mode.accel_x, "x");
- errors += ao_mpu6000_accel_check(normal_mode.accel_y, test_mode.accel_y, "y");
- errors += ao_mpu6000_accel_check(normal_mode.accel_z, test_mode.accel_z, "z");
+ errors += ao_mpu6000_accel_check(normal_mode.accel_x, test_mode.accel_x);
+ errors += ao_mpu6000_accel_check(normal_mode.accel_y, test_mode.accel_y);
+ errors += ao_mpu6000_accel_check(normal_mode.accel_z, test_mode.accel_z);
- errors += ao_mpu6000_gyro_check(normal_mode.gyro_x, test_mode.gyro_x, "x");
- errors += ao_mpu6000_gyro_check(normal_mode.gyro_y, test_mode.gyro_y, "y");
- errors += ao_mpu6000_gyro_check(normal_mode.gyro_z, test_mode.gyro_z, "z");
+ errors += ao_mpu6000_gyro_check(normal_mode.gyro_x, test_mode.gyro_x);
+ errors += ao_mpu6000_gyro_check(normal_mode.gyro_y, test_mode.gyro_y);
+ errors += ao_mpu6000_gyro_check(normal_mode.gyro_z, test_mode.gyro_z);
if (!errors)
break;
}