IO firmware: Warning / bug fixes

This commit is contained in:
Lorenz Meier 2014-06-30 12:21:23 +02:00
parent a66f88b29a
commit 751f8462f6
2 changed files with 6 additions and 2 deletions

View File

@ -331,6 +331,7 @@ i2c_tx_complete(void)
i2c_tx_setup(); i2c_tx_setup();
} }
#ifdef DEBUG
static void static void
i2c_dump(void) i2c_dump(void)
{ {
@ -339,3 +340,4 @@ i2c_dump(void)
debug("CCR 0x%08x TRISE 0x%08x", rCCR, rTRISE); debug("CCR 0x%08x TRISE 0x%08x", rCCR, rTRISE);
debug("SR1 0x%08x SR2 0x%08x", rSR1, rSR2); debug("SR1 0x%08x SR2 0x%08x", rSR1, rSR2);
} }
#endif

View File

@ -119,13 +119,15 @@ sbus_init(const char *device)
bool bool
sbus1_output(uint16_t *values, uint16_t num_values) sbus1_output(uint16_t *values, uint16_t num_values)
{ {
write(sbus_fd, 'A', 1); char a = 'A';
write(sbus_fd, &a, 1);
} }
bool bool
sbus2_output(uint16_t *values, uint16_t num_values) sbus2_output(uint16_t *values, uint16_t num_values)
{ {
write(sbus_fd, 'B', 1); char b = 'B';
write(sbus_fd, &b, 1);
} }
bool bool