Skip to content

Commit

Permalink
Update uart.c
Browse files Browse the repository at this point in the history
correct UART interrupt setting for when using FreeRTOS
  • Loading branch information
pwittich committed May 15, 2019
1 parent c3e07b2 commit 8281f04
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions common/uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
#include "driverlib/uart.h"
#include "driverlib/interrupt.h"

#ifdef USE_FREERTOS
#include "FreeRTOS.h"
#endif // USE_FREERTOS

// Initialize the UART
// based on uart_echo demo project
Expand All @@ -36,6 +39,9 @@ UART4Init(uint32_t ui32SysClock)
//
// Enable the UART interrupt.
//
#ifdef USE_FREERTOS
IntPrioritySet( INT_UART4, configKERNEL_INTERRUPT_PRIORITY );
#endif // USE_FREERTOS
MAP_IntEnable(INT_UART4);
MAP_UARTIntEnable(UART4_BASE, UART_INT_RX | UART_INT_RT);

Expand Down

0 comments on commit 8281f04

Please sign in to comment.