Configuration of the Arduino API for Arduino Atmega boards. More...
Configuration of the Arduino API for Arduino Atmega boards.
Definition in file arduino_board.h.
Include dependency graph for arduino_board.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
| #define | F_CPU CLOCK_CORECLOCK |
| F_CPU defines the CPU frequency in Hz. More... | |
| #define | LED_BUILTIN ARDUINO_LED |
| Arduino IDE define for the on-board LED. More... | |
| #define F_CPU CLOCK_CORECLOCK |
F_CPU defines the CPU frequency in Hz.
This is used in AVR's libc delay.h and setbaud.h
In RIOT delay() has a different implementation using ztimer, and F_CPU is already defined when using setbaud.h (see cpu/atmega_common/periph/uart.c)
However Arduino libraries and sketches may expect F_CPU to be defined and fail otherwise (for example the Arduino SDI-12 package expects this, for AVR cpus). For this reason we define F_CPU here, if not already defined.
Definition at line 45 of file arduino_board.h.
| #define LED_BUILTIN ARDUINO_LED |
Arduino IDE define for the on-board LED.
In Arduino IDE the on-board LED pin is defined by macro LED_BUILTIN. It is used whenever the LED is controlled. To make it easier to use Arduino sketches as they are, LED_BUILTIN is defined by using ARDUINO_LED as defined by the board.
Definition at line 57 of file arduino_board.h.