File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
platforms/nuttx/src/px4/espressif/esp32/io_pins Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -158,6 +158,7 @@ void get_optimal_timer_setup(uint32_t desired_freq){
158158
159159int up_pwm_servo_set (unsigned channel , uint16_t value )
160160{
161+
161162 uint32_t duty = (value * reload )/timer_period ;
162163
163164 // uint32_t regval = b16toi(duty + b16HALF);
@@ -166,7 +167,7 @@ int up_pwm_servo_set(unsigned channel, uint16_t value)
166167
167168 SET_CHAN_REG (channel , LEDC_LSCH0_DUTY_REG , duty << 4 );
168169 /* Set pulse phase 0 */
169- SET_CHAN_REG (channel , LEDC_LSCH0_HPOINT_REG , 0 );
170+ // SET_CHAN_REG(channel, LEDC_LSCH0_HPOINT_REG, 0);
170171 /* Update clock divide and reload to hardware */
171172 SET_CHAN_BITS (channel , LEDC_LSCH0_CONF0_REG , LEDC_PARA_UP_LSCH0 );
172173 // might be needed to update the LEDC_TIMERx_PARA_UP register
You can’t perform that action at this time.
0 commit comments