A GPS disciplined clock

Dependencies:   net lpc1768 crypto clock web log

Committer:
andrewboyson
Date:
Tue Jan 08 15:07:03 2019 +0000
Revision:
23:da63f48b0d9e
Parent:
22:81cafe287ab8
Child:
31:1a1d20352fca
Updated net library and ntp server

Who changed what in which revision?

UserRevisionLine numberNew 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 23:da63f48b0d9e 6 #include "clk.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 18:eda70c3ee1a0 14 #include "fault.h"
andrewboyson 23:da63f48b0d9e 15 #include "userfault.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 23:da63f48b0d9e 24 ClkInit();
andrewboyson 23:da63f48b0d9e 25 LogInit(ClkNowTmUtc, 115200);
andrewboyson 0:67724a462d86 26 GpsInit();
andrewboyson 19:e95161b21b32 27 NetInit("gps", "gps");
andrewboyson 16:3d40d832dc70 28 HttpServerInit();
andrewboyson 0:67724a462d86 29 ServerNtpInit();
andrewboyson 22:81cafe287ab8 30 FaultInit();
andrewboyson 0:67724a462d86 31
andrewboyson 0:67724a462d86 32 while (1)
andrewboyson 0:67724a462d86 33 {
andrewboyson 22:81cafe287ab8 34 FaultZone = FAULT_ZONE_LOG; LogMain();
andrewboyson 23:da63f48b0d9e 35 FaultZone = FAULT_ZONE_CLOCK; ClkMain();
andrewboyson 23:da63f48b0d9e 36 FaultZone = FAULT_ZONE_GPS; GpsMain();
andrewboyson 22:81cafe287ab8 37 FaultZone = FAULT_ZONE_NET; NetMain();
andrewboyson 22:81cafe287ab8 38 FaultZone = FAULT_ZONE_FAULT; FaultMain();
andrewboyson 0:67724a462d86 39 }
andrewboyson 0:67724a462d86 40 }