diff options
author | cbbrowne <cbbrowne@cbbrowne.tor.int-afilias.info> | 2016-11-29 12:20:26 -0500 |
---|---|---|
committer | cbbrowne <cbbrowne@cbbrowne.tor.int-afilias.info> | 2016-11-29 12:20:26 -0500 |
commit | ff1b563e851858a291ac226bc7e31055c7da6618 (patch) | |
tree | 8367dd5ef812baf644e1c54ba900dab3f042f0fa /keyboards/ergodox/ez/ez.c | |
parent | 5776f39667c82e1053b46fd12d8c6faa5b5acf81 (diff) | |
parent | 81ea909467c8a5bfbd803c58e685c5de74dbc249 (diff) |
Merge branch 'master' of https://github.com/jackhumbert/qmk_firmware
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; } |