diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2009-06-17 19:55:27 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2009-06-17 19:55:27 +0000 |
commit | 3520d8e90e7f6e3ffc88f8d1ff47fa3cc0efe960 (patch) | |
tree | 814a3bcd5d0fc6ee0c99d57d5f188e7f113ec29f /firmware/export | |
parent | bc1fd05dc1f025bdeb2e79fb552472775bedd156 (diff) | |
download | rockbox-3520d8e90e7f6e3ffc88f8d1ff47fa3cc0efe960.tar.gz rockbox-3520d8e90e7f6e3ffc88f8d1ff47fa3cc0efe960.zip |
Sansa c200v2 : lcd & backlight support, using the c200v1 lcd driver
The LCD driver is unified and lcd_send_command now takes 2 arguments : the command and its argument.
If there is no argument, it's set to 0 and a NOP command is issued
If there is more than one argument (set X/Y address), the 2nd argument is sent as a 2nd command, and a NOP command is issued after it.
Benefit : c200v2 transfers the command and the argument in one 16 bits transfer
Performance should not be affected since commands without argument are only used in lcd_init() and lcd_enable()
lcd_send_data() now transfers whole lines (or columns) instead of single pixels
yuv is disabled for c200v2 for now
Some buttons can be read, including left button (bit 6 of DBOP_DIN), but for some reason they have no effect in rockbox: to be investigated
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21321 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export')
-rw-r--r-- | firmware/export/config-c200v2.h | 36 |
1 files changed, 15 insertions, 21 deletions
diff --git a/firmware/export/config-c200v2.h b/firmware/export/config-c200v2.h index 775a39fc4c..03f6ac0698 100644 --- a/firmware/export/config-c200v2.h +++ b/firmware/export/config-c200v2.h | |||
@@ -1,21 +1,25 @@ | |||
1 | /* | 1 | /* |
2 | * This config file is for the Sandisk Sansa e200 | 2 | * This config file is for the Sandisk Sansa c200v2 |
3 | */ | 3 | */ |
4 | #define TARGET_TREE /* this target is using the target tree system */ | 4 | #define TARGET_TREE /* this target is using the target tree system */ |
5 | 5 | ||
6 | /* For Rolo and boot loader */ | 6 | /* For Rolo and boot loader */ |
7 | #define MODEL_NUMBER 44 | 7 | #define MODEL_NUMBER 44 |
8 | #define MODEL_NAME "Sandisk Sansa c200v2 series" | 8 | #define MODEL_NAME "Sandisk Sansa c200v2 series" |
9 | #define FIRMWARE_OFFSET_FILE_DATA 8 | ||
10 | #define FIRMWARE_OFFSET_FILE_CRC 0 | ||
11 | |||
12 | #if 0 | ||
9 | 13 | ||
10 | #define HW_SAMPR_CAPS (SAMPR_CAP_44) | 14 | #define HW_SAMPR_CAPS (SAMPR_CAP_44) |
11 | 15 | ||
12 | #if 0 | ||
13 | /* define this if you have recording possibility */ | 16 | /* define this if you have recording possibility */ |
14 | #define HAVE_RECORDING | 17 | #define HAVE_RECORDING |
15 | 18 | ||
16 | #define REC_SAMPR_CAPS (SAMPR_CAP_22) | 19 | #define REC_SAMPR_CAPS (SAMPR_CAP_22) |
17 | #define REC_FREQ_DEFAULT REC_FREQ_22 /* Default is not 44.1kHz */ | 20 | #define REC_FREQ_DEFAULT REC_FREQ_22 /* Default is not 44.1kHz */ |
18 | #define REC_SAMPR_DEFAULT SAMPR_22 | 21 | #define REC_SAMPR_DEFAULT SAMPR_22 |
22 | |||
19 | #endif | 23 | #endif |
20 | 24 | ||
21 | /* Define bitmask of input sources - recordable bitmask can be defined | 25 | /* Define bitmask of input sources - recordable bitmask can be defined |
@@ -55,7 +59,6 @@ | |||
55 | #define LCD_DEPTH 16 /* 65536 colours */ | 59 | #define LCD_DEPTH 16 /* 65536 colours */ |
56 | #define LCD_PIXELFORMAT RGB565 /* rgb565 */ | 60 | #define LCD_PIXELFORMAT RGB565 /* rgb565 */ |
57 | 61 | ||
58 | #ifndef BOOTLOADER | ||
59 | /* define this if you have LCD enable function */ | 62 | /* define this if you have LCD enable function */ |
60 | #define HAVE_LCD_ENABLE | 63 | #define HAVE_LCD_ENABLE |
61 | 64 | ||
@@ -63,22 +66,21 @@ | |||
63 | should be defined as well. */ | 66 | should be defined as well. */ |
64 | /* TODO: #define HAVE_LCD_SLEEP */ | 67 | /* TODO: #define HAVE_LCD_SLEEP */ |
65 | /* TODO: #define HAVE_LCD_SLEEP_SETTING <= optional */ | 68 | /* TODO: #define HAVE_LCD_SLEEP_SETTING <= optional */ |
66 | #endif | 69 | |
67 | /* define this if you can flip your LCD */ | 70 | /* define this if you can flip your LCD */ |
68 | #define HAVE_LCD_FLIP | 71 | #define HAVE_LCD_FLIP |
69 | 72 | ||
70 | /* define this if you can invert the colours on your LCD */ | 73 | /* define this if you can invert the colours on your LCD */ |
71 | /* TODO: #define HAVE_LCD_INVERT */ | 74 | /* TODO: #define HAVE_LCD_INVERT */ |
72 | 75 | ||
73 | #if 0 | ||
74 | /* Define this if your LCD can set contrast */ | 76 | /* Define this if your LCD can set contrast */ |
75 | #define HAVE_LCD_CONTRAST | 77 | #define HAVE_LCD_CONTRAST |
76 | 78 | ||
77 | #define MIN_CONTRAST_SETTING 0 | 79 | #define MIN_CONTRAST_SETTING 0 |
78 | #define MAX_CONTRAST_SETTING 255 | 80 | #define MAX_CONTRAST_SETTING 255 |
79 | #define DEFAULT_CONTRAST_SETTING 85 | 81 | #define DEFAULT_CONTRAST_SETTING 85 |
80 | #endif | 82 | |
81 | /* #define IRAM_LCDFRAMEBUFFER IDATA_ATTR *//* put the lcd frame buffer in IRAM */ | 83 | #define IRAM_LCDFRAMEBUFFER IDATA_ATTR /* put the lcd frame buffer in IRAM */ |
82 | 84 | ||
83 | #define CONFIG_KEYPAD SANSA_C200_PAD | 85 | #define CONFIG_KEYPAD SANSA_C200_PAD |
84 | 86 | ||
@@ -91,7 +93,7 @@ | |||
91 | /* There is no hardware tone control */ | 93 | /* There is no hardware tone control */ |
92 | #define HAVE_SW_TONE_CONTROLS | 94 | #define HAVE_SW_TONE_CONTROLS |
93 | 95 | ||
94 | /* The PP5024 has a built-in AustriaMicrosystems AS3514 */ | 96 | /* The AS3525 has a built-in AS3514 (or a newer version) */ |
95 | #define HAVE_AS3514 | 97 | #define HAVE_AS3514 |
96 | 98 | ||
97 | /* define this if you have a real-time clock */ | 99 | /* define this if you have a real-time clock */ |
@@ -114,7 +116,7 @@ | |||
114 | #define AB_REPEAT_ENABLE 1 | 116 | #define AB_REPEAT_ENABLE 1 |
115 | 117 | ||
116 | /* FM Tuner - suspected to be the SI4702 */ | 118 | /* FM Tuner - suspected to be the SI4702 */ |
117 | #define CONFIG_TUNER SI4700 | 119 | //#define CONFIG_TUNER SI4700 |
118 | /* #define HAVE_TUNER_PWR_CTRL */ | 120 | /* #define HAVE_TUNER_PWR_CTRL */ |
119 | 121 | ||
120 | /* Define this for LCD backlight available */ | 122 | /* Define this for LCD backlight available */ |
@@ -159,30 +161,22 @@ | |||
159 | #define ROM_START 0x00000000 | 161 | #define ROM_START 0x00000000 |
160 | 162 | ||
161 | /* Define this to the CPU frequency */ | 163 | /* Define this to the CPU frequency */ |
162 | #define CPU_FREQ 75000000 | 164 | #define CPU_FREQ 250000000 |
163 | 165 | ||
164 | /* Type of LCD TODO: hopefully the same as the x5 but check this*/ | 166 | /* Type of LCD TODO: hopefully the same as the x5 but check this*/ |
165 | #define CONFIG_LCD LCD_C200 | 167 | #define CONFIG_LCD LCD_C200 |
166 | 168 | ||
167 | /* Offset ( in the firmware file's header ) to the file CRC and data. These are | ||
168 | only used when loading the old format rockbox.e200 file */ | ||
169 | #define FIRMWARE_OFFSET_FILE_CRC 0x0 | ||
170 | #define FIRMWARE_OFFSET_FILE_DATA 0x8 | ||
171 | |||
172 | #define USB_HANDLED_BY_OF | 169 | #define USB_HANDLED_BY_OF |
173 | 170 | ||
174 | #ifndef BOOTLOADER | 171 | #ifndef BOOTLOADER |
175 | #define HAVE_MULTIVOLUME | 172 | //#define HAVE_MULTIVOLUME |
176 | #define HAVE_HOTSWAP | 173 | //#define HAVE_HOTSWAP |
177 | #endif | 174 | #endif |
178 | 175 | ||
179 | /* USB On-the-go */ | ||
180 | #define CONFIG_USBOTG USBOTG_ARC | ||
181 | |||
182 | /* enable these for the experimental usb stack */ | 176 | /* enable these for the experimental usb stack */ |
183 | //#define HAVE_USBSTACK | 177 | //#define HAVE_USBSTACK |
184 | //#define USB_VENDOR_ID 0x0781 | 178 | //#define USB_VENDOR_ID 0x0781 |
185 | //#define USB_PRODUCT_ID 0x7450 | 179 | //#define USB_PRODUCT_ID 0x7452 |
186 | /* Virtual LED (icon) */ | 180 | /* Virtual LED (icon) */ |
187 | #define CONFIG_LED LED_VIRTUAL | 181 | #define CONFIG_LED LED_VIRTUAL |
188 | 182 | ||