eadf/esp8266_pcd8544

easygpio issue on freertos sdk

alonewolfx2 opened this issue · 8 comments

can we use pcd8544 library without easygpio driver? because freertos sdk has different interrupt for gpio pins. i tried your library with freertos and i didnt make it compile.
here is sdk link on github
https://github.com/espressif/esp_iot_rtos_sdk

eadf commented

I've made some #ifdef conditions removing the easygpio_attachInterrupt and easygpio_detachInterrupt functions if XT_RTOS_NAME is defined.
I have no way of testing this with an actual rtos installation, could you test this?

no it doesnt work.

eadf commented

rtos sdk does not contain osapi.h, os_type.h and user_interface.h.
espressif/ESP8266_AT#9

I'm working on a workaround..
I can't find any reasonable #define that can tell me if rtos is used or not. Do you know any?

os_timer_t is defined in os_type.h in esp_iot_sdk_v0.9.5.
In esp_iot_rtos_sdk it's in esp_timer.h and this headerfiles are mutually exclusive.

os_event_t is not defined in rtos, at all.
I've created a rtos branch with a bunch of #ifdefs in it, but it still fails in user_main.c at the os_event_t type (the easygpio and pcd8544 files compiles)

Have you any progress for rtos sdk?

eadf commented

Sorry, no - not yet.

Have you figured out a way for the compiler to "know" if it's running in rtos? (a standard #define or something)

i am using user_config.h for this operation. i define RTOS in user_config.h and include user_main first line.i quick looked rtos brunch and i saw something. rtos sdk has not ets_sys.h,osapi.h. so you must to change that lines in usermain.c

eadf commented

The compilation process does not quite work that way. Not every .c file that needs to know about rtos includes user_config.h (and they should not), so RTOS much be defined in the Makefile:

CFLAGS=-DRTOS.....

But your right, something has to be done with user_main.c.
-I have not yet looked into how to setup timers in rtos (like we do in the closed source SDK)

xtask usefull more than timers.