mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
Merge pull request #10150 from fedepell/arduino_2
sys/arduino: add arduino time functions micros() and delayMicroseconds()
This commit is contained in:
commit
f376b46691
@ -62,6 +62,16 @@ void delay(unsigned long msec)
|
||||
xtimer_usleep(1000 * msec);
|
||||
}
|
||||
|
||||
void delayMicroseconds(unsigned long usec)
|
||||
{
|
||||
xtimer_usleep(usec);
|
||||
}
|
||||
|
||||
unsigned long micros()
|
||||
{
|
||||
return xtimer_now_usec();
|
||||
}
|
||||
|
||||
/*
|
||||
* Bitfield for the state of the ADC-channels.
|
||||
* 0: Not initialized
|
||||
|
@ -89,6 +89,20 @@ int digitalRead(int pin);
|
||||
*/
|
||||
void delay(unsigned long msec);
|
||||
|
||||
/**
|
||||
* @brief Sleep for a given amount of time [microseconds]
|
||||
*
|
||||
* @param[in] usec number of microseconds to sleep
|
||||
*/
|
||||
void delayMicroseconds(unsigned long usec);
|
||||
|
||||
/**
|
||||
* @brief Returns the number of microseconds since start
|
||||
*
|
||||
* @return value of microseconds since start
|
||||
*/
|
||||
unsigned long micros();
|
||||
|
||||
/**
|
||||
* @brief Read the current value of the given analog pin
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user