2012-08-20 15:38:09 -03:00
|
|
|
|
2012-11-28 21:57:20 -04:00
|
|
|
#ifndef __AP_HAL_AVR_SPI_DRIVER_H__
|
|
|
|
#define __AP_HAL_AVR_SPI_DRIVER_H__
|
2012-08-20 15:38:09 -03:00
|
|
|
|
|
|
|
#include <AP_HAL.h>
|
2012-08-22 21:31:52 -03:00
|
|
|
#include "AP_HAL_AVR_Namespace.h"
|
2012-11-28 21:57:20 -04:00
|
|
|
#include "GPIO.h"
|
|
|
|
#include "SPIDevices.h"
|
2013-01-02 03:22:07 -04:00
|
|
|
#include "Semaphores.h"
|
2012-08-20 15:38:09 -03:00
|
|
|
|
2012-11-28 21:57:20 -04:00
|
|
|
class AP_HAL_AVR::APM1SPIDeviceManager : public AP_HAL::SPIDeviceManager {
|
2012-08-20 15:38:09 -03:00
|
|
|
public:
|
2012-08-30 20:25:35 -03:00
|
|
|
void init(void* machtnichts);
|
2012-11-28 21:57:20 -04:00
|
|
|
AP_HAL::SPIDeviceDriver* device(enum AP_HAL::SPIDevice d);
|
|
|
|
|
2012-08-20 15:38:09 -03:00
|
|
|
private:
|
2012-11-28 21:57:20 -04:00
|
|
|
AVRSPI0DeviceDriver* _dataflash;
|
|
|
|
AVRSPI0DeviceDriver* _optflow;
|
|
|
|
|
|
|
|
AVRSPI2DeviceDriver* _adc;
|
|
|
|
};
|
|
|
|
|
|
|
|
class AP_HAL_AVR::APM2SPIDeviceManager : public AP_HAL::SPIDeviceManager {
|
|
|
|
public:
|
|
|
|
void init(void* machtnichts);
|
|
|
|
AP_HAL::SPIDeviceDriver* device(enum AP_HAL::SPIDevice d);
|
|
|
|
|
|
|
|
private:
|
|
|
|
AVRSPI0DeviceDriver* _mpu6k;
|
|
|
|
AVRSPI0DeviceDriver* _ms5611;
|
|
|
|
AVRSPI0DeviceDriver* _optflow_spi0;
|
|
|
|
|
|
|
|
AVRSPI3DeviceDriver* _dataflash;
|
|
|
|
AVRSPI3DeviceDriver* _optflow_spi3;
|
2012-08-20 15:38:09 -03:00
|
|
|
};
|
|
|
|
|
2012-11-28 21:57:20 -04:00
|
|
|
#endif // __AP_HAL_AVR_SPI_DRIVER_H__
|
2012-08-20 15:38:09 -03:00
|
|
|
|