ardupilot/libraries/AP_HAL_Empty/SPIDriver.cpp
Lucas De Marchi 00f17466a8 AP_HAL_Empty: use init() method without arguments
Override the init() method from parent class that doesn't have a
parameter since it's not used here.
2015-12-02 14:49:11 -02:00

49 lines
777 B
C++

#include "SPIDriver.h"
using namespace Empty;
EmptySPIDeviceDriver::EmptySPIDeviceDriver()
{}
void EmptySPIDeviceDriver::init()
{}
AP_HAL::Semaphore* EmptySPIDeviceDriver::get_semaphore()
{
return &_semaphore;
}
bool EmptySPIDeviceDriver::transaction(const uint8_t *tx, uint8_t *rx, uint16_t len)
{
return true;
}
void EmptySPIDeviceDriver::cs_assert()
{}
void EmptySPIDeviceDriver::cs_release()
{}
uint8_t EmptySPIDeviceDriver::transfer (uint8_t data)
{
return 0;
}
void EmptySPIDeviceDriver::transfer (const uint8_t *data, uint16_t len)
{
}
EmptySPIDeviceManager::EmptySPIDeviceManager()
{}
void EmptySPIDeviceManager::init()
{}
AP_HAL::SPIDeviceDriver* EmptySPIDeviceManager::device(enum AP_HAL::SPIDevice, uint8_t index)
{
return &_device;
}