Defines | Functions | Variables
uart.c File Reference
#include <string.h>
#include "LPC214x.h"
#include "interrupt_utils.h"
#include "system.h"
#include "main.h"
#include "uart.h"
#include "irq.h"
#include "hardware.h"
#include "gpsmath.h"
#include "ssp.h"
#include "lpcUART.h"
#include "HL_interface.h"
Include dependency graph for uart.c:

Go to the source code of this file.

Defines

#define UART0_DISABLE_RX_INT   uart0_rx_cpsr=disableIRQ();U0IER &= ~UIER_ERBFI;restoreIRQ(uart0_rx_cpsr);
#define UART0_DISABLE_TX_INT   uart0_tx_cpsr=disableIRQ();U0IER &= ~UIER_ETBEI;restoreIRQ(uart0_tx_cpsr);
#define UART0_ENABLE_RX_INT   uart0_rx_cpsr=disableIRQ();U0IER |= UIER_ERBFI;restoreIRQ(uart0_rx_cpsr);
#define UART0_ENABLE_TX_INT   uart0_tx_cpsr=disableIRQ();U0IER |= UIER_ETBEI;restoreIRQ(uart0_tx_cpsr);

Functions

void __putchar (int ch)
uint16_t crc16 (void *data, uint16_t cnt, uint16_t crc)
uint16_t crc_update (uint16_t crc, uint8_t data)
uint16_t Fifo_availableMemory (Fifo *fifo)
void Fifo_initialize (Fifo *fifo, volatile uint8_t *buffer, uint32_t bufferSize)
uint8_t Fifo_readByte (Fifo *fifo, uint8_t *byte)
void Fifo_reset (Fifo *fifo)
uint8_t Fifo_writeBlock (Fifo *fifo, void *data, uint32_t length)
uint8_t Fifo_writeByte (Fifo *fifo, uint8_t byte)
void parseRxFifo (void)
PacketInforegisterPacket (uint8_t descriptor, void *data)
void startAutoBaud (void)
void UART0_rxFlush (void)
int UART0_txEmpty (void)
void UART0_txFlush (void)
uint8_t UART0_writeFifo (void *data, uint32_t length)
void uart0ISR (void)
void UART_send (char *buffer, unsigned char length)
void UART_send_ringbuffer (void)
void UARTInitialize (unsigned int baud)
unsigned char UARTReadChar (void)
void UARTWriteChar (unsigned char ch)
int writePacket2Ringbuffer (uint8_t descriptor, void *data, uint8_t length)

Variables

volatile char autobaud_in_progress = 0
PacketInfo packetInfo [PACKET_INFO_SIZE]
uint32_t registeredPacketCnt = 0
volatile uint8_t rxBuffer [UART0_RX_BUFFERSIZE]
Fifo rxFifo
uint8_t rxParseBuffer [UART0_RX_BUFFERSIZE]
volatile unsigned char transmission_running = 0
volatile uint8_t txBuffer [UART0_TX_BUFFERSIZE]
Fifo txFifo
volatile short uart0_min_rx_buffer = UART0_RX_BUFFERSIZE
volatile short uart0_min_tx_buffer = UART0_TX_BUFFERSIZE
unsigned uart0_rx_cpsr
unsigned uart0_tx_cpsr
volatile unsigned int UART_rxGoodPacketCount = 0
volatile unsigned int UART_rxPacketCount = 0

Define Documentation

Definition at line 54 of file uart.c.

Definition at line 52 of file uart.c.

Definition at line 55 of file uart.c.

Definition at line 53 of file uart.c.


Function Documentation

void __putchar ( int  ch)

Definition at line 441 of file uart.c.

uint16_t crc16 ( void *  data,
uint16_t  cnt,
uint16_t  crc 
) [inline]

Definition at line 485 of file uart.c.

uint16_t crc_update ( uint16_t  crc,
uint8_t  data 
) [inline]

Definition at line 477 of file uart.c.

uint16_t Fifo_availableMemory ( Fifo fifo) [inline]

Definition at line 207 of file uart.c.

void Fifo_initialize ( Fifo fifo,
volatile uint8_t *  buffer,
uint32_t  bufferSize 
)

Definition at line 155 of file uart.c.

uint8_t Fifo_readByte ( Fifo fifo,
uint8_t *  byte 
) [inline]

Definition at line 198 of file uart.c.

void Fifo_reset ( Fifo fifo) [inline]

Definition at line 212 of file uart.c.

uint8_t Fifo_writeBlock ( Fifo fifo,
void *  data,
uint32_t  length 
) [inline]

Definition at line 176 of file uart.c.

uint8_t Fifo_writeByte ( Fifo fifo,
uint8_t  byte 
) [inline]

Definition at line 166 of file uart.c.

void parseRxFifo ( void  )

Definition at line 231 of file uart.c.

PacketInfo* registerPacket ( uint8_t  descriptor,
void *  data 
)

Definition at line 218 of file uart.c.

void startAutoBaud ( void  )

Definition at line 402 of file uart.c.

void UART0_rxFlush ( void  )

Definition at line 411 of file uart.c.

int UART0_txEmpty ( void  )

Definition at line 421 of file uart.c.

void UART0_txFlush ( void  )

Definition at line 416 of file uart.c.

uint8_t UART0_writeFifo ( void *  data,
uint32_t  length 
)

Definition at line 368 of file uart.c.

void uart0ISR ( void  )

Definition at line 75 of file uart.c.

void UART_send ( char *  buffer,
unsigned char  length 
)

Definition at line 448 of file uart.c.

void UART_send_ringbuffer ( void  )

Definition at line 464 of file uart.c.

void UARTInitialize ( unsigned int  baud)

Definition at line 382 of file uart.c.

unsigned char UARTReadChar ( void  )

Definition at line 434 of file uart.c.

void UARTWriteChar ( unsigned char  ch)

Definition at line 427 of file uart.c.

int writePacket2Ringbuffer ( uint8_t  descriptor,
void *  data,
uint8_t  length 
)

Definition at line 349 of file uart.c.


Variable Documentation

volatile char autobaud_in_progress = 0

Definition at line 73 of file uart.c.

Definition at line 70 of file uart.c.

uint32_t registeredPacketCnt = 0

Definition at line 71 of file uart.c.

volatile uint8_t rxBuffer[UART0_RX_BUFFERSIZE]

Definition at line 60 of file uart.c.

Definition at line 62 of file uart.c.

Definition at line 61 of file uart.c.

volatile unsigned char transmission_running = 0

Definition at line 47 of file uart.c.

volatile uint8_t txBuffer[UART0_TX_BUFFERSIZE]

Definition at line 64 of file uart.c.

Definition at line 65 of file uart.c.

Definition at line 58 of file uart.c.

Definition at line 57 of file uart.c.

unsigned uart0_rx_cpsr

Definition at line 49 of file uart.c.

unsigned uart0_tx_cpsr

Definition at line 50 of file uart.c.

volatile unsigned int UART_rxGoodPacketCount = 0

Definition at line 68 of file uart.c.

volatile unsigned int UART_rxPacketCount = 0

Definition at line 67 of file uart.c.



asctec_hl_firmware
Author(s): Markus Achtelik, Michael Achtelik, Stephan Weiss, Laurent Kneip
autogenerated on Tue Jan 7 2014 11:05:19