diff options
| author | tmk <nobody@nowhere> | 2014-10-28 14:41:45 +0900 |
|---|---|---|
| committer | Jun Wako <wakojun@gmail.com> | 2015-04-22 14:18:13 +0900 |
| commit | d5482f29f46174bfa8854653f8a6cab5af97085e (patch) | |
| tree | a16b04228512a6a547e834a6a7ecf32f0c5f5160 | |
| parent | d42aa47809c97a77c49e9396201c2b5c3956bb54 (diff) | |
| download | qmk_firmware-d5482f29f46174bfa8854653f8a6cab5af97085e.tar.gz qmk_firmware-d5482f29f46174bfa8854653f8a6cab5af97085e.zip | |
Fix debug print
| -rw-r--r-- | converter/ibm4704_usb/config.h | 21 | ||||
| -rw-r--r-- | converter/ibm4704_usb/matrix.c | 2 | ||||
| -rw-r--r-- | tmk_core/protocol/ibm4704.c | 2 |
3 files changed, 7 insertions, 18 deletions
diff --git a/converter/ibm4704_usb/config.h b/converter/ibm4704_usb/config.h index 812d95c67..4f267b3b7 100644 --- a/converter/ibm4704_usb/config.h +++ b/converter/ibm4704_usb/config.h | |||
| @@ -41,9 +41,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 41 | 41 | ||
| 42 | 42 | ||
| 43 | 43 | ||
| 44 | /* | 44 | /* Pin configuration */ |
| 45 | * Busywait | ||
| 46 | */ | ||
| 47 | #define IBM4704_CLOCK_PORT PORTD | 45 | #define IBM4704_CLOCK_PORT PORTD |
| 48 | #define IBM4704_CLOCK_PIN PIND | 46 | #define IBM4704_CLOCK_PIN PIND |
| 49 | #define IBM4704_CLOCK_DDR DDRD | 47 | #define IBM4704_CLOCK_DDR DDRD |
| @@ -53,19 +51,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 53 | #define IBM4704_DATA_DDR DDRD | 51 | #define IBM4704_DATA_DDR DDRD |
| 54 | #define IBM4704_DATA_BIT 0 | 52 | #define IBM4704_DATA_BIT 0 |
| 55 | 53 | ||
| 56 | /* | 54 | /* Pin interrupt on rising edge */ |
| 57 | * Pin interrupt | 55 | #define IBM4704_INT_INIT() do { EICRA |= ((1<<ISC11)|(0<<ISC10)); } while (0) |
| 58 | */ | 56 | #define IBM4704_INT_ON() do { EIMSK |= (1<<INT1); } while (0) |
| 59 | #define IBM4704_INT_INIT() do { \ | 57 | #define IBM4704_INT_OFF() do { EIMSK &= ~(1<<INT1); } while (0) |
| 60 | EICRA |= ((1<<ISC11) | \ | ||
| 61 | (0<<ISC10)); \ | ||
| 62 | } while (0) | ||
| 63 | #define IBM4704_INT_ON() do { \ | ||
| 64 | EIMSK |= (1<<INT1); \ | ||
| 65 | } while (0) | ||
| 66 | #define IBM4704_INT_OFF() do { \ | ||
| 67 | EIMSK &= ~(1<<INT1); \ | ||
| 68 | } while (0) | ||
| 69 | #define IBM4704_INT_VECT INT1_vect | 58 | #define IBM4704_INT_VECT INT1_vect |
| 70 | 59 | ||
| 71 | 60 | ||
diff --git a/converter/ibm4704_usb/matrix.c b/converter/ibm4704_usb/matrix.c index 857dea0f9..5f928d716 100644 --- a/converter/ibm4704_usb/matrix.c +++ b/converter/ibm4704_usb/matrix.c | |||
| @@ -86,7 +86,7 @@ static void enable_break(void) | |||
| 86 | 86 | ||
| 87 | void matrix_init(void) | 87 | void matrix_init(void) |
| 88 | { | 88 | { |
| 89 | debug_enable = false; | 89 | debug_enable = true; |
| 90 | 90 | ||
| 91 | ibm4704_init(); | 91 | ibm4704_init(); |
| 92 | matrix_clear(); | 92 | matrix_clear(); |
diff --git a/tmk_core/protocol/ibm4704.c b/tmk_core/protocol/ibm4704.c index 152d7e61b..a10a5e74d 100644 --- a/tmk_core/protocol/ibm4704.c +++ b/tmk_core/protocol/ibm4704.c | |||
| @@ -180,7 +180,7 @@ ISR(IBM4704_INT_VECT) | |||
| 180 | ERROR: | 180 | ERROR: |
| 181 | ibm4704_error = state; | 181 | ibm4704_error = state; |
| 182 | while (ibm4704_send(0xFE)) _delay_ms(1); // resend | 182 | while (ibm4704_send(0xFE)) _delay_ms(1); // resend |
| 183 | xprintf("R:%02X\n", data); | 183 | xprintf("R:%02X%02X\n", state, data); |
| 184 | DONE: | 184 | DONE: |
| 185 | state = INIT; | 185 | state = INIT; |
| 186 | data = 0; | 186 | data = 0; |
