Add a test hook for the PX4IO interface. Wire up some simple tests for the serial interface.

Signal quality looks good at 1.5Mbps. Transmit timing is ~450µs per packet, ~20µs packet-to-packet delay spinning in a loop transmitting.
This commit is contained in:
px4dev
2013-07-03 23:41:40 -07:00
parent 03a15bfdc5
commit 7255c02c20
4 changed files with 225 additions and 143 deletions
+8
View File
@@ -69,6 +69,8 @@ public:
virtual bool ok();
virtual int test(unsigned mode);
private:
static const unsigned _retries = 2;
@@ -107,6 +109,12 @@ PX4IO_I2C::ok()
return true;
}
int
PX4IO_I2C::test(unsigned mode)
{
return 0;
}
int
PX4IO_I2C::set_reg(uint8_t page, uint8_t offset, const uint16_t *values, unsigned num_values)
{