您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ xQueueSendFromISR函数代码示例

51自学网 2021-06-03 10:14:09
  C++
这篇教程C++ xQueueSendFromISR函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中xQueueSendFromISR函数的典型用法代码示例。如果您正苦于以下问题:C++ xQueueSendFromISR函数的具体用法?C++ xQueueSendFromISR怎么用?C++ xQueueSendFromISR使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了xQueueSendFromISR函数的25个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: prvSelectButtonInterrupt

interrupt void prvSelectButtonInterrupt( void ){/* Define the message sent to the LCD task from this interrupt. */static const xQueueMessage xMessage = { mainMESSAGE_BUTTON_SEL, ( unsigned long ) "Select Interrupt" };portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;	/* This is the interrupt handler for the joystick select button input.	The button has been pushed, write a message to the LCD via the LCD task. */	xQueueSendFromISR( xLCDQueue, &xMessage, &xHigherPriorityTaskWoken );	P2IFG = 0;		/* If writing to xLCDQueue caused a task to unblock, and the unblocked task	has a priority equal to or above the task that this interrupt interrupted,	then lHigherPriorityTaskWoken will have been set to pdTRUE internally within	xQueuesendFromISR(), and portEND_SWITCHING_ISR() will ensure that this	interrupt returns directly to the higher priority unblocked task. */	portYIELD_FROM_ISR( xHigherPriorityTaskWoken );}
开发者ID:BirdBare,项目名称:STM32F4-Discovery_FW_V1.1.0_Makefiles,代码行数:19,


示例2: GPIO0_IRQHandler

void GPIO0_IRQHandler(){   portBASE_TYPE xSwitchRequired1;      if (Chip_PININT_GetFallStates(LPC_GPIO_PIN_INT)&PININTCH0)    {       Chip_PININT_ClearIntStatus(LPC_GPIO_PIN_INT,PININTCH0);         //xSemaphoreGiveFromISR(xSemaphore,&xSwitchRequired1);      uint8_t aux=0;      xQueueSendFromISR( xQueue1, ( void * ) &aux, &xSwitchRequired1);            //NO USAR - xSemaphoreGive(xSemaphore);    }   portEND_SWITCHING_ISR(xSwitchRequired1);}
开发者ID:mdarino,项目名称:LSE_SistOper1,代码行数:19,


示例3: EXTI9_5_IRQHandler

void EXTI9_5_IRQHandler( void ){/* Define the message sent to the LCD task from this interrupt. */const xQueueMessage xMessage = { mainMESSAGE_BUTTON_SEL, ( unsigned long ) "Select Interrupt!" };long lHigherPriorityTaskWoken = pdFALSE;	/* This is the interrupt handler for the joystick select button input.	The button has been pushed, write a message to the LCD via the LCD task. */	xQueueSendFromISR( xLCDQueue, &xMessage, &lHigherPriorityTaskWoken );		EXTI_ClearITPendingBit( SEL_BUTTON_EXTI_LINE );		/* If writing to xLCDQueue caused a task to unblock, and the unblocked task	has a priority equal to or above the task that this interrupt interrupted,	then lHigherPriorityTaskWoken will have been set to pdTRUE internally within	xQueuesendFromISR(), and portEND_SWITCHING_ISR() will ensure that this	interrupt returns directly to the higher priority unblocked task. */	portEND_SWITCHING_ISR( lHigherPriorityTaskWoken );}
开发者ID:ammarkham,项目名称:freertos-moo,代码行数:19,


示例4: interrupt

/* * UART RX interrupt service routine. */interrupt (UART1RX_VECTOR) wakeup vRxISR( void ){signed char cChar;portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;	/* Get the character from the UART and post it on the queue of Rxed 	characters. */	cChar = U1RXBUF;	xQueueSendFromISR( xRxedChars, &cChar, &xHigherPriorityTaskWoken );	if( xHigherPriorityTaskWoken )	{		/*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. */		taskYIELD();	}}
开发者ID:InSoonPark,项目名称:FreeRTOS,代码行数:22,


示例5: vSerialISR

/* Serial port ISR.  This can cause a context switch so is not defined as astandard ISR using the __irq keyword.  Instead a wrapper function is definedwithin serialISR.s79 which in turn calls this function.  See the portdocumentation on the FreeRTOS.org website for more information. */__arm void vSerialISR( void ){unsigned short usStatus;signed char cChar;portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;	/* What caused the interrupt? */	usStatus = UART_FlagStatus( UART0 );	if( usStatus & UART_TxHalfEmpty )	{		/* The interrupt was caused by the THR becoming empty.  Are there any		more characters to transmit? */		if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xHigherPriorityTaskWoken ) == pdTRUE )		{			/* A character was retrieved from the queue so can be sent to the			THR now. */			UART0->TxBUFR = cChar;		}		else		{			/* Queue empty, nothing to send so turn off the Tx interrupt. */			serINTERRUPT_OFF();		}			}	if( usStatus & 	UART_RxBufFull )	{		/* The interrupt was caused by a character being received.  Grab the		character from the RHR and place it in the queue of received		characters. */		cChar = UART0->RxBUFR;		xQueueSendFromISR( xRxedChars, &cChar, &xHigherPriorityTaskWoken );	}	/* If a task was woken by either a character being received or a character	being transmitted then we may need to switch to another task. */	portEND_SWITCHING_ISR( xHigherPriorityTaskWoken );	/* End the interrupt in the EIC. */	portCLEAR_EIC();}
开发者ID:AskDrCatcher,项目名称:FreeRTOS,代码行数:46,


