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