2012-08-20 15:37:46 -03:00
|
|
|
|
|
|
|
#ifndef __AP_HAL_NAMESPACE_H__
|
|
|
|
#define __AP_HAL_NAMESPACE_H__
|
|
|
|
|
2013-09-30 04:00:26 -03:00
|
|
|
#include "string.h"
|
2015-05-24 18:43:22 -03:00
|
|
|
#include "utility/functor.h"
|
2015-05-24 19:39:23 -03:00
|
|
|
|
2012-08-20 15:37:46 -03:00
|
|
|
namespace AP_HAL {
|
|
|
|
|
|
|
|
/* Toplevel pure virtual class Hal.*/
|
|
|
|
class HAL;
|
|
|
|
|
|
|
|
/* Toplevel class names for drivers: */
|
|
|
|
class UARTDriver;
|
|
|
|
class I2CDriver;
|
2012-11-28 21:57:20 -04:00
|
|
|
|
|
|
|
class SPIDeviceDriver;
|
|
|
|
class SPIDeviceManager;
|
|
|
|
|
2012-09-10 23:05:02 -03:00
|
|
|
class AnalogSource;
|
2012-08-20 15:37:46 -03:00
|
|
|
class AnalogIn;
|
|
|
|
class Storage;
|
2012-10-02 01:55:52 -03:00
|
|
|
class DigitalSource;
|
2012-08-20 15:37:46 -03:00
|
|
|
class GPIO;
|
2012-08-27 15:44:50 -03:00
|
|
|
class RCInput;
|
|
|
|
class RCOutput;
|
2012-08-23 15:36:13 -03:00
|
|
|
class Scheduler;
|
2012-11-28 21:57:20 -04:00
|
|
|
class Semaphore;
|
2012-12-18 20:09:24 -04:00
|
|
|
|
|
|
|
class Util;
|
2012-08-20 15:37:46 -03:00
|
|
|
|
2012-08-20 20:54:01 -03:00
|
|
|
/* Utility Classes */
|
|
|
|
class Print;
|
|
|
|
class Stream;
|
|
|
|
class BetterStream;
|
2012-09-07 20:06:41 -03:00
|
|
|
|
2013-09-30 04:00:26 -03:00
|
|
|
/* Typdefs for function pointers (Procedure, Member Procedure)
|
|
|
|
|
|
|
|
For member functions we use the FastDelegate delegates class
|
|
|
|
which allows us to encapculate a member function as a type
|
|
|
|
*/
|
2012-09-07 20:06:41 -03:00
|
|
|
typedef void(*Proc)(void);
|
2015-05-24 20:24:11 -03:00
|
|
|
FUNCTOR_TYPEDEF(MemberProc, void);
|
2012-11-28 21:57:20 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Global names for all of the existing SPI devices on all platforms.
|
|
|
|
*/
|
|
|
|
|
|
|
|
enum SPIDevice {
|
2014-07-16 11:57:49 -03:00
|
|
|
SPIDevice_Dataflash = 0,
|
|
|
|
SPIDevice_ADS7844 = 1,
|
|
|
|
SPIDevice_MS5611 = 2,
|
|
|
|
SPIDevice_MPU6000 = 3,
|
|
|
|
SPIDevice_ADNS3080_SPI0 = 4,
|
|
|
|
SPIDevice_ADNS3080_SPI3 = 5,
|
|
|
|
SPIDevice_MPU9250 = 6,
|
|
|
|
SPIDevice_L3GD20 = 7,
|
2015-08-17 22:16:50 -03:00
|
|
|
SPIDevice_LSM303D = 8,
|
2014-07-26 19:31:11 -03:00
|
|
|
SPIDevice_LSM9DS0_AM = 9,
|
2014-11-05 09:10:53 -04:00
|
|
|
SPIDevice_LSM9DS0_G = 10,
|
2015-08-17 22:16:50 -03:00
|
|
|
SPIDevice_Ublox = 11,
|
|
|
|
SPIDevice_RASPIO = 12
|
2012-11-28 21:57:20 -04:00
|
|
|
};
|
|
|
|
|
2012-08-20 15:37:46 -03:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif // __AP_HAL_NAMESPACE_H__
|