AP_HAL_Namespace.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #pragma once
  2. #include "string.h"
  3. #include "utility/functor.h"
  4. namespace AP_HAL {
  5. /* Toplevel pure virtual class Hal.*/
  6. class HAL;
  7. /* Toplevel class names for drivers: */
  8. class UARTDriver;
  9. class I2CDevice;
  10. class I2CDeviceManager;
  11. class Device;
  12. class SPIDevice;
  13. class SPIDeviceDriver;
  14. class SPIDeviceManager;
  15. class AnalogSource;
  16. class AnalogIn;
  17. class Storage;
  18. class DigitalSource;
  19. class GPIO;
  20. class RCInput;
  21. class RCOutput;
  22. class Scheduler;
  23. class Semaphore;
  24. class OpticalFlow;
  25. class CANProtocol;
  26. class CANManager;
  27. class CAN;
  28. class Util;
  29. class Flash;
  30. /* Utility Classes */
  31. class Print;
  32. class Stream;
  33. class BetterStream;
  34. /* Typdefs for function pointers (Procedure, Member Procedure)
  35. For member functions we use the FastDelegate delegates class
  36. which allows us to encapculate a member function as a type
  37. */
  38. typedef void(*Proc)(void);
  39. FUNCTOR_TYPEDEF(MemberProc, void);
  40. /**
  41. * Global names for all of the existing SPI devices on all platforms.
  42. */
  43. enum SPIDeviceType {
  44. // Devices using AP_HAL::SPIDevice abstraction
  45. SPIDevice_Type = -1,
  46. };
  47. // Must be implemented by the concrete HALs.
  48. const HAL& get_HAL();
  49. }