AP_HAL: added inversion options

This commit is contained in:
Andrew Tridgell 2018-11-10 20:45:12 +11:00
parent ac3b0a98ab
commit 37fc6e8b1c

View File

@ -44,7 +44,15 @@ public:
// write to a locked port. If port is locked and key is not correct then 0 is returned
// and write is discarded
virtual size_t write_locked(const uint8_t *buffer, size_t size, uint32_t key) { return 0; }
// control optional features
virtual bool set_options(uint8_t options) { return options==0; }
enum {
OPTION_RXINV=(1U<<0), // invert RX line
OPTION_TXINV=(1U<<1), // invert TX line
};
enum flow_control {
FLOW_CONTROL_DISABLE=0, FLOW_CONTROL_ENABLE=1, FLOW_CONTROL_AUTO=2
};