COSA
An Object-Oriented Platform for Arduino Programming
RS485.cpp File Reference
#include "Cosa/Types.h"
#include "RS485.hh"
#include "Cosa/RTT.hh"
#include <util/crc16.h>
Include dependency graph for RS485.cpp:

Go to the source code of this file.

Macros

#define UART_TX_ISR(vec, nr)
 

Functions

static uint8_t crc7 (const void *buf, size_t size)
 
static uint16_t crc_xmodem (const void *buf, size_t len)
 

Detailed Description

Version
1.0

License

Copyright (C) 2013-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 RS485.cpp.

Macro Definition Documentation

#define UART_TX_ISR (   vec,
  nr 
)
Value:
ISR(vec ## _TX_vect) \
{ \
if (UNLIKELY(UART::uart[nr] == NULL)) return; \
UART::uart[nr]->on_tx_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 166 of file RS485.cpp.

Function Documentation

static uint8_t crc7 ( const void *  buf,
size_t  size 
)
static

Definition at line 28 of file RS485.cpp.

static uint16_t crc_xmodem ( const void *  buf,
size_t  len 
)
static

Definition at line 43 of file RS485.cpp.