WeekendWarrior1 / XTronical_XT_DAC_Audio_Mirror

Mirror of XTronical's excellent XT_DAC_Audio library for ease of integration into platformio projects
GNU General Public License v3.0
10 stars 18 forks source link

Error while compiling #11

Open saeedalikhani98 opened 1 month ago

saeedalikhani98 commented 1 month ago

C:\Users\saeed\Documents\Arduino\libraries\XT_DAC_Audio\XT_DAC_Audio.cpp: In constructor 'XT_DAC_Audio_Class::XT_DAC_Audio_Class(uint8_t, uint8_t, uint16_t)': C:\Users\saeed\Documents\Arduino\libraries\XT_DAC_Audio\XT_DAC_Audio.cpp:278:27: error: too many arguments to function 'hw_timer_t timerBegin(uint32_t)' 278 | timer = timerBegin(TimerNo, 80, true); // use timer TimerNo, pre-scaler is 80 (divide by 8000), count up | ~~^~~~~~~ In file included from C:\Users\saeed\Documents\Arduino\libraries\XT_DAC_Audio\XT_DAC_Audio.cpp:10: C:\Users\saeed\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.4\cores\esp32/esp32-hal-timer.h:35:13: note: declared here 35 | hw_timer_t timerBegin(uint32_t frequency); | ^~~~~~ C:\Users\saeed\Documents\Arduino\libraries\XT_DAC_Audio\XT_DAC_Audio.cpp:279:29: error: too many arguments to function 'void timerAttachInterrupt(hw_timer_t, void ()())' 279 | timerAttachInterrupt(timer, &onTimer, true); // P3= edge triggered | ~~~~^~~~~~~ C:\Users\saeed\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.4\cores\esp32/esp32-hal-timer.h:50:6: note: declared here 50 | void timerAttachInterrupt(hw_timer_t timer, void (userFunc)(void)); | ^~~~~~~~ C:\Users\saeed\Documents\Arduino\libraries\XT_DAC_Audio\XT_DAC_Audio.cpp:280:9: error: 'timerAlarmWrite' was not declared in this scope; did you mean 'timerWrite'? 280 | timerAlarmWrite(timer, 20, true); // will trigger 250,000 times per second, | ^~~~~~~ | timerWrite C:\Users\saeed\Documents\Arduino\libraries\XT_DAC_Audio\XT_DAC_Audio.cpp:281:9: error: 'timerAlarmEnable' was not declared in this scope; did you mean 'timerAlarm'? 281 | timerAlarmEnable(timer); // enable | ^~~~ | timerAlarm

saeedalikhani98 commented 1 month ago

I added the library "soc/rtc_io_reg.h". The error could not be resolved