COSA
An Object-Oriented Platform for Arduino Programming
|
#include "VWI.hh"
Go to the source code of this file.
Functions | |
static uint8_t | timer_setting (uint16_t speed, uint8_t bits, uint16_t *nticks) |
ISR (TIMER1_COMPA_vect) | |
Variables | |
static const uint16_t prescale[] | __PROGMEM |
Copyright (C) 2008-2013, Mike McCauley (Author/VirtualWire rev. 1.19) Copyright (C) 2013-2015, Mikael Patel (Cosa C++ port and refactoring) Copyright (C) 2015, Mikael Patel (RF433 link quality indicator)
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 VWI.cpp.
ISR | ( | TIMER1_COMPA_vect | ) |
|
static |
Calculate timer setting, prescale and count value, given speed (bps), number of bits in timer. Returns zero(0) if fails otherwise prescale value/index, and timer top.
[in] | speed | bits per second, transmitter/receiver. |
[in] | bits | number of bits in counter (8 or 16 bit timer). |
[out] | nticks | timer top value. |