/* Register/Clear TX wakeup callback. 
This function is usually invoked with NULL callback from the TX wakeup callback itself, to unregister. Once the callback has resumed the application task, there is no need to invoke the callback again. */
uint8_t gmac_dev_set_tx_wakeup_callback(gmac_device_t *p_gmac_dev, gmac_dev_wakeup_cb_t func_wakeup_cb, uint8_t uc_threshold)
/* Register/Clear TX wakeup callback. 
This function is usually invoked with NULL callback from the TX wakeup callback itself, to unregister. Once the callback has resumed the application task, there is no need to invoke the callback again. */
uint8_t gmac_dev_set_tx_wakeup_callback(gmac_device_t *p_gmac_dev, gmac_dev_wakeup_cb_t func_wakeup_cb, uint8_t uc_threshold)
{
	if (func_wakeup_cb == NULL) {
		p_gmac_dev->func_wakeup_cb = NULL;
	} else {
		if (uc_threshold <= p_gmac_dev->us_tx_list_size) {
			p_gmac_dev->func_wakeup_cb = func_wakeup_cb;
			p_gmac_dev->uc_wakeup_threshold = uc_threshold;
		} else {
			return GMAC_PARAM;
		}
	}
	return GMAC_OK;
}