2012-12-14 21:55:38 -04:00
|
|
|
|
|
|
|
#include "SPIDriver.h"
|
|
|
|
|
|
|
|
using namespace Empty;
|
|
|
|
|
2012-12-17 15:07:26 -04:00
|
|
|
EmptySPIDeviceDriver::EmptySPIDeviceDriver()
|
|
|
|
{}
|
|
|
|
|
|
|
|
void EmptySPIDeviceDriver::init()
|
|
|
|
{}
|
|
|
|
|
|
|
|
AP_HAL::Semaphore* EmptySPIDeviceDriver::get_semaphore()
|
|
|
|
{
|
|
|
|
return &_semaphore;
|
|
|
|
}
|
|
|
|
|
2015-08-19 12:42:30 -03:00
|
|
|
bool EmptySPIDeviceDriver::transaction(const uint8_t *tx, uint8_t *rx, uint16_t len)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
2012-12-17 21:12:15 -04:00
|
|
|
|
|
|
|
|
2012-12-17 15:07:26 -04:00
|
|
|
void EmptySPIDeviceDriver::cs_assert()
|
|
|
|
{}
|
|
|
|
|
|
|
|
void EmptySPIDeviceDriver::cs_release()
|
|
|
|
{}
|
|
|
|
|
|
|
|
uint8_t EmptySPIDeviceDriver::transfer (uint8_t data)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2013-01-12 07:13:23 -04:00
|
|
|
void EmptySPIDeviceDriver::transfer (const uint8_t *data, uint16_t len)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2012-12-17 15:07:26 -04:00
|
|
|
EmptySPIDeviceManager::EmptySPIDeviceManager()
|
|
|
|
{}
|
|
|
|
|
|
|
|
void EmptySPIDeviceManager::init(void *)
|
|
|
|
{}
|
|
|
|
|
2015-09-14 15:47:07 -03:00
|
|
|
AP_HAL::SPIDeviceDriver* EmptySPIDeviceManager::device(enum AP_HAL::SPIDevice, uint8_t index)
|
2012-12-17 15:07:26 -04:00
|
|
|
{
|
|
|
|
return &_device;
|
|
|
|
}
|
2012-12-14 21:55:38 -04:00
|
|
|
|