summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/SOURCES8
-rw-r--r--firmware/export/config.h4
-rw-r--r--firmware/export/config/tatungtpj1022.h151
-rw-r--r--firmware/target/arm/pp/system-pp502x.c2
-rw-r--r--firmware/target/arm/pp/system-target.h8
-rw-r--r--firmware/target/arm/pp/usb-fw-pp502x.c6
-rw-r--r--firmware/target/arm/tatung/app.lds2
-rw-r--r--firmware/target/arm/tatung/boot.lds2
-rw-r--r--firmware/target/arm/tatung/tpj1022/adc-target.h35
-rw-r--r--firmware/target/arm/tatung/tpj1022/backlight-target.h31
-rw-r--r--firmware/target/arm/tatung/tpj1022/backlight-tpj1022.c46
-rw-r--r--firmware/target/arm/tatung/tpj1022/button-target.h51
-rw-r--r--firmware/target/arm/tatung/tpj1022/button-tpj1022.c49
-rw-r--r--firmware/target/arm/tatung/tpj1022/lcd-tpj1022.c85
-rw-r--r--firmware/target/arm/tatung/tpj1022/power-tpj1022.c63
-rw-r--r--firmware/target/arm/tatung/tpj1022/powermgmt-tpj1022.c62
16 files changed, 0 insertions, 605 deletions
diff --git a/firmware/SOURCES b/firmware/SOURCES
index e2f7e26f84..87db67d8fd 100644
--- a/firmware/SOURCES
+++ b/firmware/SOURCES
@@ -1301,14 +1301,6 @@ target/arm/olympus/mrobe-100/power-mr100.c
1301target/arm/olympus/mrobe-100/powermgmt-mr100.c 1301target/arm/olympus/mrobe-100/powermgmt-mr100.c
1302#endif /* MROBE_100 */ 1302#endif /* MROBE_100 */
1303 1303
1304#ifdef TATUNG_TPJ1022
1305target/arm/tatung/tpj1022/backlight-tpj1022.c
1306target/arm/tatung/tpj1022/button-tpj1022.c
1307target/arm/tatung/tpj1022/lcd-tpj1022.c
1308target/arm/tatung/tpj1022/power-tpj1022.c
1309target/arm/tatung/tpj1022/powermgmt-tpj1022.c
1310#endif /* TATUNG_TPJ1022 */
1311
1312#ifdef IPOD_4G 1304#ifdef IPOD_4G
1313target/arm/ipod/backlight-4g_color.c 1305target/arm/ipod/backlight-4g_color.c
1314target/arm/ipod/button-clickwheel.c 1306target/arm/ipod/button-clickwheel.c
diff --git a/firmware/export/config.h b/firmware/export/config.h
index 383677865f..5700fad37f 100644
--- a/firmware/export/config.h
+++ b/firmware/export/config.h
@@ -105,7 +105,6 @@
105#define IRIVER_H10_PAD 12 105#define IRIVER_H10_PAD 12
106#define SANSA_E200_PAD 13 106#define SANSA_E200_PAD 13
107#define SANSA_C200_PAD 14 107#define SANSA_C200_PAD 14
108#define TATUNG_TPJ1022_PAD 15
109#define MROBE100_PAD 17 108#define MROBE100_PAD 17
110#define MROBE500_PAD 18 109#define MROBE500_PAD 18
111#define GIGABEAT_S_PAD 19 110#define GIGABEAT_S_PAD 19
@@ -224,7 +223,6 @@
224#define LCD_GIGABEAT 12 223#define LCD_GIGABEAT 12
225#define LCD_H10_20GB 13 /* as used by iriver H10 20Gb */ 224#define LCD_H10_20GB 13 /* as used by iriver H10 20Gb */
226#define LCD_H10_5GB 14 /* as used by iriver H10 5Gb */ 225#define LCD_H10_5GB 14 /* as used by iriver H10 5Gb */
227#define LCD_TPJ1022 15 /* as used by Tatung Elio TPJ-1022 */
228#define LCD_C200 17 /* as used by Sandisk Sansa c200 */ 226#define LCD_C200 17 /* as used by Sandisk Sansa c200 */
229#define LCD_MROBE500 18 /* as used by Olympus M:Robe 500i */ 227#define LCD_MROBE500 18 /* as used by Olympus M:Robe 500i */
230#define LCD_MROBE100 19 /* as used by Olympus M:Robe 100 */ 228#define LCD_MROBE100 19 /* as used by Olympus M:Robe 100 */
@@ -425,8 +423,6 @@ Lyre prototype 1 */
425#include "config/sansae200.h" 423#include "config/sansae200.h"
426#elif defined(SANSA_C200) 424#elif defined(SANSA_C200)
427#include "config/sansac200.h" 425#include "config/sansac200.h"
428#elif defined(TATUNG_TPJ1022)
429#include "config/tatungtpj1022.h"
430#elif defined(MROBE_100) 426#elif defined(MROBE_100)
431#include "config/mrobe100.h" 427#include "config/mrobe100.h"
432#elif defined(MROBE_500) 428#elif defined(MROBE_500)
diff --git a/firmware/export/config/tatungtpj1022.h b/firmware/export/config/tatungtpj1022.h
deleted file mode 100644
index 3865e8f87f..0000000000
--- a/firmware/export/config/tatungtpj1022.h
+++ /dev/null
@@ -1,151 +0,0 @@
1/*
2 * This config file is for the Tatung Elio TPJ-1022
3 */
4
5#define MODEL_NAME "Tatung Elio TPJ-1022"
6
7/* For Rolo and boot loader */
8#define MODEL_NUMBER 15
9
10/* define this if you use an ATA controller */
11#define CONFIG_STORAGE STORAGE_ATA
12
13/*define this if the ATA controller and method of USB access support LBA48 */
14#define HAVE_LBA48
15
16/* define this if you have recording possibility */
17/*#define HAVE_RECORDING*/ /* TODO: add support for this */
18
19/* define the bitmask of hardware sample rates */
20#define HW_SAMPR_CAPS (SAMPR_CAP_96 | SAMPR_CAP_88 | SAMPR_CAP_48 | \
21 SAMPR_CAP_44 | SAMPR_CAP_32 | SAMPR_CAP_8)
22
23/* define the bitmask of recording sample rates
24#define REC_SAMPR_CAPS (SAMPR_CAP_96 | SAMPR_CAP_88 | SAMPR_CAP_48 | \
25 SAMPR_CAP_44 | SAMPR_CAP_32 | SAMPR_CAP_8) */
26
27
28
29
30/* define this if you have a colour LCD */
31#define HAVE_LCD_COLOR
32
33/* define this if you have access to the quickscreen */
34#define HAVE_QUICKSCREEN
35
36/* LCD dimensions */
37#define LCD_WIDTH 220
38#define LCD_HEIGHT 176
39/* sqrt(220^2 + 176^2) / 2.2 = 128.1 */
40#define LCD_DPI 128
41#define LCD_DEPTH 16 /* 65536 colours */
42#define LCD_PIXELFORMAT RGB565
43
44/* #define IRAM_LCDFRAMEBUFFER IDATA_ATTR *//* put the lcd frame buffer in IRAM */
45
46#define CONFIG_KEYPAD TATUNG_TPJ1022_PAD
47
48
49
50
51/* define this if you have a real-time clock */
52#ifndef BOOTLOADER
53//#define CONFIG_RTC RTC_E8564
54#endif
55
56/* Define this if you have a software controlled poweroff */
57#define HAVE_SW_POWEROFF
58
59/* The number of bytes reserved for loadable codecs */
60#define CODEC_SIZE 0x100000
61
62/* The number of bytes reserved for loadable plugins */
63#define PLUGIN_BUFFER_SIZE 0x80000
64
65/* Define this if you have the WM8731 audio codec */
66#define HAVE_WM8731
67
68#define AB_REPEAT_ENABLE
69
70/* define this if you have a disk storage, i.e. something
71 that needs spinups and can cause skips when shaked */
72#define HAVE_DISK_STORAGE
73
74/* Define this for LCD backlight available */
75#define HAVE_BACKLIGHT
76
77#define BATTERY_CAPACITY_DEFAULT 1550 /* default battery capacity
78 TODO: check this, probably different
79 for different models too */
80#define BATTERY_CAPACITY_MIN 1500 /* min. capacity selectable */
81#define BATTERY_CAPACITY_MAX 1600 /* max. capacity selectable */
82#define BATTERY_CAPACITY_INC 10 /* capacity increment */
83#define BATTERY_TYPES_COUNT 1 /* only one type */
84
85#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
86
87/* Hardware controlled charging? FIXME */
88#define CONFIG_CHARGING CHARGING_SIMPLE
89
90/* define this if the unit can be powered or charged via USB */
91/*#define HAVE_USB_POWER*/
92
93/* Define this if you have a PortalPlayer PP5020 */
94#define CONFIG_CPU PP5020
95
96/* Define this if you want to use the PP5020 i2c interface */
97#define CONFIG_I2C I2C_PP5020
98
99/* define this if the hardware can be powered off while charging */
100/* TODO: should this be set for the H10? */
101//#define HAVE_POWEROFF_WHILE_CHARGING
102
103/* The start address index for ROM builds */
104#define ROM_START 0x00000000
105
106/* Define this to the CPU frequency */
107/* TODO: this is probably wrong */
108#define CPU_FREQ 11289600
109
110/* Type of LCD */
111#define CONFIG_LCD LCD_TPJ1022
112
113#define DEFAULT_CONTRAST_SETTING 19
114
115/* Offset ( in the firmware file's header ) to the file length */
116#define FIRMWARE_OFFSET_FILE_LENGTH 0
117
118/* Offset ( in the firmware file's header ) to the file CRC */
119#define FIRMWARE_OFFSET_FILE_CRC 0
120
121/* Offset ( in the firmware file's header ) to the real data */
122#define FIRMWARE_OFFSET_FILE_DATA 8
123
124/* USB On-the-go */
125#define CONFIG_USBOTG USBOTG_ARC
126
127/* define this if the unit can be powered or charged via USB */
128#define HAVE_USB_POWER
129
130/* enable these for the experimental usb stack ROOLKU */
131#define HAVE_USBSTACK
132#define USB_VENDOR_ID 0x07B4
133#define USB_PRODUCT_ID 0x0280
134
135/* Define this if you have adjustable CPU frequency */
136#define HAVE_ADJUSTABLE_CPU_FREQ
137
138#define BOOTFILE_EXT "elio"
139#define BOOTFILE "rockbox." BOOTFILE_EXT
140#define BOOTDIR "/.rockbox"
141
142
143/* DMA is used only for reading on PP502x because although reads are ~8x faster
144 * writes appear to be ~25% slower.
145 */
146#ifndef BOOTLOADER
147#define HAVE_ATA_DMA
148#endif
149
150/* Define this if a programmable hotkey is mapped */
151//#define HAVE_HOTKEY
diff --git a/firmware/target/arm/pp/system-pp502x.c b/firmware/target/arm/pp/system-pp502x.c
index d6dfad1b24..fb6fe28d91 100644
--- a/firmware/target/arm/pp/system-pp502x.c
+++ b/firmware/target/arm/pp/system-pp502x.c
@@ -559,8 +559,6 @@ void system_init(void)
559 /* to be done */ 559 /* to be done */
560#elif defined (MROBE_100) 560#elif defined (MROBE_100)
561 /* to be done */ 561 /* to be done */
562#elif defined (TATUNG_TPJ1022)
563 /* to be done */
564#elif defined(PBELL_VIBE500) 562#elif defined(PBELL_VIBE500)
565 /* reset all allowed devices */ 563 /* reset all allowed devices */
566 DEV_RS = 0x3ffffef8; 564 DEV_RS = 0x3ffffef8;
diff --git a/firmware/target/arm/pp/system-target.h b/firmware/target/arm/pp/system-target.h
index 1e947195bd..b00374e40e 100644
--- a/firmware/target/arm/pp/system-target.h
+++ b/firmware/target/arm/pp/system-target.h
@@ -175,14 +175,6 @@ extern unsigned char probed_ramsize;
175int battery_default_capacity(void); 175int battery_default_capacity(void);
176#endif 176#endif
177 177
178
179#ifdef BOOTLOADER
180#if defined(TATUNG_TPJ1022)
181 /* Some targets don't like yielding in the bootloader - force
182 * yield() to return without a context switch. */
183#define YIELD_KERNEL_HOOK() true
184#endif
185
186#ifdef HAVE_BOOTLOADER_USB_MODE 178#ifdef HAVE_BOOTLOADER_USB_MODE
187void tick_stop(void); 179void tick_stop(void);
188void system_prepare_fw_start(void); 180void system_prepare_fw_start(void);
diff --git a/firmware/target/arm/pp/usb-fw-pp502x.c b/firmware/target/arm/pp/usb-fw-pp502x.c
index b0fcfb83a4..a4d8e28a06 100644
--- a/firmware/target/arm/pp/usb-fw-pp502x.c
+++ b/firmware/target/arm/pp/usb-fw-pp502x.c
@@ -81,12 +81,6 @@
81#define USB_GPIO_MASK 0x10 81#define USB_GPIO_MASK 0x10
82#define USB_GPIO_VAL 0x10 82#define USB_GPIO_VAL 0x10
83 83
84#elif defined(TATUNG_TPJ1022)
85 /* GPIO ? bit ? is usb detect (dummy value)*/
86#define USB_GPIO GPIOD
87#define USB_GPIO_MASK 0x10
88#define USB_GPIO_VAL 0x10
89
90#elif defined(PBELL_VIBE500) 84#elif defined(PBELL_VIBE500)
91 /* GPIO L bit 3 is usb detect */ 85 /* GPIO L bit 3 is usb detect */
92#define USB_GPIO GPIOL 86#define USB_GPIO GPIOL
diff --git a/firmware/target/arm/tatung/app.lds b/firmware/target/arm/tatung/app.lds
deleted file mode 100644
index 856cc52bb0..0000000000
--- a/firmware/target/arm/tatung/app.lds
+++ /dev/null
@@ -1,2 +0,0 @@
1#include "config.h"
2#include "../pp/app-pp.lds"
diff --git a/firmware/target/arm/tatung/boot.lds b/firmware/target/arm/tatung/boot.lds
deleted file mode 100644
index 33b826bec8..0000000000
--- a/firmware/target/arm/tatung/boot.lds
+++ /dev/null
@@ -1,2 +0,0 @@
1#include "config.h"
2#include "../pp/boot-pp.lds"
diff --git a/firmware/target/arm/tatung/tpj1022/adc-target.h b/firmware/target/arm/tatung/tpj1022/adc-target.h
deleted file mode 100644
index 026bb58089..0000000000
--- a/firmware/target/arm/tatung/tpj1022/adc-target.h
+++ /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#ifndef _ADC_TARGET_H_
22#define _ADC_TARGET_H_
23
24#define NUM_ADC_CHANNELS 4
25
26#define ADC_BATTERY 0
27#define ADC_UNKNOWN_1 1
28#define ADC_UNKNOWN_2 2
29#define ADC_SCROLLPAD 3
30#define ADC_UNREG_POWER ADC_BATTERY /* For compatibility */
31
32/* Force a scan now */
33unsigned short adc_scan(int channel);
34
35#endif
diff --git a/firmware/target/arm/tatung/tpj1022/backlight-target.h b/firmware/target/arm/tatung/tpj1022/backlight-target.h
deleted file mode 100644
index 4a5e677599..0000000000
--- a/firmware/target/arm/tatung/tpj1022/backlight-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
22/* Taken from the x5's implementation */
23
24#ifndef BACKLIGHT_TARGET_H
25#define BACKLIGHT_TARGET_H
26
27#define backlight_hw_init() true
28void backlight_hw_on(void);
29void backlight_hw_off(void);
30
31#endif
diff --git a/firmware/target/arm/tatung/tpj1022/backlight-tpj1022.c b/firmware/target/arm/tatung/tpj1022/backlight-tpj1022.c
deleted file mode 100644
index d63387728b..0000000000
--- a/firmware/target/arm/tatung/tpj1022/backlight-tpj1022.c
+++ /dev/null
@@ -1,46 +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/* The H10 display (and hence backlight) possibly identical to that of the X5,
23 so that code was used here but left #if 0'ed out for the moment */
24
25#include "config.h"
26#include "cpu.h"
27#include "system.h"
28#include "backlight.h"
29
30void backlight_hw_on(void)
31{
32#if 0
33 int level = disable_irq_save();
34 pcf50606_write(0x38, 0xb0); /* Backlight ON, GPO1INV=1, GPO1ACT=011 */
35 restore_irq(level);
36#endif
37}
38
39void backlight_hw_off(void)
40{
41#if 0
42 int level = disable_irq_save();
43 pcf50606_write(0x38, 0x80); /* Backlight OFF, GPO1INV=1, GPO1ACT=000 */
44 restore_irq(level);
45#endif
46}
diff --git a/firmware/target/arm/tatung/tpj1022/button-target.h b/firmware/target/arm/tatung/tpj1022/button-target.h
deleted file mode 100644
index 1143c1b1da..0000000000
--- a/firmware/target/arm/tatung/tpj1022/button-target.h
+++ /dev/null
@@ -1,51 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2006 by Robert Kukla
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#ifndef _BUTTON_TARGET_H_
23#define _BUTTON_TARGET_H_
24
25#define HAS_BUTTON_HOLD
26
27/* Main unit's buttons */
28
29#define BUTTON_VOL_DOWN 0x00000001
30
31/* bit position in GPIOA */
32#define BUTTON_REW 0x00000002
33#define BUTTON_FF 0x00000004
34#define BUTTON_POWER 0x00000008
35#define BUTTON_UP 0x00000010
36#define BUTTON_DOWN 0x00000020
37#define BUTTON_AB 0x00000040
38#define BUTTON_RIGHT 0x00000080
39
40/* still unknown */
41#define BUTTON_MENU 0x00000100
42#define BUTTON_REC 0x00000200
43#define BUTTON_VOL_UP 0x00000400
44#define BUTTON_LEFT 0x00000800
45
46#define BUTTON_MAIN 0x00000FFF
47
48#define POWEROFF_BUTTON BUTTON_POWER
49#define POWEROFF_COUNT 10
50
51#endif /* _BUTTON_TARGET_H_ */
diff --git a/firmware/target/arm/tatung/tpj1022/button-tpj1022.c b/firmware/target/arm/tatung/tpj1022/button-tpj1022.c
deleted file mode 100644
index ce9d7ab24d..0000000000
--- a/firmware/target/arm/tatung/tpj1022/button-tpj1022.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 Robert Kukla
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#include "system.h"
23#include "button.h"
24
25bool button_hold(void)
26{
27 return (GPIOK_INPUT_VAL & 0x40) ? true : false;
28}
29
30int button_read_device(void)
31{
32 int btn = BUTTON_NONE;
33
34 if (!button_hold())
35 {
36 btn = (GPIOA_INPUT_VAL & 0xfe) ^ 0xfe;
37
38 if ((GPIOK_INPUT_VAL & 0x20) == 0) btn |= BUTTON_VOL_DOWN;
39
40 /* to be found
41 if ((GPIO?_INPUT_VAL & 0x??) == 0) btn |= BUTTON_MENU;
42 if ((GPIO?_INPUT_VAL & 0x??) == 0) btn |= BUTTON_REC;
43 if ((GPIO?_INPUT_VAL & 0x??) == 0) btn |= BUTTON_VOL_UP;
44 if ((GPIO?_INPUT_VAL & 0x??) == 0) btn |= BUTTON_LEFT;
45 */
46 }
47
48 return btn;
49}
diff --git a/firmware/target/arm/tatung/tpj1022/lcd-tpj1022.c b/firmware/target/arm/tatung/tpj1022/lcd-tpj1022.c
deleted file mode 100644
index bf29ba092e..0000000000
--- a/firmware/target/arm/tatung/tpj1022/lcd-tpj1022.c
+++ /dev/null
@@ -1,85 +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 "lcd.h"
24#include "kernel.h"
25#include "system.h"
26
27/*** hardware configuration ***/
28
29void lcd_set_contrast(int val)
30{
31 /* TODO: Implement lcd_set_contrast() */
32 (void)val;
33}
34
35void lcd_set_invert_display(bool yesno)
36{
37 /* TODO: Implement lcd_set_invert_display() */
38 (void)yesno;
39}
40
41/* turn the display upside down (call lcd_update() afterwards) */
42void lcd_set_flip(bool yesno)
43{
44 /* TODO: Implement lcd_set_flip() */
45 (void)yesno;
46}
47
48/* LCD init */
49void lcd_init_device(void)
50{
51
52}
53
54/*** update functions ***/
55
56/* Performance function to blit a YUV bitmap directly to the LCD */
57void lcd_blit_yuv(unsigned char * const src[3],
58 int src_x, int src_y, int stride,
59 int x, int y, int width, int height)
60{
61 (void)src;
62 (void)src_x;
63 (void)src_y;
64 (void)stride;
65 (void)x;
66 (void)y;
67 (void)width;
68 (void)height;
69}
70
71/* Update a fraction of the display. */
72void lcd_update_rect(int x0, int y0, int width, int height)
73{
74 (void)x0;
75 (void)y0;
76 (void)width;
77 (void)height;
78}
79
80/* Update the display.
81 This must be called after all other LCD functions that change the display. */
82void lcd_update(void)
83{
84 lcd_update_rect(0, 0, LCD_WIDTH, LCD_HEIGHT);
85}
diff --git a/firmware/target/arm/tatung/tpj1022/power-tpj1022.c b/firmware/target/arm/tatung/tpj1022/power-tpj1022.c
deleted file mode 100644
index fa46f34daa..0000000000
--- a/firmware/target/arm/tatung/tpj1022/power-tpj1022.c
+++ /dev/null
@@ -1,63 +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/* Created from power.c using some iPod code, and some custom stuff based on
23 GPIO analysis
24*/
25
26#include "config.h"
27#include "cpu.h"
28#include <stdbool.h>
29#include "kernel.h"
30#include "system.h"
31#include "power.h"
32#include "logf.h"
33#include "usb.h"
34
35void power_init(void)
36{
37}
38
39unsigned int power_input_status(void)
40{
41 return POWER_INPUT_NONE;
42}
43
44void ide_power_enable(bool on)
45{
46 (void)on;
47 /* We do nothing on the iPod */
48}
49
50
51bool ide_powered(void)
52{
53 /* pretend we are always powered - we don't turn it off on the ipod */
54 return true;
55}
56
57void power_off(void)
58{
59 /* Give things a second to settle before cutting power */
60 sleep(HZ);
61
62 //GPIOF_OUTPUT_VAL &=~ 0x20;
63}
diff --git a/firmware/target/arm/tatung/tpj1022/powermgmt-tpj1022.c b/firmware/target/arm/tatung/tpj1022/powermgmt-tpj1022.c
deleted file mode 100644
index cc91012fcd..0000000000
--- a/firmware/target/arm/tatung/tpj1022/powermgmt-tpj1022.c
+++ /dev/null
@@ -1,62 +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/* FIXME: All voltages copied from H10 according to the battery type given
28 * in config-tpj1022.h at the time of splitting. This probably needs changing
29 * if that port ever gets up to speed. */
30
31const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT] =
32{
33 3760
34};
35
36const unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] =
37{
38 3650
39};
40
41/* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */
42const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] =
43{
44 { 3760, 3800, 3850, 3870, 3900, 3950, 4020, 4070, 4110, 4180, 4240 }
45};
46
47#if CONFIG_CHARGING
48/* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
49const unsigned short percent_to_volt_charge[11] =
50{
51 3990, 4030, 4060, 4080, 4100, 4120, 4150, 4180, 4220, 4260, 4310
52};
53#endif /* CONFIG_CHARGING */
54
55#define BATTERY_SCALE_FACTOR 6000
56/* full-scale ADC readout (2^10) in millivolt */
57
58/* Returns battery voltage from ADC [millivolts] */
59int _battery_voltage(void)
60{
61 return (adc_read(ADC_UNREG_POWER) * BATTERY_SCALE_FACTOR) >> 10;
62}