From: shangke Date: Fri, 4 Aug 2017 06:24:44 +0000 (+0800) Subject: beautify the code X-Git-Tag: v3.1-dev~426^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=05aa09fbb99b95ab98ca7cc2590f6b61e46e488d;p=esp-idf beautify the code --- 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. */