char EMAC_Set_TxWakeUpCb(EMAC_WakeupCallback pTxWakeUpCb, unsigned short threshold) { if (threshold <= TX_BUFFERS) { txTd.wakeupCb = pTxWakeUpCb; txTd.wakeupThreshold = threshold; return 0; } return 1; }