rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
hal_st_lld.h
Go to the documentation of this file.
1/*
2 ChibiOS - Copyright (C) 2014-2015 Fabio Utzig
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 PITv1/hal_st_lld.h
19 * @brief ST Driver subsystem low level driver header.
20 * @author andreika <prometheus.pcb@gmail.com>
21 * @details This header is designed to be include-able without having to
22 * include other files from the HAL.
23 *
24 * @addtogroup ST
25 * @{
26 */
27
28#ifndef HAL_ST_LLD_H_
29#define HAL_ST_LLD_H_
30
31#include "mcuconf.h"
32
33/*===========================================================================*/
34/* Driver constants. */
35/*===========================================================================*/
36
37/*===========================================================================*/
38/* Driver pre-compile time settings. */
39/*===========================================================================*/
40
41/**
42 * @name Configuration options
43 * @{
44 */
45/**
46 * @brief SysTick timer IRQ priority.
47 */
48#if !defined(KINETIS_ST_IRQ_PRIORITY) || defined(__DOXYGEN__)
49#define KINETIS_ST_IRQ_PRIORITY 8
50#endif
51
52/** @} */
53
54/*===========================================================================*/
55/* Derived constants and error checks. */
56/*===========================================================================*/
57
58/*===========================================================================*/
59/* Driver data structures and types. */
60/*===========================================================================*/
61
62/*===========================================================================*/
63/* Driver macros. */
64/*===========================================================================*/
65
66/*===========================================================================*/
67/* External declarations. */
68/*===========================================================================*/
69
70#ifdef __cplusplus
71extern "C" {
72#endif
73 void st_lld_init(void);
74#ifdef __cplusplus
75}
76#endif
77
78/*===========================================================================*/
79/* Driver inline functions. */
80/*===========================================================================*/
81
82/**
83 * @brief Returns the time counter value.
84 *
85 * @return The counter value.
86 *
87 * @notapi
88 */
89static inline systime_t st_lld_get_counter(void) {
90
91 return (systime_t)0;
92}
93
94/**
95 * @brief Starts the alarm.
96 * @note Makes sure that no spurious alarms are triggered after
97 * this call.
98 *
99 * @param[in] time the time to be set for the first alarm
100 *
101 * @notapi
102 */
103static inline void st_lld_start_alarm(systime_t time) {
104
105 (void)time;
106}
107
108/**
109 * @brief Stops the alarm interrupt.
110 *
111 * @notapi
112 */
113static inline void st_lld_stop_alarm(void) {
114
115}
116
117/**
118 * @brief Sets the alarm time.
119 *
120 * @param[in] time the time to be set for the next alarm
121 *
122 * @notapi
123 */
124static inline void st_lld_set_alarm(systime_t time) {
125
126 (void)time;
127}
128
129/**
130 * @brief Returns the current alarm time.
131 *
132 * @return The currently set alarm time.
133 *
134 * @notapi
135 */
136static inline systime_t st_lld_get_alarm(void) {
137
138 return (systime_t)0;
139}
140
141/**
142 * @brief Determines if the alarm is active.
143 *
144 * @return The alarm status.
145 * @retval false if the alarm is not active.
146 * @retval true is the alarm is active
147 *
148 * @notapi
149 */
150static inline bool st_lld_is_alarm_active(void) {
151
152 return false;
153}
154
155#endif /* HAL_ST_LLD_H_ */
156
157/** @} */
static void st_lld_set_alarm(systime_t time)
Sets the alarm time.
Definition hal_st_lld.h:124
static bool st_lld_is_alarm_active(void)
Determines if the alarm is active.
Definition hal_st_lld.h:150
static void st_lld_stop_alarm(void)
Stops the alarm interrupt.
Definition hal_st_lld.h:113
static systime_t st_lld_get_alarm(void)
Returns the current alarm time.
Definition hal_st_lld.h:136
static void st_lld_start_alarm(systime_t time)
Starts the alarm.
Definition hal_st_lld.h:103
void st_lld_init(void)
Low level ST driver initialization.
Definition hal_st_lld.c:82
static systime_t st_lld_get_counter(void)
Returns the time counter value.
Definition hal_st_lld.h:89