@@ -18,48 +18,48 @@ void printText(int8_t xpos, int8_t ypos, const char *text);
18
18
19
19
/* Main Function */
20
20
void 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 = " " ;
24
24
25
25
prgm_CleanUp ();
26
26
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 ];
34
34
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 );
57
57
58
- prgm_CleanUp ();
58
+ prgm_CleanUp ();
59
59
}
60
60
61
61
/* Draw text on the homescreen at the given X/Y location */
62
62
void 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 );
65
65
}
0 commit comments