forked from ROMEO/obsw
working on RX, broke FreeRTOS
This commit is contained in:
@ -124,7 +124,8 @@ static volatile u32_t bd_space_index = 0;
|
||||
static volatile u32_t bd_space_attr_set = 0;
|
||||
|
||||
#if !NO_SYS
|
||||
extern u32 xInsideISR;
|
||||
//extern u32 xInsideISR;
|
||||
u32 xInsideISR; // TODO check if we are ISR safe
|
||||
#endif
|
||||
|
||||
#define XEMACPS_BD_TO_INDEX(ringptr, bdptr) \
|
||||
@ -576,7 +577,10 @@ void emacps_recv_handler(void *arg)
|
||||
setup_rx_bds(xemacpsif, rxring);
|
||||
}
|
||||
#if !NO_SYS
|
||||
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
|
||||
|
||||
@ -801,18 +805,18 @@ XStatus init_dma(struct xemac_s *xemac)
|
||||
XEmacPs_Out32((xemacpsif->emacps.Config.BaseAddress + XEMACPS_TXQBASE_OFFSET),
|
||||
(UINTPTR)bdtxterminate);
|
||||
}
|
||||
#if !NO_SYS
|
||||
#ifdef SDT
|
||||
xPortInstallInterruptHandler(xemacpsif->emacps.Config.IntrId,
|
||||
( Xil_InterruptHandler ) XEmacPs_IntrHandler,
|
||||
(void *)&xemacpsif->emacps);
|
||||
#else
|
||||
xPortInstallInterruptHandler(xtopologyp->scugic_emac_intr,
|
||||
( Xil_InterruptHandler ) XEmacPs_IntrHandler,
|
||||
(void *)&xemacpsif->emacps);
|
||||
// #if !NO_SYS
|
||||
// #ifdef SDT
|
||||
// xPortInstallInterruptHandler(xemacpsif->emacps.Config.IntrId,
|
||||
// ( Xil_InterruptHandler ) XEmacPs_IntrHandler,
|
||||
// (void *)&xemacpsif->emacps);
|
||||
// #else
|
||||
// xPortInstallInterruptHandler(xtopologyp->scugic_emac_intr,
|
||||
// ( Xil_InterruptHandler ) XEmacPs_IntrHandler,
|
||||
// (void *)&xemacpsif->emacps);
|
||||
|
||||
#endif
|
||||
#else
|
||||
// #endif
|
||||
// #else
|
||||
#ifndef SDT
|
||||
/*
|
||||
* Connect the device driver handler that will be called when an
|
||||
@ -823,7 +827,7 @@ XStatus init_dma(struct xemac_s *xemac)
|
||||
(Xil_ExceptionHandler)XEmacPs_IntrHandler,
|
||||
(void *)&xemacpsif->emacps);
|
||||
#endif
|
||||
#endif
|
||||
// #endif
|
||||
/*
|
||||
* Enable the interrupt for emacps.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user