This repo is archived. You can view files and clone it, but cannot push or open issues or pull requests.
2015-04-09 16:32:04 +00:00
|
|
|
#ifndef WAIT_H
|
|
|
|
#define WAIT_H
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(__AVR__)
|
|
|
|
# include <util/delay.h>
|
|
|
|
# define wait_ms(ms) _delay_ms(ms)
|
|
|
|
# define wait_us(us) _delay_us(us)
|
2015-09-07 20:57:04 +00:00
|
|
|
#elif defined(PROTOCOL_CHIBIOS) /* __AVR__ */
|
|
|
|
# include "ch.h"
|
|
|
|
# define wait_ms(ms) chThdSleepMilliseconds(ms)
|
|
|
|
# define wait_us(us) chThdSleepMicroseconds(us)
|
|
|
|
#elif defined(__arm__) /* __AVR__ */
|
2015-04-09 16:32:04 +00:00
|
|
|
# include "wait_api.h"
|
2015-09-07 20:57:04 +00:00
|
|
|
#endif /* __AVR__ */
|
2015-04-09 16:32:04 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|