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;
|
2020-09-01 02:25:44 -03:00
|
|
|
class PWMSource;
|
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;
|
2020-05-31 09:09:21 -03:00
|
|
|
class EventHandle;
|
|
|
|
class EventSource;
|
2012-11-28 21:57:20 -04:00
|
|
|
class Semaphore;
|
2015-11-23 14:45:20 -04:00
|
|
|
class OpticalFlow;
|
2019-08-09 13:04:00 -03:00
|
|
|
class DSP;
|
2016-06-06 11:01:55 -03:00
|
|
|
|
2021-05-29 16:48:41 -03:00
|
|
|
class QSPIDevice;
|
|
|
|
class QSPIDeviceDriver;
|
|
|
|
class QSPIDeviceManager;
|
|
|
|
|
2020-05-31 09:12:02 -03:00
|
|
|
class CANIface;
|
|
|
|
class CANFrame;
|
2017-04-02 11:54:31 -03:00
|
|
|
|
2012-12-18 20:09:24 -04:00
|
|
|
class Util;
|
2019-03-25 21:13:39 -03:00
|
|
|
class Flash;
|
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
|
|
|
};
|
|
|
|
|
2021-10-29 22:15:48 -03:00
|
|
|
class SIMState;
|
|
|
|
|
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
|
|
|
}
|