示例6: vSerialISR

/* Serial port ISR.  This can cause a context switch so is not defined as astandard ISR using the __irq keyword.  Instead a wrapper function is definedwithin serialISR.s79 which in turn calls this function.  See the portdocumentation on the FreeRTOS.org website for more information. */__arm void vSerialISR( void ){unsigned long ulStatus;signed char cChar;portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;	/* What caused the interrupt? */	ulStatus = serCOM0->US_CSR &= serCOM0->US_IMR;	if( ulStatus & AT91C_US_TXRDY )	{		/* The interrupt was caused by the THR becoming empty.  Are there any		more characters to transmit? */		if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xHigherPriorityTaskWoken ) == pdTRUE )		{			/* A character was retrieved from the queue so can be sent to the			THR now. */			serCOM0->US_THR = cChar;		}		else		{			/* Queue empty, nothing to send so turn off the Tx interrupt. */			vInterruptOff();		}			}	if( ulStatus & AT91C_US_RXRDY )	{		/* The interrupt was caused by a character being received.  Grab the		character from the RHR and place it in the queue or received		characters. */		cChar = serCOM0->US_RHR;		xQueueSendFromISR( xRxedChars, &cChar, &xHigherPriorityTaskWoken );	}	/* If a task was woken by either a character being received or a character	being transmitted then we may need to switch to another task. */	portEND_SWITCHING_ISR( xHigherPriorityTaskWoken );	/* End the interrupt in the AIC. */	AT91C_BASE_AIC->AIC_EOICR = 0;}
开发者ID:Pinekn,项目名称:freeRTOS,代码行数:46,


示例7: prvUSCI_A1_ISR

