diff options
| author | Danny Nguyen <danny@keeb.io> | 2018-12-18 16:17:29 -0500 |
|---|---|---|
| committer | Drashna Jaelre <drashna@live.com> | 2018-12-19 08:37:44 -0800 |
| commit | 40bf3a2ce9ec781cc2ff7218f909ffdbece44e97 (patch) | |
| tree | 0685ef86186660faba0437464ae5d7c6c0978524 /quantum | |
| parent | 3054c7bda0dc68723f6402f9175ee11758ffc1b8 (diff) | |
| download | qmk_firmware-40bf3a2ce9ec781cc2ff7218f909ffdbece44e97.tar.gz qmk_firmware-40bf3a2ce9ec781cc2ff7218f909ffdbece44e97.zip | |
Make `readPin` output a 0 or 1 when using AVR to match ChibiOS's version of `readPin`
Diffstat (limited to 'quantum')
| -rw-r--r-- | quantum/quantum.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/quantum/quantum.h b/quantum/quantum.h index 0faf1af29..f78915fdf 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h | |||
| @@ -161,7 +161,7 @@ extern uint32_t default_layer_state; | |||
| 161 | } | 161 | } |
| 162 | } | 162 | } |
| 163 | 163 | ||
| 164 | #define readPin(pin) (PIN_ADDRESS(pin, 0) & _BV(pin & 0xF)) | 164 | #define readPin(pin) ((bool)(PIN_ADDRESS(pin, 0) & _BV(pin & 0xF))) |
| 165 | #elif defined(PROTOCOL_CHIBIOS) | 165 | #elif defined(PROTOCOL_CHIBIOS) |
| 166 | #define pin_t ioline_t | 166 | #define pin_t ioline_t |
| 167 | #define setPinInput(pin) palSetLineMode(pin, PAL_MODE_INPUT) | 167 | #define setPinInput(pin) palSetLineMode(pin, PAL_MODE_INPUT) |
