@@ -714,6 +714,24 @@ NRF_STATIC_INLINE void nrf_uarte_tx_buffer_set(NRF_UARTE_Type * p_reg,
714
714
uint8_t const * p_buffer ,
715
715
size_t length );
716
716
717
+ /**
718
+ * @brief Function for setting the transmit buffer length.
719
+ *
720
+ * @param[in] p_reg Pointer to the structure of registers of the peripheral.
721
+ * @param[in] length Maximum number of data bytes to receive.
722
+ */
723
+ NRF_STATIC_INLINE void nrf_uarte_tx_maxcnt_set (NRF_UARTE_Type * p_reg ,
724
+ size_t length );
725
+
726
+ /**
727
+ * @brief Function for setting the transmit buffer pointer.
728
+ *
729
+ * @param[in] p_reg Pointer to the structure of registers of the peripheral.
730
+ * @param[in] p_buffer Pointer to the buffer for received data.
731
+ */
732
+ NRF_STATIC_INLINE void nrf_uarte_tx_ptr_set (NRF_UARTE_Type * p_reg ,
733
+ uint8_t * p_buffer );
734
+
717
735
/**
718
736
* @brief Function for getting the transmit buffer address.
719
737
*
@@ -743,6 +761,24 @@ NRF_STATIC_INLINE void nrf_uarte_rx_buffer_set(NRF_UARTE_Type * p_reg,
743
761
uint8_t * p_buffer ,
744
762
size_t length );
745
763
764
+ /**
765
+ * @brief Function for setting the receive buffer length.
766
+ *
767
+ * @param[in] p_reg Pointer to the structure of registers of the peripheral.
768
+ * @param[in] length Maximum number of data bytes to receive.
769
+ */
770
+ NRF_STATIC_INLINE void nrf_uarte_rx_maxcnt_set (NRF_UARTE_Type * p_reg ,
771
+ size_t length );
772
+
773
+ /**
774
+ * @brief Function for setting the receive buffer pointer.
775
+ *
776
+ * @param[in] p_reg Pointer to the structure of registers of the peripheral.
777
+ * @param[in] p_buffer Pointer to the buffer for received data.
778
+ */
779
+ NRF_STATIC_INLINE void nrf_uarte_rx_ptr_set (NRF_UARTE_Type * p_reg ,
780
+ uint8_t * p_buffer );
781
+
746
782
/**
747
783
* @brief Function for getting the reception buffer address.
748
784
*
@@ -1033,6 +1069,26 @@ NRF_STATIC_INLINE void nrf_uarte_tx_buffer_set(NRF_UARTE_Type * p_reg,
1033
1069
#endif
1034
1070
}
1035
1071
1072
+ NRF_STATIC_INLINE void nrf_uarte_tx_maxcnt_set (NRF_UARTE_Type * p_reg ,
1073
+ size_t length )
1074
+ {
1075
+ #if NRF_UARTE_HAS_DMA_REG
1076
+ p_reg -> DMA .TX .MAXCNT = length ;
1077
+ #else
1078
+ p_reg -> TXD .MAXCNT = length ;
1079
+ #endif
1080
+ }
1081
+
1082
+ NRF_STATIC_INLINE void nrf_uarte_tx_ptr_set (NRF_UARTE_Type * p_reg ,
1083
+ uint8_t * p_buffer )
1084
+ {
1085
+ #if NRF_UARTE_HAS_DMA_REG
1086
+ p_reg -> DMA .TX .PTR = (uint32_t )p_buffer ;
1087
+ #else
1088
+ p_reg -> TXD .PTR = (uint32_t )p_buffer ;
1089
+ #endif
1090
+ }
1091
+
1036
1092
NRF_STATIC_INLINE uint8_t const * nrf_uarte_tx_buffer_get (NRF_UARTE_Type * p_reg )
1037
1093
{
1038
1094
#if NRF_UARTE_HAS_DMA_REG
@@ -1064,6 +1120,26 @@ NRF_STATIC_INLINE void nrf_uarte_rx_buffer_set(NRF_UARTE_Type * p_reg,
1064
1120
#endif
1065
1121
}
1066
1122
1123
+ NRF_STATIC_INLINE void nrf_uarte_rx_maxcnt_set (NRF_UARTE_Type * p_reg ,
1124
+ size_t length )
1125
+ {
1126
+ #if NRF_UARTE_HAS_DMA_REG
1127
+ p_reg -> DMA .RX .MAXCNT = length ;
1128
+ #else
1129
+ p_reg -> RXD .MAXCNT = length ;
1130
+ #endif
1131
+ }
1132
+
1133
+ NRF_STATIC_INLINE void nrf_uarte_rx_ptr_set (NRF_UARTE_Type * p_reg ,
1134
+ uint8_t * p_buffer )
1135
+ {
1136
+ #if NRF_UARTE_HAS_DMA_REG
1137
+ p_reg -> DMA .RX .PTR = (uint32_t )p_buffer ;
1138
+ #else
1139
+ p_reg -> RXD .PTR = (uint32_t )p_buffer ;
1140
+ #endif
1141
+ }
1142
+
1067
1143
NRF_STATIC_INLINE uint8_t * nrf_uarte_rx_buffer_get (NRF_UARTE_Type * p_reg )
1068
1144
{
1069
1145
#if NRF_UARTE_HAS_DMA_REG
0 commit comments