static __interrupt void prvUSCI_A1_ISR( void ){signed char cChar;portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;	while( ( UCA1IFG & UCRXIFG ) != 0 )	{		/* Get the character from the UART and post it on the queue of Rxed		characters. */		cChar = UCA1RXBUF;		xQueueSendFromISR( xRxedChars, &cChar, &xHigherPriorityTaskWoken );	}		/* If there is a Tx interrupt pending and the tx interrupts are enabled. */	if( ( UCA1IFG & UCTXIFG ) != 0 )	{		/* The previous character has been transmitted.  See if there are any		further characters waiting transmission. */		if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xHigherPriorityTaskWoken ) == pdTRUE )		{			/* There was another character queued - transmit it now. */			UCA1TXBUF = cChar;		}		else		{			/* There were no other characters to transmit - disable the Tx			interrupt. */			UCA1IE &= ~UCTXIE;		}	}	__bic_SR_register_on_exit( SCG1 + SCG0 + OSCOFF + CPUOFF );		/* If writing to a queue caused a task to unblock, and the unblocked task	has a priority equal to or above the task that this interrupt interrupted,	then lHigherPriorityTaskWoken will have been set to pdTRUE internally within	xQueuesendFromISR(), and portEND_SWITCHING_ISR() will ensure that this	interrupt returns directly to the higher priority unblocked task.		THIS MUST BE THE LAST THING DONE IN THE ISR. */		portYIELD_FROM_ISR( xHigherPriorityTaskWoken );}
开发者ID:DonjetaE,项目名称:FreeRTOS,代码行数:42,


示例8: bus_rxISR

