Revision acc97cbf
core/inc/aos_system.h | ||
---|---|---|
206 | 206 |
/** |
207 | 207 |
* @brief Retrieves the system uptime. |
208 | 208 |
* |
209 |
* @param[out] ut The system uptime.
|
|
209 |
* @param[out] ut Pointer to the system uptime.
|
|
210 | 210 |
*/ |
211 |
static inline void aosSysGetUptime(aos_timestamp_t* ut) |
|
212 |
{ |
|
213 |
aosDbgCheck(ut != NULL); |
|
214 |
|
|
215 |
chSysLock(); |
|
216 |
aosSysGetUptimeX(ut); |
|
217 |
chSysUnlock(); |
|
218 |
|
|
219 |
return; |
|
211 |
#define aosSysGetUptime(ut) { \ |
|
212 |
chSysLock(); \ |
|
213 |
aosSysGetUptimeX(ut); \ |
|
214 |
chSysUnlock(); \ |
|
220 | 215 |
} |
221 | 216 |
|
222 | 217 |
#endif /* _AMIROOS_SYSTEM_H_ */ |
modules/DiWheelDrive_1-1/module.c | ||
---|---|---|
17 | 17 |
*/ |
18 | 18 |
|
19 | 19 |
/** |
20 |
* @file
|
|
20 |
* @file |
|
21 | 21 |
* @brief Structures and constant for the DiWheelDrive module. |
22 | 22 |
* |
23 | 23 |
* @addtogroup diwheeldrive_module |
... | ... | |
144 | 144 |
/* port */ GPIOA, |
145 | 145 |
/* pad */ GPIOA_LED, |
146 | 146 |
}; |
147 |
apalControlGpio_t moduleGpioLed = { |
|
147 |
ROMCONST apalControlGpio_t moduleGpioLed = {
|
|
148 | 148 |
/* GPIO */ &_gpioLed, |
149 | 149 |
/* meta */ { |
150 | 150 |
/* direction */ APAL_GPIO_DIRECTION_OUTPUT, |
... | ... | |
160 | 160 |
/* port */ GPIOB, |
161 | 161 |
/* pad */ GPIOB_POWER_EN, |
162 | 162 |
}; |
163 |
apalControlGpio_t moduleGpioPowerEn = { |
|
163 |
ROMCONST apalControlGpio_t moduleGpioPowerEn = {
|
|
164 | 164 |
/* GPIO */ &_gpioPowerEn, |
165 | 165 |
/* meta */ { |
166 | 166 |
/* direction */ APAL_GPIO_DIRECTION_OUTPUT, |
... | ... | |
176 | 176 |
/* port */ GPIOB, |
177 | 177 |
/* pad */ GPIOB_COMPASS_DRDY, |
178 | 178 |
}; |
179 |
apalControlGpio_t moduleGpioCompassDrdy = { |
|
179 |
ROMCONST apalControlGpio_t moduleGpioCompassDrdy = {
|
|
180 | 180 |
/* GPIO */ &_gpioCompassDrdy, |
181 | 181 |
/* meta */ { |
182 | 182 |
/* direction */ APAL_GPIO_DIRECTION_INPUT, |
... | ... | |
192 | 192 |
/* port */ GPIOB, |
193 | 193 |
/* pad */ GPIOB_IR_INT, |
194 | 194 |
}; |
195 |
apalControlGpio_t moduleGpioIrInt = { |
|
195 |
ROMCONST apalControlGpio_t moduleGpioIrInt = {
|
|
196 | 196 |
/* GPIO */ &_gpioIrInt, |
197 | 197 |
/* meta */ { |
198 | 198 |
/* direction */ APAL_GPIO_DIRECTION_INPUT, |
... | ... | |
208 | 208 |
/* port */ GPIOB, |
209 | 209 |
/* pad */ GPIOB_GYRO_DRDY, |
210 | 210 |
}; |
211 |
apalControlGpio_t moduleGpioGyroDrdy = { |
|
211 |
ROMCONST apalControlGpio_t moduleGpioGyroDrdy = {
|
|
212 | 212 |
/* GPIO */ &_gpioGyroDrdy, |
213 | 213 |
/* meta */ { |
214 | 214 |
/* direction */ APAL_GPIO_DIRECTION_INPUT, |
... | ... | |
224 | 224 |
/* port */ GPIOB, |
225 | 225 |
/* pad */ GPIOB_SYS_UART_UP, |
226 | 226 |
}; |
227 |
apalControlGpio_t moduleGpioSysUartUp = { |
|
227 |
ROMCONST apalControlGpio_t moduleGpioSysUartUp = {
|
|
228 | 228 |
/* GPIO */ &_gpioSysUartUp, |
229 | 229 |
/* meta */ { |
230 | 230 |
/* direction */ APAL_GPIO_DIRECTION_BIDIRECTIONAL, |
... | ... | |
240 | 240 |
/* port */ GPIOB, |
241 | 241 |
/* pad */ GPIOB_ACCEL_INT_N, |
242 | 242 |
}; |
243 |
apalControlGpio_t moduleGpioAccelInt = { |
|
243 |
ROMCONST apalControlGpio_t moduleGpioAccelInt = {
|
|
244 | 244 |
/* GPIO */ &_gpioAccelInt, |
245 | 245 |
/* meta */ { |
246 | 246 |
/* direction */ APAL_GPIO_DIRECTION_INPUT, |
... | ... | |
256 | 256 |
/* port */ GPIOC, |
257 | 257 |
/* pad */ GPIOC_SYS_INT_N, |
258 | 258 |
}; |
259 |
apalControlGpio_t moduleGpioSysSync = {
|
|
259 |
ROMCONST apalControlGpio_t moduleGpioSysSync = {
|
|
260 | 260 |
/* GPIO */ &_gpioSysSync, |
261 | 261 |
/* meta */ { |
262 | 262 |
/* direction */ APAL_GPIO_DIRECTION_BIDIRECTIONAL, |
... | ... | |
272 | 272 |
/* port */ GPIOC, |
273 | 273 |
/* pad */ GPIOC_PATH_DCSTAT, |
274 | 274 |
}; |
275 |
apalControlGpio_t moduleGpioPathDcStat = { |
|
275 |
ROMCONST apalControlGpio_t moduleGpioPathDcStat = {
|
|
276 | 276 |
/* GPIO */ &_gpioPathDcStat, |
277 | 277 |
/* meta */ { |
278 | 278 |
/* direction */ APAL_GPIO_DIRECTION_INPUT, |
... | ... | |
288 | 288 |
/* port */ GPIOC, |
289 | 289 |
/* pad */ GPIOC_PATH_DCEN, |
290 | 290 |
}; |
291 |
apalControlGpio_t moduleGpioPathDcEn = { |
|
291 |
ROMCONST apalControlGpio_t moduleGpioPathDcEn = {
|
|
292 | 292 |
/* GPIO */ &_gpioPathDcEn, |
293 | 293 |
/* meta */ { |
294 | 294 |
/* direction */ APAL_GPIO_DIRECTION_OUTPUT, |
... | ... | |
304 | 304 |
/* port */ GPIOC, |
305 | 305 |
/* pad */ GPIOC_SYS_PD_N, |
306 | 306 |
}; |
307 |
apalControlGpio_t moduleGpioSysPd = { |
|
307 |
ROMCONST apalControlGpio_t moduleGpioSysPd = {
|
|
308 | 308 |
/* GPIO */ &_gpioSysPd, |
309 | 309 |
/* meta */ { |
310 | 310 |
/* direction */ APAL_GPIO_DIRECTION_BIDIRECTIONAL, |
... | ... | |
320 | 320 |
/* port */ GPIOC, |
321 | 321 |
/* pad */ GPIOC_SYS_REG_EN, |
322 | 322 |
}; |
323 |
apalControlGpio_t moduleGpioSysRegEn = { |
|
323 |
ROMCONST apalControlGpio_t moduleGpioSysRegEn = {
|
|
324 | 324 |
/* GPIO */ &_gpioSysRegEn, |
325 | 325 |
/* meta */ { |
326 | 326 |
/* direction */ APAL_GPIO_DIRECTION_INPUT, |
... | ... | |
336 | 336 |
/* port */ GPIOD, |
337 | 337 |
/* pad */ GPIOD_SYS_WARMRST_N, |
338 | 338 |
}; |
339 |
apalControlGpio_t moduleGpioSysWarmrst = { |
|
339 |
ROMCONST apalControlGpio_t moduleGpioSysWarmrst = {
|
|
340 | 340 |
/* GPIO */ &_gpioSysWarmrst, |
341 | 341 |
/* meta */ { |
342 | 342 |
/* direction */ APAL_GPIO_DIRECTION_BIDIRECTIONAL, |
... | ... | |
355 | 355 |
/*===========================================================================*/ |
356 | 356 |
|
357 | 357 |
#if (AMIROOS_CFG_SHELL_ENABLE == true) || defined(__DOXYGEN__) |
358 |
const char* moduleShellPrompt = "DiWheelDrive";
|
|
358 |
ROMCONST char* moduleShellPrompt = "DiWheelDrive";
|
|
359 | 359 |
#endif |
360 | 360 |
|
361 | 361 |
/** @} */ |
... | ... | |
462 | 462 |
/* right wheel */ &MODULE_HAL_QEI_RIGHT_WHEEL, |
463 | 463 |
/* increment per revolution */ MODULE_HAL_QEI_INCREMENTS_PER_REVOLUTION, |
464 | 464 |
}, |
465 |
/* Wheel diameter */ 0.05571f, |
|
466 |
/* timeout */ 10 * MICROSECONDS_PER_SECOND, |
|
465 |
/* Wheel diameter */ { |
|
466 |
/* left wheel */ 0.05571f, |
|
467 |
/* right wheel */ 0.05571f, |
|
468 |
}, |
|
469 |
/* timeout */ 5 * MICROSECONDS_PER_SECOND, |
|
467 | 470 |
}; |
468 | 471 |
aos_unittest_t moduleUtAlldA3906 = { |
469 | 472 |
/* name */ "A3906", |
modules/DiWheelDrive_1-1/module.h | ||
---|---|---|
169 | 169 |
/** |
170 | 170 |
* @brief LED output signal GPIO. |
171 | 171 |
*/ |
172 |
extern apalControlGpio_t moduleGpioLed; |
|
172 |
extern ROMCONST apalControlGpio_t moduleGpioLed;
|
|
173 | 173 |
|
174 | 174 |
/** |
175 | 175 |
* @brief POWER_EN output signal GPIO. |
176 | 176 |
*/ |
177 |
extern apalControlGpio_t moduleGpioPowerEn; |
|
177 |
extern ROMCONST apalControlGpio_t moduleGpioPowerEn;
|
|
178 | 178 |
|
179 | 179 |
/** |
180 | 180 |
* @brief COMPASS_DRDY input signal GPIO. |
181 | 181 |
*/ |
182 |
extern apalControlGpio_t moduleGpioCompassDrdy; |
|
182 |
extern ROMCONST apalControlGpio_t moduleGpioCompassDrdy;
|
|
183 | 183 |
|
184 | 184 |
/** |
185 | 185 |
* @brief IR_INT input signal GPIO. |
186 | 186 |
*/ |
187 |
extern apalControlGpio_t moduleGpioIrInt; |
|
187 |
extern ROMCONST apalControlGpio_t moduleGpioIrInt;
|
|
188 | 188 |
|
189 | 189 |
/** |
190 | 190 |
* @brief GYRO_DRDY input signal GPIO. |
191 | 191 |
*/ |
192 |
extern apalControlGpio_t moduleGpioGyroDrdy; |
|
192 |
extern ROMCONST apalControlGpio_t moduleGpioGyroDrdy;
|
|
193 | 193 |
|
194 | 194 |
/** |
195 | 195 |
* @brief SYS_UART_UP bidirectional signal GPIO. |
196 | 196 |
*/ |
197 |
extern apalControlGpio_t moduleGpioSysUartUp; |
|
197 |
extern ROMCONST apalControlGpio_t moduleGpioSysUartUp;
|
|
198 | 198 |
|
199 | 199 |
/** |
200 | 200 |
* @brief ACCEL_INT input signal GPIO. |
201 | 201 |
*/ |
202 |
extern apalControlGpio_t moduleGpioAccelInt; |
|
202 |
extern ROMCONST apalControlGpio_t moduleGpioAccelInt;
|
|
203 | 203 |
|
204 | 204 |
/** |
205 | 205 |
* @brief SYS_SNYC bidirectional signal GPIO. |
206 | 206 |
*/ |
207 |
extern apalControlGpio_t moduleGpioSysSync; |
|
207 |
extern ROMCONST apalControlGpio_t moduleGpioSysSync;
|
|
208 | 208 |
|
209 | 209 |
/** |
210 | 210 |
* @brief PATH_DCSTAT input signal GPIO. |
211 | 211 |
*/ |
212 |
extern apalControlGpio_t moduleGpioPathDcStat; |
|
212 |
extern ROMCONST apalControlGpio_t moduleGpioPathDcStat;
|
|
213 | 213 |
|
214 | 214 |
/** |
215 | 215 |
* @brief PATH_DCEN output signal GPIO. |
216 | 216 |
*/ |
217 |
extern apalControlGpio_t moduleGpioPathDcEn; |
|
217 |
extern ROMCONST apalControlGpio_t moduleGpioPathDcEn;
|
|
218 | 218 |
|
219 | 219 |
/** |
220 | 220 |
* @brief SYS_PD bidirectional signal GPIO. |
221 | 221 |
*/ |
222 |
extern apalControlGpio_t moduleGpioSysPd; |
|
222 |
extern ROMCONST apalControlGpio_t moduleGpioSysPd;
|
|
223 | 223 |
|
224 | 224 |
/** |
225 | 225 |
* @brief SYS_REG_EN input signal GPIO. |
226 | 226 |
*/ |
227 |
extern apalControlGpio_t moduleGpioSysRegEn; |
|
227 |
extern ROMCONST apalControlGpio_t moduleGpioSysRegEn;
|
|
228 | 228 |
|
229 | 229 |
/** |
230 | 230 |
* @brief SYS_WARMRST bidirectional signal GPIO. |
231 | 231 |
*/ |
232 |
extern apalControlGpio_t moduleGpioSysWarmrst; |
|
232 |
extern ROMCONST apalControlGpio_t moduleGpioSysWarmrst;
|
|
233 | 233 |
|
234 | 234 |
/** @} */ |
235 | 235 |
|
... | ... | |
294 | 294 |
/** |
295 | 295 |
* @brief Shell prompt text. |
296 | 296 |
*/ |
297 |
extern const char* moduleShellPrompt;
|
|
297 |
extern ROMCONST char* moduleShellPrompt;
|
|
298 | 298 |
#endif |
299 | 299 |
|
300 | 300 |
/** |
modules/LightRing_1-0/module.c | ||
---|---|---|
86 | 86 |
/* port */ GPIOA, |
87 | 87 |
/* pad */ GPIOA_LIGHT_BLANK, |
88 | 88 |
}; |
89 |
apalControlGpio_t moduleGpioLightBlank = { |
|
89 |
ROMCONST apalControlGpio_t moduleGpioLightBlank = {
|
|
90 | 90 |
/* GPIO */ &_gpioLightBlank, |
91 | 91 |
/* meta */ { |
92 | 92 |
/* direction */ APAL_GPIO_DIRECTION_OUTPUT, |
... | ... | |
102 | 102 |
/* port */ GPIOB, |
103 | 103 |
/* pad */ GPIOB_LASER_EN, |
104 | 104 |
}; |
105 |
apalControlGpio_t moduleGpioLaserEn = { |
|
105 |
ROMCONST apalControlGpio_t moduleGpioLaserEn = {
|
|
106 | 106 |
/* GPIO */ &_gpioLaserEn, |
107 | 107 |
/* meta */ { |
108 | 108 |
/* direction */ APAL_GPIO_DIRECTION_OUTPUT, |
... | ... | |
118 | 118 |
/* port */ GPIOB, |
119 | 119 |
/* pad */ GPIOB_LASER_OC_N, |
120 | 120 |
}; |
121 |
apalControlGpio_t moduleGpioLaserOc = { |
|
121 |
ROMCONST apalControlGpio_t moduleGpioLaserOc = {
|
|
122 | 122 |
/* GPIO */ &_gpioLaserOc, |
123 | 123 |
/* meta */ { |
124 | 124 |
/* direction */ APAL_GPIO_DIRECTION_INPUT, |
... | ... | |
134 | 134 |
/* port */ GPIOB, |
135 | 135 |
/* pad */ GPIOB_SYS_UART_DN, |
136 | 136 |
}; |
137 |
apalControlGpio_t moduleGpioSysUartDn = { |
|
137 |
ROMCONST apalControlGpio_t moduleGpioSysUartDn = {
|
|
138 | 138 |
/* GPIO */ &_gpioSysUartDn, |
139 | 139 |
/* meta */ { |
140 | 140 |
/* direction */ APAL_GPIO_DIRECTION_BIDIRECTIONAL, |
... | ... | |
150 | 150 |
/* port */ GPIOB, |
151 | 151 |
/* pad */ GPIOB_WL_GDO2, |
152 | 152 |
}; |
153 |
apalControlGpio_t moduleGpioWlGdo2 = { |
|
153 |
ROMCONST apalControlGpio_t moduleGpioWlGdo2 = {
|
|
154 | 154 |
/* GPIO */ &_gpioWlGdo2, |
155 | 155 |
/* meta */ { |
156 | 156 |
/* direction */ APAL_GPIO_DIRECTION_INPUT, |
... | ... | |
166 | 166 |
/* port */ GPIOB, |
167 | 167 |
/* pad */ GPIOB_WL_GDO0, |
168 | 168 |
}; |
169 |
apalControlGpio_t moduleGpioWlGdo0 = { |
|
169 |
ROMCONST apalControlGpio_t moduleGpioWlGdo0 = {
|
|
170 | 170 |
/* GPIO */ &_gpioWlGdo0, |
171 | 171 |
/* meta */ { |
172 | 172 |
/* direction */ APAL_GPIO_DIRECTION_INPUT, |
... | ... | |
182 | 182 |
/* port */ GPIOC, |
183 | 183 |
/* pad */ GPIOC_LIGHT_XLAT, |
184 | 184 |
}; |
185 |
apalControlGpio_t moduleGpioLightXlat = { |
|
185 |
ROMCONST apalControlGpio_t moduleGpioLightXlat = {
|
|
186 | 186 |
/* GPIO */ &_gpioLightXlat, |
187 | 187 |
/* meta */ { |
188 | 188 |
/* direction */ APAL_GPIO_DIRECTION_OUTPUT, |
... | ... | |
198 | 198 |
/* port */ GPIOC, |
199 | 199 |
/* pad */ GPIOC_SYS_PD_N, |
200 | 200 |
}; |
201 |
apalControlGpio_t moduleGpioSysPd = { |
|
201 |
ROMCONST apalControlGpio_t moduleGpioSysPd = {
|
|
202 | 202 |
/* GPIO */ &_gpioSysPd, |
203 | 203 |
/* meta */ { |
204 | 204 |
/* direction */ APAL_GPIO_DIRECTION_BIDIRECTIONAL, |
... | ... | |
214 | 214 |
/* port */ GPIOD, |
215 | 215 |
/* pad */ GPIOD_SYS_INT_N, |
216 | 216 |
}; |
217 |
apalControlGpio_t moduleGpioSysSync = { |
|
217 |
ROMCONST apalControlGpio_t moduleGpioSysSync = {
|
|
218 | 218 |
/* GPIO */ &_gpioSysSync, |
219 | 219 |
/* meta */ { |
220 | 220 |
/* direction */ APAL_GPIO_DIRECTION_BIDIRECTIONAL, |
... | ... | |
233 | 233 |
/*===========================================================================*/ |
234 | 234 |
|
235 | 235 |
#if (AMIROOS_CFG_SHELL_ENABLE == true) || defined(__DOXYGEN__) |
236 |
const char* moduleShellPrompt = "LightRing";
|
|
236 |
ROMCONST char* moduleShellPrompt = "LightRing";
|
|
237 | 237 |
#endif |
238 | 238 |
|
239 | 239 |
/** @} */ |
modules/LightRing_1-0/module.h | ||
---|---|---|
104 | 104 |
/** |
105 | 105 |
* @brief LIGHT_BANK output signal GPIO. |
106 | 106 |
*/ |
107 |
extern apalControlGpio_t moduleGpioLightBlank; |
|
107 |
extern ROMCONST apalControlGpio_t moduleGpioLightBlank;
|
|
108 | 108 |
|
109 | 109 |
/** |
110 | 110 |
* @brief LASER_EN output signal GPIO. |
111 | 111 |
*/ |
112 |
extern apalControlGpio_t moduleGpioLaserEn; |
|
112 |
extern ROMCONST apalControlGpio_t moduleGpioLaserEn;
|
|
113 | 113 |
|
114 | 114 |
/** |
115 | 115 |
* @brief LASER_OC input signal GPIO. |
116 | 116 |
*/ |
117 |
extern apalControlGpio_t moduleGpioLaserOc; |
|
117 |
extern ROMCONST apalControlGpio_t moduleGpioLaserOc;
|
|
118 | 118 |
|
119 | 119 |
/** |
120 | 120 |
* @brief SYS_UART_DN bidirectional signal GPIO. |
121 | 121 |
*/ |
122 |
extern apalControlGpio_t moduleGpioSysUartDn; |
|
122 |
extern ROMCONST apalControlGpio_t moduleGpioSysUartDn;
|
|
123 | 123 |
|
124 | 124 |
/** |
125 | 125 |
* @brief WL_GDO2 input signal GPIO. |
126 | 126 |
*/ |
127 |
extern apalControlGpio_t moduleGpioWlGdo2; |
|
127 |
extern ROMCONST apalControlGpio_t moduleGpioWlGdo2;
|
|
128 | 128 |
|
129 | 129 |
/** |
130 | 130 |
* @brief WL_GDO0 input signal GPIO. |
131 | 131 |
*/ |
132 |
extern apalControlGpio_t moduleGpioWlGdo0; |
|
132 |
extern ROMCONST apalControlGpio_t moduleGpioWlGdo0;
|
|
133 | 133 |
|
134 | 134 |
/** |
135 | 135 |
* @brief LIGHT_XLAT output signal GPIO. |
136 | 136 |
*/ |
137 |
extern apalControlGpio_t moduleGpioLightXlat; |
|
137 |
extern ROMCONST apalControlGpio_t moduleGpioLightXlat;
|
|
138 | 138 |
|
139 | 139 |
/** |
140 | 140 |
* @brief SYS_PD bidirectional signal GPIO. |
141 | 141 |
*/ |
142 |
extern apalControlGpio_t moduleGpioSysPd; |
|
142 |
extern ROMCONST apalControlGpio_t moduleGpioSysPd;
|
|
143 | 143 |
|
144 | 144 |
/** |
145 | 145 |
* @brief SYS_SYNC bidirectional signal GPIO. |
146 | 146 |
*/ |
147 |
extern apalControlGpio_t moduleGpioSysSync; |
|
147 |
extern ROMCONST apalControlGpio_t moduleGpioSysSync;
|
|
148 | 148 |
|
149 | 149 |
/** @} */ |
150 | 150 |
|
... | ... | |
189 | 189 |
/** |
190 | 190 |
* @brief Shell prompt text. |
191 | 191 |
*/ |
192 |
extern const char* moduleShellPrompt;
|
|
192 |
extern ROMCONST char* moduleShellPrompt;
|
|
193 | 193 |
#endif |
194 | 194 |
|
195 | 195 |
/** |
modules/PowerManagement_1-1/board.c | ||
---|---|---|
49 | 49 |
* @param[in] afrh AF register (high ) configuration. |
50 | 50 |
* @param[in] ignmask Mask to ignore individual pads. |
51 | 51 |
*/ |
52 |
static void gpio_init(stm32_gpio_t *gpiop, |
|
52 |
static void _gpio_init(stm32_gpio_t *gpiop,
|
|
53 | 53 |
const uint32_t moder, |
54 | 54 |
const uint32_t otyper, |
55 | 55 |
const uint32_t ospeedr, |
... | ... | |
90 | 90 |
/** |
91 | 91 |
* @brief GPIO initilization for all ports. |
92 | 92 |
*/ |
93 |
static void stm32_gpio_init(void) { |
|
93 |
static void _stm32_gpio_init(void) {
|
|
94 | 94 |
|
95 | 95 |
/* Enabling GPIO-related clocks, the mask comes from the |
96 | 96 |
registry header file.*/ |
... | ... | |
99 | 99 |
|
100 | 100 |
/* Initializing all the defined GPIO ports.*/ |
101 | 101 |
#if STM32_HAS_GPIOA |
102 |
gpio_init(GPIOA, VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH, VAL_GPIOA_IGNORE); |
|
102 |
_gpio_init(GPIOA, VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH, VAL_GPIOA_IGNORE);
|
|
103 | 103 |
#endif |
104 | 104 |
#if STM32_HAS_GPIOB |
105 |
gpio_init(GPIOB, VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH, VAL_GPIOB_IGNORE); |
|
105 |
_gpio_init(GPIOB, VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH, VAL_GPIOB_IGNORE);
|
|
106 | 106 |
#endif |
107 | 107 |
#if STM32_HAS_GPIOC |
108 |
gpio_init(GPIOC, VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH, VAL_GPIOC_IGNORE); |
|
108 |
_gpio_init(GPIOC, VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH, VAL_GPIOC_IGNORE);
|
|
109 | 109 |
#endif |
110 | 110 |
#if STM32_HAS_GPIOD |
111 |
gpio_init(GPIOD, VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH, VAL_GPIOD_IGNORE); |
|
111 |
_gpio_init(GPIOD, VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH, VAL_GPIOD_IGNORE);
|
|
112 | 112 |
#endif |
113 | 113 |
#if STM32_HAS_GPIOE |
114 |
gpio_init(GPIOE, VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH, VAL_GPIOE_IGNORE); |
|
114 |
_gpio_init(GPIOE, VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH, VAL_GPIOE_IGNORE);
|
|
115 | 115 |
#endif |
116 | 116 |
#if STM32_HAS_GPIOF |
117 |
gpio_init(GPIOF, VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH, VAL_GPIOF_IGNORE); |
|
117 |
_gpio_init(GPIOF, VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH, VAL_GPIOF_IGNORE);
|
|
118 | 118 |
#endif |
119 | 119 |
#if STM32_HAS_GPIOG |
120 |
gpio_init(GPIOG, VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH, VAL_GPIOG_IGNORE); |
|
120 |
_gpio_init(GPIOG, VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH, VAL_GPIOG_IGNORE);
|
|
121 | 121 |
#endif |
122 | 122 |
#if STM32_HAS_GPIOH |
123 |
gpio_init(GPIOH, VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH, VAL_GPIOH_IGNORE); |
|
123 |
_gpio_init(GPIOH, VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH, VAL_GPIOH_IGNORE);
|
|
124 | 124 |
#endif |
125 | 125 |
#if STM32_HAS_GPIOI |
126 |
gpio_init(GPIOI, VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH, VAL_GPIOI_IGNORE); |
|
126 |
_gpio_init(GPIOI, VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH, VAL_GPIOI_IGNORE);
|
|
127 | 127 |
#endif |
128 | 128 |
#if STM32_HAS_GPIOJ |
129 |
gpio_init(GPIOJ, VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR, VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH, VAL_GPIOJ_IGNORE); |
|
129 |
_gpio_init(GPIOJ, VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR, VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH, VAL_GPIOJ_IGNORE);
|
|
130 | 130 |
#endif |
131 | 131 |
#if STM32_HAS_GPIOK |
132 |
gpio_init(GPIOK, VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR, VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH, VAL_GPIOK_IGNORE); |
|
132 |
_gpio_init(GPIOK, VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR, VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH, VAL_GPIOK_IGNORE);
|
|
133 | 133 |
#endif |
134 | 134 |
} |
135 | 135 |
|
... | ... | |
140 | 140 |
*/ |
141 | 141 |
void __early_init(void) { |
142 | 142 |
|
143 |
stm32_gpio_init(); |
|
143 |
_stm32_gpio_init();
|
|
144 | 144 |
stm32_clock_init(); |
145 | 145 |
} |
146 | 146 |
|
modules/PowerManagement_1-1/module.c | ||
---|---|---|
17 | 17 |
*/ |
18 | 18 |
|
19 | 19 |
/** |
20 |
* @file
|
|
20 |
* @file |
|
21 | 21 |
* @brief Structures and constant for the PowerManagement module. |
22 | 22 |
* |
23 | 23 |
* @addtogroup powermanagement_module |
... | ... | |
129 | 129 |
/* port */ GPIOA, |
130 | 130 |
/* pad */ GPIOA_SYS_REG_EN, |
131 | 131 |
}; |
132 |
apalControlGpio_t moduleSysRegEn = { |
|
132 |
ROMCONST apalControlGpio_t moduleSysRegEn = {
|
|
133 | 133 |
/* GPIO */ &_gpioSysRegEn, |
134 | 134 |
/* meta */ { |
135 | 135 |
/* direction */ APAL_GPIO_DIRECTION_OUTPUT, |
... | ... | |
145 | 145 |
/* port */ GPIOB, |
146 | 146 |
/* pad */ GPIOB_IR_INT1_N, |
147 | 147 |
}; |
148 |
apalControlGpio_t moduleGpioIrInt1 = { |
|
148 |
ROMCONST apalControlGpio_t moduleGpioIrInt1 = {
|
|
149 | 149 |
/* GPIO */ &_gpioIrInt1, |
150 | 150 |
/* meta */ { |
151 | 151 |
/* direction */ APAL_GPIO_DIRECTION_INPUT, |
... | ... | |
161 | 161 |
/* port */ GPIOB, |
162 | 162 |
/* pad */ GPIOB_POWER_EN, |
163 | 163 |
}; |
164 |
apalControlGpio_t moduleGpioPowerEn = { |
|
164 |
ROMCONST apalControlGpio_t moduleGpioPowerEn = {
|
|
165 | 165 |
/* GPIO */ &_gpioPowerEn, |
166 | 166 |
/* meta */ { |
167 | 167 |
/* direction */ APAL_GPIO_DIRECTION_OUTPUT, |
... | ... | |
177 | 177 |
/* port */ GPIOB, |
178 | 178 |
/* pad */ GPIOB_SYS_UART_DN, |
179 | 179 |
}; |
180 |
apalControlGpio_t moduleGpioSysUartDn = { |
|
180 |
ROMCONST apalControlGpio_t moduleGpioSysUartDn = {
|
|
181 | 181 |
/* GPIO */ &_gpioSysUartDn, |
182 | 182 |
/* meta */ { |
183 | 183 |
/* direction */ APAL_GPIO_DIRECTION_BIDIRECTIONAL, |
... | ... | |
193 | 193 |
/* port */ GPIOB, |
194 | 194 |
/* pad */ GPIOB_CHARGE_STAT2A, |
195 | 195 |
}; |
196 |
apalControlGpio_t moduleGpioChargeStat2A = { |
|
196 |
ROMCONST apalControlGpio_t moduleGpioChargeStat2A = {
|
|
197 | 197 |
/* GPIO */ &_gpioChargeStat2A, |
198 | 198 |
/* meta */ { |
199 | 199 |
/* direction */ APAL_GPIO_DIRECTION_INPUT, |
... | ... | |
209 | 209 |
/* port */ GPIOB, |
210 | 210 |
/* pad */ GPIOB_GAUGE_BATLOW2, |
211 | 211 |
}; |
212 |
apalControlGpio_t moduleGpioGaugeBatLow2 = { |
|
212 |
ROMCONST apalControlGpio_t moduleGpioGaugeBatLow2 = {
|
|
213 | 213 |
/* GPIO */ &_gpioGaugeBatLow2, |
214 | 214 |
/* meta */ { |
215 | 215 |
/* direction */ APAL_GPIO_DIRECTION_INPUT, |
... | ... | |
225 | 225 |
/* port */ GPIOB, |
226 | 226 |
/* pad */ GPIOB_GAUGE_BATGD2_N, |
227 | 227 |
}; |
228 |
apalControlGpio_t moduleGpioGaugeBatGd2 = { |
|
228 |
ROMCONST apalControlGpio_t moduleGpioGaugeBatGd2 = {
|
|
229 | 229 |
/* GPIO */ &_gpioGaugeBatGd2, |
230 | 230 |
/* meta */ { |
231 | 231 |
/* direction */ APAL_GPIO_DIRECTION_INPUT, |
... | ... | |
241 | 241 |
/* port */ GPIOB, |
242 | 242 |
/* pad */ GPIOB_LED, |
243 | 243 |
}; |
244 |
apalControlGpio_t moduleGpioLed = { |
|
244 |
ROMCONST apalControlGpio_t moduleGpioLed = {
|
|
245 | 245 |
/* GPIO */ &_gpioLed, |
246 | 246 |
/* meta */ { |
247 | 247 |
/* direction */ APAL_GPIO_DIRECTION_OUTPUT, |
... | ... | |
257 | 257 |
/* port */ GPIOB, |
258 | 258 |
/* pad */ GPIOB_SYS_UART_UP, |
259 | 259 |
}; |
260 |
apalControlGpio_t moduleGpioSysUartUp = { |
|
260 |
ROMCONST apalControlGpio_t moduleGpioSysUartUp = {
|
|
261 | 261 |
/* GPIO */ &_gpioSysUartUp, |
262 | 262 |
/* meta */ { |
263 | 263 |
/* direction */ APAL_GPIO_DIRECTION_BIDIRECTIONAL, |
... | ... | |
273 | 273 |
/* port */ GPIOC, |
274 | 274 |
/* pad */ GPIOC_CHARGE_STAT1A, |
275 | 275 |
}; |
276 |
apalControlGpio_t moduleGpioChargeStat1A = { |
|
276 |
ROMCONST apalControlGpio_t moduleGpioChargeStat1A = {
|
|
277 | 277 |
/* GPIO */ &_gpioChargeStat1A, |
278 | 278 |
/* meta */ { |
279 | 279 |
/* direction */ APAL_GPIO_DIRECTION_INPUT, |
... | ... | |
289 | 289 |
/* port */ GPIOC, |
290 | 290 |
/* pad */ GPIOC_GAUGE_BATLOW1, |
291 | 291 |
}; |
292 |
apalControlGpio_t moduleGpioGaugeBatLow1 = { |
|
292 |
ROMCONST apalControlGpio_t moduleGpioGaugeBatLow1 = {
|
|
293 | 293 |
/* GPIO */ &_gpioGaugeBatLow1, |
294 | 294 |
/* meta */ { |
295 | 295 |
/* direction */ APAL_GPIO_DIRECTION_INPUT, |
... | ... | |
305 | 305 |
/* port */ GPIOC, |
306 | 306 |
/* pad */ GPIOC_GAUGE_BATGD1_N, |
307 | 307 |
}; |
308 |
apalControlGpio_t moduleGpioGaugeBatGd1 = { |
|
308 |
ROMCONST apalControlGpio_t moduleGpioGaugeBatGd1 = {
|
|
309 | 309 |
/* GPIO */ &_gpioGaugeBatGd1, |
310 | 310 |
/* meta */ { |
311 | 311 |
/* direction */ APAL_GPIO_DIRECTION_INPUT, |
... | ... | |
321 | 321 |
/* port */ GPIOC, |
322 | 322 |
/* pad */ GPIOC_CHARGE_EN1_N, |
323 | 323 |
}; |
324 |
apalControlGpio_t moduleGpioChargeEn1 = { |
|
324 |
ROMCONST apalControlGpio_t moduleGpioChargeEn1 = {
|
|
325 | 325 |
/* GPIO */ &_gpioChargeEn1, |
326 | 326 |
/* meta */ { |
327 | 327 |
/* direction */ APAL_GPIO_DIRECTION_OUTPUT, |
... | ... | |
337 | 337 |
/* port */ GPIOC, |
338 | 338 |
/* pad */ GPIOC_IR_INT2_N, |
339 | 339 |
}; |
340 |
apalControlGpio_t moduleGpioIrInt2 = { |
|
340 |
ROMCONST apalControlGpio_t moduleGpioIrInt2 = {
|
|
341 | 341 |
/* GPIO */ &_gpioIrInt2, |
342 | 342 |
/* meta */ { |
343 | 343 |
/* direction */ APAL_GPIO_DIRECTION_INPUT, |
... | ... | |
353 | 353 |
/* port */ GPIOC, |
354 | 354 |
/* pad */ GPIOC_TOUCH_INT_N, |
355 | 355 |
}; |
356 |
apalControlGpio_t moduleGpioTouchInt = { |
|
356 |
ROMCONST apalControlGpio_t moduleGpioTouchInt = {
|
|
357 | 357 |
/* GPIO */ &_gpioTouchInt, |
358 | 358 |
/* meta */ { |
359 | 359 |
/* direction */ APAL_GPIO_DIRECTION_INPUT, |
... | ... | |
369 | 369 |
/* port */ GPIOC, |
370 | 370 |
/* pad */ GPIOC_SYS_DONE, |
371 | 371 |
}; |
372 |
apalControlGpio_t moduleGpioSysDone = { |
|
372 |
ROMCONST apalControlGpio_t moduleGpioSysDone = {
|
|
373 | 373 |
/* GPIO */ &_gpioSysDone, |
374 | 374 |
/* meta */ { |
375 | 375 |
/* direction */ APAL_GPIO_DIRECTION_INPUT, |
... | ... | |
385 | 385 |
/* port */ GPIOC, |
386 | 386 |
/* pad */ GPIOC_SYS_PROG_N, |
387 | 387 |
}; |
388 |
apalControlGpio_t moduleGpioSysProg = { |
|
388 |
ROMCONST apalControlGpio_t moduleGpioSysProg = {
|
|
389 | 389 |
/* GPIO */ &_gpioSysProg, |
390 | 390 |
/* meta */ { |
391 | 391 |
/* direction */ APAL_GPIO_DIRECTION_OUTPUT, |
... | ... | |
401 | 401 |
/* port */ GPIOC, |
402 | 402 |
/* pad */ GPIOC_PATH_DC, |
403 | 403 |
}; |
404 |
apalControlGpio_t moduleGpioPathDc = { |
|
404 |
ROMCONST apalControlGpio_t moduleGpioPathDc = {
|
|
405 | 405 |
/* GPIO */ &_gpioPathDc, |
406 | 406 |
/* meta */ { |
407 | 407 |
/* direction */ APAL_GPIO_DIRECTION_INPUT, |
... | ... | |
417 | 417 |
/* port */ GPIOC, |
418 | 418 |
/* pad */ GPIOC_SYS_SPI_DIR, |
419 | 419 |
}; |
420 |
apalControlGpio_t moduleGpioSysSpiDir = { |
|
420 |
ROMCONST apalControlGpio_t moduleGpioSysSpiDir = {
|
|
421 | 421 |
/* GPIO */ &_gpioSysSpiDir, |
422 | 422 |
/* meta */ { |
423 | 423 |
/* direction */ APAL_GPIO_DIRECTION_BIDIRECTIONAL, |
... | ... | |
433 | 433 |
/* port */ GPIOC, |
434 | 434 |
/* pad */ GPIOC_SYS_INT_N, |
435 | 435 |
}; |
436 |
apalControlGpio_t moduleGpioSysSync = { |
|
436 |
ROMCONST apalControlGpio_t moduleGpioSysSync = {
|
|
437 | 437 |
/* GPIO */ &_gpioSysSync, |
438 | 438 |
/* meta */ { |
439 | 439 |
/* direction */ APAL_GPIO_DIRECTION_BIDIRECTIONAL, |
... | ... | |
449 | 449 |
/* port */ GPIOC, |
450 | 450 |
/* pad */ GPIOC_SYS_PD_N, |
451 | 451 |
}; |
452 |
apalControlGpio_t moduleGpioSysPd = { |
|
452 |
ROMCONST apalControlGpio_t moduleGpioSysPd = {
|
|
453 | 453 |
/* GPIO */ &_gpioSysPd, |
454 | 454 |
/* meta */ { |
455 | 455 |
/* direction */ APAL_GPIO_DIRECTION_BIDIRECTIONAL, |
... | ... | |
465 | 465 |
/* port */ GPIOC, |
466 | 466 |
/* pad */ GPIOC_SYS_WARMRST_N, |
467 | 467 |
}; |
468 |
apalControlGpio_t moduleGpioSysWarmrst = { |
|
468 |
ROMCONST apalControlGpio_t moduleGpioSysWarmrst = {
|
|
469 | 469 |
/* GPIO */ &_gpioSysWarmrst, |
470 | 470 |
/* meta */ { |
471 | 471 |
/* direction */ APAL_GPIO_DIRECTION_BIDIRECTIONAL, |
... | ... | |
481 | 481 |
/* port */ GPIOC, |
482 | 482 |
/* pad */ GPIOC_BT_RST, |
483 | 483 |
}; |
484 |
apalControlGpio_t moduleGpioBtRst = { |
|
484 |
ROMCONST apalControlGpio_t moduleGpioBtRst = {
|
|
485 | 485 |
/* GPIO */ &_gpioBtRst, |
486 | 486 |
/* meta */ { |
487 | 487 |
/* direction */ APAL_GPIO_DIRECTION_OUTPUT, |
... | ... | |
497 | 497 |
/* port */ GPIOD, |
498 | 498 |
/* pad */ GPIOD_CHARGE_EN2_N, |
499 | 499 |
}; |
500 |
apalControlGpio_t moduleGpioChargeEn2 = { |
|
500 |
ROMCONST apalControlGpio_t moduleGpioChargeEn2 = {
|
|
501 | 501 |
/* GPIO */ &_gpioChargeEn2, |
502 | 502 |
/* meta */ { |
503 | 503 |
/* direction */ APAL_GPIO_DIRECTION_OUTPUT, |
... | ... | |
516 | 516 |
/*===========================================================================*/ |
517 | 517 |
|
518 | 518 |
#if (AMIROOS_CFG_SHELL_ENABLE == true) || defined(__DOXYGEN__) |
519 |
const char* moduleShellPrompt = "PowerManagement";
|
|
519 |
ROMCONST char* moduleShellPrompt = "PowerManagement";
|
|
520 | 520 |
#endif |
521 | 521 |
|
522 | 522 |
/** @} */ |
... | ... | |
1051 | 1051 |
aosUtRun(stream, &moduleUtAlldTps62113Ina219, "VSYS (4.2V)"); |
1052 | 1052 |
return AOS_OK; |
1053 | 1053 |
} |
1054 |
ut_tps62113ina219data_t _utAlldTps62113Ina219Data = { |
|
1054 |
static ut_tps62113ina219data_t _utAlldTps62113Ina219Data = {
|
|
1055 | 1055 |
/* TPS62113 */ &moduleLldStepDownConverter, |
1056 | 1056 |
/* INA219 */ &moduleLldPowerMonitorVsys42, |
1057 | 1057 |
/* timeout */ MICROSECONDS_PER_SECOND, |
modules/PowerManagement_1-1/module.h | ||
---|---|---|
17 | 17 |
*/ |
18 | 18 |
|
19 | 19 |
/** |
20 |
* @file
|
|
20 |
* @file |
|
21 | 21 |
* @brief Structures and constant for the PowerManagement module. |
22 | 22 |
* |
23 | 23 |
* @addtogroup powermanagement_module |
... | ... | |
154 | 154 |
/** |
155 | 155 |
* @brief SYS_REG_EN output signal GPIO. |
156 | 156 |
*/ |
157 |
extern apalControlGpio_t moduleGpioSysRegEn; |
|
157 |
extern ROMCONST apalControlGpio_t moduleGpioSysRegEn;
|
|
158 | 158 |
|
159 | 159 |
/** |
160 | 160 |
* @brief IR_INT1 input signal GPIO. |
161 | 161 |
*/ |
162 |
extern apalControlGpio_t moduleGpioIrInt1; |
|
162 |
extern ROMCONST apalControlGpio_t moduleGpioIrInt1;
|
|
163 | 163 |
|
164 | 164 |
/** |
165 | 165 |
* @brief POWER_EN output signal GPIO. |
166 | 166 |
*/ |
167 |
extern apalControlGpio_t moduleGpioPowerEn; |
|
167 |
extern ROMCONST apalControlGpio_t moduleGpioPowerEn;
|
|
168 | 168 |
|
169 | 169 |
/** |
170 | 170 |
* @brief SYS_UART_DN bidirectional signal GPIO. |
171 | 171 |
*/ |
172 |
extern apalControlGpio_t moduleGpioSysUartDn; |
|
172 |
extern ROMCONST apalControlGpio_t moduleGpioSysUartDn;
|
|
173 | 173 |
|
174 | 174 |
/** |
175 | 175 |
* @brief CHARGE_STAT2A input signal GPIO. |
176 | 176 |
*/ |
177 |
extern apalControlGpio_t moduleGpioChargeStat2A; |
|
177 |
extern ROMCONST apalControlGpio_t moduleGpioChargeStat2A;
|
|
178 | 178 |
|
179 | 179 |
/** |
180 | 180 |
* @brief GAUGE_BATLOW2 input signal GPIO. |
181 | 181 |
*/ |
182 |
extern apalControlGpio_t moduleGpioGaugeBatLow2; |
|
182 |
extern ROMCONST apalControlGpio_t moduleGpioGaugeBatLow2;
|
|
183 | 183 |
|
184 | 184 |
/** |
185 | 185 |
* @brief GAUGE_BATGD2 input signal GPIO. |
186 | 186 |
*/ |
187 |
extern apalControlGpio_t moduleGpioGaugeBatGd2; |
|
187 |
extern ROMCONST apalControlGpio_t moduleGpioGaugeBatGd2;
|
|
188 | 188 |
|
189 | 189 |
/** |
190 | 190 |
* @brief LED output signal GPIO. |
191 | 191 |
*/ |
192 |
extern apalControlGpio_t moduleGpioLed; |
|
192 |
extern ROMCONST apalControlGpio_t moduleGpioLed;
|
|
193 | 193 |
|
194 | 194 |
/** |
195 | 195 |
* @brief SYS_UART_UP bidirectional signal GPIO. |
196 | 196 |
*/ |
197 |
extern apalControlGpio_t moduleGpioSysUartUp; |
|
197 |
extern ROMCONST apalControlGpio_t moduleGpioSysUartUp;
|
|
198 | 198 |
|
199 | 199 |
/** |
200 | 200 |
* @brief CHARGE_STAT1A input signal GPIO. |
201 | 201 |
*/ |
202 |
extern apalControlGpio_t moduleGpioChargeStat1A; |
|
202 |
extern ROMCONST apalControlGpio_t moduleGpioChargeStat1A;
|
|
203 | 203 |
|
204 | 204 |
/** |
205 | 205 |
* @brief GAUGE_BATLOW1 input signal GPIO. |
206 | 206 |
*/ |
207 |
extern apalControlGpio_t moduleGpioGaugeBatLow1; |
|
207 |
extern ROMCONST apalControlGpio_t moduleGpioGaugeBatLow1;
|
|
208 | 208 |
|
209 | 209 |
/** |
210 | 210 |
* @brief GAUGE_BATGD1 input signal GPIO. |
211 | 211 |
*/ |
212 |
extern apalControlGpio_t moduleGpioGaugeBatGd1; |
|
212 |
extern ROMCONST apalControlGpio_t moduleGpioGaugeBatGd1;
|
|
213 | 213 |
|
214 | 214 |
/** |
215 | 215 |
* @brief CHARG_EN1 output signal GPIO. |
216 | 216 |
*/ |
217 |
extern apalControlGpio_t moduleGpioChargeEn1; |
|
217 |
extern ROMCONST apalControlGpio_t moduleGpioChargeEn1;
|
|
218 | 218 |
|
219 | 219 |
/** |
220 | 220 |
* @brief IR_INT2 input signal GPIO. |
221 | 221 |
*/ |
222 |
extern apalControlGpio_t moduleGpioIrInt2; |
|
222 |
extern ROMCONST apalControlGpio_t moduleGpioIrInt2;
|
|
223 | 223 |
|
224 | 224 |
/** |
225 | 225 |
* @brief TOUCH_INT input signal GPIO. |
226 | 226 |
*/ |
227 |
extern apalControlGpio_t moduleGpioTouchInt; |
|
227 |
extern ROMCONST apalControlGpio_t moduleGpioTouchInt;
|
|
228 | 228 |
|
229 | 229 |
/** |
230 | 230 |
* @brief SYS_DONE input signal GPIO. |
231 | 231 |
*/ |
232 |
extern apalControlGpio_t moduleGpioSysDone; |
|
232 |
extern ROMCONST apalControlGpio_t moduleGpioSysDone;
|
|
233 | 233 |
|
234 | 234 |
/** |
235 | 235 |
* @brief SYS_PROG output signal GPIO. |
236 | 236 |
*/ |
237 |
extern apalControlGpio_t moduleGpioSysProg; |
|
237 |
extern ROMCONST apalControlGpio_t moduleGpioSysProg;
|
|
238 | 238 |
|
239 | 239 |
/** |
240 | 240 |
* @brief PATH_DC input signal GPIO. |
241 | 241 |
*/ |
242 |
extern apalControlGpio_t moduleGpioPathDc; |
|
242 |
extern ROMCONST apalControlGpio_t moduleGpioPathDc;
|
|
243 | 243 |
|
244 | 244 |
/** |
245 | 245 |
* @brief SYS_SPI_DIR bidirectional signal GPIO. |
246 | 246 |
*/ |
247 |
extern apalControlGpio_t moduleGpioSysSpiDir; |
|
247 |
extern ROMCONST apalControlGpio_t moduleGpioSysSpiDir;
|
|
248 | 248 |
|
249 | 249 |
/** |
250 | 250 |
* @brief SYS_SYNC bidirectional signal GPIO. |
251 | 251 |
*/ |
252 |
extern apalControlGpio_t moduleGpioSysSync; |
|
252 |
extern ROMCONST apalControlGpio_t moduleGpioSysSync;
|
|
253 | 253 |
|
254 | 254 |
/** |
255 | 255 |
* @brief SYS_PD bidirectional signal GPIO. |
256 | 256 |
*/ |
257 |
extern apalControlGpio_t moduleGpioSysPd; |
|
257 |
extern ROMCONST apalControlGpio_t moduleGpioSysPd;
|
|
258 | 258 |
|
259 | 259 |
/** |
260 | 260 |
* @brief SYS_WARMRST bidirectional signal GPIO. |
261 | 261 |
*/ |
262 |
extern apalControlGpio_t moduleGpioSysWarmrst; |
|
262 |
extern ROMCONST apalControlGpio_t moduleGpioSysWarmrst;
|
|
263 | 263 |
|
264 | 264 |
/** |
265 | 265 |
* @brief BT_RST output signal GPIO. |
266 | 266 |
*/ |
267 |
extern apalControlGpio_t moduleGpioBtRst; |
|
267 |
extern ROMCONST apalControlGpio_t moduleGpioBtRst;
|
|
268 | 268 |
|
269 | 269 |
/** |
270 | 270 |
* @brief CHARGE_EN2 output signal GPIO. |
271 | 271 |
*/ |
272 |
extern apalControlGpio_t moduleGpioChargeEn2; |
|
272 |
extern ROMCONST apalControlGpio_t moduleGpioChargeEn2;
|
|
273 | 273 |
|
274 | 274 |
/** @} */ |
275 | 275 |
|
... | ... | |
354 | 354 |
/** |
355 | 355 |
* @brief Shell prompt text. |
356 | 356 |
*/ |
357 |
extern const char* moduleShellPrompt;
|
|
357 |
extern ROMCONST char* moduleShellPrompt;
|
|
358 | 358 |
#endif |
359 | 359 |
|
360 | 360 |
/** |
periphery-lld/AMiRo-LLD | ||
---|---|---|
1 |
Subproject commit 9d4563d7664d7a39bc04d065e7580e1991bb5dbb |
|
1 |
Subproject commit 11500ad81cfe6291b84e2faaf5731446da4014d4 |
Also available in: Unified diff