@@ -18,48 +18,48 @@ void printText(int8_t xpos, int8_t ypos, const char *text);
1818
1919/* Main Function */
2020void main (void ) {
21- /* Key varaible */
22- kb_key_t key ;
23- const char * erase_string = " " ;
21+ /* Key varaible */
22+ kb_key_t key ;
23+ const char * erase_string = " " ;
2424
2525 prgm_CleanUp ();
2626
27- /* Loop until 2nd is pressed */
28- do {
29-
30- /* Update kb_Data */
31- kb_Scan ();
32-
33- key = kb_Data [kb_group_7 ];
27+ /* Loop until 2nd is pressed */
28+ do {
29+
30+ /* Update kb_Data */
31+ kb_Scan ();
32+
33+ key = kb_Data [kb_group_7 ];
3434
35- /* Print the current arrow key input */
36- if (key & kb_Down ) {
37- printText (0 ,0 ,"Down" );
38- } else {
39- printText (0 ,0 ,erase_string );
40- }
41- if (key & kb_Up ) {
42- printText (0 ,1 ,"Up" );
43- } else {
44- printText (0 ,1 ,erase_string );
45- }
46- if (key & kb_Left ) {
47- printText (0 ,2 ,"Left" );
48- } else {
49- printText (0 ,2 ,erase_string );
50- }
51- if (key & kb_Right ) {
52- printText (0 ,3 ,"Right" );
53- } else {
54- printText (0 ,3 ,erase_string );
55- }
56- } while ( kb_Data [kb_group_1 ] != kb_2nd );
35+ /* Print the current arrow key input */
36+ if (key & kb_Down ) {
37+ printText (0 ,0 ,"Down" );
38+ } else {
39+ printText (0 ,0 ,erase_string );
40+ }
41+ if (key & kb_Up ) {
42+ printText (0 ,1 ,"Up" );
43+ } else {
44+ printText (0 ,1 ,erase_string );
45+ }
46+ if (key & kb_Left ) {
47+ printText (0 ,2 ,"Left" );
48+ } else {
49+ printText (0 ,2 ,erase_string );
50+ }
51+ if (key & kb_Right ) {
52+ printText (0 ,3 ,"Right" );
53+ } else {
54+ printText (0 ,3 ,erase_string );
55+ }
56+ } while (kb_Data [kb_group_1 ] != kb_2nd );
5757
58- prgm_CleanUp ();
58+ prgm_CleanUp ();
5959}
6060
6161/* Draw text on the homescreen at the given X/Y location */
6262void printText (int8_t xpos , int8_t ypos , const char * text ) {
63- os_SetCursorPos (ypos , xpos );
64- os_PutStrFull (text );
63+ os_SetCursorPos (ypos , xpos );
64+ os_PutStrFull (text );
6565}
0 commit comments