Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: BLE_API mbed-dev nRF51822
Diff: main.cpp
- Revision:
- 8:d684faf04c9a
- Parent:
- 7:b9270a37345b
- Child:
- 9:d1daefbf1fbd
--- a/main.cpp Thu Jul 21 07:56:04 2016 +0900
+++ b/main.cpp Thu Jul 21 08:45:27 2016 +0900
@@ -159,7 +159,7 @@
static bool state = 0;
void buttonIntCallback() {
- printf("int!\r\n");
+ // just for wakeup
}
int main(void) {
@@ -181,8 +181,6 @@
HIDController::init();
while (1) {
- HIDController::process();
-
if (!buttonIntIn.read()) {
uint8_t (&keysCurr)[COLS] = state ? keysA : keysB;
uint8_t (&keysPrev)[COLS] = state ? keysB : keysA;
@@ -195,7 +193,7 @@
for (int row = 0; row < ROWS; row++) {
if (changed & (1<<row)) {
bool pressed = keysCurr[col] & (1<<row);
- printf("changed: col=%d, row=%d / pressed=%d\r\n", col, row, pressed);
+ // printf("changed: col=%d, row=%d / pressed=%d\r\n", col, row, pressed);
keymap.execute(col, row, pressed);
}
}
@@ -205,6 +203,8 @@
// XXX
keyboardMatrixController.enableInterrupt();
wait_ms(5);
+ } else {
+ HIDController::process();
}
}
}