summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2021-08-14 16:28:30 -0400
committerSolomon Peachy <pizza@shaftnet.org>2021-08-14 16:29:39 -0400
commit04fe77a4654d43bf4fe07831d25c8ab92f054b65 (patch)
tree85e5868961b42acf72d496af63c2bf8947a46ac3
parent786d06742a379df667b0fd14df0b2dbc045f312c (diff)
downloadrockbox-04fe77a4654d43bf4fe07831d25c8ab92f054b65.tar.gz
rockbox-04fe77a4654d43bf4fe07831d25c8ab92f054b65.zip
Remove the (very) incomplete port for the Tatung TPJ-1102
It was barely even a stub, and hasn't seen any development since 2009 Change-Id: I0aa15d9a7b90ae8c771924d9f401380d4cc0fab9
-rw-r--r--apps/plugins/blackjack.c16
-rw-r--r--apps/plugins/invadrox.c10
-rw-r--r--bootloader/SOURCES2
-rw-r--r--bootloader/tpj1022.c103
-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
-rw-r--r--tools/builds.pm4
-rwxr-xr-xtools/configure31
-rw-r--r--utils/themeeditor/resources/targetdb9
23 files changed, 4 insertions, 776 deletions
diff --git a/apps/plugins/blackjack.c b/apps/plugins/blackjack.c
index 24cfbe583c..3065802716 100644
--- a/apps/plugins/blackjack.c
+++ b/apps/plugins/blackjack.c
@@ -185,22 +185,6 @@ enum {
185#define BJACK_RIGHT BUTTON_RIGHT 185#define BJACK_RIGHT BUTTON_RIGHT
186#define BJACK_LEFT BUTTON_LEFT 186#define BJACK_LEFT BUTTON_LEFT
187 187
188#elif CONFIG_KEYPAD == TATUNG_TPJ1022_PAD
189#define BJACK_SELECT_NAME "MAIN"
190#define BJACK_STAY_NAME "MENU"
191#define BJACK_QUIT_NAME "POWER"
192#define BJACK_DOUBLE_NAME "DOWN"
193#define BJACK_SELECT BUTTON_MAIN
194#define BJACK_QUIT BUTTON_POWER
195#define BJACK_MAX (BUTTON_REC|BUTTON_UP)
196#define BJACK_MIN (BUTTON_REC|BUTTON_DOWN)
197#define BJACK_STAY BUTTON_MENU
198#define BJACK_DOUBLEDOWN BUTTON_DOWN
199#define BJACK_UP BUTTON_UP
200#define BJACK_DOWN BUTTON_DOWN
201#define BJACK_RIGHT BUTTON_RIGHT
202#define BJACK_LEFT BUTTON_LEFT
203
204#elif CONFIG_KEYPAD == GIGABEAT_S_PAD 188#elif CONFIG_KEYPAD == GIGABEAT_S_PAD
205#define BJACK_SELECT_NAME "PLAY" 189#define BJACK_SELECT_NAME "PLAY"
206#define BJACK_STAY_NAME "VOL-" 190#define BJACK_STAY_NAME "VOL-"
diff --git a/apps/plugins/invadrox.c b/apps/plugins/invadrox.c
index 5eedb6ffc5..a164b95cf0 100644
--- a/apps/plugins/invadrox.c
+++ b/apps/plugins/invadrox.c
@@ -141,14 +141,6 @@
141#define RIGHT BUTTON_RIGHT 141#define RIGHT BUTTON_RIGHT
142#define FIRE BUTTON_SELECT 142#define FIRE BUTTON_SELECT
143 143
144#elif CONFIG_KEYPAD == TATUNG_TPJ1022_PAD
145
146/* TODO: Figure out which buttons to use for Tatung Elio TPJ-1022 */
147#define QUIT BUTTON_AB
148#define LEFT BUTTON_LEFT
149#define RIGHT BUTTON_RIGHT
150#define FIRE BUTTON_MENU
151
152#elif CONFIG_KEYPAD == GIGABEAT_S_PAD 144#elif CONFIG_KEYPAD == GIGABEAT_S_PAD
153 145
154#define QUIT BUTTON_BACK 146#define QUIT BUTTON_BACK
@@ -617,7 +609,7 @@ CONFIG_KEYPAD == MROBE500_PAD
617 609
618#elif (LCD_WIDTH == 220) && (LCD_HEIGHT == 176) 610#elif (LCD_WIDTH == 220) && (LCD_HEIGHT == 176)
619 611
620/* TPJ1022, H300, iPod Color: 220x176x16 612/* H300, iPod Color: 220x176x16
621 * ============================ 613 * ============================
622 * X: 0p padding at left/right gives 220p playfield in middle. 614 * X: 0p padding at left/right gives 220p playfield in middle.
623 * 8p "border" gives 204p actual playfield. UFO use full 220p. 615 * 8p "border" gives 204p actual playfield. UFO use full 220p.
diff --git a/bootloader/SOURCES b/bootloader/SOURCES
index 86dd64d7d9..b721b12ce1 100644
--- a/bootloader/SOURCES
+++ b/bootloader/SOURCES
@@ -31,8 +31,6 @@ sansaview.c
31show_logo.c 31show_logo.c
32main-pp.c 32main-pp.c
33#endif 33#endif
34#elif defined(TATUNG_TPJ1022)
35tpj1022.c
36#elif defined(IAUDIO_X5) || defined(IAUDIO_M5) || defined(IAUDIO_M3) 34#elif defined(IAUDIO_X5) || defined(IAUDIO_M5) || defined(IAUDIO_M3)
37iaudio_coldfire.c 35iaudio_coldfire.c
38#elif defined(IRIVER_H100_SERIES) 36#elif defined(IRIVER_H100_SERIES)
diff --git a/bootloader/tpj1022.c b/bootloader/tpj1022.c
deleted file mode 100644
index 3590c7882d..0000000000
--- a/bootloader/tpj1022.c
+++ /dev/null
@@ -1,103 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2006 by Dave Chapman
11 *
12 * Based on Rockbox iriver bootloader by Linus Nielsen Feltzing
13 *
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License
16 * as published by the Free Software Foundation; either version 2
17 * of the License, or (at your option) any later version.
18 *
19 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
20 * KIND, either express or implied.
21 *
22 ****************************************************************************/
23#include "config.h"
24
25#include <stdlib.h>
26#include <stdio.h>
27#include <string.h>
28#include "cpu.h"
29#include "system.h"
30#include "lcd.h"
31#include "kernel.h"
32#include "thread.h"
33#include "storage.h"
34#include "file_internal.h"
35#include "disk.h"
36#include "font.h"
37#include "panic.h"
38#include "power.h"
39#include "file.h"
40#include "common.h"
41
42void* main(void)
43{
44 int i;
45 int rc;
46 int fd;
47 char buffer[80];
48 unsigned char* framebuffer = (unsigned char*)0x11e00000;
49
50#if 0
51 lcd_init();
52 font_init();
53
54 printf("Hello World!");
55#endif
56
57 i=storage_init();
58
59 filesystem_init();
60 rc = disk_mount_all();
61
62#if 0
63 /* Dump the flash */
64 fd=open("/flash.bin",O_CREAT|O_RDWR, 0666);
65 write(fd,(char*)0,1024*1024);
66 close(fd);
67#endif
68
69#if 1
70 /* Dump what may be the framebuffer */
71 fd=open("/framebuffer.bin",O_CREAT|O_RDWR|O_TRUNC, 0666);
72 write(fd,framebuffer,220*176*4);
73 close(fd);
74#endif
75
76
77 fd=open("/gpio.txt",O_CREAT|O_RDWR|O_TRUNC, 0666);
78 unsigned int gpio_a = GPIOA_INPUT_VAL;
79 unsigned int gpio_b = GPIOB_INPUT_VAL;
80 unsigned int gpio_c = GPIOC_INPUT_VAL;
81 unsigned int gpio_d = GPIOD_INPUT_VAL;
82 unsigned int gpio_e = GPIOE_INPUT_VAL;
83 unsigned int gpio_f = GPIOF_INPUT_VAL;
84 unsigned int gpio_g = GPIOG_INPUT_VAL;
85 unsigned int gpio_h = GPIOH_INPUT_VAL;
86 unsigned int gpio_i = GPIOI_INPUT_VAL;
87 unsigned int gpio_j = GPIOJ_INPUT_VAL;
88 unsigned int gpio_k = GPIOK_INPUT_VAL;
89 unsigned int gpio_l = GPIOL_INPUT_VAL;
90
91 snprintf(buffer, sizeof(buffer), "%02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n",gpio_a,gpio_b,gpio_c,gpio_d,gpio_e,gpio_f,gpio_g,gpio_h,gpio_i,gpio_j,gpio_k,gpio_l);
92 write(fd,buffer,strlen(buffer)+1);
93 close(fd);
94
95 /* Wait for FFWD button to be pressed */
96 while((GPIOA_INPUT_VAL & 0x04) != 0);
97
98
99 /* Now reboot */
100 DEV_RS |= 0x4;
101
102 return 0;
103}
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}
diff --git a/tools/builds.pm b/tools/builds.pm
index 037bd5c1f3..8de86ad388 100644
--- a/tools/builds.pm
+++ b/tools/builds.pm
@@ -321,10 +321,6 @@ $releasenotes="/wiki/ReleaseNotes315";
321 name => 'SanDisk Sansa View', 321 name => 'SanDisk Sansa View',
322 status => 1, 322 status => 1,
323 }, 323 },
324 'tatungtpj1022' => {
325 name => 'Tatung Elio TPJ-1022',
326 status => 1,
327 },
328 'vibe500' => { 324 'vibe500' => {
329 name => 'Packard Bell Vibe 500', 325 name => 'Packard Bell Vibe 500',
330 status => 3, 326 status => 3,
diff --git a/tools/configure b/tools/configure
index 91e7bb27be..a68e683cdd 100755
--- a/tools/configure
+++ b/tools/configure
@@ -1569,10 +1569,9 @@ cat <<EOF
1569 ==Samsung== 111) M6SP 61) Sansa View 1569 ==Samsung== 111) M6SP 61) Sansa View
1570 140) YH-820 112) M3 62) Sansa Clip+ 1570 140) YH-820 112) M3 62) Sansa Clip+
1571 141) YH-920 63) Sansa Fuze v2 1571 141) YH-920 63) Sansa Fuze v2
1572 142) YH-925 ==Tatung== 64) Sansa Fuze+ 1572 142) YH-925 64) Sansa Fuze+
1573 143) YP-S3 150) Elio TPJ-1022 65) Sansa Clip Zip 1573 143) YP-S3 65) Sansa Clip Zip
1574 66) Sansa Connect 1574 ==Packard Bell== 66) Sansa Connect
1575 ==Packard Bell==
1576 ==Application== 160) Vibe 500 1575 ==Application== 160) Vibe 500
1577 200) SDL 1576 200) SDL
1578 201) Android ==MPIO== 1577 201) Android ==MPIO==
@@ -2707,30 +2706,6 @@ fi
2707 arm926ejscc 2706 arm926ejscc
2708 ;; 2707 ;;
2709 2708
2710 150|tatungtpj1022)
2711 target_id=25
2712 modelname="tatungtpj1022"
2713 target="TATUNG_TPJ1022"
2714 memory=32 # always
2715 arm7tdmicc
2716 tool="$rootdir/tools/scramble -add tpj2"
2717 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
2718 bmp2rb_native="$rootdir/tools/bmp2rb -f 5"
2719 output="rockbox.elio"
2720 appextra="recorder:gui:radio"
2721 plugins="yes"
2722 boottool="$rootdir/tools/scramble -mi4v2"
2723 bootoutput="pp5020.mi4"
2724 # toolset is the tools within the tools directory that we build for
2725 # this particular target.
2726 toolset=$scramblebitmaptools
2727 # architecture, manufacturer and model for the target-tree build
2728 t_cpu="arm"
2729 t_soc="pp"
2730 t_manufacturer="tatung"
2731 t_model="tpj1022"
2732 ;;
2733
2734 100|gogearsa9200) 2709 100|gogearsa9200)
2735 target_id=41 2710 target_id=41
2736 modelname="gogearsa9200" 2711 modelname="gogearsa9200"
diff --git a/utils/themeeditor/resources/targetdb b/utils/themeeditor/resources/targetdb
index 5fab241371..4d94992953 100644
--- a/utils/themeeditor/resources/targetdb
+++ b/utils/themeeditor/resources/targetdb
@@ -814,15 +814,6 @@ sonynwzs750
814 record : no 814 record : no
815} 815}
816 816
817tatungtpj1022
818{
819 name : Tatung Elio TPJ-1022
820 screen : 220 x 176 @ rgb
821 remote : no
822 fm : no
823 record : no
824}
825
826gigabeats 817gigabeats
827{ 818{
828 name : Toshiba Gigabeat S 819 name : Toshiba Gigabeat S