diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2021-04-23 11:31:58 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2021-04-26 07:42:58 -0400 |
commit | 7d0d32dbc65a8332a49aeed3a97e24cb109958b2 (patch) | |
tree | 36ce03b1b8564bedfd8e3df0ec088a0fc6bdc06f /firmware/target/arm/pnx0101/iriver-ifp7xx | |
parent | 3ba2f6e5c7383c5d7a6f8a1c38b6b5403a8a5dcb (diff) | |
download | rockbox-7d0d32dbc65a8332a49aeed3a97e24cb109958b2.tar.gz rockbox-7d0d32dbc65a8332a49aeed3a97e24cb109958b2.zip |
Nuke the never-functional iriver ifp-7xx port
It never worked, and hasn't compiled in something like a decade, Given
the HW capabilities (limited onboard flash, no expandability) there's
really no point in trying to fix/complete it.
Change-Id: I7d175089840396f8891645bd10010d730dd5bfdc
Diffstat (limited to 'firmware/target/arm/pnx0101/iriver-ifp7xx')
10 files changed, 0 insertions, 704 deletions
diff --git a/firmware/target/arm/pnx0101/iriver-ifp7xx/adc-ifp7xx.c b/firmware/target/arm/pnx0101/iriver-ifp7xx/adc-ifp7xx.c deleted file mode 100644 index 0f306f9986..0000000000 --- a/firmware/target/arm/pnx0101/iriver-ifp7xx/adc-ifp7xx.c +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2006 by Barry Wardell | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | #include "config.h" | ||
22 | #include "cpu.h" | ||
23 | #include "system.h" | ||
24 | #include "kernel.h" | ||
25 | #include "thread.h" | ||
26 | #include "adc.h" | ||
27 | |||
28 | static unsigned short adcdata[NUM_ADC_CHANNELS]; | ||
29 | |||
30 | unsigned short adc_read(int channel) | ||
31 | { | ||
32 | return adcdata[channel]; | ||
33 | } | ||
34 | |||
35 | static void adc_tick(void) | ||
36 | { | ||
37 | if (ADCST & 0x10) { | ||
38 | adcdata[0] = ADCCH0 & 0x3ff; | ||
39 | adcdata[1] = ADCCH1 & 0x3ff; | ||
40 | adcdata[2] = ADCCH2 & 0x3ff; | ||
41 | adcdata[3] = ADCCH3 & 0x3ff; | ||
42 | adcdata[4] = ADCCH4 & 0x3ff; | ||
43 | ADCST = 0xa; | ||
44 | } | ||
45 | } | ||
46 | |||
47 | void adc_init(void) | ||
48 | { | ||
49 | ADCR24 = 0xaaaaa; | ||
50 | ADCR28 = 0; | ||
51 | ADCST = 2; | ||
52 | ADCST = 0xa; | ||
53 | |||
54 | while (!(ADCST & 0x10)); | ||
55 | adc_tick(); | ||
56 | |||
57 | tick_add_task(adc_tick); | ||
58 | } | ||
59 | |||
diff --git a/firmware/target/arm/pnx0101/iriver-ifp7xx/adc-target.h b/firmware/target/arm/pnx0101/iriver-ifp7xx/adc-target.h deleted file mode 100644 index a18aa77c7e..0000000000 --- a/firmware/target/arm/pnx0101/iriver-ifp7xx/adc-target.h +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2006 by Barry Wardell | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | #ifndef _ADC_TARGET_H_ | ||
22 | #define _ADC_TARGET_H_ | ||
23 | |||
24 | #define NUM_ADC_CHANNELS 5 | ||
25 | |||
26 | #define ADC_BUTTONS 0 | ||
27 | #define ADC_BATTERY 1 | ||
28 | #define ADC_BUTTON_PLAY 2 | ||
29 | #define ADC_UNREG_POWER ADC_BATTERY /* For compatibility */ | ||
30 | |||
31 | #endif | ||
diff --git a/firmware/target/arm/pnx0101/iriver-ifp7xx/backlight-ifp7xx.c b/firmware/target/arm/pnx0101/iriver-ifp7xx/backlight-ifp7xx.c deleted file mode 100644 index 8be7a59de2..0000000000 --- a/firmware/target/arm/pnx0101/iriver-ifp7xx/backlight-ifp7xx.c +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2006 by Barry Wardell | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | #include "config.h" | ||
22 | #include "cpu.h" | ||
23 | #include "system.h" | ||
24 | #include "backlight.h" | ||
25 | #include "lcd.h" | ||
26 | |||
27 | void backlight_hw_on(void) | ||
28 | { | ||
29 | GPIO3_SET = 1; | ||
30 | } | ||
31 | |||
32 | void backlight_hw_off(void) | ||
33 | { | ||
34 | GPIO3_CLR = 1; | ||
35 | } | ||
diff --git a/firmware/target/arm/pnx0101/iriver-ifp7xx/button-ifp7xx.c b/firmware/target/arm/pnx0101/iriver-ifp7xx/button-ifp7xx.c deleted file mode 100644 index 45f9fae478..0000000000 --- a/firmware/target/arm/pnx0101/iriver-ifp7xx/button-ifp7xx.c +++ /dev/null | |||
@@ -1,90 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2006 by Barry Wardell | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | |||
22 | |||
23 | #include <stdlib.h> | ||
24 | #include "config.h" | ||
25 | #include "cpu.h" | ||
26 | #include "system.h" | ||
27 | #include "button.h" | ||
28 | #include "kernel.h" | ||
29 | #include "backlight.h" | ||
30 | #include "adc.h" | ||
31 | |||
32 | |||
33 | void button_init_device(void) | ||
34 | { | ||
35 | |||
36 | } | ||
37 | |||
38 | bool button_hold(void) | ||
39 | { | ||
40 | return (GPIO5_READ & 4) ? false : true; | ||
41 | } | ||
42 | |||
43 | /* | ||
44 | * Get button pressed from hardware | ||
45 | */ | ||
46 | int button_read_device(void) | ||
47 | { | ||
48 | int btn = BUTTON_NONE; | ||
49 | int data; | ||
50 | static bool hold_button = false; | ||
51 | bool hold_button_old; | ||
52 | |||
53 | /* normal buttons */ | ||
54 | hold_button_old = hold_button; | ||
55 | hold_button = button_hold(); | ||
56 | |||
57 | if (hold_button != hold_button_old) | ||
58 | backlight_hold_changed(hold_button); | ||
59 | |||
60 | if (!button_hold()) | ||
61 | { | ||
62 | data = adc_read(ADC_BUTTONS); | ||
63 | if (data < 0x35c) | ||
64 | { | ||
65 | if (data < 0x151) | ||
66 | if (data < 0xc7) | ||
67 | if (data < 0x41) | ||
68 | btn = BUTTON_LEFT; | ||
69 | else | ||
70 | btn = BUTTON_RIGHT; | ||
71 | else | ||
72 | btn = BUTTON_SELECT; | ||
73 | else | ||
74 | if (data < 0x268) | ||
75 | if (data < 0x1d7) | ||
76 | btn = BUTTON_UP; | ||
77 | else | ||
78 | btn = BUTTON_DOWN; | ||
79 | else | ||
80 | if (data < 0x2f9) | ||
81 | btn = BUTTON_EQ; | ||
82 | else | ||
83 | btn = BUTTON_MODE; | ||
84 | } | ||
85 | |||
86 | if (adc_read(ADC_BUTTON_PLAY) < 0x64) | ||
87 | btn |= BUTTON_PLAY; | ||
88 | } | ||
89 | return btn; | ||
90 | } | ||
diff --git a/firmware/target/arm/pnx0101/iriver-ifp7xx/button-target.h b/firmware/target/arm/pnx0101/iriver-ifp7xx/button-target.h deleted file mode 100644 index 6932b8956f..0000000000 --- a/firmware/target/arm/pnx0101/iriver-ifp7xx/button-target.h +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2006 by Barry Wardell | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | |||
22 | /* Custom written for the ifp7xx */ | ||
23 | |||
24 | #ifndef _BUTTON_TARGET_H_ | ||
25 | #define _BUTTON_TARGET_H_ | ||
26 | |||
27 | #define HAS_BUTTON_HOLD | ||
28 | |||
29 | /* iriver IFP7XX specific button codes */ | ||
30 | |||
31 | #define BUTTON_PLAY 0x00000001 | ||
32 | #define BUTTON_SELECT 0x00000002 | ||
33 | |||
34 | #define BUTTON_LEFT 0x00000004 | ||
35 | #define BUTTON_RIGHT 0x00000008 | ||
36 | #define BUTTON_UP 0x00000010 | ||
37 | #define BUTTON_DOWN 0x00000020 | ||
38 | |||
39 | #define BUTTON_MODE 0x00000040 | ||
40 | #define BUTTON_EQ 0x00000080 | ||
41 | |||
42 | #define BUTTON_MAIN (BUTTON_PLAY|BUTTON_SELECT\ | ||
43 | |BUTTON_LEFT|BUTTON_RIGHT|BUTTON_UP|BUTTON_DOWN\ | ||
44 | |BUTTON_MODE|BUTTON_EQ) | ||
45 | |||
46 | #define POWEROFF_BUTTON BUTTON_PLAY | ||
47 | #define POWEROFF_COUNT 40 | ||
48 | |||
49 | #endif /* _BUTTON_TARGET_H_ */ | ||
diff --git a/firmware/target/arm/pnx0101/iriver-ifp7xx/lcd-ifp7xx.c b/firmware/target/arm/pnx0101/iriver-ifp7xx/lcd-ifp7xx.c deleted file mode 100644 index 1ad604d50c..0000000000 --- a/firmware/target/arm/pnx0101/iriver-ifp7xx/lcd-ifp7xx.c +++ /dev/null | |||
@@ -1,224 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2002 by Alan Korr | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | #include "config.h" | ||
22 | |||
23 | #include "kernel.h" | ||
24 | #include "lcd.h" | ||
25 | #include "system.h" | ||
26 | |||
27 | /*** definitions ***/ | ||
28 | |||
29 | #define LCD_SET_LOWER_COLUMN_ADDRESS ((char)0x00) | ||
30 | #define LCD_SET_HIGHER_COLUMN_ADDRESS ((char)0x10) | ||
31 | #define LCD_SET_INTERNAL_REGULATOR_RESISTOR_RATIO ((char)0x20) | ||
32 | #define LCD_SET_POWER_CONTROL_REGISTER ((char)0x28) | ||
33 | #define LCD_SET_DISPLAY_START_LINE ((char)0x40) | ||
34 | #define LCD_SET_CONTRAST_CONTROL_REGISTER ((char)0x81) | ||
35 | #define LCD_SET_SEGMENT_REMAP ((char)0xA0) | ||
36 | #define LCD_SET_LCD_BIAS ((char)0xA2) | ||
37 | #define LCD_SET_ENTIRE_DISPLAY_OFF ((char)0xA4) | ||
38 | #define LCD_SET_ENTIRE_DISPLAY_ON ((char)0xA5) | ||
39 | #define LCD_SET_NORMAL_DISPLAY ((char)0xA6) | ||
40 | #define LCD_SET_REVERSE_DISPLAY ((char)0xA7) | ||
41 | #define LCD_SET_MULTIPLEX_RATIO ((char)0xA8) | ||
42 | #define LCD_SET_BIAS_TC_OSC ((char)0xA9) | ||
43 | #define LCD_SET_1OVER4_BIAS_RATIO ((char)0xAA) | ||
44 | #define LCD_SET_INDICATOR_OFF ((char)0xAC) | ||
45 | #define LCD_SET_INDICATOR_ON ((char)0xAD) | ||
46 | #define LCD_SET_DISPLAY_OFF ((char)0xAE) | ||
47 | #define LCD_SET_DISPLAY_ON ((char)0xAF) | ||
48 | #define LCD_SET_PAGE_ADDRESS ((char)0xB0) | ||
49 | #define LCD_SET_COM_OUTPUT_SCAN_DIRECTION ((char)0xC0) | ||
50 | #define LCD_SET_TOTAL_FRAME_PHASES ((char)0xD2) | ||
51 | #define LCD_SET_DISPLAY_OFFSET ((char)0xD3) | ||
52 | #define LCD_SET_READ_MODIFY_WRITE_MODE ((char)0xE0) | ||
53 | #define LCD_SOFTWARE_RESET ((char)0xE2) | ||
54 | #define LCD_NOP ((char)0xE3) | ||
55 | #define LCD_SET_END_OF_READ_MODIFY_WRITE_MODE ((char)0xEE) | ||
56 | |||
57 | /* LCD command codes */ | ||
58 | #define LCD_CNTL_RESET 0xe2 /* Software reset */ | ||
59 | #define LCD_CNTL_POWER 0x2f /* Power control */ | ||
60 | #define LCD_CNTL_CONTRAST 0x81 /* Contrast */ | ||
61 | #define LCD_CNTL_OUTSCAN 0xc8 /* Output scan direction */ | ||
62 | #define LCD_CNTL_SEGREMAP 0xa1 /* Segment remap */ | ||
63 | #define LCD_CNTL_DISPON 0xaf /* Display on */ | ||
64 | |||
65 | #define LCD_CNTL_PAGE 0xb0 /* Page address */ | ||
66 | #define LCD_CNTL_HIGHCOL 0x10 /* Upper column address */ | ||
67 | #define LCD_CNTL_LOWCOL 0x00 /* Lower column address */ | ||
68 | |||
69 | /*** driver routines ***/ | ||
70 | |||
71 | void lcd_write_command(int cmd) | ||
72 | { | ||
73 | while ((LCDSTAT & 3) != 3); | ||
74 | LCDCMD = cmd; | ||
75 | } | ||
76 | |||
77 | void lcd_write_data( const unsigned char* data, int count ) | ||
78 | { | ||
79 | int i; | ||
80 | for (i=0; i < count; i++) { | ||
81 | while ((LCDSTAT & 3) != 3); | ||
82 | LCDDATA = data[i]; | ||
83 | } | ||
84 | } | ||
85 | |||
86 | /*** hardware configuration ***/ | ||
87 | |||
88 | int lcd_default_contrast(void) | ||
89 | { | ||
90 | return 45; | ||
91 | } | ||
92 | |||
93 | void lcd_set_contrast(int val) | ||
94 | { | ||
95 | lcd_write_command(LCD_CNTL_CONTRAST); | ||
96 | lcd_write_command(val); | ||
97 | } | ||
98 | |||
99 | void lcd_set_invert_display(bool yesno) | ||
100 | { | ||
101 | if (yesno) | ||
102 | lcd_write_command(LCD_SET_REVERSE_DISPLAY); | ||
103 | else | ||
104 | lcd_write_command(LCD_SET_NORMAL_DISPLAY); | ||
105 | } | ||
106 | |||
107 | /* turn the display upside down (call lcd_update() afterwards) */ | ||
108 | void lcd_set_flip(bool yesno) | ||
109 | { | ||
110 | if (yesno) | ||
111 | { | ||
112 | lcd_write_command(LCD_SET_SEGMENT_REMAP); | ||
113 | lcd_write_command(LCD_SET_COM_OUTPUT_SCAN_DIRECTION); | ||
114 | } | ||
115 | else | ||
116 | { | ||
117 | lcd_write_command(LCD_SET_SEGMENT_REMAP | 0x01); | ||
118 | lcd_write_command(LCD_SET_COM_OUTPUT_SCAN_DIRECTION | 0x08); | ||
119 | } | ||
120 | } | ||
121 | |||
122 | void lcd_init_device(void) | ||
123 | { | ||
124 | LCDREG10 = 0xf; | ||
125 | LCDREG04 = 0x4084; | ||
126 | |||
127 | /* inits like the original firmware */ | ||
128 | lcd_write_command(LCD_SOFTWARE_RESET); | ||
129 | lcd_write_command(LCD_SET_INTERNAL_REGULATOR_RESISTOR_RATIO + 4); | ||
130 | lcd_write_command(LCD_SET_LCD_BIAS); | ||
131 | lcd_write_command(LCD_SET_POWER_CONTROL_REGISTER + 7); | ||
132 | /* power control register: op-amp=1, regulator=1, booster=1 */ | ||
133 | lcd_write_command(LCD_SET_DISPLAY_ON); | ||
134 | lcd_write_command(LCD_SET_NORMAL_DISPLAY); | ||
135 | lcd_set_flip(false); | ||
136 | lcd_write_command(LCD_SET_DISPLAY_START_LINE + 0); | ||
137 | lcd_set_contrast(lcd_default_contrast()); | ||
138 | lcd_write_command(LCD_SET_PAGE_ADDRESS); | ||
139 | lcd_write_command(LCD_SET_LOWER_COLUMN_ADDRESS + 0); | ||
140 | lcd_write_command(LCD_SET_HIGHER_COLUMN_ADDRESS + 0); | ||
141 | |||
142 | lcd_clear_display(); | ||
143 | lcd_update(); | ||
144 | } | ||
145 | |||
146 | /*** Update functions ***/ | ||
147 | |||
148 | /* Performance function that works with an external buffer | ||
149 | note that by and bheight are in 8-pixel units! */ | ||
150 | void lcd_blit_mono(const unsigned char *data, int x, int by, int width, | ||
151 | int bheight, int stride) | ||
152 | { | ||
153 | /* Copy display bitmap to hardware */ | ||
154 | while (bheight--) | ||
155 | { | ||
156 | lcd_write_command (LCD_CNTL_PAGE | (by++ & 0xf)); | ||
157 | lcd_write_command (LCD_CNTL_HIGHCOL | (((x+4)>>4) & 0xf)); | ||
158 | lcd_write_command (LCD_CNTL_LOWCOL | ((x+4) & 0xf)); | ||
159 | |||
160 | lcd_write_data(data, width); | ||
161 | data += stride; | ||
162 | } | ||
163 | } | ||
164 | |||
165 | |||
166 | /* Performance function that works with an external buffer | ||
167 | note that by and bheight are in 8-pixel units! */ | ||
168 | void lcd_blit_grey_phase(unsigned char *values, unsigned char *phases, | ||
169 | int x, int by, int width, int bheight, int stride) | ||
170 | { | ||
171 | (void)values; | ||
172 | (void)phases; | ||
173 | (void)x; | ||
174 | (void)by; | ||
175 | (void)width; | ||
176 | (void)bheight; | ||
177 | (void)stride; | ||
178 | } | ||
179 | |||
180 | /* Update the display. | ||
181 | This must be called after all other LCD functions that change the display. */ | ||
182 | void lcd_update(void) ICODE_ATTR; | ||
183 | void lcd_update(void) | ||
184 | { | ||
185 | int y; | ||
186 | |||
187 | /* Copy display bitmap to hardware */ | ||
188 | for (y = 0; y < LCD_FBHEIGHT; y++) | ||
189 | { | ||
190 | lcd_write_command (LCD_CNTL_PAGE | (y & 0xf)); | ||
191 | lcd_write_command (LCD_CNTL_HIGHCOL); | ||
192 | lcd_write_command (LCD_CNTL_LOWCOL | 4); | ||
193 | |||
194 | lcd_write_data (FBADDR(0, y), LCD_WIDTH); | ||
195 | } | ||
196 | } | ||
197 | |||
198 | /* Update a fraction of the display. */ | ||
199 | void lcd_update_rect(int, int, int, int) ICODE_ATTR; | ||
200 | void lcd_update_rect(int x, int y, int width, int height) | ||
201 | { | ||
202 | int ymax; | ||
203 | |||
204 | /* The Y coordinates have to work on even 8 pixel rows */ | ||
205 | ymax = (y + height-1) >> 3; | ||
206 | y >>= 3; | ||
207 | |||
208 | if(x + width > LCD_WIDTH) | ||
209 | width = LCD_WIDTH - x; | ||
210 | if (width <= 0) | ||
211 | return; /* nothing left to do, 0 is harmful to lcd_write_data() */ | ||
212 | if(ymax >= LCD_FBHEIGHT) | ||
213 | ymax = LCD_FBHEIGHT-1; | ||
214 | |||
215 | /* Copy specified rectange bitmap to hardware */ | ||
216 | for (; y <= ymax; y++) | ||
217 | { | ||
218 | lcd_write_command (LCD_CNTL_PAGE | (y & 0xf)); | ||
219 | lcd_write_command (LCD_CNTL_HIGHCOL | (((x+4) >> 4) & 0xf)); | ||
220 | lcd_write_command (LCD_CNTL_LOWCOL | ((x+4) & 0xf)); | ||
221 | |||
222 | lcd_write_data (FBADDR(x,y), width); | ||
223 | } | ||
224 | } | ||
diff --git a/firmware/target/arm/pnx0101/iriver-ifp7xx/power-ifp7xx.c b/firmware/target/arm/pnx0101/iriver-ifp7xx/power-ifp7xx.c deleted file mode 100644 index 1fd9d68028..0000000000 --- a/firmware/target/arm/pnx0101/iriver-ifp7xx/power-ifp7xx.c +++ /dev/null | |||
@@ -1,76 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2002 by Linus Nielsen Feltzing | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | #include "config.h" | ||
22 | #include "cpu.h" | ||
23 | #include <stdbool.h> | ||
24 | #include "kernel.h" | ||
25 | #include "system.h" | ||
26 | #include "power.h" | ||
27 | #include "logf.h" | ||
28 | #include "usb.h" | ||
29 | |||
30 | #if CONFIG_TUNER | ||
31 | |||
32 | bool tuner_power(bool status) | ||
33 | { | ||
34 | (void)status; | ||
35 | return true; | ||
36 | } | ||
37 | |||
38 | #endif /* #if CONFIG_TUNER */ | ||
39 | |||
40 | #ifndef SIMULATOR | ||
41 | |||
42 | void power_init(void) | ||
43 | { | ||
44 | } | ||
45 | |||
46 | void ide_power_enable(bool on) | ||
47 | { | ||
48 | (void)on; | ||
49 | /* no ide controller */ | ||
50 | } | ||
51 | |||
52 | bool ide_powered(void) | ||
53 | { | ||
54 | return true; /* pretend always powered if not controlable */ | ||
55 | } | ||
56 | |||
57 | void power_off(void) | ||
58 | { | ||
59 | disable_interrupt(IRQ_FIQ_STATUS); | ||
60 | GPIO1_CLR = 1 << 16; | ||
61 | GPIO2_SET = 1; | ||
62 | while(1); | ||
63 | } | ||
64 | |||
65 | #else | ||
66 | |||
67 | void power_off(void) | ||
68 | { | ||
69 | } | ||
70 | |||
71 | void ide_power_enable(bool on) | ||
72 | { | ||
73 | (void)on; | ||
74 | } | ||
75 | |||
76 | #endif /* SIMULATOR */ | ||
diff --git a/firmware/target/arm/pnx0101/iriver-ifp7xx/powermgmt-ifp7xx.c b/firmware/target/arm/pnx0101/iriver-ifp7xx/powermgmt-ifp7xx.c deleted file mode 100644 index 4ce90a4c4f..0000000000 --- a/firmware/target/arm/pnx0101/iriver-ifp7xx/powermgmt-ifp7xx.c +++ /dev/null | |||
@@ -1,55 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2002 by Heikki Hannikainen, Uwe Freese | ||
11 | * Revisions copyright (C) 2005 by Gerald Van Baren | ||
12 | * | ||
13 | * This program is free software; you can redistribute it and/or | ||
14 | * modify it under the terms of the GNU General Public License | ||
15 | * as published by the Free Software Foundation; either version 2 | ||
16 | * of the License, or (at your option) any later version. | ||
17 | * | ||
18 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
19 | * KIND, either express or implied. | ||
20 | * | ||
21 | ****************************************************************************/ | ||
22 | |||
23 | #include "config.h" | ||
24 | #include "adc.h" | ||
25 | #include "powermgmt.h" | ||
26 | |||
27 | const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT] = | ||
28 | { | ||
29 | 1050, 1150 | ||
30 | }; | ||
31 | |||
32 | const unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = | ||
33 | { | ||
34 | 1050, 1150 /* FIXME: just copied from above, was missing in powermgmt.c */ | ||
35 | }; | ||
36 | |||
37 | /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ | ||
38 | const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = | ||
39 | { | ||
40 | /* These values are the same as for Ondio divided by 3. */ | ||
41 | /* May need recalibration. */ | ||
42 | { 930, 1080, 1140, 1180, 1210, 1250, 1280, 1320, 1360, 1420, 1580 }, /* alkaline */ | ||
43 | { 1030, 1180, 1210, 1230, 1240, 1250, 1260, 1270, 1280, 1290, 1350 } /* NiMH */ | ||
44 | }; | ||
45 | |||
46 | /* TODO: only roughly correct */ | ||
47 | #define BATTERY_SCALE_FACTOR 3072 | ||
48 | /* full-scale ADC readout (2^10) in millivolt */ | ||
49 | |||
50 | /* Returns battery voltage from ADC [millivolts] */ | ||
51 | int _battery_voltage(void) | ||
52 | { | ||
53 | return (adc_read(ADC_UNREG_POWER) * BATTERY_SCALE_FACTOR) >> 10; | ||
54 | } | ||
55 | |||
diff --git a/firmware/target/arm/pnx0101/iriver-ifp7xx/system-target.h b/firmware/target/arm/pnx0101/iriver-ifp7xx/system-target.h deleted file mode 100644 index 9aad4a7b74..0000000000 --- a/firmware/target/arm/pnx0101/iriver-ifp7xx/system-target.h +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2002 by Alan Korr | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | #ifndef SYSTEM_TARGET_H | ||
22 | #define SYSTEM_TARGET_H | ||
23 | |||
24 | #include "system-arm.h" | ||
25 | |||
26 | #define CPUFREQ_DEFAULT 12000000 | ||
27 | #define CPUFREQ_NORMAL 48000000 | ||
28 | #define CPUFREQ_MAX 60000000 | ||
29 | |||
30 | typedef void (*interrupt_handler_t)(void); | ||
31 | |||
32 | void irq_set_int_handler(int n, interrupt_handler_t handler); | ||
33 | void irq_enable_int(int n); | ||
34 | void irq_disable_int(int n); | ||
35 | |||
36 | #endif /* SYSTEM_TARGET_H */ | ||
diff --git a/firmware/target/arm/pnx0101/iriver-ifp7xx/usb-ifp7xx.c b/firmware/target/arm/pnx0101/iriver-ifp7xx/usb-ifp7xx.c deleted file mode 100644 index 0bfcdf3b1a..0000000000 --- a/firmware/target/arm/pnx0101/iriver-ifp7xx/usb-ifp7xx.c +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2006 by Barry Wardell | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | #include "config.h" | ||
22 | #include "cpu.h" | ||
23 | #include "kernel.h" | ||
24 | #include "thread.h" | ||
25 | #include "system.h" | ||
26 | #include "debug.h" | ||
27 | #include "ata.h" | ||
28 | #include "disk.h" | ||
29 | #include "panic.h" | ||
30 | #include "lcd.h" | ||
31 | #include "usb.h" | ||
32 | #include "button.h" | ||
33 | #include "string.h" | ||
34 | |||
35 | void usb_init_device(void) | ||
36 | { | ||
37 | } | ||
38 | |||
39 | int usb_detect(void) | ||
40 | { | ||
41 | /* TODO: Implement USB_ISP1582 */ | ||
42 | return USB_EXTRACTED; | ||
43 | } | ||
44 | |||
45 | void usb_enable(bool on) | ||
46 | { | ||
47 | /* TODO: Implement USB_ISP1582 */ | ||
48 | (void)on; | ||
49 | } | ||