1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 06:12:43 +01:00

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.
This commit is contained in:
J. David Ibáñez 2021-11-05 10:21:26 +01:00
parent 98a61d06e1
commit 77df3eedbd

View File

@ -26,6 +26,13 @@ extern "C" {
#include "irq.h"
#include "periph/gpio.h"
#include "arduino_board.h"
/**
* @brief Returns the number of milliseconds since start
*
* @return value of milliseconds since start
*/
unsigned long millis();
}
#include "serialport.hpp"
@ -115,13 +122,6 @@ void delayMicroseconds(unsigned long usec);
*/
unsigned long micros();
/**
* @brief Returns the number of milliseconds since start
*
* @return value of milliseconds since start
*/
unsigned long millis();
#if MODULE_PERIPH_ADC || DOXYGEN
/**
* @brief Read the current value of the given analog pin