tile_tmd_module.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /**
  2. * NOTICE
  3. *
  4. * Copyright 2020 Tile Inc. All Rights Reserved.
  5. * All code or other information included in the accompanying files ("Tile Source Material")
  6. * is PROPRIETARY information of Tile Inc. ("Tile") and access and use of the Tile Source Material
  7. * is subject to these terms. The Tile Source Material may only be used for demonstration purposes,
  8. * and may not be otherwise distributed or made available to others, including for commercial purposes.
  9. * Without limiting the foregoing , you understand and agree that no production use
  10. * of the Tile Source Material is allowed without a Tile ID properly obtained under a separate
  11. * agreement with Tile.
  12. * You also understand and agree that Tile may terminate the limited rights granted under these terms
  13. * at any time in its discretion.
  14. * All Tile Source Material is provided AS-IS without warranty of any kind.
  15. * Tile does not warrant that the Tile Source Material will be error-free or fit for your purposes.
  16. * Tile will not be liable for any damages resulting from your use of or inability to use
  17. * the Tile Source Material.
  18. *
  19. * Support: firmware_support@tile.com
  20. */
  21. /** @file tile_tmd_module.h
  22. ** @brief Tile Mode module interface. Controls Tile Mode.
  23. */
  24. #ifndef TILE_TMD_MODULE_H_
  25. #define TILE_TMD_MODULE_H_
  26. #include <stdint.h>
  27. /** \defgroup TMD Tile mode
  28. * \ingroup TOA
  29. * @{
  30. */
  31. /**
  32. * @brief TILE_MODE <br>
  33. */
  34. enum TILE_MODE
  35. {
  36. TILE_MODE_MANUFACTURING = 0x0,
  37. TILE_MODE_SHIPPING = 0x1,
  38. TILE_MODE_ACTIVATED = 0x2
  39. };
  40. /** @} */
  41. /**
  42. * Tile Mode module.
  43. *
  44. * This module is used by Tile Lib to get and set the mode.
  45. */
  46. struct tile_tmd_module
  47. {
  48. /**
  49. * Get the current mode
  50. */
  51. int (*get)(uint8_t *mode);
  52. /**
  53. * Set the mode. Value should be saved in NVM.
  54. */
  55. int (*set)(uint8_t mode);
  56. };
  57. /**
  58. * Register the TMD module
  59. */
  60. int tile_tmd_register(struct tile_tmd_module *module);
  61. #endif