skeleton SDMMC

This commit is contained in:
Kate J. Temkin
2018-04-21 19:38:55 -06:00
parent c19750a0d5
commit 06bf132022
6 changed files with 779 additions and 133 deletions

View File

@@ -26,6 +26,22 @@ static inline uint32_t get_time(void) {
return TIMERUS_CNTR_1US_0;
}
/**
* Returns the number of microseconds that have passed since a given get_time().
*/
static inline uint32_t get_time_since(uint32_t base) {
return get_time() - base;
}
/**
* Delays for a given number of microseconds.
*/
static inline void udelay(unsigned usecs)
{
uint32_t start = get_time();
while (get_time() - start < usecs) ;
}
__attribute__ ((noreturn)) void watchdog_reboot(void);
#endif