diff options
Diffstat (limited to 'firmware/target/arm/iriver')
-rw-r--r-- | firmware/target/arm/iriver/h10/backlight-h10.c | 2 | ||||
-rw-r--r-- | firmware/target/arm/iriver/h10/button-h10.c | 44 | ||||
-rw-r--r-- | firmware/target/arm/iriver/h10/power-h10.c | 6 | ||||
-rw-r--r-- | firmware/target/arm/iriver/h10/usb-h10.c | 6 |
4 files changed, 29 insertions, 29 deletions
diff --git a/firmware/target/arm/iriver/h10/backlight-h10.c b/firmware/target/arm/iriver/h10/backlight-h10.c index b4221dd60a..51218e21be 100644 --- a/firmware/target/arm/iriver/h10/backlight-h10.c +++ b/firmware/target/arm/iriver/h10/backlight-h10.c | |||
@@ -28,7 +28,7 @@ | |||
28 | void __backlight_on(void) | 28 | void __backlight_on(void) |
29 | { | 29 | { |
30 | #if 0 | 30 | #if 0 |
31 | int level = set_irq_level(HIGHEST_IRQ_LEVEL); | 31 | int level = set_irq_level(HIGHEST_IRQ_LEVEL); |
32 | pcf50606_write(0x38, 0xb0); /* Backlight ON, GPO1INV=1, GPO1ACT=011 */ | 32 | pcf50606_write(0x38, 0xb0); /* Backlight ON, GPO1INV=1, GPO1ACT=011 */ |
33 | set_irq_level(level); | 33 | set_irq_level(level); |
34 | #endif | 34 | #endif |
diff --git a/firmware/target/arm/iriver/h10/button-h10.c b/firmware/target/arm/iriver/h10/button-h10.c index 7979a52976..2a5983e97a 100644 --- a/firmware/target/arm/iriver/h10/button-h10.c +++ b/firmware/target/arm/iriver/h10/button-h10.c | |||
@@ -33,7 +33,7 @@ | |||
33 | 33 | ||
34 | void button_init_device(void) | 34 | void button_init_device(void) |
35 | { | 35 | { |
36 | /* No hardware initialisation required as it is done by the bootloader */ | 36 | /* No hardware initialisation required as it is done by the bootloader */ |
37 | } | 37 | } |
38 | 38 | ||
39 | bool button_hold(void) | 39 | bool button_hold(void) |
@@ -47,8 +47,8 @@ bool button_hold(void) | |||
47 | int button_read_device(void) | 47 | int button_read_device(void) |
48 | { | 48 | { |
49 | int btn = BUTTON_NONE; | 49 | int btn = BUTTON_NONE; |
50 | unsigned char state; | 50 | unsigned char state; |
51 | static bool hold_button = false; | 51 | static bool hold_button = false; |
52 | 52 | ||
53 | #if 0 | 53 | #if 0 |
54 | /* light handling */ | 54 | /* light handling */ |
@@ -59,25 +59,25 @@ int button_read_device(void) | |||
59 | #endif | 59 | #endif |
60 | 60 | ||
61 | hold_button = button_hold(); | 61 | hold_button = button_hold(); |
62 | if (!hold_button) | 62 | if (!hold_button) |
63 | { | 63 | { |
64 | /* Read normal buttons */ | 64 | /* Read normal buttons */ |
65 | state = GPIOA_INPUT_VAL & 0xf8; | 65 | state = GPIOA_INPUT_VAL & 0xf8; |
66 | if ((state & 0x8) == 0) btn |= BUTTON_FF; | 66 | if ((state & 0x8) == 0) btn |= BUTTON_FF; |
67 | if ((state & 0x10) == 0) btn |= BUTTON_PLAY; | 67 | if ((state & 0x10) == 0) btn |= BUTTON_PLAY; |
68 | if ((state & 0x20) == 0) btn |= BUTTON_REW; | 68 | if ((state & 0x20) == 0) btn |= BUTTON_REW; |
69 | if ((state & 0x40) == 0) btn |= BUTTON_RIGHT; | 69 | if ((state & 0x40) == 0) btn |= BUTTON_RIGHT; |
70 | if ((state & 0x80) == 0) btn |= BUTTON_LEFT; | 70 | if ((state & 0x80) == 0) btn |= BUTTON_LEFT; |
71 | 71 | ||
72 | /* Read power button */ | 72 | /* Read power button */ |
73 | if ((GPIOB_INPUT_VAL & 0x1) == 0) btn |= BUTTON_POWER; | 73 | if ((GPIOB_INPUT_VAL & 0x1) == 0) btn |= BUTTON_POWER; |
74 | 74 | ||
75 | /* Read scroller */ | 75 | /* Read scroller */ |
76 | if ( ((GPIOC_INPUT_VAL & 0x4)==1) && ((GPIOD_INPUT_VAL & 0x10)==1) ) | 76 | if ( ((GPIOC_INPUT_VAL & 0x4)==1) && ((GPIOD_INPUT_VAL & 0x10)==1) ) |
77 | { | 77 | { |
78 | /* Scroller is pressed */ | 78 | /* Scroller is pressed */ |
79 | } | 79 | } |
80 | } | 80 | } |
81 | 81 | ||
82 | return btn; | 82 | return btn; |
83 | } | 83 | } |
diff --git a/firmware/target/arm/iriver/h10/power-h10.c b/firmware/target/arm/iriver/h10/power-h10.c index 58dd25174f..71eae2105e 100644 --- a/firmware/target/arm/iriver/h10/power-h10.c +++ b/firmware/target/arm/iriver/h10/power-h10.c | |||
@@ -71,7 +71,7 @@ void power_init(void) | |||
71 | 71 | ||
72 | bool charger_inserted(void) | 72 | bool charger_inserted(void) |
73 | { | 73 | { |
74 | return (GPIOL_INPUT_VAL & 0x04)?true:false; /* FIXME: This only checks if USB is connected */ | 74 | return (GPIOL_INPUT_VAL & 0x04)?true:false; /* FIXME: This only checks if USB is connected */ |
75 | } | 75 | } |
76 | 76 | ||
77 | void ide_power_enable(bool on) | 77 | void ide_power_enable(bool on) |
@@ -90,10 +90,10 @@ bool ide_powered(void) | |||
90 | void power_off(void) | 90 | void power_off(void) |
91 | { | 91 | { |
92 | /* set_irq_level(HIGHEST_IRQ_LEVEL);*/ | 92 | /* set_irq_level(HIGHEST_IRQ_LEVEL);*/ |
93 | #ifndef BOOTLOADER | 93 | #ifndef BOOTLOADER |
94 | /* We don't turn off the ipod, we put it in a deep sleep */ | 94 | /* We don't turn off the ipod, we put it in a deep sleep */ |
95 | /* pcf50605_standby_mode(); */ | 95 | /* pcf50605_standby_mode(); */ |
96 | while(1) | 96 | while(1) |
97 | yield(); | 97 | yield(); |
98 | #endif | 98 | #endif |
99 | } | 99 | } |
diff --git a/firmware/target/arm/iriver/h10/usb-h10.c b/firmware/target/arm/iriver/h10/usb-h10.c index dccdea81aa..c6d275a9be 100644 --- a/firmware/target/arm/iriver/h10/usb-h10.c +++ b/firmware/target/arm/iriver/h10/usb-h10.c | |||
@@ -92,10 +92,10 @@ bool usb_detect(void) | |||
92 | 92 | ||
93 | void usb_enable(bool on) | 93 | void usb_enable(bool on) |
94 | { | 94 | { |
95 | (void)on; | 95 | (void)on; |
96 | #if 0 | 96 | #if 0 |
97 | /* For the ipod, we can only do one thing with USB mode - reboot | 97 | /* For the ipod, we can only do one thing with USB mode - reboot |
98 | into Apple's flash-based disk-mode. This does not return. */ | 98 | into Apple's flash-based disk-mode. This does not return. */ |
99 | if (on) | 99 | if (on) |
100 | { | 100 | { |
101 | /* The following code is copied from ipodlinux */ | 101 | /* The following code is copied from ipodlinux */ |