Wavebubble 2010 Hardware Test
Functions

serial.c File Reference

#include <avr/io.h>
#include <avr/pgmspace.h>
#include <avr/interrupt.h>
#include <ctype.h>
#include <string.h>
#include "main.h"
#include "serial.h"

Functions

void usart_init (void)
void pc_putc (char data)
void pc_puts (char *s)
void pc_puts_P (const char *s)
 ISR (USART_RX_vect)
void putnum_ud (uint16_t n)

Detailed Description

USART and serial I/O functions


Function Documentation

ISR ( USART_RX_vect  )

Interrupt service routine to receive data from PC via USART0

References in_char.

void pc_putc ( char  data)

Send one byte to PC

Parameters:
dataByte to send

Referenced by pc_puts(), pc_puts_P(), pll_set_freq(), putnum_ud(), tune_if(), and tune_rf().

void pc_puts ( char *  s)

Send RAM string to PC

Parameters:
sString to send, stored in RAM

References pc_putc().

void pc_puts_P ( const char *  s)

Send flash string to PC

Parameters:
sString to send, stored in flash, use PSTR macro

References pc_putc().

Referenced by main(), pll_set_freq(), tune_if(), tune_rf(), and tune_rf_band().

void putnum_ud ( uint16_t  n)

Print unsigned integer on terminal

Parameters:
nNumber to print on terminal

References pc_putc().

Referenced by pll_set_freq(), tune_if(), tune_rf(), and tune_rf_band().

void usart_init ( void  )

Init USART

Initialize USART for communication with PC.

References BAUDRATE.

Referenced by main().