Statistics
| Branch: | Tag: | Revision:

amiro-os / modules / PowerManagement_1-1 / module.c @ 96621a83

History | View | Annotate | Download (34.725 KB)

1 e545e620 Thomas Schöpping
/*
2
AMiRo-OS is an operating system designed for the Autonomous Mini Robot (AMiRo) platform.
3 96621a83 Thomas Schöpping
Copyright (C) 2016..2020  Thomas Schöpping et al.
4 e545e620 Thomas Schöpping

5
This program is free software: you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation, either version 3 of the License, or
8
(at your option) any later version.
9

10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
GNU General Public License for more details.
14

15
You should have received a copy of the GNU General Public License
16
along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
*/
18
19 53710ca3 Marc Rothmann
/**
20 acc97cbf Thomas Schöpping
 * @file
21 53710ca3 Marc Rothmann
 * @brief   Structures and constant for the PowerManagement module.
22
 *
23
 * @addtogroup powermanagement_module
24
 * @{
25
 */
26
27 c53ef0b1 Thomas Schöpping
#include <amiroos.h>
28
29
#include <string.h>
30 e545e620 Thomas Schöpping
31
/*===========================================================================*/
32
/**
33
 * @name Module specific functions
34
 * @{
35
 */
36
/*===========================================================================*/
37
38
/** @} */
39
40
/*===========================================================================*/
41
/**
42
 * @name ChibiOS/HAL configuration
43
 * @{
44
 */
45
/*===========================================================================*/
46
47
ADCConversionGroup moduleHalAdcVsysConversionGroup = {
48
  /* buffer type        */ true,
49
  /* number of channels */ 1,
50
  /* callback function  */ NULL,
51
  /* error callback     */ NULL,
52
  /* CR1                */ ADC_CR1_AWDEN | ADC_CR1_AWDIE,
53
  /* CR2                */ ADC_CR2_SWSTART | ADC_CR2_CONT,
54
  /* SMPR1              */ 0,
55
  /* SMPR2              */ ADC_SMPR2_SMP_AN9(ADC_SAMPLE_480),
56
  /* HTR                */ ADC_HTR_HT,
57
  /* LTR                */ 0,
58
  /* SQR1               */ ADC_SQR1_NUM_CH(1),
59
  /* SQR2               */ 0,
60
  /* SQR3               */ ADC_SQR3_SQ1_N(ADC_CHANNEL_IN9),
61
};
62
63
CANConfig moduleHalCanConfig = {
64
  /* mcr  */ CAN_MCR_ABOM | CAN_MCR_AWUM | CAN_MCR_TXFP,
65 933df08e Thomas Schöpping
  /* btr  */ CAN_BTR_SJW(1) | CAN_BTR_TS2(3) | CAN_BTR_TS1(15) | CAN_BTR_BRP(1),
66 e545e620 Thomas Schöpping
};
67
68 8be006e0 Thomas Schöpping
I2CConfig moduleHalI2cSrPm18Pm33GaugeRearConfig = {
69 e545e620 Thomas Schöpping
  /* I²C mode   */ OPMODE_I2C,
70
  /* frequency  */ 400000, // TODO: replace with some macro (-> ChibiOS/HAL)
71
  /* duty cycle */ FAST_DUTY_CYCLE_2,
72
};
73
74 8be006e0 Thomas Schöpping
I2CConfig moduleHalI2cSrPm42Pm50PmVddEepromGaugeFrontConfig = {
75 e545e620 Thomas Schöpping
  /* I²C mode   */ OPMODE_I2C,
76
  /* frequency  */ 400000, // TODO: replace with some macro (-> ChibiOS/HAL)
77
  /* duty cycle */ FAST_DUTY_CYCLE_2,
78
};
79
80
PWMConfig moduleHalPwmBuzzerConfig = {
81
  /* frequency              */ 1000000,
82
  /* period                 */ 0,
83
  /* callback               */ NULL,
84
  /* channel configurations */ {
85
    /* channel 0              */ {
86
      /* mode                   */ PWM_OUTPUT_DISABLED,
87
      /* callback               */ NULL
88
    },
89
    /* channel 1              */ {
90
      /* mode                   */ PWM_OUTPUT_ACTIVE_HIGH,
91
      /* callback               */ NULL
92
    },
93
    /* channel 2              */ {
94
      /* mode                   */ PWM_OUTPUT_DISABLED,
95
      /* callback               */ NULL
96
    },
97
    /* channel 3              */ {
98
      /* mode                   */ PWM_OUTPUT_DISABLED,
99
      /* callback               */ NULL
100
    },
101
  },
102
  /* TIM CR2 register       */ 0,
103 7de0cc90 Thomas Schöpping
#if (STM32_PWM_USE_ADVANCED == TRUE)
104 e545e620 Thomas Schöpping
  /* TIM BDTR register      */ 0,
105 7de0cc90 Thomas Schöpping
#endif /* (STM32_PWM_USE_ADVANCED == TRUE) */
106 e545e620 Thomas Schöpping
  /* TIM DIER register      */ 0,
107
};
108
109
SerialConfig moduleHalProgIfConfig = {
110
  /* bit rate */ 115200,
111
  /* CR1      */ 0,
112
  /* CR1      */ 0,
113
  /* CR1      */ 0,
114
};
115
116
/** @} */
117
118
/*===========================================================================*/
119
/**
120
 * @name GPIO definitions
121
 * @{
122
 */
