A GPS disciplined clock

Dependencies:   net lpc1768 crypto clock web log

Committer:
andrewboyson
Date:
Thu Oct 10 19:09:48 2019 +0000
Revision:
75:0ed9157d3bb3
Parent:
73:9e4842daf3ae
Child:
98:52506c675c82
Updated libraries

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 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 65:1412e3a1c5de 14 #include "restart.h"
andrewboyson 65:1412e3a1c5de 15 #include "restart-this.h"
andrewboyson 73:9e4842daf3ae 16 #include "crypto.h"
andrewboyson 0:67724a462d86 17
andrewboyson 0:67724a462d86 18 int main()
andrewboyson 0:67724a462d86 19 {
andrewboyson 65:1412e3a1c5de 20 RestartZone = RESTART_ZONE_INIT;
andrewboyson 0:67724a462d86 21 PeriphsInit();
andrewboyson 38:b7879c0ae0d9 22 Lpc1768Init();
andrewboyson 0:67724a462d86 23 SettingsInit();
andrewboyson 23:da63f48b0d9e 24 ClkInit();
andrewboyson 23:da63f48b0d9e 25 LogInit(ClkNowTmUtc, 115200);
andrewboyson 0:67724a462d86 26 GpsInit();
andrewboyson 73:9e4842daf3ae 27 CryptoInit(); //Uses log
andrewboyson 19:e95161b21b32 28 NetInit("gps", "gps");
andrewboyson 55:a1bd0572c8b6 29 NtpServerName = "GPS";
andrewboyson 31:1a1d20352fca 30 NtpServerEnable = true;
andrewboyson 56:287560e6950a 31 WebInit();
andrewboyson 0:67724a462d86 32
andrewboyson 0:67724a462d86 33 while (1)
andrewboyson 0:67724a462d86 34 {
andrewboyson 65:1412e3a1c5de 35 RestartZone = RESTART_ZONE_LOG; LogMain();
andrewboyson 65:1412e3a1c5de 36 RestartZone = RESTART_ZONE_CLOCK; ClkMain();
andrewboyson 65:1412e3a1c5de 37 RestartZone = RESTART_ZONE_GPS; GpsMain();
andrewboyson 65:1412e3a1c5de 38 RestartZone = RESTART_ZONE_NET; NetMain();
andrewboyson 65:1412e3a1c5de 39 RestartZone = RESTART_ZONE_LPC1768; Lpc1768Main();
andrewboyson 73:9e4842daf3ae 40 RestartZone = RESTART_ZONE_CRYPTO; CryptoMain();
andrewboyson 0:67724a462d86 41 }
andrewboyson 0:67724a462d86 42 }