Moddable-OpenSource / moddable

Tools for developers to create truly open IoT products using standard JavaScript on low cost microcontrollers.
http://www.moddable.com
1.32k stars 236 forks source link

ESP SPI incorrectly defaults select pin to active=1 #1051

Closed tve closed 1 year ago

tve commented 1 year ago

Build environment: Linux Target device: ESP32

Description The SPI implementation for ESP incorrectly defaults the select pin active state to 1, see https://github.com/Moddable-OpenSource/moddable/blob/public/modules/io/spi/esp/spi.c#L66 According to ECMA-419: "active: The value to write to the select pin when the SPI instance is active. Must be 1 or 0. This property is optional and defaults to 0."

phoddie commented 1 year ago

Thanks for the report.

The SPI implementation for ESP incorrectly defaults the select pin active state to 1

True. The fix is trivial but updating callers that depend on the current implementation is some work.

phoddie commented 1 year ago

Fixed with the March 1 commit noted above.