api-hal-version.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #pragma once
  2. #include <stdbool.h>
  3. #include <stdint.h>
  4. #include <string.h>
  5. #include <version.h>
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9. /** Init flipper version */
  10. void api_hal_version_init();
  11. /** Check target firmware version */
  12. bool api_hal_version_do_i_belong_here();
  13. /** Get hardware version */
  14. const uint8_t api_hal_version_get_hw_version();
  15. /** Get hardware target */
  16. const uint8_t api_hal_version_get_hw_target();
  17. /** Get hardware body */
  18. const uint8_t api_hal_version_get_hw_body();
  19. /** Get hardware connect */
  20. const uint8_t api_hal_version_get_hw_connect();
  21. /** Get hardware timestamp */
  22. const uint32_t api_hal_version_get_hw_timestamp();
  23. /** Get pointer to target name */
  24. const char * api_hal_version_get_name_ptr();
  25. /**
  26. * Get address of version structure of bootloader, stored in chip flash.
  27. *
  28. * @return Address of boot version structure.
  29. */
  30. const struct Version* api_hal_version_get_boot_version(void);
  31. /**
  32. * Get address of version structure of firmware.
  33. *
  34. * @return Address of firmware version structure.
  35. */
  36. const struct Version* api_hal_version_get_fw_version(void);
  37. #ifdef __cplusplus
  38. }
  39. #endif