ChibiOS 21.11.4
hal_lld.c
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_lld.c
19 * @brief PLATFORM HAL subsystem low level driver source.
20 *
21 * @addtogroup HAL
22 * @{
23 */
24
25#include "hal.h"
26
27/*===========================================================================*/
28/* Driver local definitions. */
29/*===========================================================================*/
30
31/*===========================================================================*/
32/* Driver exported variables. */
33/*===========================================================================*/
34
35#if defined(HAL_LLD_USE_CLOCK_MANAGEMENT) && !defined(__DOXYGEN__)
36/**
37 * @brief Post-reset configuration, must be implemented.
38 */
39const halclkcfg_t hal_clkcfg_reset = {
40 .dummy = 0U
41};
42
43/**
44 * @brief Configuration from mcuconf.h, must be implemented.
45 */
46const halclkcfg_t hal_clkcfg_default = {
47 .dummy = 0U
48};
49#endif
50
51/*===========================================================================*/
52/* Driver local variables and types. */
53/*===========================================================================*/
54
55/*===========================================================================*/
56/* Driver local functions. */
57/*===========================================================================*/
58
59/*===========================================================================*/
60/* Driver interrupt handlers. */
61/*===========================================================================*/
62
63/*===========================================================================*/
64/* Driver exported functions. */
65/*===========================================================================*/
66
67/**
68 * @brief Low level HAL driver initialization.
69 *
70 * @notapi
71 */
72void hal_lld_init(void) {
73
74}
75
76#if defined(HAL_LLD_USE_CLOCK_MANAGEMENT) || defined(__DOXYGEN__)
77/**
78 * @brief Switches to a different clock configuration
79 *
80 * @param[in] ccp pointer to clock a @p halclkcfg_t structure
81 * @return The clock switch result.
82 * @retval false if the clock switch succeeded
83 * @retval true if the clock switch failed
84 *
85 * @notapi
86 */
88
89 (void)ccp;
90
91 return false;
92}
93
94/**
95 * @brief Returns the frequency of a clock point in Hz.
96 *
97 * @param[in] clkpt clock point to be returned
98 * @return The clock point frequency in Hz or zero if the
99 * frequency is unknown.
100 *
101 * @notapi
102 */
104
105 (void)clkpt;
106
107 return 0U;
108}
109#endif /* defined(HAL_LLD_USE_CLOCK_MANAGEMENT) */
110
111/** @} */
unsigned halclkpt_t
Type of a clock point identifier.
Definition hal.h:239
void hal_lld_init(void)
Low level HAL driver initialization.
Definition hal_lld.c:72
halfreq_t hal_lld_get_clock_point(halclkpt_t clkpt)
Returns the frequency of a clock point in Hz.
Definition hal_lld.c:103
uint32_t halfreq_t
Type of a clock point frequency in Hz.
Definition hal.h:244
bool hal_lld_clock_switch_mode(const halclkcfg_t *ccp)
Switches to a different clock configuration.
Definition hal_lld.c:87
HAL subsystem header.
Type of a clock configuration structure.
Definition hal_lld.h:78