Factor out the duplicate code from bufadvance in rebuffer_handle()
[Rockbox.git] / firmware / export / config-h120.h
blob6fc9aa2406fa45fafa8afc889297e7b5cc82d39e
1 #define TARGET_TREE /* this target is using the target tree system */
2 /*
3 * This config file is for iriver H120 and H140
4 */
5 #define IRIVER_H100_SERIES 1
7 /* For Rolo and boot loader */
8 #define MODEL_NUMBER 0
10 /* define this if you have a bitmap LCD display */
11 #define HAVE_LCD_BITMAP
13 /* define this if you can flip your LCD */
14 #define HAVE_LCD_FLIP
16 /* define this if you can invert the colours on your LCD */
17 #define HAVE_LCD_INVERT
19 /* define this if you have access to the quickscreen */
20 #define HAVE_QUICKSCREEN
21 /* define this if you have access to the pitchscreen */
22 #define HAVE_PITCHSCREEN
24 /* define this if you would like tagcache to build on this target */
25 #define HAVE_TAGCACHE
27 /* LCD dimensions */
28 #define LCD_WIDTH 160
29 #define LCD_HEIGHT 128
30 #define LCD_DEPTH 2
32 #define LCD_PIXELFORMAT VERTICAL_PACKING
34 /* remote LCD */
35 #define LCD_REMOTE_WIDTH 128
36 #define LCD_REMOTE_HEIGHT 64
37 #define LCD_REMOTE_DEPTH 1
39 #define LCD_REMOTE_PIXELFORMAT VERTICAL_PACKING
41 #define CONFIG_KEYPAD IRIVER_H100_PAD
43 #define CONFIG_REMOTE_KEYPAD H100_REMOTE
45 /* Define this if you do software codec */
46 #define CONFIG_CODEC SWCODEC
48 /* Define this if you have an remote lcd */
49 #define HAVE_REMOTE_LCD
51 /* Define if we have a hardware defect that causes ticking on the audio line */
52 #define HAVE_REMOTE_LCD_TICKING
54 #define CONFIG_LCD LCD_S1D15E06
56 /* Define this for LCD backlight available */
57 #define HAVE_BACKLIGHT
59 /* We can fade the backlight by using PWM */
60 #define HAVE_BACKLIGHT_PWM_FADING
62 /* Define this if you have a software controlled poweroff */
63 #define HAVE_SW_POWEROFF
65 /* The number of bytes reserved for loadable codecs */
66 #define CODEC_SIZE 0x80000
68 /* The number of bytes reserved for loadable plugins */
69 #define PLUGIN_BUFFER_SIZE 0x80000
71 #define AB_REPEAT_ENABLE 1
73 #define CONFIG_TUNER TEA5767
74 #define CONFIG_TUNER_XTAL 32768
76 #define HAVE_UDA1380
78 /* define this if you have recording possibility */
79 #define HAVE_RECORDING
81 /* Define bitmask of input sources - recordable bitmask can be defined
82 explicitly if different */
83 #define INPUT_SRC_CAPS (SRC_CAP_MIC | SRC_CAP_LINEIN | \
84 SRC_CAP_FMRADIO | SRC_CAP_SPDIF)
86 /* define hardware samples rate caps mask */
87 #define HW_SAMPR_CAPS (SAMPR_CAP_88 | SAMPR_CAP_44 | SAMPR_CAP_22 | SAMPR_CAP_11)
89 /* define the bitmask of recording sample rates */
90 #define REC_SAMPR_CAPS (SAMPR_CAP_44 | SAMPR_CAP_22 | SAMPR_CAP_11)
92 #define HAVE_AGC
94 #define BATTERY_CAPACITY_DEFAULT 1300 /* default battery capacity */
95 #define BATTERY_CAPACITY_MIN 1300 /* min. capacity selectable */
96 #define BATTERY_CAPACITY_MAX 3200 /* max. capacity selectable */
97 #define BATTERY_CAPACITY_INC 50 /* capacity increment */
98 #define BATTERY_TYPES_COUNT 1 /* only one type */
100 /* Hardware controlled charging */
101 //#define CONFIG_CHARGING CHARGING_SIMPLE
102 #define CONFIG_CHARGING CHARGING_MONITOR /* FIXME: remove that once monitoring is fixed properly */
104 #ifndef SIMULATOR
106 /* Define this if you have a Motorola SCF5249 */
107 #define CONFIG_CPU MCF5249
109 /* Define this if you want to use coldfire's i2c interface */
110 #define CONFIG_I2C I2C_COLDFIRE
112 /* Define this if you can run rockbox from flash memory */
113 #define HAVE_FLASHED_ROCKBOX
115 /* define this if the hardware can be powered off while charging */
116 #define HAVE_POWEROFF_WHILE_CHARGING
118 /* The size of the flash ROM */
119 #define FLASH_SIZE 0x200000
121 /* Define this to the CPU frequency */
122 #define CPU_FREQ 11289600
124 /* Define this if you have ATA power-off control */
125 #define HAVE_ATA_POWER_OFF
127 /* Offset ( in the firmware file's header ) to the file CRC */
128 #define FIRMWARE_OFFSET_FILE_CRC 0
130 /* Offset ( in the firmware file's header ) to the real data */
131 #define FIRMWARE_OFFSET_FILE_DATA 8
133 #define HAVE_ATA_LED_CTRL
135 /* Define this if you have adjustable CPU frequency */
136 #define HAVE_ADJUSTABLE_CPU_FREQ
138 #define BOOTFILE_EXT "iriver"
139 #define BOOTFILE "rockbox." BOOTFILE_EXT
140 #define BOOTDIR "/.rockbox"
142 #define BOOTLOADER_ENTRYPOINT 0x001F0000
143 #define FLASH_RAMIMAGE_ENTRY 0x00001000
144 #define FLASH_ROMIMAGE_ENTRY 0x00100000
145 #define FLASH_MAGIC 0xfbfbfbf2
147 /* Define this if there is an EEPROM chip */
148 #define HAVE_EEPROM
150 /* Define this if the EEPROM chip is used */
151 #define HAVE_EEPROM_SETTINGS
153 #endif /* !SIMULATOR */
155 /* Define this for S/PDIF output available */
156 #define HAVE_SPDIF_OUT
158 /* Define this if you can control the S/PDIF power */
159 #define HAVE_SPDIF_POWER
161 /* Define this if you have a serial port */
162 /*#define HAVE_SERIAL*/
164 /** Port-specific settings **/
166 /* Main LCD backlight brightness range and defaults */
167 #define MIN_CONTRAST_SETTING 14 /* White screen a bit higher than this */
168 #define MAX_CONTRAST_SETTING 63 /* Black screen a bit lower than this */
169 #define DEFAULT_CONTRAST_SETTING 27
171 /* Remote LCD contrast range and defaults */
172 #define MIN_REMOTE_CONTRAST_SETTING 5
173 #define MAX_REMOTE_CONTRAST_SETTING 63
174 #define DEFAULT_REMOTE_CONTRAST_SETTING 42