diff options
author | James Buren <braewoods+rb@braewoods.net> | 2020-11-14 14:29:18 +0000 |
---|---|---|
committer | James Buren <braewoods+rb@braewoods.net> | 2020-11-14 14:29:18 +0000 |
commit | aaa9a2cceedf45b04a85b206cd622a6fb1d9da77 (patch) | |
tree | e993961c0746ed1efd6d5c6a6ebbe976be1d2cd4 /bootloader/iriver_h300.c | |
parent | 37eabbfe51e7ed7938c51934921f28cd54a1140d (diff) | |
download | rockbox-aaa9a2cceedf45b04a85b206cd622a6fb1d9da77.tar.gz rockbox-aaa9a2cceedf45b04a85b206cd622a6fb1d9da77.zip |
h1x0/h300: clean up the bootloader source a bit
First this removes most of the conditionals for the CPP as they
are always true for the targets that use the bootloader source.
Second this moves some global variable references around to reduce
some redundancy in the h1x0 bootloader source.
All of this is done to make it easier to compare the two bootloaders
as they are very heavily related to each other.
Change-Id: I7eb4a3106fb9fce6059797310d9e053a3d3ecf63
Diffstat (limited to 'bootloader/iriver_h300.c')
-rw-r--r-- | bootloader/iriver_h300.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/bootloader/iriver_h300.c b/bootloader/iriver_h300.c index 4f4baf8cb5..ee344d4165 100644 --- a/bootloader/iriver_h300.c +++ b/bootloader/iriver_h300.c | |||
@@ -58,6 +58,10 @@ | |||
58 | 58 | ||
59 | #define DRAM_START 0x31000000 | 59 | #define DRAM_START 0x31000000 |
60 | 60 | ||
61 | /* From common.c */ | ||
62 | extern int line; | ||
63 | extern int remote_line; | ||
64 | |||
61 | /* Reset the cookie for the crt0 crash check */ | 65 | /* Reset the cookie for the crt0 crash check */ |
62 | inline void __reset_cookie(void) | 66 | inline void __reset_cookie(void) |
63 | { | 67 | { |
@@ -130,10 +134,6 @@ void check_battery(void) | |||
130 | /* From the pcf50606 driver */ | 134 | /* From the pcf50606 driver */ |
131 | extern unsigned char pcf50606_intregs[3]; | 135 | extern unsigned char pcf50606_intregs[3]; |
132 | 136 | ||
133 | /* From common.c */ | ||
134 | extern int line; | ||
135 | extern int remote_line; | ||
136 | |||
137 | void main(void) | 137 | void main(void) |
138 | { | 138 | { |
139 | int i; | 139 | int i; |
@@ -144,7 +144,6 @@ void main(void) | |||
144 | bool hold_status = false; | 144 | bool hold_status = false; |
145 | int data; | 145 | int data; |
146 | bool rtc_alarm; | 146 | bool rtc_alarm; |
147 | int button; | ||
148 | int mask; | 147 | int mask; |
149 | bool usb_charge = false; | 148 | bool usb_charge = false; |
150 | 149 | ||
@@ -267,7 +266,7 @@ void main(void) | |||
267 | 266 | ||
268 | while(charger_inserted() && !request_start) | 267 | while(charger_inserted() && !request_start) |
269 | { | 268 | { |
270 | button = button_get_w_tmo(HZ); | 269 | long button = button_get_w_tmo(HZ); |
271 | 270 | ||
272 | switch(button) | 271 | switch(button) |
273 | { | 272 | { |