1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 14:33:52 +01:00

sys/arduino: Added millis()

Added arduino-compatilbe "unsigned long millis()"
This commit is contained in:
Marian Buschsieweke 2019-05-29 12:53:17 +02:00
parent b83c7dd61d
commit 27eca42f48
No known key found for this signature in database
GPG Key ID: 61F64C6599B1539F
2 changed files with 12 additions and 0 deletions

View File

@ -72,6 +72,11 @@ unsigned long micros()
return xtimer_now_usec();
}
unsigned long millis()
{
return xtimer_now_usec() / US_PER_MS;
}
int analogRead(int arduino_pin)
{
/*

View File

@ -103,6 +103,13 @@ 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();
/**
* @brief Read the current value of the given analog pin
*