diff options
Diffstat (limited to 'lib/chibios-contrib/demos/TIVA/RT-TM4C1294-LAUNCHPAD-LWIP/main.c')
-rw-r--r-- | lib/chibios-contrib/demos/TIVA/RT-TM4C1294-LAUNCHPAD-LWIP/main.c | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/lib/chibios-contrib/demos/TIVA/RT-TM4C1294-LAUNCHPAD-LWIP/main.c b/lib/chibios-contrib/demos/TIVA/RT-TM4C1294-LAUNCHPAD-LWIP/main.c new file mode 100644 index 000000000..0f8841986 --- /dev/null +++ b/lib/chibios-contrib/demos/TIVA/RT-TM4C1294-LAUNCHPAD-LWIP/main.c | |||
@@ -0,0 +1,55 @@ | |||
1 | /* | ||
2 | Copyright (C) 2014..2017 Marco Veeneman | ||
3 | |||
4 | Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | you may not use this file except in compliance with the License. | ||
6 | You may obtain a copy of the License at | ||
7 | |||
8 | http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | |||
10 | Unless required by applicable law or agreed to in writing, software | ||
11 | distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | See the License for the specific language governing permissions and | ||
14 | limitations under the License. | ||
15 | */ | ||
16 | |||
17 | #include "ch.h" | ||
18 | #include "hal.h" | ||
19 | #include "lwipthread.h" | ||
20 | #include "lwip/apps/httpd.h" | ||
21 | |||
22 | /* | ||
23 | * Application entry point. | ||
24 | */ | ||
25 | int main(void) | ||
26 | { | ||
27 | /* | ||
28 | * System initializations. | ||
29 | * - HAL initialization, this also initializes the configured device drivers | ||
30 | * and performs the board-specific initializations. | ||
31 | * - Kernel initialization, the main() function becomes a thread and the | ||
32 | * RTOS is active. | ||
33 | * - lwIP subsystem initialization using the default configuration. | ||
34 | */ | ||
35 | halInit(); | ||
36 | chSysInit(); | ||
37 | lwipInit(NULL); | ||
38 | |||
39 | /* | ||
40 | * Start the serial driver with the default configuration. | ||
41 | * Used for debug output of LwIP. | ||
42 | */ | ||
43 | sdStart(&SD1, NULL); | ||
44 | |||
45 | /* | ||
46 | * Creates the LwIP HTTP server. | ||
47 | */ | ||
48 | httpd_init(); | ||
49 | |||
50 | while (1) { | ||
51 | osalThreadSleepMilliseconds(500); | ||
52 | } | ||
53 | |||
54 | return 0; | ||
55 | } | ||