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
Describe the bug
When I try to build this as an Espressif component in my project, I get two errors regarding:
Not finding #include "driver/gpio.h"
portTICK_RATE_MS in esp/platform.c not being defined
To Reproduce
Steps to reproduce the behavior:
Create platformio project
Clone ssd1306 project into components/
Build
See error regarding driver/gpio.h
Fix this (as described below)
See error regarding portTICK_RATE_MS
Expected behavior
No build errors.
Error Messages
regarding driver/gpio.h:
Building in release mode
Compiling .pio/build/lolin_d32_pro/components/ssd1306/src/ssd1306_hal/esp/platform.c.o
components/ssd1306/src/ssd1306_hal/esp/platform.c:33:10: fatal error: driver/gpio.h: No such file or directory
33 | #include "driver/gpio.h"
| ^~~~~~~~~~~~~~~
compilation terminated.
*** [.pio/build/lolin_d32_pro/components/ssd1306/src/ssd1306_hal/esp/platform.c.o] Error 1
================== [FAILED] Took 5.59 seconds ==================
regarding portTICK_RATE_MS:
Building in release mode
Compiling .pio/build/lolin_d32_pro/components/ssd1306/src/ssd1306_hal/esp/platform.c.o
components/ssd1306/src/ssd1306_hal/esp/platform.c: In function 'platform_i2c_stop':
components/ssd1306/src/ssd1306_hal/esp/platform.c:103:77: error: 'portTICK_RATE_MS' undeclared (first use in this function); did you mean 'portTICK_PERIOD_MS'?
103 | /*esp_err_t ret =*/ i2c_master_cmd_begin(s_bus_id, s_cmd_handle, 1000 / portTICK_RATE_MS);
| ^~~~~~~~~~~~~~~~
| portTICK_PERIOD_MS
components/ssd1306/src/ssd1306_hal/esp/platform.c:103:77: note: each undeclared identifier is reported only once for each function it appears in
*** [.pio/build/lolin_d32_pro/components/ssd1306/src/ssd1306_hal/esp/platform.c.o] Error 1
================================ [FAILED] Took 5.86 seconds ================================
Please complete the following information:
library version: 1.8.5
LCD display type
OS: linux
Platform: platformio : esp32
IDE: VSCode
Suggested fixes
The errors can be fixed by making the following edits:
Describe the bug
When I try to build this as an Espressif component in my project, I get two errors regarding:
#include "driver/gpio.h"
portTICK_RATE_MS
inesp/platform.c
not being definedTo Reproduce
Steps to reproduce the behavior:
Expected behavior
No build errors.
Error Messages
regarding driver/gpio.h:
regarding portTICK_RATE_MS:
Please complete the following information:
Suggested fixes
The errors can be fixed by making the following edits:
In
CMakeLists.txt
changeto
In
/esp/platform.c
changeportTICK_RATE_MS
toportTICK_PERIOD_MS
.The text was updated successfully, but these errors were encountered: