A GPS disciplined clock

Dependencies:   net lpc1768 crypto clock web log

main/main.c

Committer:
andrewboyson
Date:
2019-01-03
Revision:
19:e95161b21b32
Parent:
18:eda70c3ee1a0
Child:
21:a8de187c1356

File content as of revision 19:e95161b21b32:

#include <stdint.h>

#include "periphs.h"
#include "system.h"
#include "led.h"
#include "clock.h"
#include "time.h"
#include "log.h"
#include "net.h"
#include "settings.h"
#include "server-ntp.h"
#include "http-server.h"
#include "gps.h"
#include "watchdog.h"
#include "fault.h"

int main()
{
          FaultZone = FAULT_ZONE_INIT;
          PeriphsInit();
           SystemInit();
              LedInit();
         SettingsInit();
            ClockInit();
              LogInit(ClockTmUtc, 115200);
              GpsInit();
              NetInit("gps", "gps");
       HttpServerInit();
        ServerNtpInit();
         WatchdogInit();
      
    while (1)
    {   
        FaultZone = FAULT_ZONE_LOG;       LogMain();
        FaultZone = FAULT_ZONE_CLOCK;   ClockMain();
        FaultZone = FAULT_ZONE_NONE;      GpsMain();
        FaultZone = FAULT_ZONE_NET;       NetMain();
        FaultZone = FAULT_ZONE_NONE; WatchdogMain();
    }
}