From 8d69f78423978e20997b34709d5b6d39896c9237 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 12 Dec 2003 13:29:11 +0000 Subject: Additional Neo support git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4132 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/button.h | 48 +++++++++++++++++++++++++++++++++++-- firmware/export/config-fmrecorder.h | 3 +++ firmware/export/config-player.h | 3 +++ firmware/export/config-recorder.h | 3 +++ firmware/export/config-recorderv2.h | 3 +++ firmware/export/config.h | 4 ++++ firmware/export/lcd.h | 20 ++++++++++++++++ 7 files changed, 82 insertions(+), 2 deletions(-) (limited to 'firmware') diff --git a/firmware/export/button.h b/firmware/export/button.h index e3c37f9382..d6503d93b7 100644 --- a/firmware/export/button.h +++ b/firmware/export/button.h @@ -30,8 +30,49 @@ void button_init (void); int button_get (bool block); int button_get_w_tmo(int ticks); -/* Shared button codes */ #define BUTTON_NONE 0x0000 + +#ifdef HAVE_NEO_KEYPAD + +#define BUTTON_UP 0x0080 +#define BUTTON_DOWN 0x0010 +#define BUTTON_LEFT 0x0001 +#define BUTTON_RIGHT 0x0002 + +#define BUTTON_SELECT 0x0040 +#define BUTTON_PROGRAM 0x0020 +#define BUTTON_MENU 0x0004 +#define BUTTON_PLAY 0x0008 +#define BUTTON_STOP 0x0100 + +#define BUTTON_IR 0x2000 +#define BUTTON_REPEAT 0x4000 +#define BUTTON_REL 0x8000 + +#define BUTTON_FLAG_MASK 0xF000 +#define BUTTON_MASK 0x0FFF +#define BUTTON_ALL BUTTON_MASK +#define BUTTON_ALL_FLAGS BUTTON_FLAG_MASK + +#define NEO_IR_BUTTON_POWER 0x0001 +#define NEO_IR_BUTTON_SETTING 0x0002 +#define NEO_IR_BUTTON_REWIND 0x0004 +#define NEO_IR_BUTTON_FFORWARD 0x0008 +#define NEO_IR_BUTTON_PLAY 0x0010 +#define NEO_IR_BUTTON_VOLUP 0x0020 +#define NEO_IR_BUTTON_VOLDN 0x0040 +#define NEO_IR_BUTTON_BROWSE 0x0080 +#define NEO_IR_BUTTON_EQ 0x0100 +#define NEO_IR_BUTTON_MUTE 0x0200 +#define NEO_IR_BUTTON_PROGRAM 0x0400 +#define NEO_IR_BUTTON_STOP 0x0800 +#define NEO_IR_BUTTON_NONE 0x0000 + +#define NEO_IR_BUTTON_REPEAT 0x1000 + +#else + +/* Shared button codes */ #define BUTTON_ON 0x0001 #define BUTTON_UP 0x0010 #define BUTTON_DOWN 0x0020 @@ -69,4 +110,7 @@ int button_get_w_tmo(int ticks); #endif /* HAVE_PLAYER_KEYPAD */ -#endif +#endif /* HAVE_NEO_KEYPAD */ + +#endif /* _BUTTON_H_ */ + diff --git a/firmware/export/config-fmrecorder.h b/firmware/export/config-fmrecorder.h index d7e6c8f8f7..738633dcc5 100644 --- a/firmware/export/config-fmrecorder.h +++ b/firmware/export/config-fmrecorder.h @@ -51,3 +51,6 @@ /* How to detect USB */ #define USB_FMRECORDERSTYLE 1 + +/* Define this if the platform has batteries */ +#define HAVE_BATTERIES 1 diff --git a/firmware/export/config-player.h b/firmware/export/config-player.h index 04c8f8fc3d..45eb1e4f9b 100644 --- a/firmware/export/config-player.h +++ b/firmware/export/config-player.h @@ -34,3 +34,6 @@ /* How to detect USB */ #define USB_PLAYERSTYLE 1 + +/* Define this if the platform has batteries */ +#define HAVE_BATTERIES 1 diff --git a/firmware/export/config-recorder.h b/firmware/export/config-recorder.h index 85b0c392df..38958a3f4d 100644 --- a/firmware/export/config-recorder.h +++ b/firmware/export/config-recorder.h @@ -42,3 +42,6 @@ /* How to detect USB */ #define USB_RECORDERSTYLE 1 + +/* Define this if the platform has batteries */ +#define HAVE_BATTERIES 1 diff --git a/firmware/export/config-recorderv2.h b/firmware/export/config-recorderv2.h index d7e6c8f8f7..738633dcc5 100644 --- a/firmware/export/config-recorderv2.h +++ b/firmware/export/config-recorderv2.h @@ -51,3 +51,6 @@ /* How to detect USB */ #define USB_FMRECORDERSTYLE 1 + +/* Define this if the platform has batteries */ +#define HAVE_BATTERIES 1 diff --git a/firmware/export/config.h b/firmware/export/config.h index 0b0cd41723..091d392328 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h @@ -28,6 +28,10 @@ #include "config-fmrecorder.h" #elif defined(ARCHOS_RECORDERV2) #include "config-recorderv2.h" +#elif defined(NEO_35) +#include "config-neo35.h" +#elif defined(NEO_MSTATION) +#include "config-mstation.h" #else /* no known platform */ #endif diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h index f4fa3372cf..c4632a0282 100644 --- a/firmware/export/lcd.h +++ b/firmware/export/lcd.h @@ -143,5 +143,25 @@ extern int lcd_getstringsize(unsigned char *str, int *w, int *h); #endif /* CHARCELLS / BITMAP */ +/* These control codes may only work on the Neo LCD display */ +#ifdef HAVE_NEO_LCD + +/* Cursor Control Instructions */ +#define LCD_OFFCUR 0x0C +#define LCD_LINECUR 0x0E +#define LCD_BLINKCUR 0x0D +#define LCD_COMBNCUR 0x0F +#define LCD_HOMECUR 0x02 +#define LCD_SHLFCUR 0x10 +#define LCD_SHRTCUR 0x14 + +/* Display Control Instructions */ +#define LCD_CLEAR 0x01 +#define LCD_OFFDISP 0x08 +#define LCD_ONDISP 0x0C +#define LCD_SHLFDISP 0x18 +#define LCD_SHRTDISP 0x1C +#define LCD_SET_CGRAM 0x40 +#endif #endif /* __LCD_H__ */ -- cgit v1.2.3