mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
[ion/device] Fix keyboard output GPIO activation
This commit is contained in:
committed by
LeaNumworks
parent
15c87dc0b3
commit
8cbbd92761
@@ -53,8 +53,8 @@ State scan() {
|
||||
for (uint8_t i=0; i<Device::numberOfRows; i++) {
|
||||
Device::activateRow(Device::numberOfRows-1-i);
|
||||
|
||||
// TODO: Assert pin numbers are sequentials and dynamically find 8 and 0
|
||||
uint8_t columns = Device::ColumnGPIO.IDR()->getBitRange(5,0);
|
||||
// TODO: Assert pin numbers are sequentials and dynamically find 5 and 0
|
||||
uint8_t columns = Device::ColumnGPIO.IDR()->getBitRange(Device::numberOfColumns-1,0);
|
||||
|
||||
/* The key is down if the input is brought low by the output. In other
|
||||
* words, we want to return true if the input is low (false). So we need to
|
||||
|
||||
@@ -52,8 +52,8 @@ inline void activateRow(uint8_t row) {
|
||||
* the others to 1. */
|
||||
uint16_t rowState = ~(1<<row);
|
||||
|
||||
// TODO: Assert pin numbers are sequentials and dynamically find 9 and 0
|
||||
Device::RowGPIO.ODR()->setBitRange(9, 0, rowState);
|
||||
// TODO: Assert pin numbers are sequentials and dynamically find 8 and 0
|
||||
Device::RowGPIO.ODR()->setBitRange(numberOfRows-1, 0, rowState);
|
||||
|
||||
// TODO: 100 us seems to work, but wasn't really calculated
|
||||
Timing::usleep(100);
|
||||
|
||||
Reference in New Issue
Block a user