aboutsummaryrefslogtreecommitdiff
path: root/lib/chibios/os/hal/ports/ADUCM/ADUCM41x/hal_st_lld.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chibios/os/hal/ports/ADUCM/ADUCM41x/hal_st_lld.h')
-rw-r--r--lib/chibios/os/hal/ports/ADUCM/ADUCM41x/hal_st_lld.h167
1 files changed, 167 insertions, 0 deletions
diff --git a/lib/chibios/os/hal/ports/ADUCM/ADUCM41x/hal_st_lld.h b/lib/chibios/os/hal/ports/ADUCM/ADUCM41x/hal_st_lld.h
new file mode 100644
index 000000000..3e7892165
--- /dev/null
+++ b/lib/chibios/os/hal/ports/ADUCM/ADUCM41x/hal_st_lld.h
@@ -0,0 +1,167 @@
1/*
2 ChibiOS - Copyright (C) 2019 Rocco Marco Guglielmi
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 ADUCM41x/hal_st_lld.h
19 * @brief ST Driver 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#include "mcuconf.h"
31
32/*===========================================================================*/
33/* Driver constants. */
34/*===========================================================================*/
35
36/*===========================================================================*/
37/* Driver pre-compile time settings. */
38/*===========================================================================*/
39
40/**
41 * @name Configuration options
42 * @{
43 */
44/**
45 * @brief SysTick timer IRQ priority.
46 */
47#if !defined(ADUCM_ST_IRQ_PRIORITY) || defined(__DOXYGEN__)
48#define ADUCM_ST_IRQ_PRIORITY 3
49#endif
50
51/**
52 * @brief TIMx unit (by number) to be used for free running operations.
53 * @note You must select a 32 bits timer if a 32 bits @p systick_t type
54 * is required.
55 * @note Timers 0, 1, 2 are supported.
56 */
57#if !defined(ADUCM_ST_USE_TIMER) || defined(__DOXYGEN__)
58#define ADUCM_ST_USE_TIMER 2
59#endif
60/** @} */
61
62/*===========================================================================*/
63/* Derived constants and error checks. */
64/*===========================================================================*/
65
66#if (OSAL_ST_MODE == OSAL_ST_MODE_FREERUNNING)
67#error "Tickless mode still not supported on this platform."
68#endif
69
70/*===========================================================================*/
71/* Driver data structures and types. */
72/*===========================================================================*/
73
74/*===========================================================================*/
75/* Driver macros. */
76/*===========================================================================*/
77
78/*===========================================================================*/
79/* External declarations. */
80/*===========================================================================*/
81
82#ifdef __cplusplus
83extern "C" {
84#endif
85 void st_lld_init(void);
86#ifdef __cplusplus
87}
88#endif
89
90/*===========================================================================*/
91/* Driver inline functions. */
92/*===========================================================================*/
93
94/**
95 * @brief Returns the time counter value.
96 *
97 * @return The counter value.
98 *
99 * @notapi
100 */
101static inline systime_t st_lld_get_counter(void) {
102
103 return (systime_t)0;
104}
105
106/**
107 * @brief Starts the alarm.
108 * @note Makes sure that no spurious alarms are triggered after
109 * this call.
110 *
111 * @param[in] abstime the time to be set for the first alarm
112 *
113 * @notapi
114 */
115static inline void st_lld_start_alarm(systime_t abstime) {
116 (void) abstime;
117
118}
119
120/**
121 * @brief Stops the alarm interrupt.
122 *
123 * @notapi
124 */
125static inline void st_lld_stop_alarm(void) {
126
127}
128
129/**
130 * @brief Sets the alarm time.
131 *
132 * @param[in] abstime the time to be set for the next alarm
133 *
134 * @notapi
135 */
136static inline void st_lld_set_alarm(systime_t abstime) {
137 (void) abstime;
138}
139
140/**
141 * @brief Returns the current alarm time.
142 *
143 * @return The currently set alarm time.
144 *
145 * @notapi
146 */
147static inline systime_t st_lld_get_alarm(void) {
148
149 return (systime_t)0;
150}
151
152/**
153 * @brief Determines if the alarm is active.
154 *
155 * @return The alarm status.
156 * @retval false if the alarm is not active.
157 * @retval true is the alarm is active
158 *
159 * @notapi
160 */
161static inline bool st_lld_is_alarm_active(void) {
162
163 return (bool)(0);
164}
165#endif /* HAL_ST_LLD_H */
166
167/** @} */