2016-02-17 21:25:25 -04:00
|
|
|
#pragma once
|
2012-08-20 15:37:46 -03:00
|
|
|
|
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;
|
2015-11-22 19:34:49 -04:00
|
|
|
class I2CDevice;
|
|
|
|
class I2CDeviceManager;
|
2015-11-30 15:53:30 -04:00
|
|
|
class Device;
|
2012-11-28 21:57:20 -04:00
|
|
|
|
2015-12-07 13:03:18 -04:00
|
|
|
class SPIDevice;
|
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;
|
2015-11-23 14:45:20 -04:00
|
|
|
class OpticalFlow;
|
2016-06-06 11:01:55 -03:00
|
|
|
|
2018-02-27 19:53:37 -04:00
|
|
|
class CANProtocol;
|
2017-04-02 11:54:31 -03:00
|
|
|
class CANManager;
|
|
|
|
class CAN;
|
|
|
|
|
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
|
|
|
|
2016-06-06 11:01:55 -03:00
|
|
|
/* Typdefs for function pointers (Procedure, Member Procedure)
|
2013-09-30 04:00:26 -03:00
|
|
|
|
|
|
|
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.
|
|
|
|
*/
|
|
|
|
|
2015-12-07 12:19:26 -04:00
|
|
|
enum SPIDeviceType {
|
2016-07-21 13:29:21 -03:00
|
|
|
// Devices using AP_HAL::SPIDevice abstraction
|
|
|
|
SPIDevice_Type = -1,
|
2012-11-28 21:57:20 -04:00
|
|
|
};
|
|
|
|
|
2015-10-16 17:22:11 -03:00
|
|
|
// Must be implemented by the concrete HALs.
|
|
|
|
const HAL& get_HAL();
|
2012-08-20 15:37:46 -03:00
|
|
|
}
|