VSF Documented
Main Page
Related Pages
Topics
Namespaces
Data Structures
Files
File List
Globals
source
hal
driver
RaspberryPi
RP2040
driver.h
Go to the documentation of this file.
1
/*****************************************************************************
2
* Copyright(C)2009-2022 by VSF Team *
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
#if defined(__VSF_HEADER_ONLY_SHOW_ARCH_INFO__) || defined(__VSF_HAL_SHOW_VENDOR_INFO__)
19
20
# include "__device.h"
21
22
#else
23
24
#ifndef __HAL_DRIVER_RASPBERRYPI_RP2040_H__
25
#define __HAL_DRIVER_RASPBERRYPI_RP2040_H__
26
27
/*============================ INCLUDES ======================================*/
28
29
# include "
hal/vsf_hal_cfg.h
"
30
# include "
hal/driver/common/swi/vsf_swi_template.h
"
31
# include "
./device.h
"
32
33
// for enum clock_index
34
# include "hardware/structs/clocks.h"
35
36
# include "i2c/i2c.h"
37
# include "uart/uart.h"
38
39
/*============================ MACROFIED FUNCTIONS ===========================*/
40
/*============================ TYPES =========================================*/
41
/*============================ INCLUDES ======================================*/
42
/*============================ TYPES =========================================*/
43
/*============================ INCLUDES ======================================*/
44
45
#if VSF_HAL_USE_IO == ENABLED
46
//# define VSF_IO_CFG_REIMPLEMENT_TYPE_MODE ENABLED
47
# include "hal/driver/common/template/vsf_template_io.h"
48
49
# define VSF_IO_CFG_DEC_PREFIX vsf_hw
50
# define VSF_IO_CFG_DEC_UPCASE_PREFIX VSF_HW
51
# include "hal/driver/common/io/io_template.h"
52
#endif
53
54
#if VSF_HAL_USE_GPIO == ENABLED
55
# define VSF_GPIO_USE_IO_MODE_TYPE ENABLED
56
# include "
hal/driver/common/template/vsf_template_gpio.h
"
57
58
# define VSF_GPIO_CFG_DEC_PREFIX vsf_hw
59
# define VSF_GPIO_CFG_DEC_UPCASE_PREFIX VSF_HW
60
# include "
hal/driver/common/gpio/gpio_template.h
"
61
#endif
62
63
#if VSF_HAL_USE_ADC == ENABLED
64
# include "
hal/driver/common/template/vsf_template_adc.h
"
65
66
# define VSF_ADC_CFG_DEC_PREFIX vsf_hw
67
# define VSF_ADC_CFG_DEC_UPCASE_PREFIX VSF_HW
68
# include "
hal/driver/common/adc/adc_template.h
"
69
#endif
70
71
#if VSF_HAL_USE_FLASH == ENABLED
72
# include "
hal/driver/common/template/vsf_template_flash.h
"
73
74
# define VSF_FLASH_CFG_DEC_PREFIX vsf_hw
75
# define VSF_FLASH_CFG_DEC_UPCASE_PREFIX VSF_HW
76
# include "
hal/driver/common/flash/flash_template.h
"
77
#endif
78
79
#if VSF_HAL_USE_I2C == ENABLED
80
# include "
hal/driver/common/template/vsf_template_i2c.h
"
81
82
# define VSF_I2C_CFG_DEC_PREFIX vsf_hw
83
# define VSF_I2C_CFG_DEC_UPCASE_PREFIX VSF_HW
84
# include "
hal/driver/common/i2c/i2c_template.h
"
85
#endif
86
87
#if VSF_HAL_USE_PWM == ENABLED
88
# include "
hal/driver/common/template/vsf_template_pwm.h
"
89
90
# define VSF_PWM_CFG_DEC_PREFIX vsf_hw
91
# define VSF_PWM_CFG_DEC_UPCASE_PREFIX VSF_HW
92
# include "
hal/driver/common/pwm/pwm_template.h
"
93
#endif
94
95
#if VSF_HAL_USE_RTC == ENABLED
96
# include "
hal/driver/common/template/vsf_template_rtc.h
"
97
98
# define VSF_RTC_CFG_DEC_PREFIX vsf_hw
99
# define VSF_RTC_CFG_DEC_UPCASE_PREFIX VSF_HW
100
# include "
hal/driver/common/rtc/rtc_template.h
"
101
#endif
102
103
#if VSF_HAL_USE_SPI == ENABLED
104
//# define VSF_SPI_CFG_REIMPLEMENT_TYPE_MODE ENABLED
105
# include "
hal/driver/common/template/vsf_template_spi.h
"
106
107
# define VSF_SPI_CFG_DEC_PREFIX vsf_hw
108
# define VSF_SPI_CFG_DEC_UPCASE_PREFIX VSF_HW
109
# include "
hal/driver/common/spi/spi_template.h
"
110
#endif
111
112
#if VSF_HAL_USE_TIMER == ENABLED
113
# include "
hal/driver/common/template/vsf_template_timer.h
"
114
115
# define VSF_TIMER_CFG_DEC_PREFIX vsf_hw
116
# define VSF_TIMER_CFG_DEC_UPCASE_PREFIX VSF_HW
117
# include "
hal/driver/common/timer/timer_template.h
"
118
119
# define VSF_TIMER_CFG_DEC_PREFIX vsf_hw_lp
120
# define VSF_TIMER_CFG_DEC_UPCASE_PREFIX VSF_HW_LP
121
# include "
hal/driver/common/timer/timer_template.h
"
122
#endif
123
124
#if VSF_HAL_USE_RNG == ENABLED
125
# include "
hal/driver/common/template/vsf_template_rng.h
"
126
127
# define VSF_RNG_CFG_DEC_PREFIX vsf_hw
128
# define VSF_RNG_CFG_DEC_UPCASE_PREFIX VSF_HW
129
# include "
hal/driver/common/rng/rng_template.h
"
130
#endif
131
132
#if VSF_HAL_USE_USART == ENABLED
133
# include "
hal/driver/common/template/vsf_template_usart.h
"
134
135
# define VSF_USART_CFG_DEC_PREFIX vsf_hw
136
# define VSF_USART_CFG_DEC_UPCASE_PREFIX VSF_HW
137
# include "
hal/driver/common/usart/usart_template.h
"
138
#endif
139
140
#if VSF_HAL_USE_WDT == ENABLED
141
//# define VSF_WDT_CFG_REIMPLEMENT_TYPE_MODE ENABLED
142
# include "
hal/driver/common/template/vsf_template_wdt.h
"
143
144
# define VSF_WDT_CFG_DEC_PREFIX vsf_hw
145
# define VSF_WDT_CFG_DEC_UPCASE_PREFIX VSF_HW
146
# include "
hal/driver/common/wdt/wdt_template.h
"
147
#endif
148
149
/*============================ MACROS ========================================*/
150
/*============================ MACROFIED FUNCTIONS ===========================*/
151
/*============================ TYPES =========================================*/
152
/*============================ GLOBAL VARIABLES ==============================*/
153
/*============================ LOCAL VARIABLES ===============================*/
154
/*============================ PROTOTYPES ====================================*/
155
156
extern
bool
clock_configure
(
enum
clock_index clk_index,
uint32_t
src,
uint32_t
auxsrc,
uint32_t
src_freq,
uint32_t
freq);
157
extern
uint32_t
clock_get_hz
(
enum
clock_index clk_index);
158
159
# endif
// __HAL_DRIVER_RASPBERRYPI_RP2040_H__
160
#endif
// __VSF_HEADER_ONLY_SHOW_ARCH_INFO__
161
/* EOF */
adc_template.h
flash_template.h
gpio_template.h
clock_configure
bool clock_configure(enum clock_index clk_index, uint32_t src, uint32_t auxsrc, uint32_t src_freq, uint32_t freq)
\tagclock_configure[]
Definition
driver.c:260
clock_get_hz
uint32_t clock_get_hz(enum clock_index clk_index)
\endclock_configure[]
Definition
driver.c:334
i2c_template.h
uint32_t
unsigned int uint32_t
Definition
lvgl.h:43
pwm_template.h
rng_template.h
rtc_template.h
device.h
spi_template.h
timer_template.h
usart_template.h
vsf_hal_cfg.h
vsf_swi_template.h
vsf_template_adc.h
vsf_template_flash.h
vsf_template_gpio.h
vsf_template_i2c.h
vsf_template_pwm.h
vsf_template_rng.h
vsf_template_rtc.h
vsf_template_spi.h
vsf_template_timer.h
vsf_template_usart.h
vsf_template_wdt.h
wdt_template.h
Generated by
1.9.8