SikendeRTOS
RTOS for ARM Cortex M3+ SoCs designed and written from scratch
UART0.c File Reference
#include <stdint.h>
#include "tm4c123gh6pm.h"
#include "UART0.h"
#include "FIFO.h"
Include dependency graph for UART0.c:

Go to the source code of this file.

Macros

#define NVIC_EN0_INT5   0x00000020
 
#define UART_FR_RXFF   0x00000040
 
#define UART_FR_TXFF   0x00000020
 
#define UART_FR_RXFE   0x00000010
 
#define UART_LCRH_WLEN_8   0x00000060
 
#define UART_LCRH_FEN   0x00000010
 
#define UART_CTL_UARTEN   0x00000001
 
#define UART_IFLS_RX1_8   0x00000000
 
#define UART_IFLS_TX1_8   0x00000000
 
#define UART_IM_RTIM   0x00000040
 
#define UART_IM_TXIM   0x00000020
 
#define UART_IM_RXIM   0x00000010
 
#define UART_RIS_RTRIS   0x00000040
 
#define UART_RIS_TXRIS   0x00000020
 
#define UART_RIS_RXRIS   0x00000010
 
#define UART_ICR_RTIC   0x00000040
 
#define UART_ICR_TXIC   0x00000020
 
#define UART_ICR_RXIC   0x00000010
 
#define FIFOSIZE   64
 
#define FIFOSUCCESS   1
 
#define FIFOFAIL   0
 

Functions

void DisableInterrupts (void)
 
void EnableInterrupts (void)
 
void WaitForInterrupt (void)
 
 AddIndexFifo (Rx, AddIndexFifo(FIFOSIZE, AddIndexFifo(char, AddIndexFifo(FIFOSUCCESS, FIFOFAIL)
 
char UART_InChar (void)
 
void UART_OutChar (char data)
 
void UART0_Handler (void)
 
void UART_OutString (char *pt)
 
uint32_t UART_InUDec (void)
 
void UART_OutUDec (uint32_t n)
 
uint32_t UART_InUHex (void)
 
void UART_OutUHex (uint32_t number)
 
void UART_InString (char *bufPt, uint16_t max)
 
void OutCRLF (void)
 

Macro Definition Documentation

◆ FIFOFAIL

#define FIFOFAIL   0

Definition at line 57 of file UART0.c.

◆ FIFOSIZE

#define FIFOSIZE   64

Definition at line 55 of file UART0.c.

◆ FIFOSUCCESS

#define FIFOSUCCESS   1

Definition at line 56 of file UART0.c.

◆ NVIC_EN0_INT5

#define NVIC_EN0_INT5   0x00000020

Definition at line 27 of file UART0.c.

◆ UART_CTL_UARTEN

#define UART_CTL_UARTEN   0x00000001

Definition at line 33 of file UART0.c.

◆ UART_FR_RXFE

#define UART_FR_RXFE   0x00000010

Definition at line 30 of file UART0.c.

◆ UART_FR_RXFF

#define UART_FR_RXFF   0x00000040

Definition at line 28 of file UART0.c.

◆ UART_FR_TXFF

#define UART_FR_TXFF   0x00000020

Definition at line 29 of file UART0.c.

◆ UART_ICR_RTIC

#define UART_ICR_RTIC   0x00000040

Definition at line 46 of file UART0.c.

◆ UART_ICR_RXIC

#define UART_ICR_RXIC   0x00000010

Definition at line 48 of file UART0.c.

◆ UART_ICR_TXIC

#define UART_ICR_TXIC   0x00000020

Definition at line 47 of file UART0.c.

◆ UART_IFLS_RX1_8

#define UART_IFLS_RX1_8   0x00000000

Definition at line 34 of file UART0.c.

◆ UART_IFLS_TX1_8

#define UART_IFLS_TX1_8   0x00000000

Definition at line 35 of file UART0.c.

◆ UART_IM_RTIM

#define UART_IM_RTIM   0x00000040

Definition at line 36 of file UART0.c.

◆ UART_IM_RXIM

#define UART_IM_RXIM   0x00000010

Definition at line 39 of file UART0.c.

◆ UART_IM_TXIM

#define UART_IM_TXIM   0x00000020

Definition at line 38 of file UART0.c.

◆ UART_LCRH_FEN

#define UART_LCRH_FEN   0x00000010

Definition at line 32 of file UART0.c.

◆ UART_LCRH_WLEN_8

#define UART_LCRH_WLEN_8   0x00000060

Definition at line 31 of file UART0.c.

◆ UART_RIS_RTRIS

#define UART_RIS_RTRIS   0x00000040

Definition at line 41 of file UART0.c.

◆ UART_RIS_RXRIS

#define UART_RIS_RXRIS   0x00000010

Definition at line 44 of file UART0.c.

◆ UART_RIS_TXRIS

#define UART_RIS_TXRIS   0x00000020

Definition at line 42 of file UART0.c.

Function Documentation

◆ AddIndexFifo()

AddIndexFifo ( Rx  ,
AddIndexFifo(  FIFOSIZE,
AddIndexFifo(  char,
AddIndexFifo(  FIFOSUCCESS,
FIFOFAIL   
)

Definition at line 59 of file UART0.c.

Here is the call graph for this function:

◆ DisableInterrupts()

void DisableInterrupts ( void  )

◆ EnableInterrupts()

void EnableInterrupts ( void  )

◆ OutCRLF()

void OutCRLF ( void  )

Definition at line 316 of file UART0.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UART0_Handler()

void UART0_Handler ( void  )

Definition at line 134 of file UART0.c.

◆ UART_InChar()

char UART_InChar ( void  )

Definition at line 115 of file UART0.c.

Here is the caller graph for this function:

◆ UART_InString()

void UART_InString ( char *  bufPt,
uint16_t  max 
)

Definition at line 289 of file UART0.c.

Here is the call graph for this function:

◆ UART_InUDec()

uint32_t UART_InUDec ( void  )

Definition at line 174 of file UART0.c.

Here is the call graph for this function:

◆ UART_InUHex()

uint32_t UART_InUHex ( void  )

Definition at line 223 of file UART0.c.

Here is the call graph for this function:

◆ UART_OutChar()

void UART_OutChar ( char  data)

Definition at line 122 of file UART0.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UART_OutString()

void UART_OutString ( char *  pt)

Definition at line 159 of file UART0.c.

Here is the call graph for this function:

◆ UART_OutUDec()

void UART_OutUDec ( uint32_t  n)

Definition at line 203 of file UART0.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UART_OutUHex()

void UART_OutUHex ( uint32_t  number)

Definition at line 260 of file UART0.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ WaitForInterrupt()

void WaitForInterrupt ( void  )