#include <avr/io.h>
#include <stdio.h>
#include "serial.h"
Functions | |
void | usb_init () |
Initialize the USB. | |
void | xbee_init () |
Initialize the XBee. | |
int | usb_putc (char c) |
Print a character to USB. | |
int | xbee_putc (char c) |
Print a character to the XBee. | |
int | usb_puts (char *s) |
Print a string to USB. | |
int | usb_getc (void) |
Read a character from USB. | |
int | xbee_getc (void) |
Read a character from the XBee. | |
int | usb_getc_nb (char *c) |
Read a character from USB without blocking. | |
int | xbee_getc_nb (char *c) |
Read a character from the XBee without blocking. | |
int | usb_puti (int value) |
Print an integer to USB. | |
uint8_t | hex_digit (uint8_t value) |
Determine a hexadecimal digit. | |
void | usb_puth16 (uint16_t value) |
Print a fixed width hexadecimal representation to USB. | |
void | usb_puth8 (uint8_t value) |
Print a fixed width hexadecimal representation to USB. | |
Variables | |
FILE * | usb_fd |
FILE * | xbee_fd |
Copyright (c) 2007 Colony Project
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Implementation of functions for serial input and output.