Hiroh Satoh / keyboard Featured

Dependencies:   BLE_API mbed-dev nRF51822

Revision:
14:3a8c126b7834
Parent:
13:b0ffdf2012b9
Child:
15:70bf079d3ee1
--- a/main.cpp	Sun Aug 21 05:13:45 2016 +0000
+++ b/main.cpp	Sun Aug 21 06:05:34 2016 +0000
@@ -30,7 +30,7 @@
 	bool gpio2_ready;
 
 	static const uint8_t GPIO1_SLAVE_ADDRESS = 0b0100000;
-	static const uint8_t GPIO2_SLAVE_ADDRESS = 0b0100001;
+	static const uint8_t GPIO2_SLAVE_ADDRESS = 0b0100100;
 
 	/**
 	 * COL=GPIOA (output normaly positive)
@@ -274,7 +274,17 @@
 			wait_ms(5);
 		} else {
 			printf("wait for events...\r\n");
+			/*
+			NRF_UART0->TASKS_STOPTX = 1;
+			NRF_UART0->TASKS_STOPRX = 1;
+			NRF_UART0->ENABLE = (UART_ENABLE_ENABLE_Disabled << UART_ENABLE_ENABLE_Pos);
+			*/
 			HIDController::waitForEvent();
+			/*
+			NRF_UART0->ENABLE = (UART_ENABLE_ENABLE_Enabled << UART_ENABLE_ENABLE_Pos);
+			NRF_UART0->TASKS_STARTTX = 1;
+			NRF_UART0->TASKS_STARTRX = 1;
+			*/
 		}
 	}
 }