A GPS disciplined clock

Dependencies:   net lpc1768 crypto clock web log

Committer:
andrewboyson
Date:
Mon Jan 07 09:35:10 2019 +0000
Revision:
22:81cafe287ab8
Parent:
21:a8de187c1356
Child:
23:da63f48b0d9e
Updated fault library

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 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 18:eda70c3ee1a0 14 #include "fault.h"
andrewboyson 0:67724a462d86 15
andrewboyson 0:67724a462d86 16 int main()
andrewboyson 0:67724a462d86 17 {
andrewboyson 18:eda70c3ee1a0 18 FaultZone = FAULT_ZONE_INIT;
andrewboyson 0:67724a462d86 19 PeriphsInit();
andrewboyson 3:36ee2aa7945a 20 SystemInit();
andrewboyson 3:36ee2aa7945a 21 LedInit();
andrewboyson 0:67724a462d86 22 SettingsInit();
andrewboyson 0:67724a462d86 23 ClockInit();
andrewboyson 3:36ee2aa7945a 24 LogInit(ClockTmUtc, 115200);
andrewboyson 0:67724a462d86 25 GpsInit();
andrewboyson 19:e95161b21b32 26 NetInit("gps", "gps");
andrewboyson 16:3d40d832dc70 27 HttpServerInit();
andrewboyson 0:67724a462d86 28 ServerNtpInit();
andrewboyson 22:81cafe287ab8 29 FaultInit();
andrewboyson 0:67724a462d86 30
andrewboyson 0:67724a462d86 31 while (1)
andrewboyson 0:67724a462d86 32 {
andrewboyson 22:81cafe287ab8 33 FaultZone = FAULT_ZONE_LOG; LogMain();
andrewboyson 22:81cafe287ab8 34 FaultZone = FAULT_ZONE_CLOCK; ClockMain();
andrewboyson 22:81cafe287ab8 35 FaultZone = FAULT_ZONE_NONE; GpsMain();
andrewboyson 22:81cafe287ab8 36 FaultZone = FAULT_ZONE_NET; NetMain();
andrewboyson 22:81cafe287ab8 37 FaultZone = FAULT_ZONE_FAULT; FaultMain();
andrewboyson 0:67724a462d86 38 }
andrewboyson 0:67724a462d86 39 }