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:
parent
b83c7dd61d
commit
27eca42f48
@ -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)
|
||||
{
|
||||
/*
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user