mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
AP_HAL: SPIDevice: add fullduplex method
This method is needed when we want to transfer both tx and rx at the same time, as opposed to common cases for sensors in which they are like in the I2C interface: half-duplex.
This commit is contained in:
parent
7ded01cf24
commit
01452bf922
@ -39,6 +39,13 @@ public:
|
||||
virtual bool transfer(const uint8_t *send, uint32_t send_len,
|
||||
uint8_t *recv, uint32_t recv_len) override = 0;
|
||||
|
||||
/*
|
||||
* Like #transfer(), but both @send and @recv buffers are transmitted at
|
||||
* the same time: because of this they need to be of the same size.
|
||||
*/
|
||||
virtual bool transfer_fullduplex(const uint8_t *send, uint8_t *recv,
|
||||
uint32_t len) = 0;
|
||||
|
||||
/* See Device::get_semaphore() */
|
||||
virtual Semaphore *get_semaphore() override = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user