diff options
author | Damien <Dbroqua@users.noreply.github.com> | 2016-12-09 19:44:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-09 19:44:03 +0100 |
commit | 13c4080a1d77cb1dfdf48df8a42e78b9dc483912 (patch) | |
tree | 66fd988d98a32e1437fbc6cb80bee03c056722a7 /keyboards/ergodox/ez/ez.c | |
parent | a849bdc5811b2bb69df8e3b0948c8e81c0dfa9d4 (diff) | |
parent | 985a091a739c99736d5b17de5161831488dbc219 (diff) | |
download | qmk_firmware-13c4080a1d77cb1dfdf48df8a42e78b9dc483912.tar.gz qmk_firmware-13c4080a1d77cb1dfdf48df8a42e78b9dc483912.zip |
Merge pull request #13 from jackhumbert/master
Merged from qmk
Diffstat (limited to 'keyboards/ergodox/ez/ez.c')
-rw-r--r-- | keyboards/ergodox/ez/ez.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/keyboards/ergodox/ez/ez.c b/keyboards/ergodox/ez/ez.c index ddb8ff0cf7..039e4c6bb1 100644 --- a/keyboards/ergodox/ez/ez.c +++ b/keyboards/ergodox/ez/ez.c @@ -16,10 +16,10 @@ void matrix_init_kb(void) { // unused pins - C7, D4, D5, D7, E6 // set as input with internal pull-ip enabled DDRC &= ~(1<<7); - DDRD &= ~(1<<7 | 1<<5 | 1<<4); + DDRD &= ~(1<<5 | 1<<4); DDRE &= ~(1<<6); PORTC |= (1<<7); - PORTD |= (1<<7 | 1<<5 | 1<<4); + PORTD |= (1<<5 | 1<<4); PORTE |= (1<<6); ergodox_blink_all_leds(); @@ -51,6 +51,10 @@ uint8_t init_mcp23018(void) { mcp23018_status = 0x20; // I2C subsystem + + uint8_t sreg_prev; + sreg_prev=SREG; + cli(); if (i2c_initialized == 0) { i2c_init(); // on pins D(1,0) i2c_initialized++; @@ -79,6 +83,8 @@ uint8_t init_mcp23018(void) { out: i2c_stop(); + SREG=sreg_prev; + return mcp23018_status; } |