|
24 | 24 | #define VIO_SINGLE_BUS_MASK 0x0004 |
25 | 25 | #define VIO_QUAD_BUS_MASK 0x001E |
26 | 26 |
|
27 | | -#define IN_REG_EMPTY 0xffff |
| 27 | +#define IN_REG_EMPTY UINT16_MAX |
28 | 28 |
|
29 | 29 | /* Time in clock cycles required for RX transfer stop procedure in modes 1-3. |
30 | 30 | * Which is min time between last two clock edges of transfer. |
@@ -121,7 +121,7 @@ NRF_STATIC_INLINE void rx_end_procedure_mode_3(volatile hrt_xfer_t *hrt_xfer_par |
121 | 121 | } |
122 | 122 |
|
123 | 123 | last_word = (BSWAP_32(last_word) << hrt_xfer_params->bus_widths.data) | |
124 | | - (in & bus_mask) >> bus_position; |
| 124 | + ((in & bus_mask) >> bus_position); |
125 | 125 | last_word = last_word << (BITS_IN_WORD - |
126 | 126 | (hrt_xfer_params->xfer_data[HRT_FE_DATA].last_word_clocks + 1) * |
127 | 127 | hrt_xfer_params->bus_widths.data); |
@@ -442,12 +442,10 @@ void hrt_read(volatile hrt_xfer_t *hrt_xfer_params) |
442 | 442 |
|
443 | 443 | if (hrt_xfer_params->bus_widths.data == 8) { |
444 | 444 | last_word = nrf_vpr_csr_vio_in_buffered_reversed_byte_get(); |
445 | | - hrt_xfer_params->xfer_data[HRT_FE_DATA].data[0] = |
446 | | - (uint8_t)(last_word >> BYTE_2_SHIFT); |
447 | | - hrt_xfer_params->xfer_data[HRT_FE_DATA].data[1] = |
448 | | - (uint8_t)(last_word >> BYTE_2_SHIFT); |
| 445 | + hrt_xfer_params->xfer_data[HRT_FE_DATA].last_word = |
| 446 | + (uint16_t)(last_word >> BYTE_2_SHIFT); |
449 | 447 | } else { |
450 | | - hrt_xfer_params->xfer_data[HRT_FE_DATA].data[0] = |
| 448 | + hrt_xfer_params->xfer_data[HRT_FE_DATA].last_word = |
451 | 449 | (uint8_t)(nrf_vpr_csr_vio_in_buffered_reversed_byte_get() >> |
452 | 450 | BYTE_3_SHIFT); |
453 | 451 | } |
|
0 commit comments