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
This commit is contained in:
James Buren 2020-11-14 14:29:18 +00:00
parent 37eabbfe51
commit aaa9a2ccee
2 changed files with 10 additions and 26 deletions

View file

@ -58,6 +58,10 @@
#define DRAM_START 0x31000000
/* From common.c */
extern int line;
extern int remote_line;
/* Reset the cookie for the crt0 crash check */
inline void __reset_cookie(void)
{
@ -130,10 +134,6 @@ void check_battery(void)
/* From the pcf50606 driver */
extern unsigned char pcf50606_intregs[3];
/* From common.c */
extern int line;
extern int remote_line;
void main(void)
{
int i;
@ -144,7 +144,6 @@ void main(void)
bool hold_status = false;
int data;
bool rtc_alarm;
int button;
int mask;
bool usb_charge = false;
@ -267,7 +266,7 @@ void main(void)
while(charger_inserted() && !request_start)
{
button = button_get_w_tmo(HZ);
long button = button_get_w_tmo(HZ);
switch(button)
{