123
/*===========================================================================*/
124
125 1e5f7648 Thomas Schöpping
/**
126
 * @brief   SYS_REG_EN output signal GPIO.
127
 */
128
static apalGpio_t _gpioSysRegEn = {
129 3106e8cc Thomas Schöpping
  /* line */ LINE_SYS_REG_EN,
130 e545e620 Thomas Schöpping
};
131 9af9aaea Thomas Schöpping
ROMCONST apalControlGpio_t moduleGpioSysRegEn = {
132 1e5f7648 Thomas Schöpping
  /* GPIO */ &_gpioSysRegEn,
133
  /* meta */ {
134
    /* direction      */ APAL_GPIO_DIRECTION_OUTPUT,
135
    /* active state   */ APAL_GPIO_ACTIVE_HIGH,
136
    /* interrupt edge */ APAL_GPIO_EDGE_NONE,
137
  },
138
};
139 e545e620 Thomas Schöpping
140 1e5f7648 Thomas Schöpping
/**
141
 * @brief   IR_INT1 input signal GPIO.
142
 */
143
static apalGpio_t _gpioIrInt1 = {
144 3106e8cc Thomas Schöpping
  /* line */ LINE_IR_INT1_N,
145 e545e620 Thomas Schöpping
};
146 acc97cbf Thomas Schöpping
ROMCONST apalControlGpio_t moduleGpioIrInt1 = {
147 1e5f7648 Thomas Schöpping
  /* GPIO */ &_gpioIrInt1,
148
  /* meta */ {
149
    /* direction      */ APAL_GPIO_DIRECTION_INPUT,
150 8be006e0 Thomas Schöpping
#if (BOARD_SENSORRING == BOARD_PROXIMITYSENSOR)
151 1e5f7648 Thomas Schöpping
    /* active state   */ (VCNL4020_LLD_INT_EDGE == APAL_GPIO_EDGE_RISING) ? APAL_GPIO_ACTIVE_HIGH : APAL_GPIO_ACTIVE_LOW,
152
    /* interrupt edge */ VCNL4020_LLD_INT_EDGE,
153 8be006e0 Thomas Schöpping
#elif (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L0X)
154 bffb3465 Thomas Schöpping
    /* active state   */ (PCAL6524_LLD_INT_EDGE == APAL_GPIO_EDGE_RISING) ? APAL_GPIO_ACTIVE_HIGH : APAL_GPIO_ACTIVE_LOW,
155
    /* interrupt edge */ PCAL6524_LLD_INT_EDGE,
156 8be006e0 Thomas Schöpping
#elif (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X)
157 bffb3465 Thomas Schöpping
    /* active state   */ (PCAL6524_LLD_INT_EDGE == APAL_GPIO_EDGE_RISING) ? APAL_GPIO_ACTIVE_HIGH : APAL_GPIO_ACTIVE_LOW,
158
    /* interrupt edge */ PCAL6524_LLD_INT_EDGE,
159 7de0cc90 Thomas Schöpping
#else /* (BOARD_SENSORRING == ?) */
160 8be006e0 Thomas Schöpping
    /* active state   */ APAL_GPIO_ACTIVE_LOW,
161
    /* interrupt edge */ APAL_GPIO_EDGE_NONE,
162 7de0cc90 Thomas Schöpping
#endif /* (BOARD_SENSORRING == ?) */
163 1e5f7648 Thomas Schöpping
  },
164
};
165 e545e620 Thomas Schöpping
166 1e5f7648 Thomas Schöpping
/**
167
 * @brief   POWER_EN output signal GPIO.
168
 */
