- fixed check of BSEL again

git-svn-id: http://moon:8086/svn/projects/HendiControl@155 fda53097-d464-4ada-af97-ba876c37ca34
This commit is contained in:
2019-03-29 23:34:10 +00:00
parent 1684218208
commit c7a3aa29ee
@@ -63,7 +63,7 @@ int port_init()
DDRB = 0x00; DDRB = 0x00;
DDRD = 0x40; DDRD = 0x40;
PORTD = 0x00; PORTD = 0x00;
return (PINB & 1 == 0); return ((PINB & 1) == 0);
} }
int main(void) int main(void)
@@ -75,12 +75,13 @@ int main(void)
srec_t srec; srec_t srec;
cli(); cli();
uart_init(9600);
uart_puts("Hendi-Control Bootloader v1.1\n");
int bsel = port_init(); int bsel = port_init();
if (bsel) if (bsel)
{ {
bootloader_enter(); bootloader_enter();
uart_init(9600);
uart_puts("Hendi-Control Bootloader v1.1\n");
size_t image_size = 0; size_t image_size = 0;
uint16_t page_addr = 0xFFFF; uint16_t page_addr = 0xFFFF;
size_t hex_buffer_size = 0; size_t hex_buffer_size = 0;