A GPS disciplined clock
Dependencies: net lpc1768 crypto clock web log
main/main.c@19:e95161b21b32, 2019-01-03 (annotated)
- Committer:
- andrewboyson
- Date:
- Thu Jan 03 17:29:33 2019 +0000
- Revision:
- 19:e95161b21b32
- Parent:
- 18:eda70c3ee1a0
- Child:
- 21:a8de187c1356
Updated net library
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
andrewboyson | 0:67724a462d86 | 1 | #include <stdint.h> |
andrewboyson | 0:67724a462d86 | 2 | |
andrewboyson | 0:67724a462d86 | 3 | #include "periphs.h" |
andrewboyson | 3:36ee2aa7945a | 4 | #include "system.h" |
andrewboyson | 3:36ee2aa7945a | 5 | #include "led.h" |
andrewboyson | 0:67724a462d86 | 6 | #include "clock.h" |
andrewboyson | 12:9bd8f04df514 | 7 | #include "time.h" |
andrewboyson | 0:67724a462d86 | 8 | #include "log.h" |
andrewboyson | 19:e95161b21b32 | 9 | #include "net.h" |
andrewboyson | 0:67724a462d86 | 10 | #include "settings.h" |
andrewboyson | 0:67724a462d86 | 11 | #include "server-ntp.h" |
andrewboyson | 16:3d40d832dc70 | 12 | #include "http-server.h" |
andrewboyson | 0:67724a462d86 | 13 | #include "gps.h" |
andrewboyson | 0:67724a462d86 | 14 | #include "watchdog.h" |
andrewboyson | 18:eda70c3ee1a0 | 15 | #include "fault.h" |
andrewboyson | 0:67724a462d86 | 16 | |
andrewboyson | 0:67724a462d86 | 17 | int main() |
andrewboyson | 0:67724a462d86 | 18 | { |
andrewboyson | 18:eda70c3ee1a0 | 19 | FaultZone = FAULT_ZONE_INIT; |
andrewboyson | 0:67724a462d86 | 20 | PeriphsInit(); |
andrewboyson | 3:36ee2aa7945a | 21 | SystemInit(); |
andrewboyson | 3:36ee2aa7945a | 22 | LedInit(); |
andrewboyson | 0:67724a462d86 | 23 | SettingsInit(); |
andrewboyson | 0:67724a462d86 | 24 | ClockInit(); |
andrewboyson | 3:36ee2aa7945a | 25 | LogInit(ClockTmUtc, 115200); |
andrewboyson | 0:67724a462d86 | 26 | GpsInit(); |
andrewboyson | 19:e95161b21b32 | 27 | NetInit("gps", "gps"); |
andrewboyson | 16:3d40d832dc70 | 28 | HttpServerInit(); |
andrewboyson | 0:67724a462d86 | 29 | ServerNtpInit(); |
andrewboyson | 0:67724a462d86 | 30 | WatchdogInit(); |
andrewboyson | 0:67724a462d86 | 31 | |
andrewboyson | 0:67724a462d86 | 32 | while (1) |
andrewboyson | 0:67724a462d86 | 33 | { |
andrewboyson | 18:eda70c3ee1a0 | 34 | FaultZone = FAULT_ZONE_LOG; LogMain(); |
andrewboyson | 18:eda70c3ee1a0 | 35 | FaultZone = FAULT_ZONE_CLOCK; ClockMain(); |
andrewboyson | 18:eda70c3ee1a0 | 36 | FaultZone = FAULT_ZONE_NONE; GpsMain(); |
andrewboyson | 19:e95161b21b32 | 37 | FaultZone = FAULT_ZONE_NET; NetMain(); |
andrewboyson | 18:eda70c3ee1a0 | 38 | FaultZone = FAULT_ZONE_NONE; WatchdogMain(); |
andrewboyson | 0:67724a462d86 | 39 | } |
andrewboyson | 0:67724a462d86 | 40 | } |