169
static apalGpio_t _gpioPowerEn = {
170 3106e8cc Thomas Schöpping
  /* line */ LINE_POWER_EN,
171 e545e620 Thomas Schöpping
};
172 acc97cbf Thomas Schöpping
ROMCONST apalControlGpio_t moduleGpioPowerEn = {
173 1e5f7648 Thomas Schöpping
  /* GPIO */ &_gpioPowerEn,
174
  /* meta */ {
175
    /* direction      */ APAL_GPIO_DIRECTION_OUTPUT,
176
    /* active state   */ APAL_GPIO_ACTIVE_HIGH,
177
    /* interrupt edge */ APAL_GPIO_EDGE_NONE,
178
  },
179
};
180 e545e620 Thomas Schöpping
181 1e5f7648 Thomas Schöpping
/**
182
 * @brief   SYS_UART_DN bidirectional signal GPIO.
183
 */
184
static apalGpio_t _gpioSysUartDn = {
185 3106e8cc Thomas Schöpping
  /* line */ LINE_SYS_UART_DN,
186 e545e620 Thomas Schöpping
};
187 acc97cbf Thomas Schöpping
ROMCONST apalControlGpio_t moduleGpioSysUartDn = {
188 1e5f7648 Thomas Schöpping
  /* GPIO */ &_gpioSysUartDn,
189
  /* meta */ {
190
    /* direction      */ APAL_GPIO_DIRECTION_BIDIRECTIONAL,
191
    /* active state   */ APAL_GPIO_ACTIVE_LOW,
192
    /* interrupt edge */ APAL_GPIO_EDGE_BOTH,
193
  },
194
};
195 e545e620 Thomas Schöpping
196 1e5f7648 Thomas Schöpping
/**
197
 * @brief   CHARGE_STAT2A input signal GPIO.
198
 */
199
static apalGpio_t _gpioChargeStat2A = {
200 3106e8cc Thomas Schöpping
  /* line */ LINE_CHARGE_STAT2A,
201 e545e620 Thomas Schöpping
};
202 acc97cbf Thomas Schöpping
ROMCONST apalControlGpio_t moduleGpioChargeStat2A = {
203 1e5f7648 Thomas Schöpping
  /* GPIO */ &_gpioChargeStat2A,
204
  /* meta */ {
205
    /* direction      */ APAL_GPIO_DIRECTION_INPUT,
206 ddf34c3d Thomas Schöpping
    /* active state   */ BQ241xx_LLD_CHARGE_STATUS_GPIO_ACTIVE_STATE,
207 1e5f7648 Thomas Schöpping
    /* interrupt edge */ APAL_GPIO_EDGE_NONE,
208
  },
209
};
210 e545e620 Thomas Schöpping
211 1e5f7648 Thomas Schöpping
/**
212
 * @brief   GAUGE_BATLOW2 input signal GPIO.
213
 */
