第二个例子LED调光驱动2_light_drivers在编译build时报错
Posted: Tue Nov 29, 2022 1:26 pm
C:/rainmaker/device_firmware/components/light_driver/iot_led.c:66:46: error: 'ti
mg_txconfig_reg_t' {aka 'volatile union <anonymous>'} has no member named 'enabl
e'
TG[group_num]->hw_timer[timer_num].config.enable = 0;
^
C:/rainmaker/device_firmware/components/light_driver/iot_led.c: In function '_io
t_set_fade_with_time':
C:/rainmaker/device_firmware/components/light_driver/iot_led.c:169:99: error: 'v
olatile union <anonymous>' has no member named 'tick_sel'
uint32_t timer_source_clk = LEDC.timer_group[speed_mode].timer[g_light_conf
ig->timer_num].conf.tick_sel;
^
C:/rainmaker/device_firmware/components/light_driver/iot_led.c: In function 'fad
e_timercb':
C:/rainmaker/device_firmware/components/light_driver/iot_led.c:278:39: error: 't
img_dev_t' {aka 'struct <anonymous>'} has no member named 'int_st'
uint32_t intr_status = TIMERG0.int_st.val;
^
C:/rainmaker/device_firmware/components/light_driver/iot_led.c:287:20: error: 't
img_dev_t' {aka 'struct <anonymous>'} has no member named 'int_clr'
TIMERG0.int_clr.t0 = 1;
^
C:/rainmaker/device_firmware/components/light_driver/iot_led.c:302:44: error: 't
img_txconfig_reg_t' {aka 'volatile union <anonymous>'} has no member named 'alar
m_en'; did you mean 'tx_alarm_en'?
TIMERG0.hw_timer[timer_idx].config.alarm_en = TIMER_ALARM_EN;
^~~~~~~~
tx_alarm_en
[1003/1017] Building C object esp-idf/...akeFiles/__idf_main.dir/app_main.c.obj
ninja: build stopped: subcommand failed.
ninja failed with exit code 1
mg_txconfig_reg_t' {aka 'volatile union <anonymous>'} has no member named 'enabl
e'
TG[group_num]->hw_timer[timer_num].config.enable = 0;
^
C:/rainmaker/device_firmware/components/light_driver/iot_led.c: In function '_io
t_set_fade_with_time':
C:/rainmaker/device_firmware/components/light_driver/iot_led.c:169:99: error: 'v
olatile union <anonymous>' has no member named 'tick_sel'
uint32_t timer_source_clk = LEDC.timer_group[speed_mode].timer[g_light_conf
ig->timer_num].conf.tick_sel;
^
C:/rainmaker/device_firmware/components/light_driver/iot_led.c: In function 'fad
e_timercb':
C:/rainmaker/device_firmware/components/light_driver/iot_led.c:278:39: error: 't
img_dev_t' {aka 'struct <anonymous>'} has no member named 'int_st'
uint32_t intr_status = TIMERG0.int_st.val;
^
C:/rainmaker/device_firmware/components/light_driver/iot_led.c:287:20: error: 't
img_dev_t' {aka 'struct <anonymous>'} has no member named 'int_clr'
TIMERG0.int_clr.t0 = 1;
^
C:/rainmaker/device_firmware/components/light_driver/iot_led.c:302:44: error: 't
img_txconfig_reg_t' {aka 'volatile union <anonymous>'} has no member named 'alar
m_en'; did you mean 'tx_alarm_en'?
TIMERG0.hw_timer[timer_idx].config.alarm_en = TIMER_ALARM_EN;
^~~~~~~~
tx_alarm_en
[1003/1017] Building C object esp-idf/...akeFiles/__idf_main.dir/app_main.c.obj
ninja: build stopped: subcommand failed.
ninja failed with exit code 1