You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ledc_dev->timer_group[group].timer[timer].conf.div_num=div_num;//18 bit (10.8) This register is used to configure parameter for divider in timer the least significant eight bits represent the decimal part.
71
-
ledc_dev->timer_group[group].timer[timer].conf.bit_num=bit_num;//5 bit This register controls the range of the counter in timer. the counter range is [0 2**bit_num] the max bit width for counter is 20.
LEDC_TIMER(group, timer).conf.div_num=div_num;//18 bit (10.8) This register is used to configure parameter for divider in timer the least significant eight bits represent the decimal part.
72
+
LEDC_TIMER(group, timer).conf.bit_num=bit_num;//5 bit This register controls the range of the counter in timer. the counter range is [0 2**bit_num] the max bit width for counter is 20.
ledc_dev->timer_group[group].timer[timer].conf.low_speed_update=1;//This bit is only useful for low speed timer channels, reserved for high speed timers
75
+
LEDC_TIMER(group, timer).conf.low_speed_update=1;//This bit is only useful for low speed timer channels, reserved for high speed timers
div_num=LEDC_TIMER(group, timer).conf.div_num;//18 bit (10.8) This register is used to configure parameter for divider in timer the least significant eight bits represent the decimal part.
115
+
bit_num=LEDC_TIMER(group, timer).conf.bit_num;//5 bit This register controls the range of the counter in timer. the counter range is [0 2**bit_num] the max bit width for counter is 20.
ledc_dev->channel_group[group].channel[channel].conf0.timer_sel=timer;//2 bit Selects the timer to attach 0-3
108
-
ledc_dev->channel_group[group].channel[channel].conf0.idle_lv=idle_level;//1 bit This bit is used to control the output value when channel is off.
109
-
ledc_dev->channel_group[group].channel[channel].hpoint.hpoint=0;//20 bit The output value changes to high when timer selected by channel has reached hpoint
110
-
ledc_dev->channel_group[group].channel[channel].conf1.duty_inc=1;//1 bit This register is used to increase the duty of output signal or decrease the duty of output signal for high speed channel
111
-
ledc_dev->channel_group[group].channel[channel].conf1.duty_num=1;//10 bit This register is used to control the number of increased or decreased times for channel
112
-
ledc_dev->channel_group[group].channel[channel].conf1.duty_cycle=1;//10 bit This register is used to increase or decrease the duty every duty_cycle cycles for channel
113
-
ledc_dev->channel_group[group].channel[channel].conf1.duty_scale=0;//10 bit This register controls the increase or decrease step scale for channel.
ledc_dev->channel_group[group].channel[channel].conf0.sig_out_en=0;//This is the output enable control bit for channel
116
-
ledc_dev->channel_group[group].channel[channel].conf1.duty_start=0;//When duty_num duty_cycle and duty_scale has been configured. these register won't take effect until set duty_start. this bit is automatically cleared by hardware.
130
+
LEDC_CHAN(group, channel).conf0.timer_sel=timer;//2 bit Selects the timer to attach 0-3
131
+
LEDC_CHAN(group, channel).conf0.idle_lv=idle_level;//1 bit This bit is used to control the output value when channel is off.
132
+
LEDC_CHAN(group, channel).hpoint.hpoint=0;//20 bit The output value changes to high when timer selected by channel has reached hpoint
133
+
LEDC_CHAN(group, channel).conf1.duty_inc=1;//1 bit This register is used to increase the duty of output signal or decrease the duty of output signal for high speed channel
134
+
LEDC_CHAN(group, channel).conf1.duty_num=1;//10 bit This register is used to control the number of increased or decreased times for channel
135
+
LEDC_CHAN(group, channel).conf1.duty_cycle=1;//10 bit This register is used to increase or decrease the duty every duty_cycle cycles for channel
136
+
LEDC_CHAN(group, channel).conf1.duty_scale=0;//10 bit This register controls the increase or decrease step scale for channel.
137
+
LEDC_CHAN(group, channel).duty.duty=0;
138
+
LEDC_CHAN(group, channel).conf0.sig_out_en=0;//This is the output enable control bit for channel
139
+
LEDC_CHAN(group, channel).conf1.duty_start=0;//When duty_num duty_cycle and duty_scale has been configured. these register won't take effect until set duty_start. this bit is automatically cleared by hardware.
ledc_dev->channel_group[group].channel[channel].duty.duty=duty << 4;//25 bit (21.4)
165
+
LEDC_CHAN(group, channel).duty.duty=duty << 4;//25 bit (21.4)
144
166
if(duty) {
145
-
ledc_dev->channel_group[group].channel[channel].conf0.sig_out_en=1;//This is the output enable control bit for channel
146
-
ledc_dev->channel_group[group].channel[channel].conf1.duty_start=1;//When duty_num duty_cycle and duty_scale has been configured. these register won't take effect until set duty_start. this bit is automatically cleared by hardware.
167
+
LEDC_CHAN(group, channel).conf0.sig_out_en=1;//This is the output enable control bit for channel
168
+
LEDC_CHAN(group, channel).conf1.duty_start=1;//When duty_num duty_cycle and duty_scale has been configured. these register won't take effect until set duty_start. this bit is automatically cleared by hardware.
ledc_dev->channel_group[group].channel[channel].conf0.sig_out_en=0;//This is the output enable control bit for channel
154
-
ledc_dev->channel_group[group].channel[channel].conf1.duty_start=0;//When duty_num duty_cycle and duty_scale has been configured. these register won't take effect until set duty_start. this bit is automatically cleared by hardware.
175
+
LEDC_CHAN(group, channel).conf0.sig_out_en=0;//This is the output enable control bit for channel
176
+
LEDC_CHAN(group, channel).conf1.duty_start=0;//When duty_num duty_cycle and duty_scale has been configured. these register won't take effect until set duty_start. this bit is automatically cleared by hardware.
0 commit comments