214
static apalGpio_t _gpioGaugeBatLow2 = {
215 3106e8cc Thomas Schöpping
  /* line */ LINE_GAUGE_BATLOW2,
216 e545e620 Thomas Schöpping
};
217 acc97cbf Thomas Schöpping
ROMCONST apalControlGpio_t moduleGpioGaugeBatLow2 = {
218 1e5f7648 Thomas Schöpping
  /* GPIO */ &_gpioGaugeBatLow2,
219
  /* meta */ {
220
    /* direction      */ APAL_GPIO_DIRECTION_INPUT,
221
    /* active state   */ BQ27500_LLD_BATLOW_ACTIVE_STATE,
222
    /* interrupt edge */ APAL_GPIO_EDGE_BOTH,
223
  },
224
};
225 e545e620 Thomas Schöpping
226 1e5f7648 Thomas Schöpping
/**
227
 * @brief   GAUGE_BATGD2 input signal GPIO.
228
 */
229
static apalGpio_t _gpioGaugeBatGd2 = {
230 3106e8cc Thomas Schöpping
  /* line */ LINE_GAUGE_BATGD2_N,
231 e545e620 Thomas Schöpping
};
232 acc97cbf Thomas Schöpping
ROMCONST apalControlGpio_t moduleGpioGaugeBatGd2 = {
233 1e5f7648 Thomas Schöpping
  /* GPIO */ &_gpioGaugeBatGd2,
234
  /* meta */ {
235
    /* direction      */ APAL_GPIO_DIRECTION_INPUT,
236
    /* active state   */ BQ27500_LLD_BATGOOD_ACTIVE_STATE,
237
    /* interrupt edge */ APAL_GPIO_EDGE_BOTH,
238
  },
239
};
240 e545e620 Thomas Schöpping
241 1e5f7648 Thomas Schöpping
/**
242
 * @brief   LED output signal GPIO.
243
 */
244
static apalGpio_t _gpioLed = {
245 3106e8cc Thomas Schöpping
  /* line */ LINE_LED,
246 e545e620 Thomas Schöpping
};
247 acc97cbf Thomas Schöpping
ROMCONST apalControlGpio_t moduleGpioLed = {
248 1e5f7648 Thomas Schöpping
  /* GPIO */ &_gpioLed,
249
  /* meta */ {
250
    /* direction      */ APAL_GPIO_DIRECTION_OUTPUT,
251 4c72a54c Thomas Schöpping
    /* active state   */ APAL_GPIO_ACTIVE_LOW,
252 1e5f7648 Thomas Schöpping
    /* interrupt edge */ APAL_GPIO_EDGE_NONE,
253
  },
254
};
255 e545e620 Thomas Schöpping
256 1e5f7648 Thomas Schöpping
/**
257
 * @brief   SYS_UART_UP bidirectional signal GPIO.
258
 */
259
static apalGpio_t _gpioSysUartUp = {
260 3106e8cc Thomas Schöpping
  /* line */ LINE_SYS_UART_UP,
261 e545e620 Thomas Schöpping
};
262 acc97cbf Thomas Schöpping
ROMCONST apalControlGpio_t moduleGpioSysUartUp = {
263 1e5f7648 Thomas Schöpping
  /* GPIO */ &_gpioSysUartUp,
264
  /* meta */ {
265
    /* direction      */ APAL_GPIO_DIRECTION_BIDIRECTIONAL,
266
    /* active state   */ APAL_GPIO_ACTIVE_LOW,
267
    /* interrupt edge */ APAL_GPIO_EDGE_BOTH,
268
  },
269
};
270 e545e620 Thomas Schöpping
271 1e5f7648 Thomas Schöpping
/**
272
 * @brief   CHARGE_STAT1A input signal GPIO.
273
 */
