1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-11-30 11:24:12 +01:00
Arduino/build/shared/lib/avrlib/rsl/radiolinx.c
2005-08-25 21:06:28 +00:00

54 lines
1.6 KiB
C
Executable File

/*! \file radiolinx.c \brief Linx Radio Driver. */
//*****************************************************************************
//
// File Name : 'radiolinx.c'
// Title : Linx Radio Driver
// Author : Pascal Stang - Copyright (C) 2003
// Created : 09/01/2003
// Revised : 09/03/2003
// Version : 0.1
// Target MCU : Atmel AVR Series
// Editor Tabs : 4
//
// This code is distributed under the GNU Public License
// which can be found at http://www.gnu.org/licenses/gpl.txt
//
//*****************************************************************************
//----- Include Files ---------------------------------------------------------
#include <avr/io.h> // include I/O definitions (port names, pin names, etc)
#include <avr/signal.h> // include "signal" names (interrupt names)
#include <avr/interrupt.h> // include interrupt support
#include "global.h" // include our global settings
#include "buffer.h" // include buffer support
#include "uartsw.h" // include software UART driver
#include "stxetx.h" // include STX/ETX protocol library
#include "radiolinx.h"
// global variables
// functions
void radioInit(void)
{
// Initialize radio interface
// Since this radio creates a special serial interface,
// we initialize it here.
uartswInit();
// set baud rate of comm
uartswSetBaudRate(4800);
// initialize stxetx to use the software UART for sending data
stxetxInit(uartswSendByte);
}
void radioSend(u08 status, u08 type, u08 datalength, u08* dataptr)
{
stxetxSend(status, type, datalength, dataptr);
}
cBuffer* radioGetRxBuffer(void)
{
return uartswGetRxBuffer();
}