Replace pin by gpio (#631)

* replace _PIN by _GPIO

* add mention about the goal of -all binaries

* [breaking] change json key from "pin" to "gpio" for actuatorONOFF
This commit is contained in:
Florian authored and GitHub committed 2020-06-13 20:04:36 -05:00
1 parent c9de14e51a
commit c9e6de1a1c
37 files changed
+198 -197

No files matched your search

+8 -8
View File
@@ -32,15 +32,15 @@ int lastInputStateGPIOKeyCode = 0x0f;
int lastLatchStateGPIOKeyCode = 0;
void setupGPIOKeyCode() {
pinMode(GPIOKeyCode_LATCH_PIN, INPUT_PULLUP); //
pinMode(GPIOKeyCode_D0_PIN, INPUT_PULLUP); //
pinMode(GPIOKeyCode_D1_PIN, INPUT_PULLUP); //
pinMode(GPIOKeyCode_D2_PIN, INPUT_PULLUP); //
//pinMode(GPIOKeyCode_D3_PIN, INPUT_PULLUP); //
pinMode(GPIOKeyCode_LATCH_GPIO, INPUT_PULLUP); //
pinMode(GPIOKeyCode_D0_GPIO, INPUT_PULLUP); //
pinMode(GPIOKeyCode_D1_GPIO, INPUT_PULLUP); //
pinMode(GPIOKeyCode_D2_GPIO, INPUT_PULLUP); //
//pinMode(GPIOKeyCode_D3_GPIO, INPUT_PULLUP); //
}
void MeasureGPIOKeyCode() {
int latch = digitalRead(GPIOKeyCode_LATCH_PIN);
int latch = digitalRead(GPIOKeyCode_LATCH_GPIO);
// check to see if you just pressed the button
// (i.e. the input went from LOW to HIGH), and you've waited long enough
@@ -54,8 +54,8 @@ void MeasureGPIOKeyCode() {
# endif
// if the Input state has changed:
if (latch > 0 && lastLatchStateGPIOKeyCode != latch) {
int reading = digitalRead(GPIOKeyCode_D0_PIN) | (digitalRead(GPIOKeyCode_D1_PIN) << 1) | (digitalRead(GPIOKeyCode_D2_PIN) << 2);
//| digitalRead(GPIOKeyCode_D3_PIN) << 3;
int reading = digitalRead(GPIOKeyCode_D0_GPIO) | (digitalRead(GPIOKeyCode_D1_GPIO) << 1) | (digitalRead(GPIOKeyCode_D2_GPIO) << 2);
//| digitalRead(GPIOKeyCode_D3_GPIO) << 3;
char hex[3];