Wavebubble 2010 Firmware
Defines | Functions

serial.h File Reference

Serial header file. More...

Go to the source code of this file.

Defines

#define BAUDRATE   19200

Functions

void usart_init (void)
 Init USART.
int pc_putc (char data)
 Send one byte to PC.
char pc_getc (void)
 Get one byte from PC.
void pc_puts (char *s)
 Send RAM string to PC.
void pc_puts_P (const char *s)
 Send flash string to PC.
void putnum_ud (uint16_t n)
 Send unsigned int number in ASCII to PC.
void print_div (void)
 Print divider on terminal.
uint16_t pc_read16 (void)
 Get unisgned int from PC.

Detailed Description

Serial header file.

Definition in file serial.h.


Define Documentation

#define BAUDRATE   19200

Definition at line 11 of file serial.h.


Function Documentation

char pc_getc ( void  )

Get one byte from PC.

Returns:
Received byte

Definition at line 74 of file serial.c.

int pc_putc ( char  data)

Send one byte to PC.

Parameters:
dataByte to send

Definition at line 38 of file serial.c.

void pc_puts ( char *  s)

Send RAM string to PC.

Parameters:
sString to send

Definition at line 52 of file serial.c.

void pc_puts_P ( const char *  s)

Send flash string to PC.

Parameters:
sString to send

Definition at line 63 of file serial.c.

uint16_t pc_read16 ( void  )

Get unisgned int from PC.

Returns:
Received number

Definition at line 120 of file serial.c.

void print_div ( void  )

Print divider on terminal.

Definition at line 110 of file serial.c.

void putnum_ud ( uint16_t  n)

Send unsigned int number in ASCII to PC.

Parameters:
nNumber to send

Definition at line 87 of file serial.c.

void usart_init ( void  )

Init USART.

Initialize USART for communication with PC.

Definition at line 21 of file serial.c.