274
static apalGpio_t _gpioChargeStat1A = {
275 3106e8cc Thomas Schöpping
  /* line */ LINE_CHARGE_STAT1A,
276 e545e620 Thomas Schöpping
};
277 acc97cbf Thomas Schöpping
ROMCONST apalControlGpio_t moduleGpioChargeStat1A = {
278 1e5f7648 Thomas Schöpping
  /* GPIO */ &_gpioChargeStat1A,
279
  /* meta */ {
280
    /* direction      */ APAL_GPIO_DIRECTION_INPUT,
281 ddf34c3d Thomas Schöpping
    /* active state   */ BQ241xx_LLD_CHARGE_STATUS_GPIO_ACTIVE_STATE,
282 1e5f7648 Thomas Schöpping
    /* interrupt edge */ APAL_GPIO_EDGE_NONE,
283
  },
284
};
285 e545e620 Thomas Schöpping
286 1e5f7648 Thomas Schöpping
/**
287
 * @brief   GAUGE_BATLOW1 input signal GPIO.
288
 */
289
static apalGpio_t _gpioGaugeBatLow1 = {
290 3106e8cc Thomas Schöpping
  /* line */ LINE_GAUGE_BATLOW1,
291 e545e620 Thomas Schöpping
};
292 acc97cbf Thomas Schöpping
ROMCONST apalControlGpio_t moduleGpioGaugeBatLow1 = {
293 1e5f7648 Thomas Schöpping
  /* GPIO */ &_gpioGaugeBatLow1,
294
  /* meta */ {
295
    /* direction      */ APAL_GPIO_DIRECTION_INPUT,
296
    /* active state   */ BQ27500_LLD_BATLOW_ACTIVE_STATE,
297
    /* interrupt edge */ APAL_GPIO_EDGE_BOTH,
298
  },
299
};
300 e545e620 Thomas Schöpping
301 1e5f7648 Thomas Schöpping
/**
302
 * @brief   GAUGE_BATGD1 input signal GPIO.
303
 */
304
static apalGpio_t _gpioGaugeBatGd1 = {
305 3106e8cc Thomas Schöpping
  /* line */ LINE_GAUGE_BATGD1_N,
306 e545e620 Thomas Schöpping
};
307 acc97cbf Thomas Schöpping
ROMCONST apalControlGpio_t moduleGpioGaugeBatGd1 = {
308 1e5f7648 Thomas Schöpping
  /* GPIO */ &_gpioGaugeBatGd1,
309
  /* meta */ {
310
    /* direction      */ APAL_GPIO_DIRECTION_INPUT,
311
    /* active state   */ BQ27500_LLD_BATGOOD_ACTIVE_STATE,
312
    /* interrupt edge */ APAL_GPIO_EDGE_BOTH,
313
  },
314
};
315 e545e620 Thomas Schöpping
316 1e5f7648 Thomas Schöpping
/**
317
 * @brief   CHARG_EN1 output signal GPIO.
318
 */
319
static apalGpio_t _gpioChargeEn1 = {
320 3106e8cc Thomas Schöpping
  /* line */ LINE_CHARGE_EN1_N,
321 e545e620 Thomas Schöpping
};
322 acc97cbf Thomas Schöpping
ROMCONST apalControlGpio_t moduleGpioChargeEn1 = {
323 1e5f7648 Thomas Schöpping
  /* GPIO */ &_gpioChargeEn1,
324
  /* meta */ {
325
    /* direction      */ APAL_GPIO_DIRECTION_OUTPUT,
326 ddf34c3d Thomas Schöpping
    /* active state   */ BQ241xx_LLD_ENABLED_GPIO_ACTIVE_STATE,
327 1e5f7648 Thomas Schöpping
    /* interrupt edge */ APAL_GPIO_EDGE_NONE,
328
  },
329
};
330 e545e620 Thomas Schöpping
331 1e5f7648 Thomas Schöpping
/**
332
 * @brief   IR_INT2 input signal GPIO.
333
 */
