2012-12-14 21:55:38 -04:00
|
|
|
|
|
|
|
#include "SPIDriver.h"
|
|
|
|
|
|
|
|
using namespace Empty;
|
|
|
|
|
2015-12-07 14:53:55 -04:00
|
|
|
SPIDeviceDriver::SPIDeviceDriver()
|
2012-12-17 15:07:26 -04:00
|
|
|
{}
|
|
|
|
|
2015-12-07 14:53:55 -04:00
|
|
|
void SPIDeviceDriver::init()
|
2012-12-17 15:07:26 -04:00
|
|
|
{}
|
|
|
|
|
2015-12-07 14:53:55 -04:00
|
|
|
AP_HAL::Semaphore* SPIDeviceDriver::get_semaphore()
|
2012-12-17 15:07:26 -04:00
|
|
|
{
|
|
|
|
return &_semaphore;
|
|
|
|
}
|
|
|
|
|
2015-12-07 14:53:55 -04:00
|
|
|
bool SPIDeviceDriver::transaction(const uint8_t *tx, uint8_t *rx, uint16_t len)
|
2015-08-19 12:42:30 -03:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
2012-12-17 21:12:15 -04:00
|
|
|
|
|
|
|
|
2015-12-07 14:53:55 -04:00
|
|
|
void SPIDeviceDriver::cs_assert()
|
2012-12-17 15:07:26 -04:00
|
|
|
{}
|
|
|
|
|
2015-12-07 14:53:55 -04:00
|
|
|
void SPIDeviceDriver::cs_release()
|
2012-12-17 15:07:26 -04:00
|
|
|
{}
|
|
|
|
|
2015-12-07 14:53:55 -04:00
|
|
|
uint8_t SPIDeviceDriver::transfer (uint8_t data)
|
2012-12-17 15:07:26 -04:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-12-07 14:53:55 -04:00
|
|
|
void SPIDeviceDriver::transfer (const uint8_t *data, uint16_t len)
|
2013-01-12 07:13:23 -04:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2015-12-07 14:53:55 -04:00
|
|
|
SPIDeviceManager::SPIDeviceManager()
|
2012-12-17 15:07:26 -04:00
|
|
|
{}
|
|
|
|
|
2015-12-07 14:53:55 -04:00
|
|
|
void SPIDeviceManager::init()
|
2012-12-17 15:07:26 -04:00
|
|
|
{}
|
|
|
|
|
2015-12-07 14:53:55 -04:00
|
|
|
AP_HAL::SPIDeviceDriver* SPIDeviceManager::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
|
|
|
|