aboutsummaryrefslogtreecommitdiff
path: root/lib/chibios/os/hal/ports/simulator/hal_st_lld.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chibios/os/hal/ports/simulator/hal_st_lld.h')
-rw-r--r--lib/chibios/os/hal/ports/simulator/hal_st_lld.h141
1 files changed, 141 insertions, 0 deletions
diff --git a/lib/chibios/os/hal/ports/simulator/hal_st_lld.h b/lib/chibios/os/hal/ports/simulator/hal_st_lld.h
new file mode 100644
index 000000000..09a9a046f
--- /dev/null
+++ b/lib/chibios/os/hal/ports/simulator/hal_st_lld.h
@@ -0,0 +1,141 @@
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
55extern "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 */
73static 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] time the time to be set for the first alarm
84 *
85 * @notapi
86 */
87static inline void st_lld_start_alarm(systime_t time) {
88
89 (void)time;
90}
91
92/**
93 * @brief Stops the alarm interrupt.
94 *
95 * @notapi
96 */
97static inline void st_lld_stop_alarm(void) {
98
99}
100
101/**
102 * @brief Sets the alarm time.
103 *
104 * @param[in] time the time to be set for the next alarm
105 *
106 * @notapi
107 */
108static inline void st_lld_set_alarm(systime_t time) {
109
110 (void)time;
111}
112
113/**
114 * @brief Returns the current alarm time.
115 *
116 * @return The currently set alarm time.
117 *
118 * @notapi
119 */
120static 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 */
134static inline bool st_lld_is_alarm_active(void) {
135
136 return false;
137}
138
139#endif /* HAL_ST_LLD_H */
140
141/** @} */