api-hal-version.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. /** Check target firmware version */
  10. bool api_hal_version_do_i_belong_here();
  11. /** Get hardware version */
  12. const uint8_t api_hal_version_get_hw_version();
  13. /** Get hardware target */
  14. const uint8_t api_hal_version_get_hw_target();
  15. /** Get hardware body */
  16. const uint8_t api_hal_version_get_hw_body();
  17. /** Get hardware connect */
  18. const uint8_t api_hal_version_get_hw_connect();
  19. /** Get hardware timestamp */
  20. const uint32_t api_hal_version_get_hw_timestamp();
  21. /** Get pointer to target name */
  22. const char * api_hal_version_get_name_ptr();
  23. /**
  24. * Get address of version structure of bootloader, stored in chip flash.
  25. *
  26. * @return Address of boot version structure.
  27. */
  28. const struct Version* api_hal_version_get_boot_version(void);
  29. /**
  30. * Get address of version structure of firmware.
  31. *
  32. * @return Address of firmware version structure.
  33. */
  34. const struct Version* api_hal_version_get_fw_version(void);
  35. #ifdef __cplusplus
  36. }
  37. #endif