Skip to content
Snippets Groups Projects
Unverified Commit f376b466 authored by Kevin "Bear Puncher" Weiss's avatar Kevin "Bear Puncher" Weiss Committed by GitHub
Browse files

Merge pull request #10150 from fedepell/arduino_2

sys/arduino: add arduino time functions micros() and delayMicroseconds()
parents 7fde6fc2 75c4dab3
No related branches found
No related tags found
No related merge requests found
......@@ -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
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment