Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Esp32 Error #2

Open
limaomerces opened this issue Sep 7, 2020 · 1 comment
Open

Esp32 Error #2

limaomerces opened this issue Sep 7, 2020 · 1 comment

Comments

@limaomerces
Copy link

limaomerces commented Sep 7, 2020

Error with ESP32

1- Using "example.ino"
2- Checking code (before compiling)
3- Error:

In file included from C:\Users\Tiago\AppData\Local\Temp\arduino_modified_sketch_857920\example.ino:6:0:

C:\Users\Tiago\Documents\Arduino\libraries\ShiftPWM-master/ESPTimerHelper.h:5:17: error: variable or field 'StartTimer' declared void

 void StartTimer(hw_timer_t * timer);

                 ^

C:\Users\Tiago\Documents\Arduino\libraries\ShiftPWM-master/ESPTimerHelper.h:5:17: error: 'hw_timer_t' was not declared in this scope

C:\Users\Tiago\Documents\Arduino\libraries\ShiftPWM-master/ESPTimerHelper.h:5:30: error: 'timer' was not declared in this scope

 void StartTimer(hw_timer_t * timer);

                              ^

C:\Users\Tiago\Documents\Arduino\libraries\ShiftPWM-master/ESPTimerHelper.h:6:1: error: 'hw_timer_t' does not name a type

 hw_timer_t * SetTimer(int timer,void(*callback)(),int periode_us = 10);

 ^

C:\Users\Tiago\AppData\Local\Temp\arduino_modified_sketch_857920\example.ino: In function 'void InitPWMTimer()':

example:33:58: error: 'SetTimer' was not declared in this scope

 void InitPWMTimer() { StartTimer(SetTimer(0, TimerHandler)); }

                                                          ^

example:33:59: error: 'StartTimer' was not declared in this scope

 void InitPWMTimer() { StartTimer(SetTimer(0, TimerHandler)); }

                                                           ^

C:\Users\Tiago\AppData\Local\Temp\arduino_modified_sketch_857920\example.ino: In function 'void InitDutyChangeTimer()':

example:53:57: error: 'SetTimer' was not declared in this scope

     StartTimer(SetTimer(1, DutyChangeTimerHandler, 10000));

                                                         ^

example:53:58: error: 'StartTimer' was not declared in this scope

     StartTimer(SetTimer(1, DutyChangeTimerHandler, 10000));

                                                          ^

exit status 1
'SetTimer' was not declared in this scope

@cobrce
Copy link
Owner

cobrce commented Sep 25, 2020

I fixed ESPTimerHelper.h by including esp32-hal.h, tested and compiled with latest version of esp library (1.0.4)

Please try pull and test if the error is still there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants