你好,在evt提供的例程中,有关于MACRAW发送的例子,那么要怎么接收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; }
热门产品 :
CH592: RISC-V内核BLE5.4无线MCU