@@ -126,11 +126,11 @@ static bool ot_plat_ble_queue_msg(const uint8_t *aData, uint16_t aLen, int8_t aR
126
126
127
127
len = sizeof (aLen ) + sizeof (aRssi ) + ((aLen <= PLAT_BLE_MSG_DATA_MAX ) ? aLen : 0 );
128
128
129
- if (ring_buf_space_get (& ot_plat_ble_ring_buf ) >= len ) {
130
- ring_buf_put (& ot_plat_ble_ring_buf , (uint8_t * )& aLen , sizeof (aLen ));
131
- ring_buf_put (& ot_plat_ble_ring_buf , & aRssi , sizeof (aRssi ));
129
+ if (ring_buffer_space (& ot_plat_ble_ring_buf ) >= len ) {
130
+ ring_buffer_write (& ot_plat_ble_ring_buf , (uint8_t * )& aLen , sizeof (aLen ));
131
+ ring_buffer_write (& ot_plat_ble_ring_buf , & aRssi , sizeof (aRssi ));
132
132
if (aLen <= PLAT_BLE_MSG_DATA_MAX ) {
133
- ring_buf_put (& ot_plat_ble_ring_buf , aData , aLen );
133
+ ring_buffer_write (& ot_plat_ble_ring_buf , aData , aLen );
134
134
}
135
135
k_sem_give (& ot_plat_ble_event_semaphore );
136
136
} else {
@@ -156,10 +156,10 @@ static void ot_plat_ble_thread(void *unused1, void *unused2, void *unused3)
156
156
157
157
while (1 ) {
158
158
k_sem_take (& ot_plat_ble_event_semaphore , K_FOREVER );
159
- ring_buf_get (& ot_plat_ble_ring_buf , (uint8_t * )& len , sizeof (len ));
160
- ring_buf_get (& ot_plat_ble_ring_buf , & rssi , sizeof (rssi ));
159
+ ring_buffer_read (& ot_plat_ble_ring_buf , (uint8_t * )& len , sizeof (len ));
160
+ ring_buffer_read (& ot_plat_ble_ring_buf , & rssi , sizeof (rssi ));
161
161
if (len <= PLAT_BLE_MSG_DATA_MAX ) {
162
- ring_buf_get (& ot_plat_ble_ring_buf , ot_plat_ble_msg_buf , len );
162
+ ring_buffer_read (& ot_plat_ble_ring_buf , ot_plat_ble_msg_buf , len );
163
163
}
164
164
165
165
openthread_mutex_lock ();
0 commit comments