C++ file for display control

Dependencies:   4DGL mbed ConfigFile

Fork of 4DGLtest by Stephane ROCHON

Revision:
10:5706b75d40fa
Parent:
9:311b6676272d
--- a/keyboard.cpp	Fri Jul 11 11:08:02 2014 +0000
+++ b/keyboard.cpp	Wed Jul 16 08:05:54 2014 +0000
@@ -3,8 +3,8 @@
 #include "keyboard.h"
 
 const int CDU_KB_ADRS  = 0x68;  //Base addrees TCA8418 keypad scanner
-const int ACK  = 0x00;
-const int NACK = 0x01;
+const int I2C_ACK  = 0x00;
+//const int I2C_ NACK = 0x01;
 
 extern int key_hit_ID;
 //extern mbos CDU_OS;
@@ -29,7 +29,7 @@
     char cmd[2];
     cmd[0] = REG_CFG; //pointer byte to CFG register
     cmd[1] = 0x01; //data for CFG register KE_IEN set to 1
-    if ( CDU_I2C.write(CDU_KB_ADRS,cmd, 2) == ACK ) //initiate write cycle and check for ACK
+    if ( CDU_I2C.write(CDU_KB_ADRS,cmd, 2) == I2C_ACK ) //initiate write cycle and check for ACK
     {
         //intialize all registers from TCA8418 here
         cmd[0] = REG_INT_STAT; //pointer byte to Interrupt Status Register