A GPS disciplined clock

Dependencies:   net lpc1768 crypto clock web log

main/main.c

Committer:
andrewboyson
Date:
2019-01-08
Revision:
23:da63f48b0d9e
Parent:
22:81cafe287ab8
Child:
31:1a1d20352fca

File content as of revision 23:da63f48b0d9e:

#include <stdint.h>

#include "periphs.h"
#include "system.h"
#include "led.h"
#include "clk.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 "fault.h"
#include "userfault.h"

int main()
{
          FaultZone = FAULT_ZONE_INIT;
          PeriphsInit();
           SystemInit();
              LedInit();
         SettingsInit();
              ClkInit();
              LogInit(ClkNowTmUtc, 115200);
              GpsInit();
              NetInit("gps", "gps");
       HttpServerInit();
        ServerNtpInit();
            FaultInit();
      
    while (1)
    {   
        FaultZone = FAULT_ZONE_LOG;     LogMain();
        FaultZone = FAULT_ZONE_CLOCK;   ClkMain();
        FaultZone = FAULT_ZONE_GPS;     GpsMain();
        FaultZone = FAULT_ZONE_NET;     NetMain();
        FaultZone = FAULT_ZONE_FAULT; FaultMain();
    }
}