esp8266_pcd8544 icon indicating copy to clipboard operation
esp8266_pcd8544 copied to clipboard

easygpio issue on freertos sdk

Open alonewolfx2 opened this issue 10 years ago • 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

alonewolfx2 avatar Feb 10 '15 11:02 alonewolfx2

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?

eadf avatar Feb 10 '15 14:02 eadf

no it doesnt work.

alonewolfx2 avatar Feb 10 '15 15:02 alonewolfx2

rtos sdk does not contain osapi.h, os_type.h and user_interface.h. https://github.com/espressif/esp8266_at/issues/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)

eadf avatar Feb 10 '15 15:02 eadf

Have you any progress for rtos sdk?

alonewolfx2 avatar Mar 03 '15 08:03 alonewolfx2

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)

eadf avatar Mar 04 '15 11:03 eadf

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

alonewolfx2 avatar Mar 04 '15 12:03 alonewolfx2

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)

eadf avatar Mar 04 '15 16:03 eadf

xtask usefull more than timers.

alonewolfx2 avatar Mar 04 '15 16:03 alonewolfx2