Mercurial > louis > kiibohd-controller
comparison Scan/MatrixARM/matrix_scan.c @ 441:b61ee829f278
fix ghost vars, ifdef
author | CryHam <cryham@gmail.com> |
---|---|
date | Tue, 17 May 2016 10:19:38 +0200 |
parents | 94ef7b561d7d |
children |
comparison
equal
deleted
inserted
replaced
440:94ef7b561d7d | 441:b61ee829f278 |
---|---|
210 | 210 |
211 // Setup Strobe Pins | 211 // Setup Strobe Pins |
212 for ( uint8_t pin = 0; pin < Matrix_colsNum; pin++ ) | 212 for ( uint8_t pin = 0; pin < Matrix_colsNum; pin++ ) |
213 { | 213 { |
214 Matrix_pin( Matrix_cols[ pin ], Type_StrobeSetup ); | 214 Matrix_pin( Matrix_cols[ pin ], Type_StrobeSetup ); |
215 #ifdef GHOSTING_MATRIX | |
215 col_use[pin] = 0; | 216 col_use[pin] = 0; |
216 col_ghost[pin] = 0; | 217 col_ghost[pin] = 0; |
217 col_ghost_old[pin] = 0; | 218 col_ghost_old[pin] = 0; |
219 #endif | |
218 } | 220 } |
219 | 221 |
220 // Setup Sense Pins | 222 // Setup Sense Pins |
221 for ( uint8_t pin = 0; pin < Matrix_rowsNum; pin++ ) | 223 for ( uint8_t pin = 0; pin < Matrix_rowsNum; pin++ ) |
222 { | 224 { |
223 Matrix_pin( Matrix_rows[ pin ], Type_SenseSetup ); | 225 Matrix_pin( Matrix_rows[ pin ], Type_SenseSetup ); |
226 #ifdef GHOSTING_MATRIX | |
224 row_use[pin] = 0; | 227 row_use[pin] = 0; |
225 row_ghost[pin] = 0; | 228 row_ghost[pin] = 0; |
226 row_ghost_old[pin] = 0; | 229 row_ghost_old[pin] = 0; |
230 #endif | |
227 } | 231 } |
228 | 232 |
229 // Clear out Debounce Array | 233 // Clear out Debounce Array |
230 for ( uint8_t item = 0; item < Matrix_maxKeys; item++ ) | 234 for ( uint8_t item = 0; item < Matrix_maxKeys; item++ ) |
231 { | 235 { |