-
-
Notifications
You must be signed in to change notification settings - Fork 759
#606. Initial framework for hardware SPI for ESP8266. #692
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
Conversation
@@ -1493,7 +1493,8 @@ LDFLAGS += -L$(ESP8266_SDK_ROOT)/lib \ | |||
|
|||
# Extra source files specific to the ESP8266 | |||
SOURCES += targets/esp8266/uart.c \ | |||
targets/esp8266/user_main.c \ | |||
targets/esp8266/spi.c \ | |||
targets/esp8266/user_main.c \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like a space/tab mismatch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup ... sorry about that. Have corrected now.
The jshSPISend16 was not previously implemented and jshSPISend() did not correctly honor input data of <0 value or return value properly.
Howdy ... is there something that needs attention with this Pull Request before it can be merged? Want to make sure that it isn't waiting on something I need to attend to. |
Hi, sorry for the delay... Looks good - please could you just:
|
Requested changes made and committed. |
Thanks, I'll merge - but you know you committed quite a lot of extra stuff this time as well? Or was adding NeoPixel intentional? https://github.com/nkolban/Espruino/commit/71d19752eea5941db68f8945d23969ba04da64c7 The AES branch is now merged too, so you could massively simplify your NeoPixel code.Literally just the following will do:
Note also that you can set the variable type in the JSON to |
#606. Initial framework for hardware SPI for ESP8266.
Pure gold!!! I had no idea that the params section of JSON was more than documentation ... and had been filling it in as a good citizen by accident. I didn't know it could dynamically cast parameters ... VERY nice. The JSV_GET_AS_CHAR_ARRAY is also nice however I had to convince myself that I could understand it. It seems to create new variables which I found an unusual side effect for a macro. I can't say it is wrong ... just unusual (to me). I have accommodated both changes and after testing, will commit them with the next batch. |
Thanks! Yes, I was unsure about that behaviour, but the variables always have to be the same time so it seemed to make sense to avoid duplication. Maybe not... For the JSON, it's used for the reference, to define how the function gets called, and for autocomplete in the Web IDE. Some info here, maybe it needs clearing up a bit though:
... by making all the type conversions automatic, Espruino cuts out on all the duplicated code that handles that so it doesn't use up much Flash. It's also removing another potential source of bugs :) |
The ESP8266 jshardware source file needs prepared for more detailed implementation of SPI hardware support. This commit includes the framework for implementation of those detailed functions.
The hardware SPI source files are also introduced in this commit with the corresponding Makefile change to include them in ESP8266 compilation.