From 05aa09fbb99b95ab98ca7cc2590f6b61e46e488d Mon Sep 17 00:00:00 2001 From: shangke Date: Fri, 4 Aug 2017 14:24:44 +0800 Subject: [PATCH] beautify the code --- components/ethernet/emac_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/ethernet/emac_main.c b/components/ethernet/emac_main.c index f57fc95cca..b6989f0bbe 100644 --- a/components/ethernet/emac_main.c +++ b/components/ethernet/emac_main.c @@ -54,8 +54,8 @@ static struct emac_config_data emac_config; -static uint8_t emac_dma_rx_chain_buf[32 * DMA_RX_BUF_NUM]; -static uint8_t emac_dma_tx_chain_buf[32 * DMA_TX_BUF_NUM]; +static uint8_t emac_dma_rx_chain_buf[sizeof(struct dma_extended_desc) * DMA_RX_BUF_NUM]; +static uint8_t emac_dma_tx_chain_buf[sizeof(struct dma_extended_desc) * DMA_TX_BUF_NUM]; static uint8_t emac_dma_rx_buf[DMA_RX_BUF_SIZE * DMA_RX_BUF_NUM]; static uint8_t emac_dma_tx_buf[DMA_TX_BUF_SIZE * DMA_TX_BUF_NUM]; @@ -130,7 +130,7 @@ static void emac_set_rx_base_reg(void) * (3) When the software receives the interrupts, it will handle the linked lists by turns from dirty_rx, send data packets to protocol * stack. dirty_rx will deviate backwards by turns and cnt_rx will by turns ++. * -* (4) After the protocol stack handles all the data and calls the free function, it will deviate backwards by turns from cur_rx, mark the * node of linked lists as “HARDWARE USABLE” and cnt_rx will by turns ——. +* (4) After the protocol stack handles all the data and calls the free function, it will deviate backwards by turns from cur_rx, mark the * node of linked lists as “HARDWARE USABLE” and cnt_rx will by turns --. * * (5) Cycle from Step 2 to Step 4 without break and build up circular linked list handling. */