Skip to content
Snippets Groups Projects
Commit 4960607a authored by Federico Pellegrin's avatar Federico Pellegrin
Browse files

sys/arduino: add arduino time functions micros() and delayMicroseconds()

parent 94adf875
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 int micros()
{
return xtimer_now_usec();
}
/*
* Bitfield for the state of the ADC-channels.
* 0: Not initialized
......
......@@ -82,6 +82,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