Util_RPI.h 401 B

1234567891011121314151617181920212223242526
  1. #pragma once
  2. #include "Util.h"
  3. namespace Linux {
  4. class UtilRPI : public Util {
  5. public:
  6. UtilRPI();
  7. static UtilRPI *from(AP_HAL::Util *util) {
  8. return static_cast<UtilRPI*>(util);
  9. }
  10. /* return the Raspberry Pi version */
  11. int get_rpi_version() const;
  12. protected:
  13. // Called in the constructor once
  14. int _check_rpi_version();
  15. private:
  16. int _rpi_version = 0;
  17. };
  18. }