/** * Bus UART RX interrupt. */void bus_rxISR( void ){	uint8_t byte;	/* Get the character from the UART and post it on the queue of Rxed 	characters. */	byte = USART_ReceiveData(USART1);	if( xQueueSendFromISR(debug_rx, &byte, pdFALSE ) )	{		/*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. */		taskYIELD();	}#ifdef HAVE_POWERSAVE	power_interrupt_epilogue();#endif}
开发者ID:Paolo-Maffei,项目名称:nxstack,代码行数:23,


示例9: EncolarEventoFromISR

portBASE_TYPE EncolarEventoFromISR (Modulo_t * receptor, Signal_t senial, int valor){	//xQueueHandle colaEventos = getColaEventos(receptor->prioridad);	portBASE_TYPE cambiarCtx = pdFALSE;	/*Evento_t evn;	evn.receptor = receptor;	evn.signal = senial;	evn.valor = valor;*/	EventoDriver_t msg;	msg.codigo = 3; //timeoutSalud	msg.dato = 0;	xQueueSendFromISR(colaEventosDrivers, &msg, &cambiarCtx);	//xQueueSendFromISR(colaEventos, &evn, &cambiarCtx);	return cambiarCtx;}
开发者ID:devtodev,项目名称:NXP,代码行数:20,


示例10: __gmsReceiveCSQData

static inline void __gmsReceiveCSQData(unsigned char data){    if (data == 0x0A) {        GsmTaskMessage *message;        portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;        buffer[bufferIndex++] = 0;        message = __gsmCreateMessage(TYPE_CSQ_DATA, buffer, bufferIndex);        if (pdTRUE == xQueueSendFromISR(__queue, &message, &xHigherPriorityTaskWoken)) {            if (xHigherPriorityTaskWoken) {                taskYIELD();            }        } else {            __gsmDestroyMessage(message);        }        isCSQ = 0;        bufferIndex = 0;    } else if (data != 0x0D) {        buffer[bufferIndex++] = data;    }}
开发者ID:masuchen,项目名称:chargingmachine,代码行数:20,


示例11: Timer_GetTime

/******** Timer_GetCCPPeriod ************************************************// Count the number of system ticks during one period of CCP input frequency										// Input: timer is one of the Timer_T value ( Timer1A, Timer1B... )// Output: none										// ------------------------------------------------------------------------*/void Timer_GetCCPPeriod	( Timer_T timer ){	unsigned long ticks = 0;	static unsigned long last_time = 0;	static unsigned long this_time = 0;	static char counter = 0;	portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;	if ( counter )	{		// finish		this_time = Timer_GetTime ( timer );		if ( this_time >= last_time )		{			// sysTick overflow, flush data			last_time = 0;			this_time = 0;			counter = 0;		}		else		{			// get the number of ticks in a period, push on to the Queue			ticks = last_time - this_time;			while ( xQueueSendFromISR (CCPQueue[timer], &ticks, &xHigherPriorityTaskWoken) != pdTRUE );			// reset ISR and disable interrupt			counter = 0;			Timer_Disable ( timer ) ;		}	}	else	{		// begin		last_time = Timer_GetTime ( timer );		// next interrupt will finish system tick calculation		counter = 1;	}}
开发者ID:yguo89,项目名称:RTOS,代码行数:46,


示例12: vEINT0_ISR_Handler

/* * When the WIZnet device asserts an interrupt we send an (empty) message to * the TCP task.  This wakes the task so the interrupt can be processed.  The * source of the interrupt has to be ascertained by the TCP task as this  * requires an I2C transaction which cannot be performed from this ISR. * Note this code predates the introduction of semaphores, a semaphore should * be used in place of the empty queue message. */void vEINT0_ISR_Handler( void ){extern xQueueHandle xTCPISRQueue;portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;	/* Just wake the TCP task so it knows an ISR has occurred. */	xQueueSendFromISR( xTCPISRQueue, ( void * ) &lDummyVariable, &xHigherPriorityTaskWoken );		/* We cannot carry on processing interrupts until the TCP task has 	processed this one - so for now interrupts are disabled.  The TCP task will	re-enable it. */	VICIntEnClear |= tcpEINT0_VIC_CHANNEL_BIT;	/* Clear the interrupt bit. */		VICVectAddr = tcpCLEAR_VIC_INTERRUPT;	if( xHigherPriorityTaskWoken )	{		portYIELD_FROM_ISR();	}}
开发者ID:niesteszeck,项目名称:FreeRTOS,代码行数:29,


示例13: tdcMeasurementHandler

/** * /brief	TDC interrupt handler, called after the propagation delay measurement. */void tdcMeasurementHandler(void) {	uint32_t result;	event_t error_event;	BaseType_t xTaskWoken = pdFALSE;	/* Check the pointer */	if (g_rawDataPtr != NULL) {		/* Read the calibration value */		bsp_GP22RegRead(GP22_RD_RES_0, &result, 4);		/* Safe the raw data */		g_rawDataPtr->raw[g_rawDataPtr->raw_ctr++] = result;	}	else {		/* Send error event */		error_event.event = Fault_MemoryPoolPtr;		xQueueSendFromISR(queueEvent, &error_event, &xTaskWoken);	}	/* Check if a higher prior task is woken up */	portEND_SWITCHING_ISR(xTaskWoken);}
开发者ID:funshine,项目名称:LIDAR,代码行数:24,


示例14: r_scifa2_callback_receiveend

/************************************************************************************************************************ Function Name: r_scifa2_callback_receiveend* Description  : This function is a callback function when SCIFA2 finishes reception.* Arguments    : None* Return Value : None***********************************************************************************************************************/void r_scifa2_callback_receiveend(void){    /* Start user code. Do not edit comment generated here */    uint8_t ucRxedChar = 0;    BaseType_t xHigherPriorityTaskWoken = pdFALSE;    /* Read the received data */    ucRxedChar = SCIFA2.FRDR;    /* Characters received from the UART are stored in this queue, ready to be    received by the application.  ***NOTE*** Using a queue in this way is very    convenient, but also very inefficient.  It can be used here because    characters will only arrive slowly.  In a higher bandwidth system a circular    RAM buffer or DMA should be used in place of this queue. */    xQueueSendFromISR( xRxQueue, ( void * ) &ucRxedChar, &xHigherPriorityTaskWoken );    /* Re-enable receptions */    SCIFA2.SCR.BIT.RE = 1U;    /* End user code. Do not edit comment generated here */}
开发者ID:peterliu2,项目名称:FreeRTOS,代码行数:27,


示例15: vAsyncSerialIODataAvailableISR

/* Define a callback function which is called when data is available. */void vAsyncSerialIODataAvailableISR( int iFileDescriptor, void *pContext ){portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;ssize_t iReadResult = -1;unsigned char ucRx;	/* This handler only processes a single byte/character at a time. */	iReadResult = read( iFileDescriptor, &ucRx, 1 );	if ( 1 == iReadResult )	{		if ( NULL != pContext )		{			/* Send the received byte to the queue. */			if ( pdTRUE != xQueueSendFromISR( (xQueueHandle)pContext, &ucRx, &xHigherPriorityTaskWoken ) )			{				/* the queue is full. */			}		}	}	portEND_SWITCHING_ISR( xHigherPriorityTaskWoken );}
开发者ID:EmuxEvans,项目名称:CompositeFreeRTOS,代码行数:22,


示例16: dma_isr_handler

// DMA interrupt handler. It is called each time a DMA block is finished processing.static void dma_isr_handler(void){    portBASE_TYPE task_awoken = pdFALSE;    if (i2s_dma_is_eof_interrupt()) {        dma_descriptor_t *descr = i2s_dma_get_eof_descriptor();        if (xQueueIsQueueFullFromISR(dma_queue)) {            // List of empty blocks is full. Sender don't send data fast enough.            int dummy;            underrun_counter++;            // Discard top of the queue            xQueueReceiveFromISR(dma_queue, &dummy, &task_awoken);        }        // Push the processed buffer to the queue so sender can refill it.        xQueueSendFromISR(dma_queue, (void*)(&descr->buf_ptr), &task_awoken);    }    i2s_dma_clear_interrupt();    portEND_SWITCHING_ISR(task_awoken);}
开发者ID:Paasmer,项目名称:esp-open-rtos,代码行数:22,


示例17: xMBPortEventPost

BOOLxMBPortEventPost( eMBEventType eEvent ){    portBASE_TYPE   xEventSent = pdFALSE;    ENTER_CRITICAL_SECTION(  );    if( bIsInitialized )    {        if( bMBPIsWithinException(  ) )        {            xEventSent =                xQueueSendFromISR( arxEventHdls[0].xQueueHdl, ( const void * )&eEvent, pdFALSE );        }        else        {            xEventSent = xQueueSend( arxEventHdls[0].xQueueHdl, ( const void * )&eEvent, pdFALSE );        }    }    EXIT_CRITICAL_SECTION(  );    return xEventSent == pdTRUE ? TRUE : FALSE;}
开发者ID:WillJason,项目名称:cortex-M-Serise,代码行数:21,


示例18: osMessagePut

/// Put a Message to a Queue./// /param[in]     queue_id      message queue ID obtained with /ref osMessageCreate./// /param[in]     info          message information./// /param[in]     millisec      timeout value or 0 in case of no time-out./// /return status code that indicates the execution status of the function./// /note MUST REMAIN UNCHANGED: /b osMessagePut shall be consistent in every CMSIS-RTOS.osStatus osMessagePut (osMessageQId queue_id, uint32_t info, uint32_t millisec){    portBASE_TYPE taskWoken = pdFALSE;    portTickType ticks;    if (inHandlerMode()) {        if (xQueueSendFromISR(queue_id, (const void *)info, &taskWoken) != pdTRUE) {            return osErrorOS;        }        portEND_SWITCHING_ISR(taskWoken);            }    else {        ticks = millisec_to_ticks(millisec);                if (xQueueSend(queue_id, (const void *)info, ticks) != pdTRUE) {            return osErrorOS;        }    }    return osOK;}
开发者ID:geliang201201,项目名称:RTL_Ameba,代码行数:27,


示例19: vUART_ISR

void vUART_ISR(void){    unsigned long ulStatus;    char cRxedChar;    portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;    /* What caused the interrupt. */    ulStatus = UARTIntStatus( UART0_BASE, pdTRUE );    /* Clear the interrupt. */    UARTIntClear( UART0_BASE, ulStatus );    /* Was an Rx interrpt pending? */    if( ulStatus & UART_INT_RX ) {        if( ( HWREG(UART0_BASE + UART_O_FR ) & UART_FR_RXFF ) ) {            /* Get the char from the buffer and post it onto the queue of            Rxed chars.  Posting the character should wake the task that is            blocked on the queue waiting for characters. */            cRxedChar = ( char ) HWREG( UART0_BASE + UART_O_DR );            xQueueSendFromISR( xCommsQueue, &cRxedChar, &xHigherPriorityTaskWoken );        }    }    /* Was a Tx interrupt pending? */    if( ulStatus & UART_INT_TX ) {        /* Send the next character in the string.  We are not using the FIFO. */        if( cNextChar <= mainLAST_TX_CHAR ) {            if( !( HWREG( UART0_BASE + UART_O_FR ) & UART_FR_TXFF ) ) {                HWREG( UART0_BASE + UART_O_DR ) = cNextChar;            }            cNextChar++;        }    }    /* If a task was woken by the character being received then we force    a context switch to occur in case the task is of higher priority than    the currently executing task (i.e. the task that this interrupt    interrupted.) */    portEND_SWITCHING_ISR( xHigherPriorityTaskWoken );}
开发者ID:peterliu2,项目名称:tivaWare,代码行数:40,


示例20: vSerialISR

__arm void vSerialISR( void ){signed char cChar;portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;	do	{		if( UART0->MIS & UART_IT_Transmit )		{			/* The interrupt was caused by the THR becoming empty.  Are there any			more characters to transmit? */			if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xHigherPriorityTaskWoken ) == pdTRUE )			{				/* A character was retrieved from the queue so can be sent to the				THR now. */				UART0->DR = cChar;			}			else			{				xQueueEmpty = pdTRUE;					}					UART_ClearITPendingBit( UART0, UART_IT_Transmit );		}			if( UART0->MIS & UART_IT_Receive )		{			/* The interrupt was caused by a character being received.  Grab the			character from the RHR and place it in the queue of received			characters. */			cChar = UART0->DR;			xQueueSendFromISR( xRxedChars, &cChar, &xHigherPriorityTaskWoken );			UART_ClearITPendingBit( UART0, UART_IT_Receive );		}	} while( UART0->MIS );	/* If a task was woken by either a character being received or a character	being transmitted then we may need to switch to another task. */	portEND_SWITCHING_ISR( xHigherPriorityTaskWoken );}
开发者ID:DuinOS,项目名称:FreeRTOS,代码行数:40,


