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

52 Commits

Author SHA1 Message Date
MrKevinWeiss
652e4f41c1
cpp: Use modules for cpp and libstdcpp
Also add better error message when kconfig or make includes a .cpp without cpp module.
2021-07-02 15:11:10 +02:00
MrKevinWeiss
630f7a2102
sys/arduino: Add Kconfig model 2021-07-02 15:11:09 +02:00
MrKevinWeiss
6884927c3f
sys/arduino: Remove option
There is no clear reason why this should be configurable and causes an abstraction of USEMODULE.
The true reason is to make Kconfig easier but it seems having a variable in USEMODULE is a bit strange.
2021-07-02 15:11:09 +02:00
746f56cc3f
sys/arduino: use ztimer as backend high-level timer 2021-06-17 10:23:21 +02:00
Marian Buschsieweke
45ed8bc330
sys/arduino: Bug and style fixes in SPI
- set is_transaction before releasing the SPI bus (and the mutex) to avoid
  data races
- adapt switch indent to coding convention
2021-02-02 09:45:46 +01:00
Marian Buschsieweke
45b8902659
Merge pull request #15314 from aabadie/pr/sys/arduino_print_float
sys/arduino: fix print float
2020-11-17 16:15:39 +01:00
Leandro Lanzieri
b2b704160e
sys/arduino: add module to Kconfig 2020-11-06 15:57:57 +01:00
1be6bd7567
sys/arduino: use fmt_float to print float values 2020-10-27 15:31:42 +01:00
eefcfd16e2
sys/arduino: fix typo 'adress' -> 'address' 2020-10-02 08:09:14 +02:00
Francisco Molina
e7a8c58de4
sys/arduino: include arduino_sketches in Makefile.dep 2020-06-25 11:02:02 +02:00
Gunar Schorcht
34555748dd sys/arduino: fix of compilation error with NDEBUG
When NDEBUG macro is defined during compilation, the assert macro produces empty code. Parameters or variables checked with assert are then unused.
2020-02-03 00:22:37 +01:00
c8b43b8ca4 sys/arduino: fix typos 2019-11-23 22:39:37 +01:00
Francois Berder
4a31f94cfc many typo fixes
Signed-off-by: Francois Berder <18538310+francois-berder@users.noreply.github.com>
2019-11-23 22:39:07 +01: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
fabian18
a8ff989db1 sys/arduino: Fixed frequency selection in SPI 2019-11-11 10:33:01 +01:00
Marian Buschsieweke
8a53e072f9
sys/arduino/doc: Removed SPI from ToDo
The SPI interface has been added, so it should no longer be listed on the ToDo
list.
2019-11-07 13:04:47 +01:00
Marian Buschsieweke
83a955fa49
sys/arduino/doc: Removed I2C from ToDo
The I2C (Wire) interface has been added, so it should no longer be listed on the
ToDo list.
2019-11-07 13:04:47 +01:00
Marian Buschsieweke
c449467125
sys/arduino: Enable C++11 support
Arduino is always enabling C++11 support, so sketches and libs are depending on
it. Every C++ compiler has been enabling C++11 by default for some years now.
Still, Ubuntu's avr-gcc is so **horrible** out of date, that it is not enabled
there. As a simple work around, -std=c++11 is now passed to the C++ compiler if
Arduino is used.
2019-11-07 13:04:47 +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
d9e0c6c859 sys/arduino: use 64bit usec to compute millis()
This is quick solution to avoid wrapping around after 4294967 milliseconds.
It uses xtimer_now_usec64 instead of xtimer_now_usec.

Notice that this is more expansive than the previous solution, especially
on AVR systems.
2019-09-19 19:52:43 +02:00
Gaëtan Harter
a1f0651170
Revert "sys/arduino: work around llvm-ar bug."
This reverts commit 72f934f13d.

Not required anymore as 'ar' is not executed in the object directory
anymore.
2019-09-16 15:52:36 +02:00
Juan Carrano
72f934f13d sys/arduino: work around llvm-ar bug.
llvm-ar behaves weidly when creating thin archive. This only manifests
itself when using arduino sketches as these are built from the "bin"
directory.

Specifically, given a directory "m" and an object in "m/obj.o " an
invocation with CWD==m:

```
llvm-ar rcTs ../m.a obj.o
```

Will create a maformed archive. Binutils does not have any issue with this.

The following command, executed with CWD==m/.. works:

```
llvm-ar rcTs m.a m/obj.o
```

The trick used in this commit is to put the source files in a different
directory than the object files and compile from there.
2019-09-10 17:53:07 +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
8cff47304b
sys/arduino: Make use of US_PER_MS in delay() 2019-08-29 13:57:56 +02:00
Marian Buschsieweke
27eca42f48
sys/arduino: Added millis()
Added arduino-compatilbe "unsigned long millis()"
2019-08-29 13:36:15 +02:00
Gaëtan Harter
be30f072e2
sys/arduino/sketches: build sketches as a module
Generate a module for arduino sketches in a subfolder of BINDIR.
This prevents issues when doing concurrent builds or out of tree build with
readonly sources.

Declare all generated files as `BUILDDEPS` to be re-created after
`clean` on parrallel `clean all`.
2019-08-21 11:57:41 +02:00
Benjamin Valentin
9311e05fcf sys/arduino: reduce scope of adc_line_state
This makes cppcheck happy.
2019-08-06 19:43:54 +02:00
Benjamin Valentin
e8dc1119b8 sys: make use of ARRAY_SIZE macro 2019-08-06 19:43:54 +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
75c4dab3c7 sys/arduino: correct micros() return type 2018-10-12 17:40:37 +02:00
Kevin "Bear Puncher" Weiss
ceba02f368
Merge pull request #10149 from fedepell/arduino_1
sys/arduino: add docs for analog map (strictly needed to build)
2018-10-12 15:09:38 +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
Federico Pellegrin
4a7222072f sys/arduino: add docs for analog map (strictly needed to build) 2018-10-11 14:17:50 +02:00
Gaëtan Harter
14ac80e15a
sys/arduino: use RIOTTOOLS variable
Follow up to #9067 and part of #8821
2018-05-04 11:16:48 +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
560a509036 make: remove trailing slash from BINDIR variable 2016-10-18 23:27:59 +02:00
Laurent Navet
b702049134 sys/arduino: fix typos in documentation 2016-06-12 10:45:25 +02:00
DipSwitch
0bb4748a94 core: Fix/refactor function naming in core/incude/irq.h 2016-03-20 16:47:34 +01:00
Hauke Petersen
013eed7fa0 sys: adapted to GPIO changes 2016-03-17 14:55:30 +01:00
Hauke Petersen
236bd201ca sys/arduino: adapted to changed UART cb type 2016-03-15 14:24:48 +01:00
Oleg Hahm
b87a0f12b0 arduino header: fix pedantic compiler warnings 2015-12-07 20:28:52 +01:00