#include "project.h" int time_known; static void cmd_dispatch() { uint8_t c; while (!ring_read_byte (&rx1_ring, &c)) { printf ("KEY> %c\r\n", c); switch (c) { case 'R': scb_reset_system(); break; case 'G': gps_reset(); break; case 'A': gps_almanac(); break; } } } static void board_setup (void) { rcc_clock_setup_hse_3v3 (&hse_8mhz_3v3[CLOCK_3V3_168MHZ]); rcc_periph_clock_enable (RCC_SYSCFG); rcc_periph_clock_enable (RCC_GPIOA); rcc_periph_clock_enable (RCC_GPIOB); rcc_periph_clock_enable (RCC_GPIOC); rcc_periph_clock_enable (RCC_GPIOD); rcc_periph_clock_enable (RCC_GPIOE); rcc_periph_clock_enable (RCC_USART1); rcc_periph_clock_enable (RCC_USART3); rcc_periph_clock_enable (RCC_ETHMAC); rcc_periph_clock_enable (RCC_ETHMACTX); rcc_periph_clock_enable (RCC_ETHMACRX); rcc_periph_clock_enable (RCC_ETHMACPTP); nvic_set_priority (NVIC_EXTI2_IRQ, 0x0); nvic_set_priority (NVIC_EXTI0_IRQ, 0x10); nvic_set_priority (NVIC_EXTI15_10_IRQ, 0x20); nvic_set_priority (NVIC_USART1_IRQ, 0x30); nvic_set_priority (NVIC_USART3_IRQ, 0x30); nvic_set_priority (NVIC_ETH_IRQ, 0x40); nvic_set_priority (NVIC_SYSTICK_IRQ, 0x50); } static void system_init (void) { board_setup(); led_init(); ticker_init(); usart_init(); msf_init(); dcf77_init(); printf ("LWIP\r\n"); start_lwip(); printf ("STETH\r\n"); steth_init(); gps_init(); } int main (void) { system_init(); printf ("Boot\r\n"); #if 0 while (1) { uint32_t now = SCS_DWT_CYCCNT; uint64_t abs= abs_extend (now); EPOCH e = pll_decompose (abs); time_print_epoch ("TEST: ", e); delay_ms(100); } #endif while (1) { #if 0 { uint32_t now = SCS_DWT_CYCCNT; uint64_t abs= abs_extend (now); EPOCH e = pll_decompose (abs); time_print_epoch ("TEST: ", e); delay_ms(100); } abs_meh(); #endif msf_dispatch(); dcf77_dispatch(); gps_dispatch(); cmd_dispatch(); dispatch_lwip(); } return 0; } /upstream/commit/target/linux/bcm4908/image/Makefile?h=v22.03.0'>commitdiffstats
path: root/target/linux/bcm4908/image/Makefile
blob: 7116c2a9f1fb2355dd29707d251be9c85a4ee124 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138