334
static apalGpio_t _gpioIrInt2 = {
335 3106e8cc Thomas Schöpping
  /* line */ LINE_IR_INT2_N,
336 e545e620 Thomas Schöpping
};
337 acc97cbf Thomas Schöpping
ROMCONST apalControlGpio_t moduleGpioIrInt2 = {
338 1e5f7648 Thomas Schöpping
  /* GPIO */ &_gpioIrInt2,
339
  /* meta */ {
340
    /* direction      */ APAL_GPIO_DIRECTION_INPUT,
341 8be006e0 Thomas Schöpping
#if (BOARD_SENSORRING == BOARD_PROXIMITYSENSOR)
342 1e5f7648 Thomas Schöpping
    /* active state   */ (VCNL4020_LLD_INT_EDGE == APAL_GPIO_EDGE_RISING) ? APAL_GPIO_ACTIVE_HIGH : APAL_GPIO_ACTIVE_LOW,
343
    /* interrupt edge */ VCNL4020_LLD_INT_EDGE,
344 8be006e0 Thomas Schöpping
#elif (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L0X)
345 bffb3465 Thomas Schöpping
    /* active state   */ (PCAL6524_LLD_INT_EDGE == APAL_GPIO_EDGE_RISING) ? APAL_GPIO_ACTIVE_HIGH : APAL_GPIO_ACTIVE_LOW,
346
    /* interrupt edge */ PCAL6524_LLD_INT_EDGE,
347 8be006e0 Thomas Schöpping
#elif (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X)
348 bffb3465 Thomas Schöpping
    /* active state   */ (PCAL6524_LLD_INT_EDGE == APAL_GPIO_EDGE_RISING) ? APAL_GPIO_ACTIVE_HIGH : APAL_GPIO_ACTIVE_LOW,
349
    /* interrupt edge */ PCAL6524_LLD_INT_EDGE,
350 7de0cc90 Thomas Schöpping
#else /* (BOARD_SENSORRING == ?) */
351 8be006e0 Thomas Schöpping
    /* active state   */ APAL_GPIO_ACTIVE_LOW,
352
    /* interrupt edge */ APAL_GPIO_EDGE_NONE,
353 7de0cc90 Thomas Schöpping
#endif /* (BOARD_SENSORRING == ?) */
354 1e5f7648 Thomas Schöpping
  },
355
};
356 e545e620 Thomas Schöpping
357 1e5f7648 Thomas Schöpping
/**
358
 * @brief   TOUCH_INT input signal GPIO.
359
 */
360
static apalGpio_t _gpioTouchInt = {
361 3106e8cc Thomas Schöpping
  /* line */ LINE_TOUCH_INT_N,
362 e545e620 Thomas Schöpping
};
363 acc97cbf Thomas Schöpping
ROMCONST apalControlGpio_t moduleGpioTouchInt = {
364 1e5f7648 Thomas Schöpping
  /* GPIO */ &_gpioTouchInt,
365
  /* meta */ {
366
    /* direction      */ APAL_GPIO_DIRECTION_INPUT,
367 8be006e0 Thomas Schöpping
#if (BOARD_SENSORRING == BOARD_PROXIMITYSENSOR)
368 1e5f7648 Thomas Schöpping
    /* active state   */ (MPR121_LLD_INT_EDGE == APAL_GPIO_EDGE_RISING) ? APAL_GPIO_ACTIVE_HIGH : APAL_GPIO_ACTIVE_LOW,
369
    /* interrupt edge */ MPR121_LLD_INT_EDGE,
370 8be006e0 Thomas Schöpping
#elif (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L0X)
371 bffb3465 Thomas Schöpping
    /* active state   */ (AT42QT1050_LLD_INT_EDGE == APAL_GPIO_EDGE_RISING) ? APAL_GPIO_ACTIVE_HIGH : APAL_GPIO_ACTIVE_LOW,
372
    /* interrupt edge */ AT42QT1050_LLD_INT_EDGE,
373 8be006e0 Thomas Schöpping
#elif (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X)
374 bffb3465 Thomas Schöpping
    /* active state   */ (AT42QT1050_LLD_INT_EDGE == APAL_GPIO_EDGE_RISING) ? APAL_GPIO_ACTIVE_HIGH : APAL_GPIO_ACTIVE_LOW,
375
    /* interrupt edge */ AT42QT1050_LLD_INT_EDGE,
376 7de0cc90 Thomas Schöpping
#else /* (BOARD_SENSORRING == ?) */
377 8be006e0 Thomas Schöpping
    /* active state   */ APAL_GPIO_ACTIVE_LOW,
378
    /* interrupt edge */ APAL_GPIO_EDGE_NONE,
379 7de0cc90 Thomas Schöpping
#endif /* (BOARD_SENSORRING == ?) */
380 1e5f7648 Thomas Schöpping
  },
381
};
382 e545e620 Thomas Schöpping
383 1e5f7648 Thomas Schöpping
/**
384
 * @brief   SYS_DONE input signal GPIO.
385
 */
