annotate frbl/reconst/serial.c @ 328:0029db632547

frbl/reconst/serial.c: first static function reconstructed
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 06 Mar 2020 07:08:58 +0000
parents
children 63d3afd14523
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
328
0029db632547 frbl/reconst/serial.c: first static function reconstructed
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 #include "main/sys_types.h"
0029db632547 frbl/reconst/serial.c: first static function reconstructed
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 #include "serial.h"
0029db632547 frbl/reconst/serial.c: first static function reconstructed
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 #include "convert.h"
0029db632547 frbl/reconst/serial.c: first static function reconstructed
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4
0029db632547 frbl/reconst/serial.c: first static function reconstructed
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 static const SYS_UWORD32 S0_expect[7] = {6, 0, 0, 'H', 'D', 'R', 0x1B};
0029db632547 frbl/reconst/serial.c: first static function reconstructed
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 static const SYS_UWORD32 S7_expect[6] = {5, 0, 0, 0, 0, 0xFA};
0029db632547 frbl/reconst/serial.c: first static function reconstructed
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7
0029db632547 frbl/reconst/serial.c: first static function reconstructed
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 static const SYS_UWORD32 uart_base[2] = {0xFFFF5800, 0xFFFF5000};
0029db632547 frbl/reconst/serial.c: first static function reconstructed
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9
0029db632547 frbl/reconst/serial.c: first static function reconstructed
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 static SYS_UWORD32 bss_0;
0029db632547 frbl/reconst/serial.c: first static function reconstructed
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 static SYS_UWORD8 bss_4;
0029db632547 frbl/reconst/serial.c: first static function reconstructed
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 static SYS_UWORD8 bss_5;
0029db632547 frbl/reconst/serial.c: first static function reconstructed
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 static SYS_UWORD8 bss_6;
0029db632547 frbl/reconst/serial.c: first static function reconstructed
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 static SYS_UWORD8 bss_7;
0029db632547 frbl/reconst/serial.c: first static function reconstructed
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 static SYS_UWORD8 bss_8;
0029db632547 frbl/reconst/serial.c: first static function reconstructed
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 static SYS_UWORD32 bss_0xc;
0029db632547 frbl/reconst/serial.c: first static function reconstructed
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 static SYS_UWORD8 bss_0x10;
0029db632547 frbl/reconst/serial.c: first static function reconstructed
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 static SYS_UWORD16 bss_0x12;
0029db632547 frbl/reconst/serial.c: first static function reconstructed
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19
0029db632547 frbl/reconst/serial.c: first static function reconstructed
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 static SYS_UWORD32
0029db632547 frbl/reconst/serial.c: first static function reconstructed
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 static_func_0x0(SYS_UWORD8 arg1, SYS_UWORD32 *arg2, SYS_UWORD32 *arg3,
0029db632547 frbl/reconst/serial.c: first static function reconstructed
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 SYS_UWORD16 *arg4)
0029db632547 frbl/reconst/serial.c: first static function reconstructed
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 {
0029db632547 frbl/reconst/serial.c: first static function reconstructed
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 SYS_UWORD32 retval;
0029db632547 frbl/reconst/serial.c: first static function reconstructed
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25
0029db632547 frbl/reconst/serial.c: first static function reconstructed
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 bss_5 += arg1;
0029db632547 frbl/reconst/serial.c: first static function reconstructed
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 if (bss_6) {
0029db632547 frbl/reconst/serial.c: first static function reconstructed
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 bss_0x12 += arg1;
0029db632547 frbl/reconst/serial.c: first static function reconstructed
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 *arg4 = bss_0x12;
0029db632547 frbl/reconst/serial.c: first static function reconstructed
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 *arg2 = 0;
0029db632547 frbl/reconst/serial.c: first static function reconstructed
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 retval = 0;
0029db632547 frbl/reconst/serial.c: first static function reconstructed
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 } else {
0029db632547 frbl/reconst/serial.c: first static function reconstructed
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 *arg3 += 2;
0029db632547 frbl/reconst/serial.c: first static function reconstructed
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 bss_0x12 = arg1 << 8;
0029db632547 frbl/reconst/serial.c: first static function reconstructed
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 retval = 1;
0029db632547 frbl/reconst/serial.c: first static function reconstructed
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 }
0029db632547 frbl/reconst/serial.c: first static function reconstructed
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 bss_6 = ~bss_6 & 1;
0029db632547 frbl/reconst/serial.c: first static function reconstructed
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 bss_0x10--;
0029db632547 frbl/reconst/serial.c: first static function reconstructed
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 if (bss_0x10 == 0)
0029db632547 frbl/reconst/serial.c: first static function reconstructed
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 bss_0xc = 6;
0029db632547 frbl/reconst/serial.c: first static function reconstructed
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 return retval;
0029db632547 frbl/reconst/serial.c: first static function reconstructed
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 }