attempt to reduce space usage

- remove unecessary code
- ifdef "extra" code
- pass data through globals instead of functions accessing static data
- functions non-reentrant, locate tmps in xdata
This commit is contained in:
Jeff Wang
2019-03-31 19:29:37 -04:00
parent ecb0492534
commit 43edb291cf
8 changed files with 132 additions and 99 deletions

View File

@ -7,10 +7,20 @@
#ifndef SRC_KEY_H_
#define SRC_KEY_H_
//#define DEBUG_KEYS
void KeyInit(void);
void KeyScan(void);
const uint8_t* DebugGetKeys(void);
const uint32_t GetNewKeys(void);
#ifdef DEBUG_KEYS
const uint8_t* DebugGetKeys(void);
#endif
//definition included for determining if multiple keys are pressed
//prefer using GetNewKeys();
#define TOTAL_ROWS 5
extern uint8_t Keys[TOTAL_ROWS]; //only bottom nibbles get set
#endif /* SRC_KEY_H_ */