示例21: FreeRTOS_FD_SET

	BaseType_t FreeRTOS_FD_SET( xSocket_t xSocket, xSocketSet_t xSocketSet )	{	xFreeRTOS_Socket_t *pxSocket = ( xFreeRTOS_Socket_t * ) xSocket;	BaseType_t xReturn = pdFALSE;	UBaseType_t uxMessagesWaiting;		configASSERT( xSocket );		/* Is the socket already a member of a select group? */		if( pxSocket->xSelectQueue == NULL )		{			taskENTER_CRITICAL();			{				/* Are there packets queued on the socket already? */				uxMessagesWaiting = uxQueueMessagesWaiting( pxSocket->xWaitingPacketSemaphore );				/* Are there enough notification spaces in the select queue for the				number of packets already queued on the socket? */				if( uxQueueSpacesAvailable( ( xQueueHandle ) xSocketSet ) >= uxMessagesWaiting )				{					/* Store a pointer to the select group in the socket for					future reference. */					pxSocket->xSelectQueue = ( xQueueHandle ) xSocketSet;					while( uxMessagesWaiting > 0 )					{						/* Add notifications of the number of packets that are						already queued on the socket to the select queue. */						xQueueSendFromISR( pxSocket->xSelectQueue, &pxSocket, NULL );						uxMessagesWaiting--;					}					xReturn = pdPASS;				}			}			taskEXIT_CRITICAL();		}		return xReturn;	}
