Exemplo n.º 1
0
void USART3_IRQHandler(void) {
	/* Check if interrupt was because data is received */
	if (USART3->SR & USART_SR_RXNE) {
		#ifdef TM_USART3_USE_CUSTOM_IRQ
			/* Call user function */
			TM_USART3_ReceiveHandler(USART3->DR);
		#else
			/* Put received data into internal buffer */
			TM_USART_INT_InsertToBuffer(&TM_USART3, USART3->DR);
		#endif
	}
}
Exemplo n.º 2
0
void USART3_IRQHandler(void) {
	//Check if interrupt was because data is received
	if (USART_GetITStatus(USART3, USART_IT_RXNE)) {
		#ifdef TM_USART3_USE_CUSTOM_IRQ
			//Call user function
			TM_USART3_ReceiveHandler(USART3->DR);
		#else
			//Put received data into internal buffer
			TM_USART_InsertToBuffer(2, USART3->DR);
		#endif
	}
}
void USART3_IRQHandler(void) {
	/* Check if interrupt was because data is received */
	if (USART3->USART_STATUS_REG & USART_ISR_RXNE) {
#ifdef TM_USART3_USE_CUSTOM_IRQ
		/* Call user function */
		TM_USART3_ReceiveHandler(USART_READ_DATA(USART3));
#else
		/* Put received data into internal buffer */
		TM_USART_INT_InsertToBuffer(&TM_USART3, USART_READ_DATA(USART3));
#endif
	}
	
	/* Clear all USART flags */
	TM_USART_INT_ClearAllFlags(USART3, IRQ_USART3);
}