C++ file for display control
Dependencies: 4DGL mbed ConfigFile
Fork of 4DGLtest by
Diff: keyboard.cpp
- Revision:
- 6:904d00252480
- Parent:
- 3:f7bce78b04c1
- Child:
- 7:779c5b8d3b14
--- a/keyboard.cpp Sun Jun 29 11:59:45 2014 +0000 +++ b/keyboard.cpp Tue Jul 01 13:27:43 2014 +0000 @@ -7,7 +7,7 @@ //CDU Keyboard communications KEYBOARD_INT InterruptIn CDU_KB_INT( p5 ); //Set CDU keyboard interrupt line. -I2C CDU_KB(p28, p27); //Communication lines to keyboard chip +I2C CDU_I2C(p28, p27); //I2C bus for keyboard/temp chip. //CDU Keyboard LEDS DigitalOut EXEC( p12 ); @@ -17,7 +17,7 @@ DigitalOut OFST( p20 ); //CDU background lighting -AnalogIn BGL_POT( p15 ); //background light control potmeter +AnalogIn BGL_POT( p16 ); //background light control potmeter PwmOut BGL_LED( p21 ); //PWM output /*void CDU_KB_INT_ON() @@ -28,25 +28,25 @@ void CDU_KB_COMM_INIT() { //initialize communication with TCA84818 - CDU_KB.write(CDU_KB_WRITE); //initiate write cycle + CDU_I2C.write(CDU_KB_WRITE); //initiate write cycle //intialize all registers from TCA8418 here - CDU_KB.read(CDU_KB_READ); //start reading from TCA4818 + CDU_I2C.read(CDU_KB_READ); //start reading from TCA4818 } -void CDU_KB_GET_KEY_TASK() +void CDU_KB_GET_KEY() { - CDU_KB.write(CDU_KB_READ); //initiate read cycle - key_hit_ID = CDU_KB.read(CDU_KB_READ) ; //read key value + CDU_I2C.write(CDU_KB_READ); //initiate read cycle + key_hit_ID = CDU_I2C.read(CDU_KB_READ) ; //read key value //CDU_OS.SetEvent(KEY_EVENT,SEND_KEYMESSAGE_TASK_ID ); //Set event key to wakeup task } void CDU_KB_INT_START() { CDU_KB_INT.mode( PullUp ); - CDU_KB_INT.fall(&CDU_KB_GET_KEY_TASK); + CDU_KB_INT.fall(&CDU_KB_GET_KEY); } -void SET_BGL_INTENSITY( int nVal ) +void CDU_SET_BGL_INTENSITY( int nVal ) { //AnalogIn BGL_POT( p15 ); //background light control potmeter. Returns a value between 0.0 and 1.0 //PwmOut BGL_LED( p21 ); //PWM output