mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-26 05:03:35 +08:00
Updated PX4 use / API of low level GPIO and other hardware-centric system facilities
This commit is contained in:
@@ -118,7 +118,7 @@ TEST_PPM::~TEST_PPM()
|
||||
int
|
||||
TEST_PPM::init()
|
||||
{
|
||||
stm32_configgpio(TEST_PPM_PIN);
|
||||
px4_arch_configgpio(TEST_PPM_PIN);
|
||||
start();
|
||||
return OK;
|
||||
}
|
||||
@@ -148,11 +148,11 @@ void
|
||||
TEST_PPM::do_out(void)
|
||||
{
|
||||
if ((_call_times % 2) == 0) {
|
||||
stm32_gpiowrite(TEST_PPM_PIN, false);
|
||||
px4_arch_gpiowrite(TEST_PPM_PIN, false);
|
||||
hrt_call_after(&_call, _values[_call_times / 2] - _plus_width, (hrt_callout)&TEST_PPM::loops, this);
|
||||
|
||||
} else {
|
||||
stm32_gpiowrite(TEST_PPM_PIN, true);
|
||||
px4_arch_gpiowrite(TEST_PPM_PIN, true);
|
||||
hrt_call_after(&_call, _plus_width, (hrt_callout)&TEST_PPM::loops, this);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user