NXP Rapid IoT prototyping kit port of Silabs "hungry gecko" smake-like game. https://os.mbed.com/teams/SiliconLabs/code/Hungry_gecko/
Dependencies: lib_sx9500 GraphicsDisplay ColorMemLCD Large_fonts
See a detailed description of this project on Hackster.io . https://www.hackster.io/marcomerli/riotwear-snake-ca6dfc
settings.h@80:77210aa1ad9c, 2019-12-26 (annotated)
- Committer:
- batman52
- Date:
- Thu Dec 26 16:47:58 2019 +0000
- Revision:
- 80:77210aa1ad9c
- Child:
- 81:737dff75e013
NXP Rapid IoT prototyping kit port of Silabs "Hhungry Gecko" ( https://os.mbed.com/teams/SiliconLabs/code/Hungry_gecko/ ) snake-like game.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
batman52 | 80:77210aa1ad9c | 1 | /***************************************************************************//** |
batman52 | 80:77210aa1ad9c | 2 | * @file settings.h |
batman52 | 80:77210aa1ad9c | 3 | * @settings file for Hungry Gecko program |
batman52 | 80:77210aa1ad9c | 4 | ******************************************************************************/ |
batman52 | 80:77210aa1ad9c | 5 | #ifndef SETTINGS_H_ |
batman52 | 80:77210aa1ad9c | 6 | #define SETTINGS_H_ |
batman52 | 80:77210aa1ad9c | 7 | #include "LCDSettings.h" |
batman52 | 80:77210aa1ad9c | 8 | #include "ColorMemLCD.h" |
batman52 | 80:77210aa1ad9c | 9 | |
batman52 | 80:77210aa1ad9c | 10 | #define MAXLENGTH 255 |
batman52 | 80:77210aa1ad9c | 11 | #define STEPSIZE 7 |
batman52 | 80:77210aa1ad9c | 12 | |
batman52 | 80:77210aa1ad9c | 13 | /* Define board limits, note that the display height and display width is 128 |
batman52 | 80:77210aa1ad9c | 14 | * This particlular choice leads to 255 STEPSIZE x STEPSIZE tiles. Thus, |
batman52 | 80:77210aa1ad9c | 15 | * the tile number can be stored in 1 uint8_t |
batman52 | 80:77210aa1ad9c | 16 | * */ |
batman52 | 80:77210aa1ad9c | 17 | #define TOPEDGE 3 |
batman52 | 80:77210aa1ad9c | 18 | #define BOARD_HEIGHT 15 |
batman52 | 80:77210aa1ad9c | 19 | #define BOARD_WIDTH 16 |
batman52 | 80:77210aa1ad9c | 20 | #define BOARDERWIDTH (DISPLAY_WIDTH - STEPSIZE*BOARD_WIDTH) |
batman52 | 80:77210aa1ad9c | 21 | |
batman52 | 80:77210aa1ad9c | 22 | #define FOREGROUND_COLOR LCD_COLOR_BLACK |
batman52 | 80:77210aa1ad9c | 23 | #define BACKGROUND_COLOR LCD_COLOR_GREEN // LCD_COLOR_WHITE |
batman52 | 80:77210aa1ad9c | 24 | |
batman52 | 80:77210aa1ad9c | 25 | #define MULTI_UPDATE 0 |
batman52 | 80:77210aa1ad9c | 26 | #define TICKER_EN 1 |
batman52 | 80:77210aa1ad9c | 27 | |
batman52 | 80:77210aa1ad9c | 28 | /* Define allowed direction to move */ |
batman52 | 80:77210aa1ad9c | 29 | typedef enum{ |
batman52 | 80:77210aa1ad9c | 30 | LEFT=0, RIGHT, UP, DOWN |
batman52 | 80:77210aa1ad9c | 31 | } Direction; |
batman52 | 80:77210aa1ad9c | 32 | |
batman52 | 80:77210aa1ad9c | 33 | #endif /* SETTINGS_H_ */ |