More implementation for the serial side on IO; fix a couple of bugs on the FMU side.

Still needs serial init and some more testing/config on the FMU side, but closer to being ready to test.
This commit is contained in:
px4dev
2013-06-28 23:39:35 -07:00
parent 90c458cb61
commit d1562f926f
6 changed files with 109 additions and 81 deletions
+2 -16
View File
@@ -96,20 +96,6 @@ hx_tx_raw(hx_stream_t stream, uint8_t c)
stream->tx_error = true;
}
static void
hx_tx_byte(hx_stream_t stream, uint8_t c)
{
switch (c) {
case FBO:
case CEO:
hx_tx_raw(stream, CEO);
c ^= 0x20;
break;
}
hx_tx_raw(stream, c);
}
static int
hx_rx_frame(hx_stream_t stream)
{
@@ -281,12 +267,12 @@ hx_stream_send(hx_stream_t stream,
{
int result;
result = hx_start(stream, data, count);
result = hx_stream_start(stream, data, count);
if (result != OK)
return result;
int c;
while ((c = hx_send_next(stream)) >= 0)
while ((c = hx_stream_send_next(stream)) >= 0)
hx_tx_raw(stream, c);
/* check for transmit error */