COSA
An Object-Oriented Platform for Arduino Programming
UART.cpp File Reference
#include "Cosa/Board.hh"
#include "Cosa/UART.hh"
#include <avr/power.h>
#include "Cosa/IOBuffer.hh"
Include dependency graph for UART.cpp:

Go to the source code of this file.

Macros

#define USE_FAST_TRACK
 
#define USE_SYNC_DELAY
 
#define UART_ISR(vec, nr)
 

Variables

static IOBuffer< UART::RX_BUFFER_MAXibuf
 
static IOBuffer< UART::TX_BUFFER_MAXobuf
 
UART uart (0,&ibuf,&obuf)
 

Detailed Description

Version
1.0

License

Copyright (C) 2012-2015, Mikael Patel

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

This file is part of the Arduino Che Cosa project.

Definition in file UART.cpp.

Macro Definition Documentation

#define UART_ISR (   vec,
  nr 
)
Value:
ISR(vec ## _UDRE_vect) \
{ \
if (UNLIKELY(UART::uart[nr] == NULL)) return; \
UART::uart[nr]->on_udre_interrupt(); \
} \
\
ISR(vec ## _RX_vect) \
{ \
if (UNLIKELY(UART::uart[nr] == NULL)) return; \
UART::uart[nr]->on_rx_interrupt(); \
} \
#define NULL
Definition: Types.h:101
UART uart(0,&ibuf,&obuf)
static UART * uart[Board::UART_MAX]
Definition: UART.hh:203
ISR(ANALOG_COMP_vect)
Definition: UART.hh:59
#define UNLIKELY(x)
Definition: Types.h:153

Definition at line 226 of file UART.cpp.

#define USE_FAST_TRACK

Definition at line 86 of file UART.cpp.

#define USE_SYNC_DELAY

Definition at line 92 of file UART.cpp.

Variable Documentation

Definition at line 37 of file UART.cpp.

Definition at line 38 of file UART.cpp.

UART uart(0,&ibuf,&obuf)

Default serial port(0). Weakly defined (See UART.cpp). On Leonardo and other ATmega32u4 based boards the standard serial is CDC.