AP_HAL_FLYMAPLE: SPI: adapt to the new signature of transaction()

A default behaviour was added here.
This commit is contained in:
Gustavo Jose de Sousa 2015-08-19 12:43:14 -03:00 committed by Andrew Tridgell
parent 4e27d19107
commit 458f587656
2 changed files with 3 additions and 2 deletions

View File

@ -48,7 +48,7 @@ AP_HAL::Semaphore* FLYMAPLESPIDeviceDriver::get_semaphore()
return &_semaphore;
}
void FLYMAPLESPIDeviceDriver::transaction(const uint8_t *tx, uint8_t *rx, uint16_t len)
bool FLYMAPLESPIDeviceDriver::transaction(const uint8_t *tx, uint8_t *rx, uint16_t len)
{
cs_assert();
if (rx == NULL) {
@ -61,6 +61,7 @@ void FLYMAPLESPIDeviceDriver::transaction(const uint8_t *tx, uint8_t *rx, uint16
}
}
cs_release();
return true;
}

View File

@ -29,7 +29,7 @@ public:
FLYMAPLESPIDeviceDriver();
void init();
AP_HAL::Semaphore* get_semaphore();
void transaction(const uint8_t *tx, uint8_t *rx, uint16_t len);
bool transaction(const uint8_t *tx, uint8_t *rx, uint16_t len);
void cs_assert();
void cs_release();