Revision 3106e8cc modules/LightRing_1-0/module.c

View differences:

modules/LightRing_1-0/module.c
63 63
SPIConfig moduleHalSpiLightConfig = {
64 64
  /* circular buffer mode        */ false,
65 65
  /* callback function pointer   */ NULL,
66
  /* chip select line port       */ GPIOC,
67
  /* chip select line pad number */ GPIOC_LIGHT_XLAT,
66
  /* chip select line port       */ PAL_PORT(LINE_LIGHT_XLAT),
67
  /* chip select line pad number */ PAL_PAD(LINE_LIGHT_XLAT),
68 68
  /* CR1                         */ SPI_CR1_BR_0 | SPI_CR1_BR_1,
69 69
  /* CR2                         */ SPI_CR2_RXDMAEN | SPI_CR2_TXDMAEN,
70 70
};
......
72 72
SPIConfig moduleHalSpiWlConfig = {
73 73
  /* circular buffer mode        */ false,
74 74
  /* callback function pointer   */ NULL,
75
  /* chip select line port       */ GPIOB,
76
  /* chip select line pad number */ GPIOB_WL_SS_N,
75
  /* chip select line port       */ PAL_PORT(LINE_WL_SS_N),
76
  /* chip select line pad number */ PAL_PAD(LINE_WL_SS_N),
77 77
  /* CR1                         */ SPI_CR1_BR_0,
78 78
  /* CR2                         */ SPI_CR2_RXDMAEN | SPI_CR2_TXDMAEN,
79 79
};
......
89 89
 * @brief   LIGHT_BANK output signal GPIO.
90 90
 */
91 91
static apalGpio_t _gpioLightBlank = {
92
  /* port */ GPIOA,
93
  /* pad  */ GPIOA_LIGHT_BLANK,
92
  /* line */ LINE_LIGHT_BLANK,
94 93
};
95 94
ROMCONST apalControlGpio_t moduleGpioLightBlank = {
96 95
  /* GPIO */ &_gpioLightBlank,
......
105 104
 * @brief   LASER_EN output signal GPIO.
106 105
 */
107 106
static apalGpio_t _gpioLaserEn = {
108
  /* port */ GPIOB,
109
  /* pad  */ GPIOB_LASER_EN,
107
  /* line */ LINE_LASER_EN,
110 108
};
111 109
ROMCONST apalControlGpio_t moduleGpioLaserEn = {
112 110
  /* GPIO */ &_gpioLaserEn,
......
121 119
 * @brief   LASER_OC input signal GPIO.
122 120
 */
123 121
static apalGpio_t _gpioLaserOc = {
124
  /* port */ GPIOB,
125
  /* pad  */ GPIOB_LASER_OC_N,
122
  /* line */ LINE_LASER_OC_N,
126 123
};
127 124
ROMCONST apalControlGpio_t moduleGpioLaserOc = {
128 125
  /* GPIO */ &_gpioLaserOc,
......
137 134
 * @brief   SYS_UART_DN bidirectional signal GPIO.
138 135
 */
139 136
static apalGpio_t _gpioSysUartDn = {
140
  /* port */ GPIOB,
141
  /* pad  */ GPIOB_SYS_UART_DN,
137
  /* line */ LINE_SYS_UART_DN,
142 138
};
143 139
ROMCONST apalControlGpio_t moduleGpioSysUartDn = {
144 140
  /* GPIO */ &_gpioSysUartDn,
......
153 149
 * @brief   WL_GDO2 input signal GPIO.
154 150
 */
155 151
static apalGpio_t _gpioWlGdo2 = {
156
  /* port */ GPIOB,
157
  /* pad  */ GPIOB_WL_GDO2,
152
  /* line */ LINE_WL_GDO2,
158 153
};
159 154
ROMCONST apalControlGpio_t moduleGpioWlGdo2 = {
160 155
  /* GPIO */ &_gpioWlGdo2,
......
169 164
 * @brief   WL_GDO0 input signal GPIO.
170 165
 */
171 166
static apalGpio_t _gpioWlGdo0= {
172
  /* port */ GPIOB,
173
  /* pad  */ GPIOB_WL_GDO0,
167
  /* line */ LINE_WL_GDO0,
174 168
};
175 169
ROMCONST apalControlGpio_t moduleGpioWlGdo0 = {
176 170
  /* GPIO */ &_gpioWlGdo0,
......
182 176
};
183 177

  
184 178
/**
185
 * @brief   LIGHT_XLAT output signal GPIO.
186
 */
187
static apalGpio_t _gpioLightXlat = {
188
  /* port */ GPIOC,
189
  /* pad  */ GPIOC_LIGHT_XLAT,
190
};
191
ROMCONST apalControlGpio_t moduleGpioLightXlat = {
192
  /* GPIO */ &_gpioLightXlat,
193
  /* meta */ {
194
    /* direction      */ APAL_GPIO_DIRECTION_OUTPUT,
195
    /* active state   */ TLC5947_LLD_XLAT_ACTIVE_STATE,
196
    /* interrupt edge */ APAL_GPIO_EDGE_NONE,
197
  },
198
};
199

  
200
/**
201 179
 * @brief   SYS_PD bidirectional signal GPIO.
202 180
 */
203 181
static apalGpio_t _gpioSysPd = {
204
  /* port */ GPIOC,
205
  /* pad  */ GPIOC_SYS_PD_N,
182
  /* line */ LINE_SYS_PD_N,
206 183
};
207 184
ROMCONST apalControlGpio_t moduleGpioSysPd = {
208 185
  /* GPIO */ &_gpioSysPd,
......
217 194
 * @brief   SYS_SYNC bidirectional signal GPIO.
218 195
 */
219 196
static apalGpio_t _gpioSysSync = {
220
  /* port */ GPIOD,
221
  /* pad  */ GPIOD_SYS_INT_N,
197
  /* line */ LINE_SYS_INT_N,
222 198
};
223 199
ROMCONST apalControlGpio_t moduleGpioSysSync = {
224 200
  /* GPIO */ &_gpioSysSync,
......
268 244
TLC5947Driver moduleLldLedPwm = {
269 245
  /* SPI driver         */ &MODULE_HAL_SPI_LIGHT,
270 246
  /* BLANK signal GPIO  */ &moduleGpioLightBlank,
271
  /* XLAT signal GPIO   */ &moduleGpioLightXlat,
247
  /* XLAT signal GPIO   */ NULL,
272 248
};
273 249

  
274 250
TPS20xxBDriver moduleLldPowerSwitchLaser = {

Also available in: Unified diff