diff options
author | Jack Humbert <jack.humb@gmail.com> | 2015-10-28 13:54:41 -0400 |
---|---|---|
committer | Jack Humbert <jack.humb@gmail.com> | 2015-10-28 13:54:41 -0400 |
commit | 8643e01286816baecfc8784529f35155f55aaa63 (patch) | |
tree | e2277066867573e00758317aa5b5adb7bf87f282 /keyboard/ergodox_ez/ergodox_ez.c | |
parent | 1fb8b4ce3a14c98b54962a9829471e3e0c68bca6 (diff) | |
parent | d3db8d62f6fc6a7dee43978ddc8356579b502b37 (diff) |
merging
Diffstat (limited to 'keyboard/ergodox_ez/ergodox_ez.c')
-rw-r--r-- | keyboard/ergodox_ez/ergodox_ez.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/keyboard/ergodox_ez/ergodox_ez.c b/keyboard/ergodox_ez/ergodox_ez.c index f7e156b319..78e956a042 100644 --- a/keyboard/ergodox_ez/ergodox_ez.c +++ b/keyboard/ergodox_ez/ergodox_ez.c @@ -4,10 +4,6 @@ bool i2c_initialized = 0; uint8_t mcp23018_status = 0x20; -bool ergodox_left_led_1 = 0; // left top -bool ergodox_left_led_2 = 0; // left middle -bool ergodox_left_led_3 = 0; // left bottom - __attribute__ ((weak)) void * matrix_init_user(void) { @@ -92,32 +88,7 @@ uint8_t init_mcp23018(void) { out: i2c_stop(); - if (!mcp23018_status) mcp23018_status = ergodox_left_leds_update(); - return mcp23018_status; } -uint8_t ergodox_left_leds_update(void) { - if (mcp23018_status) { // if there was an error - return mcp23018_status; - } - - // set logical value (doesn't matter on inputs) - // - unused : hi-Z : 1 - // - input : hi-Z : 1 - // - driving : hi-Z : 1 - mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out; - mcp23018_status = i2c_write(OLATA); if (mcp23018_status) goto out; - mcp23018_status = i2c_write(0b11111111 - & ~(ergodox_left_led_3<<LEFT_LED_3_SHIFT) - ); if (mcp23018_status) goto out; - mcp23018_status = i2c_write(0b11111111 - & ~(ergodox_left_led_2<<LEFT_LED_2_SHIFT) - & ~(ergodox_left_led_1<<LEFT_LED_1_SHIFT) - ); if (mcp23018_status) goto out; - -out: - i2c_stop(); - return mcp23018_status; -} |