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

easygpio issue on freertos sdk #3

Open
alonewolfx2 opened this issue Feb 10, 2015 · 8 comments
Open

easygpio issue on freertos sdk #3

alonewolfx2 opened this issue Feb 10, 2015 · 8 comments

Comments

@alonewolfx2
Copy link

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
Copy link
Owner

eadf commented Feb 10, 2015

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?

@alonewolfx2
Copy link
Author

no it doesnt work.

@eadf
Copy link
Owner

eadf commented Feb 10, 2015

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)

@alonewolfx2
Copy link
Author

Have you any progress for rtos sdk?

@eadf
Copy link
Owner

eadf commented Mar 4, 2015

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)

@alonewolfx2
Copy link
Author

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
Copy link
Owner

eadf commented Mar 4, 2015

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)

@alonewolfx2
Copy link
Author

xtask usefull more than timers.

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