wm_ntp.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /**
  2. * @file wm_ntp.h
  3. *
  4. * @brief ntp module
  5. *
  6. * @author dave
  7. *
  8. * Copyright (c) 2015 Winner Microelectronics Co., Ltd.
  9. */
  10. #ifndef WM_NTP_H
  11. #define WM_NTP_H
  12. #include "wm_type_def.h"
  13. /**
  14. * @defgroup APP_APIs APP APIs
  15. * @brief APP APIs
  16. */
  17. /**
  18. * @addtogroup APP_APIs
  19. * @{
  20. */
  21. /**
  22. * @defgroup NTP_APIs NTP APIs
  23. * @brief NTP APIs
  24. */
  25. /**
  26. * @addtogroup NTP_APIs
  27. * @{
  28. */
  29. /**
  30. * @brief This function is used to get network time.
  31. *
  32. * @param None
  33. *
  34. * @retval time value
  35. *
  36. * @note None
  37. */
  38. u32 tls_ntp_client(void);
  39. /**
  40. * @brief This function is used to set ntp servers.
  41. *
  42. * @param[in] *ipaddr xxx.xxx.xxx.xxx
  43. * @param[in] server_no max num is three
  44. *
  45. * @retval WM_SUCCESS success
  46. * @retval WM_FAILED failed
  47. *
  48. * @note None
  49. */
  50. int tls_ntp_set_server(char *ipaddr, int server_no);
  51. /**
  52. * @brief This function is used to query params of the ntp servers
  53. *
  54. *
  55. * @retval WM_SUCCESS success
  56. * @retval WM_FAILED failed
  57. *
  58. * @note None
  59. */
  60. int tls_ntp_query_sntpcfg(void);
  61. /**
  62. * @}
  63. */
  64. /**
  65. * @}
  66. */
  67. #endif /* WM_NTP_H */