2012-12-12 20:16:47 -04:00
|
|
|
|
|
|
|
|
2013-09-23 04:06:16 -03:00
|
|
|
static void delay(uint32_t ms)
|
2012-12-12 20:16:47 -04:00
|
|
|
{
|
|
|
|
hal.scheduler->delay(ms);
|
|
|
|
}
|
|
|
|
|
2013-09-23 04:06:16 -03:00
|
|
|
static void mavlink_delay(uint32_t ms)
|
2012-12-12 20:16:47 -04:00
|
|
|
{
|
|
|
|
hal.scheduler->delay(ms);
|
|
|
|
}
|
|
|
|
|
2013-09-23 04:06:16 -03:00
|
|
|
static uint32_t millis()
|
2012-12-12 20:16:47 -04:00
|
|
|
{
|
|
|
|
return hal.scheduler->millis();
|
|
|
|
}
|
|
|
|
|
2013-09-23 04:06:16 -03:00
|
|
|
static uint32_t micros()
|
2012-12-12 20:16:47 -04:00
|
|
|
{
|
|
|
|
return hal.scheduler->micros();
|
|
|
|
}
|
|
|
|
|
2013-09-23 04:06:16 -03:00
|
|
|
static void pinMode(uint8_t pin, uint8_t output)
|
2012-12-12 20:16:47 -04:00
|
|
|
{
|
|
|
|
hal.gpio->pinMode(pin, output);
|
|
|
|
}
|
|
|
|
|
2013-09-23 04:06:16 -03:00
|
|
|
static void digitalWrite(uint8_t pin, uint8_t out)
|
2012-12-12 20:16:47 -04:00
|
|
|
{
|
|
|
|
hal.gpio->write(pin,out);
|
|
|
|
}
|
|
|
|
|
2013-09-23 04:06:16 -03:00
|
|
|
static uint8_t digitalRead(uint8_t pin)
|
2012-12-12 20:16:47 -04:00
|
|
|
{
|
|
|
|
return hal.gpio->read(pin);
|
|
|
|
}
|
|
|
|
|