Infrared4Arduino
1.2.3
Loading...
Searching...
No Matches
src
Board.cpp
Go to the documentation of this file.
1
/*
2
Copyright (C) 2020 Bengt Martensson.
3
4
This program is free software: you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
6
the Free Software Foundation; either version 3 of the License, or (at
7
your option) any later version.
8
9
This program is distributed in the hope that it will be useful, but
10
WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
General Public License for more details.
13
14
You should have received a copy of the GNU General Public License along with
15
this program. If not, see http://www.gnu.org/licenses/.
16
*/
17
18
#include "
Board.h
"
19
24
// See https://www.arduino.cc/reference/en/language/functions/time/delaymicroseconds/
25
void
Board::delayMicroseconds
(
microseconds_t
t) {
26
if
(t) {
27
if
(t > 16383U) {
28
::delayMicroseconds
(t % 1000U);
29
delay(t / 1000U);
30
} else
31
::delayMicroseconds(t);
32
}
33
}
34
35
Board
* Board::instance =
new
CURRENT_CLASS
();
CURRENT_CLASS
#define CURRENT_CLASS
Definition:
ATmega2560.h:28
Board.h
microseconds_t
uint16_t microseconds_t
Type for durations in micro seconds.
Definition:
InfraredTypes.h:15
Board
This class serves as an HAL (Hardware Abstraction Layer).
Definition:
Board.h:33
Board::delayMicroseconds
static void delayMicroseconds(microseconds_t)
Version of delayMicroseconds able to grok more than 16383 micros.
Definition:
Board.cpp:25
Generated on Wed Mar 15 2023 14:15:12 for Infrared4Arduino by
1.9.5