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

Method init

libraries/AP_HAL_Linux/RCOutput_PCA9685.cpp:85–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85void RCOutput_PCA9685::init()
86{
87 reset_all_channels();
88
89 /* Set the initial frequency */
90 set_freq(0, 50);
91
92 /* Enable PCA9685 PWM */
93 if (_oe_pin_number != -1) {
94 _enable_pin = hal.gpio->channel(_oe_pin_number);
95 _enable_pin->mode(HAL_GPIO_OUTPUT);
96 _enable_pin->write(0);
97 }
98}
99
100void RCOutput_PCA9685::reset_all_channels()
101{

Callers

nothing calls this directly

Calls 3

channelMethod · 0.45
modeMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected