1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

23 Commits

Author SHA1 Message Date
Marian Buschsieweke
043e8cc88e
boards,sys/arduino: major clean up
- Rename all `arduino_pinmap.h` to `arduino_iomap.h`
    - An empty `arduino_pinmap.h` that just includes `arduino_iomap.h`
      is provided for backward compatibility
    - Move all info from `arduino_board.h` into the new file as trivial
      macros, so that they can also be used outside of sketches
    - The new name reflects the fact not just pin mappings, but also
      other I/O features such as PWMs are mapped
- Drop all `arduino_board.h`
    - `arduino_board.h` and `arduino_iomap.h` now provide the exact
      same information, just in a different format
    - a generic `arduino_board.h` is provided instead that just
      uses the info in `arduinio_iomap.h` and provides them in the
      format the code in `sys/arduino` expects it
- Add fine grained features to indicate for mappings
    - availability of mappings for analog pins, DAC pins, PWM pins,
      UART devices, SPI/I2C buses to the corresponding RIOT
      identification can now be expressed:
        - `arduino_pins`: `ARDUINO_PIN_0` etc. are available
        - `arduino_analog`: `ARDUINO_A0` etc. are available
        - `arduino_pwm`: `ARDUINO_PIN_13_PWM_DEV` etc. are available
        - `arduino_dac`: `ARDUINO_DAC0` etc. are available
        - `arduino_uart`: `ARDUINO_UART_D0D1` or similar are available
        - `arduino_spi`: `ARDUINO_SPI_ISP` or similar are available
        - `arduino_i2c`: `ARDUINO_I2C_UNO` or similar are available
    - mechanical/electrical compatibility with specific form factors
      can now be expressed as features:
        - `aruino_shield_nano`: Arduino NANO compatible headers
        - `aruino_shield_uno`: Arduino UNO compatible headers
        - `aruino_shield_mega`: Arduino MEGA compatible headers
        - `aruino_shield_isp`: ISP header is available

This provides the groundwork to implement shield support as modules
that can rely on the I/O mappings, rather than having to provide a
configuration per board.
2023-06-26 17:24:07 +02:00
Benjamin Valentin
6e7d5ae2d3 codespell: fix remaining issues 2022-09-16 14:00:35 +02:00
J. David Ibáñez
77df3eedbd sys/arduino: millis() expected to have C linkage
This fixes building tests/pkg_arduino_sdi_12 for the hifive1b board.

The problem is, in build/pkg/arduino_api/api/Common.h millis is defined
within an extern "C" block. While in sys/arduino/include/arduino.hpp it
was not.
2021-11-05 10:21:26 +01:00
J. David Ibáñez
a651315fbe sys/arduino: add interrupts/noInterrupts
This fixes the error:

$ BOARD=arduino-mega2560 make -C tests/pkg_arduino_sdi_12/
[...]
[...]/RIOT/build/pkg/arduino_sdi_12/src/SDI12.cpp:379:7: error: ‘interrupts’ was not declared in this scope
2021-10-28 15:59:48 +02:00
eefcfd16e2
sys/arduino: fix typo 'adress' -> 'address' 2020-10-02 08:09:14 +02:00
Gunar Schorcht
4b92ce289b sys/arduino: compilation of Arduino libraries
To make it possible to use an Arduino library, a new pseudomodule arduino_lib is introduced. This pseudomodule enables implicitly module arduino but avoids that a sketch is required or generated and compiled. Thus, it is possible to compile and use a package or directory with some source files from an Arduino library in RIOT applications.
2019-11-21 19:13:14 +01:00
Gunar Schorcht
e942338f78 sys/arduino: add type definitions often used
boolean and byte are data types defined in Arduino.h and very often used in Arduino code.
2019-11-21 17:22:38 +01:00
0845cac3b8
sys/arduino: provide implementation for analogWrite 2019-11-15 17:51:45 +01:00
Marian Buschsieweke
cc50da690b
sys/arduino: Added SPI interface
Added an Arduino compatible SPI API on top of RIOT's SPI API.
2019-11-07 13:04:46 +01:00
Gunar Schorcht
3fc2c60f20 sys/arduino: add Wire (I2C) library implementation 2019-10-24 08:33:49 +02:00
Gunar Schorcht
1657606092 sys/arduino: add Arduino.h for compatibility
Arduino libraries often include Arduino.h. For source code compatibility this header file is required. Header guards in file arduino.hpp had to be renamed.
2019-10-19 19:22:40 +02:00
c4bb2a2e17
sys/arduino: make ADC feature optional 2019-10-08 10:26:23 +02:00
Kees Bakker
35c5869a2e
Merge pull request #12117 from maribu/arduino-println
sys/arduino: Extended Serial.print() / println()
2019-09-07 21:16:43 +02:00
Marian Buschsieweke
d4aeca7469
sys/arduino: Extended Serial.print() / println()
- Serial.print() and Serial.println() have been extended to support:
    - unsigned int
    - long
    - unsigned long
- The SerialFormat BIN has been implemented
- Serial.println(void) has been added
2019-09-04 21:36:20 +02:00
Marian Buschsieweke
27eca42f48
sys/arduino: Added millis()
Added arduino-compatilbe "unsigned long millis()"
2019-08-29 13:36:15 +02:00
Kevin "Bear Puncher" Weiss
f376b46691
Merge pull request #10150 from fedepell/arduino_2
sys/arduino: add arduino time functions micros() and delayMicroseconds()
2018-10-16 08:46:10 +02:00
Federico Pellegrin
a89e43ae31 sys/arduino: add possibility to customize Arduino serial port at compile time 2018-10-11 21:33:50 +02:00
Federico Pellegrin
4960607a1e sys/arduino: add arduino time functions micros() and delayMicroseconds() 2018-10-11 14:42:46 +02:00
Laurent Navet
9de00af063 cpu/atmega_common: add adc driver 2017-11-10 14:19:08 +01:00
Joakim Nohlgård
575b8ea340 sys/arduino: Make SerialPort constructor explicit 2017-02-17 08:02:36 +01:00
3b1d67badd sys/arduino: make arduino sketch works on avr based boards 2017-01-03 13:01:30 +01:00
Oleg Hahm
b87a0f12b0 arduino header: fix pedantic compiler warnings 2015-12-07 20:28:52 +01:00
Hauke Petersen
7855cb3707 sys: added module for running Arduino code 2015-11-27 12:45:12 +01:00