HAL_ChibiOS: update ppm to use Extended ICU driver

This commit is contained in:
bugobliterator
2018-01-20 17:40:07 +11:00
committed by Andrew Tridgell
parent 6d8d8630bc
commit 445ba6ed39
6 changed files with 232 additions and 59 deletions
+3 -3
View File
@@ -30,8 +30,8 @@ using namespace ChibiOS;
extern const AP_HAL::HAL& hal;
void RCInput::init()
{
#if HAL_USE_ICU == TRUE
ppm_init(1000000, true);
#if HAL_USE_EICU == TRUE
ppm_init(1000000, false);
#endif
chMtxObjectInit(&rcin_mutex);
_init = true;
@@ -166,7 +166,7 @@ void RCInput::_timer_tick(void)
if (!_init) {
return;
}
#if HAL_USE_ICU == TRUE
#if HAL_USE_EICU == TRUE
if (ppm_available()) {
chMtxLock(&rcin_mutex);
_num_channels = ppm_read_bulk(_rc_values, RC_INPUT_MAX_CHANNELS);