开发者ID:Ryan311,项目名称:FreeRTOSV8.2.3,代码行数:40,


示例22: prvEMACEventListener

static void prvEMACEventListener( unsigned long ulISREvents ){long lHigherPriorityTaskWoken = pdFALSE;const unsigned long ulRxEvent = uipETHERNET_RX_EVENT;	/* Sanity check that the event queue was indeed created. */	configASSERT( xEMACEventQueue );	if( ( ulISREvents & MSS_MAC_EVENT_PACKET_SEND ) != 0UL )	{		/* An Ethernet Tx event has occurred. */		MSS_MAC_FreeTxBuffers();	}	if( ( ulISREvents & MSS_MAC_EVENT_PACKET_RECEIVED ) != 0UL )	{		/* An Ethernet Rx event has occurred. */		xQueueSendFromISR( xEMACEventQueue, &ulRxEvent, &lHigherPriorityTaskWoken );	}	portEND_SWITCHING_ISR( lHigherPriorityTaskWoken );}
开发者ID:chen0510566,项目名称:BeagleBone,代码行数:22,


示例23: dma_rx_isr

static bool dma_rx_isr(volatile struct usart_info *ui){        const uint16_t dma_counter = (uint16_t) ui->dma_rx.stream->NDTR;        volatile uint8_t* tail = ui->dma_rx.ptr;        volatile uint8_t* const buff = ui->dma_rx.buff;        volatile uint8_t* const edge = buff + ui->dma_rx.buff_size;        volatile uint8_t* const head = dma_counter ? edge - dma_counter : buff;        xQueueHandle queue = serial_get_rx_queue(ui->serial);        portBASE_TYPE task_awoke = pdFALSE;        while (tail != head) {                uint8_t val = *tail;                if (!xQueueSendFromISR(queue, &val, &task_awoke))                        ui->char_dropped = true;                if (++tail >= edge)                        tail = buff;        }        ui->dma_rx.ptr = head;        return task_awoke;}
开发者ID:autosportlabs,项目名称:RaceCapture-Pro_firmware,代码行数:22,


