A GPS disciplined clock
Dependencies: net lpc1768 crypto clock web log
main/main.c@57:2d54e570de60, 2019-04-29 (annotated)
- Committer:
- andrewboyson
- Date:
- Mon Apr 29 15:23:11 2019 +0000
- Revision:
- 57:2d54e570de60
- Parent:
- 56:287560e6950a
- Child:
- 65:1412e3a1c5de
Updated libraries
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 | 38:b7879c0ae0d9 | 4 | #include "lpc1768.h" |
andrewboyson | 23:da63f48b0d9e | 5 | #include "clk.h" |
andrewboyson | 12:9bd8f04df514 | 6 | #include "time.h" |
andrewboyson | 0:67724a462d86 | 7 | #include "log.h" |
andrewboyson | 19:e95161b21b32 | 8 | #include "net.h" |
andrewboyson | 0:67724a462d86 | 9 | #include "settings.h" |
andrewboyson | 57:2d54e570de60 | 10 | #include "web.h" |
andrewboyson | 31:1a1d20352fca | 11 | #include "ntpserver.h" |
andrewboyson | 0:67724a462d86 | 12 | #include "gps.h" |
andrewboyson | 38:b7879c0ae0d9 | 13 | #include "led.h" |
andrewboyson | 18:eda70c3ee1a0 | 14 | #include "fault.h" |
andrewboyson | 53:9ec18325113a | 15 | #include "fault-derived.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 | 38:b7879c0ae0d9 | 21 | Lpc1768Init(); |
andrewboyson | 0:67724a462d86 | 22 | SettingsInit(); |
andrewboyson | 23:da63f48b0d9e | 23 | ClkInit(); |
andrewboyson | 23:da63f48b0d9e | 24 | LogInit(ClkNowTmUtc, 115200); |
andrewboyson | 0:67724a462d86 | 25 | GpsInit(); |
andrewboyson | 19:e95161b21b32 | 26 | NetInit("gps", "gps"); |
andrewboyson | 55:a1bd0572c8b6 | 27 | NtpServerName = "GPS"; |
andrewboyson | 31:1a1d20352fca | 28 | NtpServerEnable = true; |
andrewboyson | 56:287560e6950a | 29 | WebInit(); |
andrewboyson | 0:67724a462d86 | 30 | |
andrewboyson | 0:67724a462d86 | 31 | while (1) |
andrewboyson | 0:67724a462d86 | 32 | { |
andrewboyson | 38:b7879c0ae0d9 | 33 | FaultZone = FAULT_ZONE_LOG; LogMain(); |
andrewboyson | 38:b7879c0ae0d9 | 34 | FaultZone = FAULT_ZONE_CLOCK; ClkMain(); |
andrewboyson | 38:b7879c0ae0d9 | 35 | FaultZone = FAULT_ZONE_GPS; GpsMain(); |
andrewboyson | 38:b7879c0ae0d9 | 36 | FaultZone = FAULT_ZONE_NET; NetMain(); |
andrewboyson | 38:b7879c0ae0d9 | 37 | FaultZone = FAULT_ZONE_LPC1768; Lpc1768Main(); |
andrewboyson | 0:67724a462d86 | 38 | } |
andrewboyson | 0:67724a462d86 | 39 | } |