|
15 | 15 | #include <nrf_peripherals.h>
|
16 | 16 |
|
17 | 17 | #include <zephyr/logging/log.h>
|
| 18 | + |
18 | 19 | LOG_MODULE_REGISTER(pwm_nrf5_sw, CONFIG_PWM_LOG_LEVEL);
|
19 | 20 |
|
20 | 21 | #define GENERATOR_NODE DT_INST_PHANDLE(0, generator)
|
@@ -232,31 +233,31 @@ static int pwm_nrf5_sw_set_cycles(const struct device *dev, uint32_t channel,
|
232 | 233 | /* setup PPI */
|
233 | 234 | if (USE_RTC) {
|
234 | 235 | NRF_PPI->CH[ppi_chs[0]].EEP =
|
235 |
| - (uint32_t) &(rtc->EVENTS_COMPARE[1 + channel]); |
| 236 | + (uint32_t) &rtc->EVENTS_COMPARE[1 + channel]; |
236 | 237 | NRF_PPI->CH[ppi_chs[0]].TEP =
|
237 |
| - (uint32_t) &(NRF_GPIOTE->TASKS_OUT[gpiote_ch]); |
| 238 | + (uint32_t) &NRF_GPIOTE->TASKS_OUT[gpiote_ch]; |
238 | 239 | NRF_PPI->CH[ppi_chs[1]].EEP =
|
239 |
| - (uint32_t) &(rtc->EVENTS_COMPARE[0]); |
| 240 | + (uint32_t) &rtc->EVENTS_COMPARE[0]; |
240 | 241 | NRF_PPI->CH[ppi_chs[1]].TEP =
|
241 |
| - (uint32_t) &(NRF_GPIOTE->TASKS_OUT[gpiote_ch]); |
| 242 | + (uint32_t) &NRF_GPIOTE->TASKS_OUT[gpiote_ch]; |
242 | 243 | #if defined(PPI_FEATURE_FORKS_PRESENT)
|
243 | 244 | NRF_PPI->FORK[ppi_chs[1]].TEP =
|
244 |
| - (uint32_t) &(rtc->TASKS_CLEAR); |
| 245 | + (uint32_t) &rtc->TASKS_CLEAR; |
245 | 246 | #else
|
246 | 247 | NRF_PPI->CH[ppi_chs[2]].EEP =
|
247 |
| - (uint32_t) &(rtc->EVENTS_COMPARE[0]); |
| 248 | + (uint32_t) &rtc->EVENTS_COMPARE[0]; |
248 | 249 | NRF_PPI->CH[ppi_chs[2]].TEP =
|
249 |
| - (uint32_t) &(rtc->TASKS_CLEAR); |
| 250 | + (uint32_t) &rtc->TASKS_CLEAR; |
250 | 251 | #endif
|
251 | 252 | } else {
|
252 | 253 | NRF_PPI->CH[ppi_chs[0]].EEP =
|
253 |
| - (uint32_t) &(timer->EVENTS_COMPARE[1 + channel]); |
| 254 | + (uint32_t) &timer->EVENTS_COMPARE[1 + channel]; |
254 | 255 | NRF_PPI->CH[ppi_chs[0]].TEP =
|
255 |
| - (uint32_t) &(NRF_GPIOTE->TASKS_OUT[gpiote_ch]); |
| 256 | + (uint32_t) &NRF_GPIOTE->TASKS_OUT[gpiote_ch]; |
256 | 257 | NRF_PPI->CH[ppi_chs[1]].EEP =
|
257 |
| - (uint32_t) &(timer->EVENTS_COMPARE[0]); |
| 258 | + (uint32_t) &timer->EVENTS_COMPARE[0]; |
258 | 259 | NRF_PPI->CH[ppi_chs[1]].TEP =
|
259 |
| - (uint32_t) &(NRF_GPIOTE->TASKS_OUT[gpiote_ch]); |
| 260 | + (uint32_t) &NRF_GPIOTE->TASKS_OUT[gpiote_ch]; |
260 | 261 | }
|
261 | 262 | NRF_PPI->CHENSET = ppi_mask;
|
262 | 263 |
|
|
0 commit comments