hal_st_lld.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. /*
  2. ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. /**
  14. * @file hal_st_lld.h
  15. * @brief PLATFORM ST subsystem low level driver header.
  16. * @details This header is designed to be include-able without having to
  17. * include other files from the HAL.
  18. *
  19. * @addtogroup ST
  20. * @{
  21. */
  22. #ifndef HAL_ST_LLD_H
  23. #define HAL_ST_LLD_H
  24. /*===========================================================================*/
  25. /* Driver constants. */
  26. /*===========================================================================*/
  27. /*===========================================================================*/
  28. /* Driver pre-compile time settings. */
  29. /*===========================================================================*/
  30. /*===========================================================================*/
  31. /* Derived constants and error checks. */
  32. /*===========================================================================*/
  33. /*===========================================================================*/
  34. /* Driver data structures and types. */
  35. /*===========================================================================*/
  36. /*===========================================================================*/
  37. /* Driver macros. */
  38. /*===========================================================================*/
  39. /*===========================================================================*/
  40. /* External declarations. */
  41. /*===========================================================================*/
  42. #ifdef __cplusplus
  43. extern "C" {
  44. #endif
  45. void st_lld_init(void);
  46. #ifdef __cplusplus
  47. }
  48. #endif
  49. /*===========================================================================*/
  50. /* Driver inline functions. */
  51. /*===========================================================================*/
  52. /**
  53. * @brief Returns the time counter value.
  54. *
  55. * @return The counter value.
  56. *
  57. * @notapi
  58. */
  59. static inline systime_t st_lld_get_counter(void) {
  60. return (systime_t)0;
  61. }
  62. /**
  63. * @brief Starts the alarm.
  64. * @note Makes sure that no spurious alarms are triggered after
  65. * this call.
  66. *
  67. * @param[in] abstime the time to be set for the first alarm
  68. *
  69. * @notapi
  70. */
  71. static inline void st_lld_start_alarm(systime_t abstime) {
  72. (void)abstime;
  73. }
  74. /**
  75. * @brief Stops the alarm interrupt.
  76. *
  77. * @notapi
  78. */
  79. static inline void st_lld_stop_alarm(void) {
  80. }
  81. /**
  82. * @brief Sets the alarm time.
  83. *
  84. * @param[in] abstime the time to be set for the next alarm
  85. *
  86. * @notapi
  87. */
  88. static inline void st_lld_set_alarm(systime_t abstime) {
  89. (void)abstime;
  90. }
  91. /**
  92. * @brief Returns the current alarm time.
  93. *
  94. * @return The currently set alarm time.
  95. *
  96. * @notapi
  97. */
  98. static inline systime_t st_lld_get_alarm(void) {
  99. return (systime_t)0;
  100. }
  101. /**
  102. * @brief Determines if the alarm is active.
  103. *
  104. * @return The alarm status.
  105. * @retval false if the alarm is not active.
  106. * @retval true is the alarm is active
  107. *
  108. * @notapi
  109. */
  110. static inline bool st_lld_is_alarm_active(void) {
  111. return false;
  112. }
  113. #endif /* HAL_ST_LLD_H */
  114. /** @} */