From a7617e3c8476471b12feefc70d69f72673165327 Mon Sep 17 00:00:00 2001 From: MacRsh Date: Sat, 23 Sep 2023 18:25:01 +0800 Subject: [PATCH] =?UTF-8?q?1.=E7=A7=BB=E9=99=A4=E8=AE=BE=E5=A4=87=E5=AF=B9?= =?UTF-8?q?=E8=B1=A1=E4=B8=AD=E7=9A=84=E8=AF=BB=E5=86=99fifo=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/mrdef.h | 2 -- src/device.c | 8 -------- 2 files changed, 10 deletions(-) diff --git a/include/mrdef.h b/include/mrdef.h index 7d50a26..9dce697 100644 --- a/include/mrdef.h +++ b/include/mrdef.h @@ -357,8 +357,6 @@ struct mr_device mr_uint8_t oflags; /* Open mode flags */ mr_uint8_t reserved; /* Reserved */ mr_size_t ref_count; /* Number of references */ - struct mr_rb rx_fifo; /* Receive FIFO */ - struct mr_rb tx_fifo; /* Transmit FIFO */ mr_err_t (*rx_cb)(mr_device_t device, void *args); /* Receive the completed callback */ mr_err_t (*tx_cb)(mr_device_t device, void *args); /* Send completion callback */ diff --git a/src/device.c b/src/device.c index 73564a0..7c4bd9f 100644 --- a/src/device.c +++ b/src/device.c @@ -70,8 +70,6 @@ mr_err_t mr_device_add(mr_device_t device, device->sflags = sflags; device->oflags = MR_DEVICE_OFLAG_CLOSED; device->ref_count = 0; - mr_rb_init(&device->rx_fifo, MR_NULL, 0); - mr_rb_init(&device->tx_fifo, MR_NULL, 0); device->rx_cb = MR_NULL; device->tx_cb = MR_NULL; @@ -115,10 +113,6 @@ mr_err_t mr_device_remove(mr_device_t device) return ret; } - /* Reset the device */ - mr_rb_allocate_buffer(&device->rx_fifo, 0); - mr_rb_allocate_buffer(&device->tx_fifo, 0); - return ret; } @@ -199,8 +193,6 @@ mr_err_t mr_device_close(mr_device_t device) /* Set the device status to closed */ device->oflags = MR_DEVICE_OFLAG_CLOSED; - mr_rb_reset(&device->rx_fifo); - mr_rb_reset(&device->tx_fifo); device->rx_cb = MR_NULL; device->tx_cb = MR_NULL;