386
static apalGpio_t _gpioSysDone = {
387 3106e8cc Thomas Schöpping
  /* line */ LINE_SYS_DONE,
388 e545e620 Thomas Schöpping
};
389 acc97cbf Thomas Schöpping
ROMCONST apalControlGpio_t moduleGpioSysDone = {
390 1e5f7648 Thomas Schöpping
  /* GPIO */ &_gpioSysDone,
391
  /* meta */ {
392
    /* direction      */ APAL_GPIO_DIRECTION_INPUT,
393
    /* active state   */ APAL_GPIO_ACTIVE_HIGH,
394
    /* interrupt edge */ APAL_GPIO_EDGE_NONE,
395
  },
396
};
397 e545e620 Thomas Schöpping
398 1e5f7648 Thomas Schöpping
/**
399
 * @brief   SYS_PROG output signal GPIO.
400
 */
401
static apalGpio_t _gpioSysProg = {
402 3106e8cc Thomas Schöpping
  /* line */ LINE_SYS_PROG_N,
403 e545e620 Thomas Schöpping
};
404 acc97cbf Thomas Schöpping
ROMCONST apalControlGpio_t moduleGpioSysProg = {
405 1e5f7648 Thomas Schöpping
  /* GPIO */ &_gpioSysProg,
406
  /* meta */ {
407
    /* direction      */ APAL_GPIO_DIRECTION_OUTPUT,
408
    /* active state   */ APAL_GPIO_ACTIVE_LOW,
409
    /* interrupt edge */ APAL_GPIO_EDGE_NONE,
410
  },
411
};
412 e545e620 Thomas Schöpping
413 1e5f7648 Thomas Schöpping
/**
414
 * @brief   PATH_DC input signal GPIO.
415
 */
416
static apalGpio_t _gpioPathDc = {
417 3106e8cc Thomas Schöpping
  /* line */ LINE_PATH_DC,
418 e545e620 Thomas Schöpping
};
419 acc97cbf Thomas Schöpping
ROMCONST apalControlGpio_t moduleGpioPathDc = {
420 1e5f7648 Thomas Schöpping
  /* GPIO */ &_gpioPathDc,
421
  /* meta */ {
422
    /* direction      */ APAL_GPIO_DIRECTION_INPUT,
423
    /* active state   */ APAL_GPIO_ACTIVE_LOW,
424
    /* interrupt edge */ APAL_GPIO_EDGE_BOTH,
425
  },
426
};
427 e545e620 Thomas Schöpping
428 1e5f7648 Thomas Schöpping
/**
429
 * @brief   SYS_SPI_DIR bidirectional signal GPIO.
430
 */
431
static apalGpio_t _gpioSysSpiDir = {
432 3106e8cc Thomas Schöpping
  /* line */ LINE_SYS_SPI_DIR,
433 e545e620 Thomas Schöpping
};