api-hal-version.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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 model name */
  14. const char* api_hal_version_get_model_name();
  15. /** Get hardware version */
  16. const uint8_t api_hal_version_get_hw_version();
  17. /** Get hardware target */
  18. const uint8_t api_hal_version_get_hw_target();
  19. /** Get hardware body */
  20. const uint8_t api_hal_version_get_hw_body();
  21. /** Get hardware body color */
  22. const uint8_t api_hal_version_get_hw_color();
  23. /** Get hardware connect */
  24. const uint8_t api_hal_version_get_hw_connect();
  25. /** Get hardware region */
  26. const uint8_t api_hal_version_get_hw_region();
  27. /** Get hardware timestamp */
  28. const uint32_t api_hal_version_get_hw_timestamp();
  29. /** Get pointer to target name */
  30. const char* api_hal_version_get_name_ptr();
  31. /** Get pointer to target device name */
  32. const char* api_hal_version_get_device_name_ptr();
  33. /** Get pointer to target ble local device name */
  34. const char* api_hal_version_get_ble_local_device_name_ptr();
  35. const uint8_t* api_hal_version_get_ble_mac();
  36. /**
  37. * Get address of version structure of bootloader, stored in chip flash.
  38. *
  39. * @return Address of boot version structure.
  40. */
  41. const struct Version* api_hal_version_get_boot_version(void);
  42. /**
  43. * Get address of version structure of firmware.
  44. *
  45. * @return Address of firmware version structure.
  46. */
  47. const struct Version* api_hal_version_get_firmware_version(void);
  48. /** Get platform UID size in bytes */
  49. size_t api_hal_version_uid_size();
  50. /** Get const pointer to UID */
  51. const uint8_t* api_hal_version_uid();
  52. #ifdef __cplusplus
  53. }
  54. #endif