api-hal-version.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. /** Get pointer to target device name */
  26. const char* api_hal_version_get_device_name_ptr();
  27. /** Get pointer to target ble local device name */
  28. const char* api_hal_version_get_ble_local_device_name_ptr();
  29. /**
  30. * Get address of version structure of bootloader, stored in chip flash.
  31. *
  32. * @return Address of boot version structure.
  33. */
  34. const struct Version* api_hal_version_get_boot_version(void);
  35. /**
  36. * Get address of version structure of firmware.
  37. *
  38. * @return Address of firmware version structure.
  39. */
  40. const struct Version* api_hal_version_get_fw_version(void);
  41. #ifdef __cplusplus
  42. }
  43. #endif