PRAGMAS con freeRTOS
Página 1 de 1.
PRAGMAS con freeRTOS
Hola todos!! como están? alguien que me explique los pragmas de interrupciones en el modulo USB de freeRTOS.. lo coloco en rojo.... espero informacion que me aclare para que son estas interrupciones...
#pragma interruptlow vSerialRxISR save=PRODH, PRODL, TABLAT, section(".tmpdata")
void vSerialRxISR( void )
{
char cChar;
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
/* Get the character and post it on the queue of Rxed characters.
If the post causes a task to wake force a context switch as the woken task
may have a higher priority than the task we have interrupted. */
cChar = RCREG;
/* Clear any overrun errors. */
if( RCSTAbits.OERR )
{
RCSTAbits.CREN = serCLEAR_OVERRUN;
RCSTAbits.CREN = serCONTINUOUS_RX;
}
xQueueSendFromISR( xRxedChars, ( const void * ) &cChar, &xHigherPriorityTaskWoken );
if( xHigherPriorityTaskWoken )
{
taskYIELD();
}
}
/*-----------------------------------------------------------*/
#pragma interruptlow vSerialTxISR save=PRODH, PRODL, TABLAT, section(".tmpdata")
void vSerialTxISR( void )
{
char cChar, cTaskWoken = pdFALSE;
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &cTaskWoken ) == pdTRUE )
{
/* Send the next character queued for Tx. */
TXREG = cChar;
}
else
{
/* Queue empty, nothing to send. */
PIE1bits.TXIE = serINTERRUPT_DISABLED;
}
}
gracias de antemano a todos....
#pragma interruptlow vSerialRxISR save=PRODH, PRODL, TABLAT, section(".tmpdata")
void vSerialRxISR( void )
{
char cChar;
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
/* Get the character and post it on the queue of Rxed characters.
If the post causes a task to wake force a context switch as the woken task
may have a higher priority than the task we have interrupted. */
cChar = RCREG;
/* Clear any overrun errors. */
if( RCSTAbits.OERR )
{
RCSTAbits.CREN = serCLEAR_OVERRUN;
RCSTAbits.CREN = serCONTINUOUS_RX;
}
xQueueSendFromISR( xRxedChars, ( const void * ) &cChar, &xHigherPriorityTaskWoken );
if( xHigherPriorityTaskWoken )
{
taskYIELD();
}
}
/*-----------------------------------------------------------*/
#pragma interruptlow vSerialTxISR save=PRODH, PRODL, TABLAT, section(".tmpdata")
void vSerialTxISR( void )
{
char cChar, cTaskWoken = pdFALSE;
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &cTaskWoken ) == pdTRUE )
{
/* Send the next character queued for Tx. */
TXREG = cChar;
}
else
{
/* Queue empty, nothing to send. */
PIE1bits.TXIE = serINTERRUPT_DISABLED;
}
}
gracias de antemano a todos....
Libi- Nuevo Usuario
- Mensajes : 5
Fecha de inscripción : 07/05/2013
Página 1 de 1.
Permisos de este foro:
No puedes responder a temas en este foro.
|
|