diff options
author | Priyadi Iman Nurcahyo <priyadi@priyadi.net> | 2016-12-04 23:57:47 +0700 |
---|---|---|
committer | Priyadi Iman Nurcahyo <priyadi@priyadi.net> | 2016-12-04 23:57:47 +0700 |
commit | fc80aa9974faad146837cd26d9264b5a6c74dd4b (patch) | |
tree | 893e6f573c2753a51f67ed3636110850036405c7 /keyboards/ergodox/ez/ez.c | |
parent | a8e5f6180585f46684d713976ad05d4d81b11ab1 (diff) | |
parent | f39e1b5dfe7552f01dbc6eab95c268f41a9d98e2 (diff) |
Merge branch 'master' into promethium
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; } |