NvmCtxMgmt.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*!
  2. * \file NvmCtxMgmt.h
  3. *
  4. * \brief NVM context management implementation
  5. *
  6. * \copyright Revised BSD License, see section \ref LICENSE.
  7. *
  8. * \code
  9. * ______ _
  10. * / _____) _ | |
  11. * ( (____ _____ ____ _| |_ _____ ____| |__
  12. * \____ \| ___ | (_ _) ___ |/ ___) _ \
  13. * _____) ) ____| | | || |_| ____( (___| | | |
  14. * (______/|_____)_|_|_| \__)_____)\____)_| |_|
  15. * (C)2013-2017 Semtech
  16. *
  17. * ___ _____ _ ___ _ _____ ___ ___ ___ ___
  18. * / __|_ _/_\ / __| |/ / __/ _ \| _ \/ __| __|
  19. * \__ \ | |/ _ \ (__| ' <| _| (_) | / (__| _|
  20. * |___/ |_/_/ \_\___|_|\_\_| \___/|_|_\\___|___|
  21. * embedded.connectivity.solutions===============
  22. *
  23. * \endcode
  24. *
  25. * \author Miguel Luis ( Semtech )
  26. *
  27. * \author Gregory Cristian ( Semtech )
  28. *
  29. * \author Daniel Jaeckle ( STACKFORCE )
  30. *
  31. * \author Johannes Bruder ( STACKFORCE )
  32. *
  33. * \defgroup NVMCTXMGMT NVM context management implementation
  34. * This module implements the NVM context handling
  35. * \{
  36. */
  37. #ifndef __NVMCTXMGMT_H__
  38. #define __NVMCTXMGMT_H__
  39. #include "LoRaMac.h"
  40. /*!
  41. * Data structure containing the status of a operation
  42. */
  43. typedef enum NvmCtxMgmtStatus_e
  44. {
  45. /*!
  46. * Operation was successful
  47. */
  48. NVMCTXMGMT_STATUS_SUCCESS,
  49. /*!
  50. * Operation was not successful
  51. */
  52. NVMCTXMGMT_STATUS_FAIL
  53. }NvmCtxMgmtStatus_t;
  54. /*!
  55. * \brief Calculates the next datarate to set, when ADR is on or off.
  56. *
  57. * \param [IN] adrNext Pointer to the function parameters.
  58. *
  59. */
  60. void NvmCtxMgmtEvent( LoRaMacNvmCtxModule_t module );
  61. NvmCtxMgmtStatus_t NvmCtxMgmtStore( void );
  62. NvmCtxMgmtStatus_t NvmCtxMgmtRestore(void );
  63. #endif // __NVMCTXMGMT_H__