Skip to content

Commit

Permalink
Fix defines, add date and time functions, fix spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
mateoconlechuga committed Dec 21, 2016
1 parent 83237c0 commit fe26915
Show file tree
Hide file tree
Showing 12 changed files with 991 additions and 964 deletions.
2 changes: 1 addition & 1 deletion CEdev/bin/main_makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ LIBHEADER_ASM := libheader.asm
#----------------------------

SHELL := cmd.exe
VERSION := 6.6
VERSION := 6.7

#----------------------------
# Try not to edit anything below these lines unless you know what you are doing
Expand Down
4 changes: 0 additions & 4 deletions CEdev/examples/demo_7/src/main.h

This file was deleted.

Binary file modified CEdev/examples/library_examples/keypad/demo_0/bin/KEYPAD0.8xp
Binary file not shown.
13 changes: 9 additions & 4 deletions CEdev/examples/library_examples/keypad/demo_0/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,14 @@ void fillScreen(uint8_t color);
void main(void) {
/* Key varaible */
kb_key_t key;

/* Loop until 2nd is pressed */
while(kb_ScanGroup(kb_group_1) != kb_2nd) {
key = kb_ScanGroup(kb_group_7);
do {
/* Update kb_Data */
kb_Scan();

/* Load group 7 registers */
key = kb_Data[kb_group_7];

switch(key) {
case kb_Down: /* Change screen color to black */
Expand All @@ -41,7 +45,8 @@ void main(void) {
default:
break;
}
}
} while( kb_Data[kb_group_1] != kb_2nd );

prgm_CleanUp();
}

Expand Down
Binary file modified CEdev/examples/library_examples/keypad/demo_1/bin/KEYPAD1.8xp
Binary file not shown.
17 changes: 12 additions & 5 deletions CEdev/examples/library_examples/keypad/demo_1/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,17 @@ void printText(int8_t xpos, int8_t ypos, const char *text);
void main(void) {
/* Key varaible */
kb_key_t key;
char erase_string[] = " ";

const char *erase_string = " ";

prgm_CleanUp();

/* Loop until 2nd is pressed */
while(kb_ScanGroup(kb_group_1) != kb_2nd) {
key = kb_ScanGroup(kb_group_7);
do {

/* Update kb_Data */
kb_Scan();

key = kb_Data[kb_group_7];

/* Print the current arrow key input */
if(key & kb_Down) {
Expand All @@ -47,7 +53,8 @@ void main(void) {
} else {
printText(0,3,erase_string);
}
}
} while( kb_Data[kb_group_1] != kb_2nd );

prgm_CleanUp();
}

Expand Down
2 changes: 1 addition & 1 deletion CEdev/examples/library_examples/keypad/demo_2/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ void interrupt isr_keyboard(void);

/* Global Flag */
uint8_t exit_loop = false;
int a;

/* Main Function */
void main(void) {
/* Initialize the interrupt handlers */
Expand Down
1 change: 0 additions & 1 deletion CEdev/examples/readme.md

This file was deleted.

6 changes: 3 additions & 3 deletions CEdev/include/lib/ce/keypadc.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ void kb_Reset(void);
#define kb_IntAcknowledge (*(volatile uint8_t*)0xF50008)
#define kb_IntStatus (*(volatile uint8_t*)0xF50008)
#define kb_Config (*(uint8_t*)0xF50000)
#define kb_Data ((uint16_t*)0xF50010)
#define kb_Data (uint8_t)((uint16_t*)0xF50010)

#define KB_SCAN_COMPLETE (1<<0)
#define KB_DATA_CHANGED (1<<1)
Expand Down Expand Up @@ -142,7 +142,7 @@ void kb_Reset(void);
#define kb_8 1<<3
#define kb_LParen 1<<4
#define kb_Cos 1<<5
#define kb_Pgrm 1<<6
#define kb_Prgm 1<<6
#define kb_Stat 1<<7

/**
Expand Down Expand Up @@ -222,7 +222,7 @@ void kb_Reset(void);
#define kb_Key8 (kb_lkey_t)(4 << 8 | 1<<3)
#define kb_KeyLParen (kb_lkey_t)(4 << 8 | 1<<4)
#define kb_KeyCos (kb_lkey_t)(4 << 8 | 1<<5)
#define kb_KeyPgrm (kb_lkey_t)(4 << 8 | 1<<6)
#define kb_KeyPrgm (kb_lkey_t)(4 << 8 | 1<<6)
#define kb_KeyStat (kb_lkey_t)(4 << 8 | 1<<7)

/**
Expand Down
Loading

0 comments on commit fe26915

Please sign in to comment.