Defines | Functions | Variables
uart.c File Reference
#include <string.h>
#include <mav_common/comm.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 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, 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
uint8_t rxBuffer [UART0_RX_BUFFERSIZE]
Fifo rxFifo
uint8_t rxParseBuffer [UART0_RX_BUFFERSIZE]
volatile unsigned char transmission_running = 0
uint8_t txBuffer [UART0_TX_BUFFERSIZE]
Fifo txFifo
short uart0_min_rx_buffer = UART0_RX_BUFFERSIZE
short uart0_min_tx_buffer = UART0_TX_BUFFERSIZE
unsigned uart0_rx_cpsr
unsigned uart0_tx_cpsr
unsigned int UART_rxcount = 0
volatile unsigned int UART_rxGoodPacketCount = 0
volatile unsigned int UART_rxPacketCount = 0
unsigned char * UART_rxptr
unsigned char UART_syncstate = 0

Define Documentation

Definition at line 26 of file uart.c.

Definition at line 24 of file uart.c.

Definition at line 27 of file uart.c.

Definition at line 25 of file uart.c.


Function Documentation

void __putchar ( int  ch)

Definition at line 414 of file uart.c.

uint16_t crc16 ( void *  data,
uint16_t  cnt,
uint16_t  crc 
)

Definition at line 458 of file uart.c.

uint16_t crc_update ( uint16_t  crc,
uint8_t  data 
)

Definition at line 450 of file uart.c.

uint16_t Fifo_availableMemory ( Fifo fifo) [inline]

Definition at line 179 of file uart.c.

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

Definition at line 127 of file uart.c.

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

Definition at line 170 of file uart.c.

void Fifo_reset ( Fifo fifo) [inline]

Definition at line 184 of file uart.c.

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

Definition at line 148 of file uart.c.

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

Definition at line 138 of file uart.c.

void parseRxFifo ( void  )

Definition at line 203 of file uart.c.

PacketInfo* registerPacket ( uint8_t  descriptor,
void *  data 
)

Definition at line 190 of file uart.c.

void startAutoBaud ( void  )

Definition at line 375 of file uart.c.

void UART0_rxFlush ( void  )

Definition at line 384 of file uart.c.

int UART0_txEmpty ( void  )

Definition at line 394 of file uart.c.

void UART0_txFlush ( void  )

Definition at line 389 of file uart.c.

uint8_t UART0_writeFifo ( void *  data,
uint32_t  length 
)

Definition at line 341 of file uart.c.

void uart0ISR ( void  )

Definition at line 47 of file uart.c.

void UART_send ( char *  buffer,
unsigned char  length 
)

Definition at line 421 of file uart.c.

void UART_send_ringbuffer ( void  )

Definition at line 437 of file uart.c.

void UARTInitialize ( unsigned int  baud)

Definition at line 355 of file uart.c.

unsigned char UARTReadChar ( void  )

Definition at line 407 of file uart.c.

void UARTWriteChar ( unsigned char  ch)

Definition at line 400 of file uart.c.

int writePacket2Ringbuffer ( uint8_t  descriptor,
void *  data,
uint8_t  length 
) [inline]

Definition at line 322 of file uart.c.


Variable Documentation

volatile char autobaud_in_progress = 0

Definition at line 45 of file uart.c.

Definition at line 42 of file uart.c.

uint32_t registeredPacketCnt = 0

Definition at line 43 of file uart.c.

Definition at line 32 of file uart.c.

Definition at line 34 of file uart.c.

Definition at line 33 of file uart.c.

volatile unsigned char transmission_running = 0

Definition at line 15 of file uart.c.

Definition at line 36 of file uart.c.

Definition at line 37 of file uart.c.

Definition at line 30 of file uart.c.

Definition at line 29 of file uart.c.

unsigned uart0_rx_cpsr

Definition at line 21 of file uart.c.

unsigned uart0_tx_cpsr

Definition at line 22 of file uart.c.

unsigned int UART_rxcount = 0

Definition at line 18 of file uart.c.

volatile unsigned int UART_rxGoodPacketCount = 0

Definition at line 40 of file uart.c.

volatile unsigned int UART_rxPacketCount = 0

Definition at line 39 of file uart.c.

unsigned char* UART_rxptr

Definition at line 19 of file uart.c.

unsigned char UART_syncstate = 0

Definition at line 17 of file uart.c.



ccny_asctec_firmware
Author(s): Ivan Dryanovski, Roberto G. Valenti
autogenerated on Tue Jan 7 2014 11:04:32