示例24: prvSendToQueueInSetFromISR

static void prvSendToQueueInSetFromISR( void ){static BaseType_t xQueueToWriteTo = 0;	if( xQueueSendFromISR( xQueues[ xQueueToWriteTo ], ( void * ) &ulISRTxValue, NULL ) == pdPASS )	{		ulISRTxValue++;		/* If the Tx value has wrapped then set it back to its initial value. */		if( ulISRTxValue == 0UL )		{			ulISRTxValue = queuesetINITIAL_ISR_TX_VALUE;		}		/* Use a different queue next time. */		xQueueToWriteTo++;		if( xQueueToWriteTo >= queuesetNUM_QUEUES_IN_SET )		{			xQueueToWriteTo = 0;		}	}}
开发者ID:BlueSkyGjj,项目名称:nRF52,代码行数:22,


示例25: USART1_IRQHandler

void USART1_IRQHandler(void){	/*	if(USART_GetITStatus(USART1, USART_IT_RXNE))	{		u8 RxData = (u8)USART_ReceiveData(USART1);		test[testlen++] = RxData;	}	DisplayString(0, 0, (u8*)test);	*/	portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;	portCHAR cChar;	if( USART_GetITStatus( USART1, USART_IT_TXE ) == SET )	{		/* The interrupt was caused by the THR becoming empty.  Are there any		more characters to transmit? */		if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xHigherPriorityTaskWoken ) == pdTRUE )		{			/* A character was retrieved from the queue so can be sent to the			THR now. */			USART_SendData( USART1, cChar );		}		else		{			USART_ITConfig( USART1, USART_IT_TXE, DISABLE );				}			}		if( USART_GetITStatus( USART1, USART_IT_RXNE ) == SET )	{		cChar = USART_ReceiveData( USART1 );		xQueueSendFromISR( xRxedChars, &cChar, &xHigherPriorityTaskWoken );	}			portEND_SWITCHING_ISR( xHigherPriorityTaskWoken );}
开发者ID:eloiz07,项目名称:DPC_Touch,代码行数:38,



注:本文中的xQueueSendFromISR函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ xQueueSendToBack函数代码示例
C++ xQueueReceiveFromISR函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。