Microcontroladores PIC en Linux.
¿Quieres reaccionar a este mensaje? Regístrate en el foro con unos pocos clics o inicia sesión para continuar.

PRAGMAS con freeRTOS

Ir abajo

PRAGMAS con freeRTOS Empty PRAGMAS con freeRTOS

Mensaje por Libi Lun 9 Sep 2013 - 1:05

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....

Libi
Nuevo Usuario
Nuevo Usuario

Mensajes : 5
Fecha de inscripción : 07/05/2013

Volver arriba Ir abajo

Volver arriba


 
Permisos de este foro:
No puedes responder a temas en este foro.