diff options
-rw-r--r-- | firmware/export/config-mini2440.h | 19 | ||||
-rw-r--r-- | uisimulator/sdl/UI-mini2440.bmp | bin | 0 -> 577320 bytes | |||
-rw-r--r-- | uisimulator/sdl/button.c | 35 | ||||
-rw-r--r-- | uisimulator/sdl/uisdl.h | 6 |
4 files changed, 52 insertions, 8 deletions
diff --git a/firmware/export/config-mini2440.h b/firmware/export/config-mini2440.h index 83505d8994..557f865454 100644 --- a/firmware/export/config-mini2440.h +++ b/firmware/export/config-mini2440.h @@ -68,6 +68,10 @@ /* But the 3.5" LCD touch screen does not support brightness*/ #define HAVE_BACKLIGHT #define HAVE_BACKLIGHT_BRIGHTNESS +/* Main LCD backlight brightness range and defaults */ +#define MIN_BRIGHTNESS_SETTING 1 /* 0.5 mA */ +#define MAX_BRIGHTNESS_SETTING 12 /* 32 mA */ +#define DEFAULT_BRIGHTNESS_SETTING 10 /* 16 mA */ /* Keypad */ #define CONFIG_KEYPAD MINI2440_PAD @@ -93,11 +97,7 @@ #define BATTERY_CAPACITY_INC 100 /* capacity increment */ #define BATTERY_TYPES_COUNT 1 /* only one type */ -/* USB */ -/* TODO:#define HAVE_USBSTACK */ -#define USB_NONE -#define HAVE_SERIAL /***************************************************************************/ /* Application Config */ @@ -134,16 +134,19 @@ #define MCK_FREQ (CPU_FREQ/4) #define SLOW_CLOCK 32768 -/* Main LCD backlight brightness range and defaults */ -#define MIN_BRIGHTNESS_SETTING 1 /* 0.5 mA */ -#define MAX_BRIGHTNESS_SETTING 12 /* 32 mA */ -#define DEFAULT_BRIGHTNESS_SETTING 10 /* 16 mA */ + /* Define this if your LCD can set contrast */ #define HAVE_LCD_CONTRAST #define MIN_CONTRAST_SETTING 0 #define MAX_CONTRAST_SETTING 63 #define DEFAULT_CONTRAST_SETTING 47 /* Match boot contrast */ +/* USB */ +/* TODO:#define HAVE_USBSTACK */ +#define USB_NONE + +#define HAVE_SERIAL + /* Hardware controlled charging with monitoring */ #define CONFIG_CHARGING CHARGING_MONITOR /*#define POWER_INPUT_BATTERY 0*/ diff --git a/uisimulator/sdl/UI-mini2440.bmp b/uisimulator/sdl/UI-mini2440.bmp Binary files differnew file mode 100644 index 0000000000..556026a5ca --- /dev/null +++ b/uisimulator/sdl/UI-mini2440.bmp diff --git a/uisimulator/sdl/button.c b/uisimulator/sdl/button.c index f8889bafb8..3a6b9ce09f 100644 --- a/uisimulator/sdl/button.c +++ b/uisimulator/sdl/button.c @@ -1190,6 +1190,41 @@ void button_event(int key, bool pressed) case SDLK_KP_PLUS: new_btn = BUTTON_REC; break; +#elif CONFIG_KEYPAD == MINI2440_PAD + case SDLK_LEFT: + new_btn = BUTTON_LEFT; + break; + case SDLK_RIGHT: + new_btn = BUTTON_RIGHT; + break; + case SDLK_UP: + new_btn = BUTTON_UP; + break; + case SDLK_DOWN: + new_btn = BUTTON_DOWN; + break; + case SDLK_F8: + case SDLK_ESCAPE: + new_btn = BUTTON_POWER; + break; + case SDLK_KP_ENTER: + case SDLK_RETURN: + case SDLK_a: + new_btn = BUTTON_A; + break; + case SDLK_SPACE: + new_btn = BUTTON_SELECT; + break; + case SDLK_KP_PERIOD: + case SDLK_INSERT: + new_btn = BUTTON_MENU; + break; + case SDLK_KP_PLUS: + new_btn = BUTTON_VOL_UP; + break; + case SDLK_KP_MINUS: + new_btn = BUTTON_VOL_DOWN; + break; #else #error No keymap defined! #endif /* CONFIG_KEYPAD */ diff --git a/uisimulator/sdl/uisdl.h b/uisimulator/sdl/uisdl.h index 8e60735d05..911f2a3f50 100644 --- a/uisimulator/sdl/uisdl.h +++ b/uisimulator/sdl/uisdl.h @@ -353,6 +353,12 @@ #define UI_LCD_POSX 124 /* x position of lcd */ #define UI_LCD_POSY 42 /* y position of lcd */ +#elif defined(MINI2440) +#define UI_TITLE "Mini2440" +#define UI_WIDTH 441 /* width of GUI window */ +#define UI_HEIGHT 436 /* height of GUI window */ +#define UI_LCD_POSX 148 /* x position of lcd */ +#define UI_LCD_POSY 50 /* y position of lcd */ #else #error no UI defines #endif |