We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 83978e6 commit 8f5378bCopy full SHA for 8f5378b
drivers/pwm/pwm_nrf5_sw.c
@@ -232,11 +232,15 @@ static int pwm_nrf5_sw_init(struct device *dev)
232
* NOTE: If PA/LNA feature is enabled for nRF52x, then additional two PPI
233
* channels 14-15 are used by BLE controller.
234
*/
235
-/* FIXME: For nRF51, use .timer = NRF_TIMER1, .ppi_base = 7 */
236
static const struct pwm_config pwm_nrf5_sw_0_config = {
+#if defined(CONFIG_SOC_SERIES_NRF51X)
237
+ .timer = NRF_TIMER1,
238
+ .ppi_base = 7,
239
+#else
240
.timer = NRF_TIMER2,
- .gpiote_base = 0,
241
.ppi_base = 14,
242
+#endif
243
+ .gpiote_base = 0,
244
.map_size = PWM_0_MAP_SIZE,
245
};
246
0 commit comments