MCPcopy Create free account
hub / github.com/ArduPilot/ardupilot / toneAlarm_init

Method toneAlarm_init

libraries/AP_HAL_ChibiOS/Util.cpp:145–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143uint8_t Util::_toneAlarm_types = 0;
144
145bool Util::toneAlarm_init(uint8_t types)
146{
147#ifdef HAL_PWM_ALARM
148 _toneAlarm_pwm_group.pwm_cfg.period = 1000;
149 pwmStart(_toneAlarm_pwm_group.pwm_drv, &_toneAlarm_pwm_group.pwm_cfg);
150#endif
151 _toneAlarm_types = types;
152
153#if HAL_USE_PWM != TRUE && !HAL_DSHOT_ALARM_ENABLED && !HAL_CANMANAGER_ENABLED
154 // Nothing to do
155 return false;
156#else
157 return true;
158#endif
159}
160
161#if HAL_USE_PWM == TRUE
162bool Util::toneAlarm_init(const PWMConfig& pwm_cfg, PWMDriver* pwm_drv, pwmchannel_t chan, bool active_high)

Callers 1

initMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected