你好,在evt提供的例程中,有關于MACRAW發(fā)送的例子,那么要怎么接收macraw的數據呢?
uint32_t?MACRAW_Tx(uint8_t?*buff,?uint16_t?len) { ?????/*?Check?if?the?descriptor?is?owned?by?the?ETHERNET?DMA?(when?set)?or?CPU?(when?reset)?*/ ????if(?DMATxDescToSet->Status?&?ETH_DMATxDesc_OWN?) ????{ ????????/*?Return?ERROR:?OWN?bit?set?*/ ????????return?ETH_ERROR; ????} ????DMATxDescToSet->Status?|=?ETH_DMATxDesc_OWN; ????R16_ETH_ETXLN?=?len; ????R16_ETH_ETXST?=?(uint32_t)buff; ????R8_ETH_ECON1?|=?RB_ETH_ECON1_TXRTS;???????????????????????????????//start?sending ????/*?Update?the?ETHERNET?DMA?global?Tx?descriptor?with?next?Tx?descriptor?*/ ????/*?Chained?Mode?*/ ????/*?Selects?the?next?DMA?Tx?descriptor?list?for?next?buffer?to?send?*/ ????DMATxDescToSet?=?(ETH_DMADESCTypeDef*)?(DMATxDescToSet->Buffer2NextDescAddr); ????/*?Return?SUCCESS?*/ ????return?ETH_SUCCESS; }
熱門產品 :
CH182: 以太網PHY收發(fā)器芯片