MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / FXmacOsTx

Function FXmacOsTx

bsp/phytium/libraries/drivers/drv_xmac.c:1218–1245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1216}
1217
1218FError FXmacOsTx(FXmacOs *instance_p, void *tx_buf)
1219{
1220 FXmacBdRing *txring;
1221 FError ret;
1222 struct pbuf *p;
1223 FASSERT(instance_p != NULL);
1224 FASSERT(tx_buf != NULL);
1225
1226 p = tx_buf;
1227 txring = &(FXMAC_GET_TXRING(instance_p->instance));
1228 FXmacProcessSentBds(instance_p, txring);
1229
1230 /* check if space is available to send */
1231 if (IsTxSpaceAvailable(instance_p))
1232 {
1233 ret = FXmacOsOutput(instance_p, p);
1234 }
1235 else
1236 {
1237#if LINK_STATS
1238 lwip_stats.link.drop++;
1239#endif
1240 LOG_E("Pack dropped, no space.");
1241 ret = FREERTOS_XMAC_NO_VALID_SPACE;
1242 }
1243
1244 return ret;
1245}
1246
1247FXmacOs *FXmacOsGetInstancePointer(FXmacOsControl *config_p)
1248{

Callers 1

rt_xmac_txFunction · 0.85

Calls 3

FXmacProcessSentBdsFunction · 0.85
FXmacOsOutputFunction · 0.85
IsTxSpaceAvailableFunction · 0.70

Tested by

no test coverage detected