From a233495718046fb4832fe802c781a87ecc3b5914 Mon Sep 17 00:00:00 2001 From: Meco Man <920369182@qq.com> Date: Thu, 31 Dec 2020 16:02:42 +0800 Subject: [PATCH] Typo: rt_data_queue_peak() in dataqueue --- components/drivers/audio/audio.c | 4 ++-- components/drivers/include/ipc/dataqueue.h | 2 +- components/drivers/serial/serial.c | 2 +- components/drivers/src/dataqueue.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/components/drivers/audio/audio.c b/components/drivers/audio/audio.c index 12b9b48a43..c3f8723db6 100644 --- a/components/drivers/audio/audio.c +++ b/components/drivers/audio/audio.c @@ -45,7 +45,7 @@ static rt_err_t _audio_send_replay_frame(struct rt_audio_device *audio) dst_size = buf_info->block_size; /* check replay queue is empty */ - if (rt_data_queue_peak(&audio->replay->queue, (const void **)&data, &src_size) != RT_EOK) + if (rt_data_queue_peek(&audio->replay->queue, (const void **)&data, &src_size) != RT_EOK) { /* ack stop event */ if (audio->replay->event & REPLAY_EVT_STOP) @@ -64,7 +64,7 @@ static rt_err_t _audio_send_replay_frame(struct rt_audio_device *audio) /* copy data from memory pool to hardware device fifo */ while (index < dst_size) { - result = rt_data_queue_peak(&audio->replay->queue, (const void **)&data, &src_size); + result = rt_data_queue_peek(&audio->replay->queue, (const void **)&data, &src_size); if (result != RT_EOK) { LOG_D("under run %d, remain %d", audio->replay->pos, remain_bytes); diff --git a/components/drivers/include/ipc/dataqueue.h b/components/drivers/include/ipc/dataqueue.h index 0262f4702b..76203c404d 100644 --- a/components/drivers/include/ipc/dataqueue.h +++ b/components/drivers/include/ipc/dataqueue.h @@ -55,7 +55,7 @@ rt_err_t rt_data_queue_pop(struct rt_data_queue *queue, const void **data_ptr, rt_size_t *size, rt_int32_t timeout); -rt_err_t rt_data_queue_peak(struct rt_data_queue *queue, +rt_err_t rt_data_queue_peek(struct rt_data_queue *queue, const void **data_ptr, rt_size_t *size); void rt_data_queue_reset(struct rt_data_queue *queue); diff --git a/components/drivers/serial/serial.c b/components/drivers/serial/serial.c index cb4c40c7c2..3b8edf74d5 100644 --- a/components/drivers/serial/serial.c +++ b/components/drivers/serial/serial.c @@ -1268,7 +1268,7 @@ void rt_hw_serial_isr(struct rt_serial_device *serial, int event) tx_dma = (struct rt_serial_tx_dma*) serial->serial_tx; rt_data_queue_pop(&(tx_dma->data_queue), &last_data_ptr, &data_size, 0); - if (rt_data_queue_peak(&(tx_dma->data_queue), &data_ptr, &data_size) == RT_EOK) + if (rt_data_queue_peek(&(tx_dma->data_queue), &data_ptr, &data_size) == RT_EOK) { /* transmit next data node */ tx_dma->activated = RT_TRUE; diff --git a/components/drivers/src/dataqueue.c b/components/drivers/src/dataqueue.c index bfe8e12573..1651417bb9 100644 --- a/components/drivers/src/dataqueue.c +++ b/components/drivers/src/dataqueue.c @@ -264,7 +264,7 @@ __exit: } RTM_EXPORT(rt_data_queue_pop); -rt_err_t rt_data_queue_peak(struct rt_data_queue *queue, +rt_err_t rt_data_queue_peek(struct rt_data_queue *queue, const void** data_ptr, rt_size_t *size) { @@ -287,7 +287,7 @@ rt_err_t rt_data_queue_peak(struct rt_data_queue *queue, return RT_EOK; } -RTM_EXPORT(rt_data_queue_peak); +RTM_EXPORT(rt_data_queue_peek); void rt_data_queue_reset(struct rt_data_queue *queue) {