better, not done

This commit is contained in:
2024-08-20 15:13:03 +02:00
parent 2d8d8aeb0a
commit 6c556b8fbf
14 changed files with 997 additions and 19 deletions

View File

@ -124,8 +124,7 @@ static volatile u32_t bd_space_index = 0;
static volatile u32_t bd_space_attr_set = 0;
#if !NO_SYS
//extern u32 xInsideISR;
u32 xInsideISR; // TODO check if we are ISR safe
extern u32 xInsideISR;
#endif
#define XEMACPS_BD_TO_INDEX(ringptr, bdptr) \
@ -577,10 +576,10 @@ void emacps_recv_handler(void *arg)
setup_rx_bds(xemacpsif, rxring);
}
#if !NO_SYS
BaseType_t xHigherPriorityTaskWoken;
xSemaphoreGiveFromISR(xemac->sem_rx_data_available.sem, &xHigherPriorityTaskWoken);
portYIELD_FROM_ISR(xHigherPriorityTaskWoken); //TODO delay this?
//sys_sem_signal(&xemac->sem_rx_data_available);
// BaseType_t xHigherPriorityTaskWoken;
// xSemaphoreGiveFromISR(xemac->sem_rx_data_available.sem, &xHigherPriorityTaskWoken);
// portYIELD_FROM_ISR(xHigherPriorityTaskWoken); //TODO delay this?
sys_sem_signal(&xemac->sem_rx_data_available);
xInsideISR--;
#endif