diff options
Diffstat (limited to 'firmware/target/arm/tcc77x/m200')
-rw-r--r-- | firmware/target/arm/tcc77x/m200/adc-target.h | 28 | ||||
-rw-r--r-- | firmware/target/arm/tcc77x/m200/audio-m200.c | 38 | ||||
-rw-r--r-- | firmware/target/arm/tcc77x/m200/backlight-target.h | 44 | ||||
-rw-r--r-- | firmware/target/arm/tcc77x/m200/button-m200.c | 99 | ||||
-rw-r--r-- | firmware/target/arm/tcc77x/m200/button-target.h | 45 | ||||
-rw-r--r-- | firmware/target/arm/tcc77x/m200/power-m200.c | 43 |
6 files changed, 0 insertions, 297 deletions
diff --git a/firmware/target/arm/tcc77x/m200/adc-target.h b/firmware/target/arm/tcc77x/m200/adc-target.h deleted file mode 100644 index e9640cc9da..0000000000 --- a/firmware/target/arm/tcc77x/m200/adc-target.h +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2007 Dave Chapman | ||
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 8 | ||
25 | |||
26 | #define ADC_BUTTONS 1 | ||
27 | |||
28 | #endif /* _ADC_TARGET_H_ */ | ||
diff --git a/firmware/target/arm/tcc77x/m200/audio-m200.c b/firmware/target/arm/tcc77x/m200/audio-m200.c deleted file mode 100644 index 107b2743ae..0000000000 --- a/firmware/target/arm/tcc77x/m200/audio-m200.c +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2007 by Michael Sevakis | ||
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 "system.h" | ||
22 | #include "cpu.h" | ||
23 | #include "audio.h" | ||
24 | #include "sound.h" | ||
25 | |||
26 | int audio_channels = 2; | ||
27 | int audio_output_source = AUDIO_SRC_PLAYBACK; | ||
28 | |||
29 | void audio_set_output_source(int source) | ||
30 | { | ||
31 | (void)source; | ||
32 | } | ||
33 | |||
34 | void audio_input_mux(int source, unsigned flags) | ||
35 | { | ||
36 | (void)source; | ||
37 | (void)flags; | ||
38 | } | ||
diff --git a/firmware/target/arm/tcc77x/m200/backlight-target.h b/firmware/target/arm/tcc77x/m200/backlight-target.h deleted file mode 100644 index d73ac78852..0000000000 --- a/firmware/target/arm/tcc77x/m200/backlight-target.h +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2008 by Dave Chapman | ||
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 BACKLIGHT_TARGET_H | ||
22 | #define BACKLIGHT_TARGET_H | ||
23 | |||
24 | #include "tcc77x.h" | ||
25 | |||
26 | static inline bool backlight_hw_init(void) | ||
27 | { | ||
28 | GPIOA_DIR |= 0x40; | ||
29 | return true; | ||
30 | } | ||
31 | |||
32 | static inline void backlight_hw_on(void) | ||
33 | { | ||
34 | /* Enable backlight */ | ||
35 | GPIOA |= 0x40; | ||
36 | } | ||
37 | |||
38 | static inline void backlight_hw_off(void) | ||
39 | { | ||
40 | /* Disable backlight */ | ||
41 | GPIOA &= ~0x40; | ||
42 | } | ||
43 | |||
44 | #endif | ||
diff --git a/firmware/target/arm/tcc77x/m200/button-m200.c b/firmware/target/arm/tcc77x/m200/button-m200.c deleted file mode 100644 index a37fe1302c..0000000000 --- a/firmware/target/arm/tcc77x/m200/button-m200.c +++ /dev/null | |||
@@ -1,99 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2007 by Dave Chapman | ||
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 "config.h" | ||
23 | #include "cpu.h" | ||
24 | #include "button.h" | ||
25 | #include "adc.h" | ||
26 | |||
27 | /* | ||
28 | |||
29 | Results of button testing (viewing ADC values whilst pressing buttons): | ||
30 | |||
31 | HOLD: GPIOB & 0x0200 (0=hold active, 0x0200 = hold inactive) | ||
32 | |||
33 | ADC[1]: (approx values) | ||
34 | |||
35 | Idle - 0x3ff | ||
36 | MENU - unknown | ||
37 | |||
38 | REPEAT/AB - 0x03? | ||
39 | LEFT - 0x07?-0x08? | ||
40 | SELECT - 0x0c? | ||
41 | RIGHT - 0x11? | ||
42 | |||
43 | PLAY/PAUSE - 0x17?-0x018? | ||
44 | VOL UP - 0x1e?-0x01f? | ||
45 | VOL DOWN - 0x26? | ||
46 | |||
47 | */ | ||
48 | |||
49 | void button_init_device(void) | ||
50 | { | ||
51 | /* Nothing to do */ | ||
52 | } | ||
53 | |||
54 | int button_read_device(void) | ||
55 | { | ||
56 | int btn = BUTTON_NONE; | ||
57 | int adc; | ||
58 | |||
59 | /* TODO - determine how to detect BUTTON_MENU - it doesn't appear to | ||
60 | be connected to a GPIO or to an ADC | ||
61 | */ | ||
62 | |||
63 | adc = adc_read(ADC_BUTTONS); | ||
64 | |||
65 | if (adc < 0x384) { | ||
66 | if (adc < 0x140) { | ||
67 | if (adc < 0x96) { | ||
68 | if (adc < 0x50) { | ||
69 | btn |= BUTTON_REPEATAB; /* 0x00..0x4f */ | ||
70 | } else { | ||
71 | btn |= BUTTON_LEFT; /* 0x50..0x95 */ | ||
72 | } | ||
73 | } else { | ||
74 | if (adc < 0xe0) { | ||
75 | btn |= BUTTON_SELECT; /* 0x96..0xdf */ | ||
76 | } else { | ||
77 | btn |= BUTTON_RIGHT; /* 0xe0..0x13f */ | ||
78 | } | ||
79 | } | ||
80 | } else { | ||
81 | if (adc < 0x208) { | ||
82 | if (adc < 0x1b0) { | ||
83 | btn |= BUTTON_PLAYPAUSE; /* 0x140..0x1af */ | ||
84 | } else { | ||
85 | btn |= BUTTON_VOLUP; /* 0x1b0..0x207 */ | ||
86 | } | ||
87 | } else { | ||
88 | btn |= BUTTON_VOLDOWN; /* 0x209..0x383 */ | ||
89 | } | ||
90 | } | ||
91 | } | ||
92 | |||
93 | return btn; | ||
94 | } | ||
95 | |||
96 | bool button_hold(void) | ||
97 | { | ||
98 | return (GPIOB & 0x200)?false:true; | ||
99 | } | ||
diff --git a/firmware/target/arm/tcc77x/m200/button-target.h b/firmware/target/arm/tcc77x/m200/button-target.h deleted file mode 100644 index b96df22edc..0000000000 --- a/firmware/target/arm/tcc77x/m200/button-target.h +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2007 by Dave Chapman | ||
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 | #define BUTTON_MENU 0x00000001 | ||
29 | #define BUTTON_VOLUP 0x00000002 | ||
30 | #define BUTTON_VOLDOWN 0x00000004 | ||
31 | #define BUTTON_PLAYPAUSE 0x00000008 | ||
32 | #define BUTTON_REPEATAB 0x00000010 | ||
33 | #define BUTTON_LEFT 0x00000020 | ||
34 | #define BUTTON_RIGHT 0x00000040 | ||
35 | #define BUTTON_SELECT 0x00000080 | ||
36 | |||
37 | #define BUTTON_MAIN (BUTTON_MENU|BUTTON_VOLUP|BUTTON_VOLDOWN\ | ||
38 | |BUTTON_PLAYPAUSE|BUTTON_REPEATAB|BUTTON_LEFT\ | ||
39 | |BUTTON_RIGHT|BUTTON_SELECT) | ||
40 | |||
41 | /* Software power-off */ | ||
42 | #define POWEROFF_BUTTON BUTTON_MENU | ||
43 | #define POWEROFF_COUNT 40 | ||
44 | |||
45 | #endif /* _BUTTON_TARGET_H_ */ | ||
diff --git a/firmware/target/arm/tcc77x/m200/power-m200.c b/firmware/target/arm/tcc77x/m200/power-m200.c deleted file mode 100644 index e84ff1c852..0000000000 --- a/firmware/target/arm/tcc77x/m200/power-m200.c +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2007 Dave Chapman | ||
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 | |||
28 | void power_init(void) | ||
29 | { | ||
30 | } | ||
31 | |||
32 | void ide_power_enable(bool on) | ||
33 | { | ||
34 | } | ||
35 | |||
36 | bool ide_powered(void) | ||
37 | { | ||
38 | return true; | ||
39 | } | ||
40 | |||
41 | void power_off(void) | ||
42 | { | ||
43 | } | ||