File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -229,8 +229,8 @@ struct uarte_async_rx_cbwt {
229229 uint8_t * anomaly_byte_dst ;
230230 uint8_t anomaly_byte ;
231231#endif
232+ nrfx_gppi_handle_t ppi_h ;
232233 uint8_t bounce_idx ;
233- uint8_t ppi_ch ;
234234 bool in_irq ;
235235 bool discard_fifo ;
236236};
@@ -1719,18 +1719,17 @@ static int cbwt_uarte_async_init(const struct device *dev)
17191719 NRF_UARTE_INT_RXTO_MASK ;
17201720 uint32_t evt = nrf_uarte_event_address_get (cfg -> uarte_regs , NRF_UARTE_EVENT_RXDRDY );
17211721 uint32_t tsk = nrf_timer_task_address_get (cfg -> timer_regs , NRF_TIMER_TASK_COUNT );
1722- nrfx_err_t ret ;
1722+ int ret ;
17231723
17241724 nrf_timer_mode_set (cfg -> timer_regs , NRF_TIMER_MODE_COUNTER );
17251725 nrf_timer_bit_width_set (cfg -> timer_regs , NRF_TIMER_BIT_WIDTH_32 );
17261726
1727- ret = nrfx_gppi_channel_alloc ( & cbwt_data -> ppi_ch );
1728- if (ret != NRFX_SUCCESS ) {
1729- return - ENOMEM ;
1727+ ret = nrfx_gppi_conn_alloc ( evt , tsk , & cbwt_data -> ppi_h );
1728+ if (ret < 0 ) {
1729+ return rv ;
17301730 }
17311731
1732- nrfx_gppi_channel_endpoints_setup (cbwt_data -> ppi_ch , evt , tsk );
1733- nrfx_gppi_channels_enable (BIT (cbwt_data -> ppi_ch ));
1732+ nrfx_gppi_conn_enable (cbwt_data -> ppi_h );
17341733
17351734#ifdef CONFIG_UART_USE_RUNTIME_CONFIGURE
17361735 cbwt_data -> bounce_buf_swap_len = cfg -> bounce_buf_swap_len ;
You can’t perform that action at this time.
0 commit comments