osclock.c 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /* ----> DO NOT REMOVE THE FOLLOWING NOTICE <----
  2. Copyright (c) 2014-2017 Datalight, Inc.
  3. All Rights Reserved Worldwide.
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; use version 2 of the License.
  7. This program is distributed in the hope that it will be useful,
  8. but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty
  9. of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License along
  12. with this program; if not, write to the Free Software Foundation, Inc.,
  13. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  14. */
  15. /* Businesses and individuals that for commercial or other reasons cannot
  16. comply with the terms of the GPLv2 license may obtain a commercial license
  17. before incorporating Reliance Edge into proprietary software for
  18. distribution in any form. Visit http://www.datalight.com/reliance-edge for
  19. more information.
  20. */
  21. /** @file
  22. @brief Implements real-time clock functions.
  23. */
  24. #include "hal.h"
  25. #if (HAL_USE_SDMMC == TRUE)
  26. #include "sama_sdmmc_lld.h"
  27. #if SDMMC_USE_RELEDGE_LIB == 1
  28. #include <redfs.h>
  29. /** @brief Initialize the real time clock.
  30. The behavior of calling this function when the RTC is already initialized
  31. is undefined.
  32. @return A negated ::REDSTATUS code indicating the operation result.
  33. @retval 0 Operation was successful.
  34. */
  35. REDSTATUS RedOsClockInit(void)
  36. {
  37. return 0;
  38. }
  39. /** @brief Uninitialize the real time clock.
  40. The behavior of calling this function when the RTC is not initialized is
  41. undefined.
  42. @return A negated ::REDSTATUS code indicating the operation result.
  43. @retval 0 Operation was successful.
  44. */
  45. REDSTATUS RedOsClockUninit(void)
  46. {
  47. return 0;
  48. }
  49. /** @brief Get the date/time.
  50. The behavior of calling this function when the RTC is not initialized is
  51. undefined.
  52. @return The number of seconds since January 1, 1970 excluding leap seconds
  53. (in other words, standard Unix time). If the resolution or epoch
  54. of the RTC is different than this, the implementation must convert
  55. it to the expected representation.
  56. */
  57. uint32_t RedOsClockGetTime(void)
  58. {
  59. /* FreeRTOS does not provide an RTC abstraction since most of the systems
  60. it targets have no RTC hardware. If your hardware includes an RTC that
  61. you would like to use, this function must be customized.
  62. */
  63. return 0;
  64. }
  65. #endif
  66. #endif