Central Heating controller using the real time clock, PHY module for internet, 1-wire interface for temperature sensors, a system log and a configuration file
Dependencies: net 1-wire lpc1768 crypto clock web fram log
/media/uploads/andrewboyson/heating.sch
/media/uploads/andrewboyson/heating.brd
/media/uploads/andrewboyson/eagle.epf
settings/settings.c@101:77fd93f0bde1, 2020-12-29 (annotated)
- Committer:
- andrewboyson
- Date:
- Tue Dec 29 20:19:43 2020 +0000
- Revision:
- 101:77fd93f0bde1
- Parent:
- 74:8228f0297227
- Child:
- 103:15583327fcdd
Updated to accommodate changes in the net library
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
andrewboyson | 0:3c04f4b47041 | 1 | #include <stdbool.h> |
andrewboyson | 8:8b5e0bb28da0 | 2 | #include <stdlib.h> |
andrewboyson | 28:bb55def47737 | 3 | #include <string.h> |
andrewboyson | 0:3c04f4b47041 | 4 | |
andrewboyson | 21:0c9673027ff9 | 5 | #include "clkgov.h" |
andrewboyson | 8:8b5e0bb28da0 | 6 | #include "fram.h" |
andrewboyson | 8:8b5e0bb28da0 | 7 | #include "log.h" |
andrewboyson | 8:8b5e0bb28da0 | 8 | #include "net.h" |
andrewboyson | 8:8b5e0bb28da0 | 9 | #include "link.h" |
andrewboyson | 8:8b5e0bb28da0 | 10 | #include "dnsname.h" |
andrewboyson | 8:8b5e0bb28da0 | 11 | #include "dnsquery.h" |
andrewboyson | 8:8b5e0bb28da0 | 12 | #include "dnsreply.h" |
andrewboyson | 8:8b5e0bb28da0 | 13 | #include "dnsserver.h" |
andrewboyson | 38:2bfeefa8709a | 14 | #include "dnslabel.h" |
andrewboyson | 8:8b5e0bb28da0 | 15 | #include "ntp.h" |
andrewboyson | 8:8b5e0bb28da0 | 16 | #include "dhcp.h" |
andrewboyson | 8:8b5e0bb28da0 | 17 | #include "ns.h" |
andrewboyson | 101:77fd93f0bde1 | 18 | #include "nr.h" |
andrewboyson | 28:bb55def47737 | 19 | #include "ntpclient.h" |
andrewboyson | 8:8b5e0bb28da0 | 20 | #include "1-wire.h" |
andrewboyson | 8:8b5e0bb28da0 | 21 | #include "echo4.h" |
andrewboyson | 8:8b5e0bb28da0 | 22 | #include "echo6.h" |
andrewboyson | 8:8b5e0bb28da0 | 23 | #include "dest6.h" |
andrewboyson | 8:8b5e0bb28da0 | 24 | #include "ra.h" |
andrewboyson | 8:8b5e0bb28da0 | 25 | #include "rs.h" |
andrewboyson | 8:8b5e0bb28da0 | 26 | #include "ar4.h" |
andrewboyson | 8:8b5e0bb28da0 | 27 | #include "ar6.h" |
andrewboyson | 8:8b5e0bb28da0 | 28 | #include "arp.h" |
andrewboyson | 8:8b5e0bb28da0 | 29 | #include "ip4.h" |
andrewboyson | 8:8b5e0bb28da0 | 30 | #include "ip6.h" |
andrewboyson | 8:8b5e0bb28da0 | 31 | #include "udp.h" |
andrewboyson | 8:8b5e0bb28da0 | 32 | #include "tcp.h" |
andrewboyson | 74:8228f0297227 | 33 | #include "web.h" |
andrewboyson | 8:8b5e0bb28da0 | 34 | #include "tftp.h" |
andrewboyson | 8:8b5e0bb28da0 | 35 | #include "dns.h" |
andrewboyson | 28:bb55def47737 | 36 | #include "led.h" |
andrewboyson | 0:3c04f4b47041 | 37 | |
andrewboyson | 21:0c9673027ff9 | 38 | static int iClkGovSlewDivisor ; |
andrewboyson | 21:0c9673027ff9 | 39 | static int iClkGovSlewMaxMs ; |
andrewboyson | 21:0c9673027ff9 | 40 | static int iClkGovPpbDivisor ; |
andrewboyson | 21:0c9673027ff9 | 41 | static int iClkGovPpbChangeMax ; |
andrewboyson | 21:0c9673027ff9 | 42 | static int iClkGovSyncedLimitNs ; |
andrewboyson | 21:0c9673027ff9 | 43 | static int iClkGovSyncedLimitPpb ; |
andrewboyson | 21:0c9673027ff9 | 44 | static int iClkGovSyncedHysterisNs ; |
andrewboyson | 21:0c9673027ff9 | 45 | static int iClkGovSyncedHysterisPpb; |
andrewboyson | 21:0c9673027ff9 | 46 | static int iClkGovMaxOffsetSecs ; |
andrewboyson | 21:0c9673027ff9 | 47 | static int iClkGov; |
andrewboyson | 8:8b5e0bb28da0 | 48 | |
andrewboyson | 8:8b5e0bb28da0 | 49 | static int iOneWire; |
andrewboyson | 8:8b5e0bb28da0 | 50 | |
andrewboyson | 8:8b5e0bb28da0 | 51 | static int iDnsSendRequestsViaIp4 ; |
andrewboyson | 8:8b5e0bb28da0 | 52 | static int iNtpSendRequestsViaIp4 ; |
andrewboyson | 8:8b5e0bb28da0 | 53 | static int iTftpSendRequestsViaIp4; |
andrewboyson | 0:3c04f4b47041 | 54 | |
andrewboyson | 8:8b5e0bb28da0 | 55 | static int iNetHost; |
andrewboyson | 8:8b5e0bb28da0 | 56 | static int iLogUart; |
andrewboyson | 8:8b5e0bb28da0 | 57 | static int iNetStack; |
andrewboyson | 8:8b5e0bb28da0 | 58 | static int iNetNewLine; |
andrewboyson | 8:8b5e0bb28da0 | 59 | static int iNetVerbose; |
andrewboyson | 8:8b5e0bb28da0 | 60 | static int iLink; |
andrewboyson | 8:8b5e0bb28da0 | 61 | static int iDnsName; |
andrewboyson | 8:8b5e0bb28da0 | 62 | static int iDnsQuery; |
andrewboyson | 8:8b5e0bb28da0 | 63 | static int iDnsReply; |
andrewboyson | 8:8b5e0bb28da0 | 64 | static int iDnsServer; |
andrewboyson | 8:8b5e0bb28da0 | 65 | static int iNtp; |
andrewboyson | 8:8b5e0bb28da0 | 66 | static int iDhcp; |
andrewboyson | 8:8b5e0bb28da0 | 67 | static int iNsRecvSol; |
andrewboyson | 8:8b5e0bb28da0 | 68 | static int iNsRecvAdv; |
andrewboyson | 8:8b5e0bb28da0 | 69 | static int iNsSendSol; |
andrewboyson | 8:8b5e0bb28da0 | 70 | static int iNr4; |
andrewboyson | 101:77fd93f0bde1 | 71 | static int iNr; |
andrewboyson | 8:8b5e0bb28da0 | 72 | static int iNtpClient; |
andrewboyson | 8:8b5e0bb28da0 | 73 | static int iEcho4; |
andrewboyson | 8:8b5e0bb28da0 | 74 | static int iEcho6; |
andrewboyson | 8:8b5e0bb28da0 | 75 | static int iDest6; |
andrewboyson | 8:8b5e0bb28da0 | 76 | static int iRa; |
andrewboyson | 8:8b5e0bb28da0 | 77 | static int iRs; |
andrewboyson | 8:8b5e0bb28da0 | 78 | static int iAr4; |
andrewboyson | 8:8b5e0bb28da0 | 79 | static int iAr6; |
andrewboyson | 8:8b5e0bb28da0 | 80 | static int iArp; |
andrewboyson | 8:8b5e0bb28da0 | 81 | static int iIp4; |
andrewboyson | 8:8b5e0bb28da0 | 82 | static int iIp6; |
andrewboyson | 8:8b5e0bb28da0 | 83 | static int iUdp; |
andrewboyson | 8:8b5e0bb28da0 | 84 | static int iTcp; |
andrewboyson | 8:8b5e0bb28da0 | 85 | static int iHttp; |
andrewboyson | 8:8b5e0bb28da0 | 86 | static int iTftp; |
andrewboyson | 8:8b5e0bb28da0 | 87 | |
andrewboyson | 8:8b5e0bb28da0 | 88 | //Clock settings |
andrewboyson | 32:bbf9c8b45a2e | 89 | void SetClockSlewDivisor (int value) { ClkGovSlewDivisor = value; FramWrite(iClkGovSlewDivisor, 4, &ClkGovSlewDivisor ); } |
andrewboyson | 32:bbf9c8b45a2e | 90 | void SetClockSlewMaxMs (int value) { ClkGovSlewChangeMaxMs = value; FramWrite(iClkGovSlewMaxMs, 4, &ClkGovSlewChangeMaxMs ); } |
andrewboyson | 32:bbf9c8b45a2e | 91 | void SetClockPpbDivisor (int value) { ClkGovFreqDivisor = value; FramWrite(iClkGovPpbDivisor, 4, &ClkGovFreqDivisor ); } |
andrewboyson | 32:bbf9c8b45a2e | 92 | void SetClockPpbChangeMax (int value) { ClkGovFreqChangeMaxPpb = value; FramWrite(iClkGovPpbChangeMax, 4, &ClkGovFreqChangeMaxPpb ); } |
andrewboyson | 32:bbf9c8b45a2e | 93 | void SetClockSyncedLimitNs (int value) { ClkGovSlewSyncedLimNs = value; FramWrite(iClkGovSyncedLimitNs, 4, &ClkGovSlewSyncedLimNs ); } |
andrewboyson | 32:bbf9c8b45a2e | 94 | void SetClockSyncedLimitPpb (int value) { ClkGovFreqSyncedLimPpb = value; FramWrite(iClkGovSyncedLimitPpb, 4, &ClkGovFreqSyncedLimPpb ); } |
andrewboyson | 32:bbf9c8b45a2e | 95 | void SetClockSyncedHysterisNs (int value) { ClkGovSlewSyncedHysNs = value; FramWrite(iClkGovSyncedHysterisNs, 4, &ClkGovSlewSyncedHysNs ); } |
andrewboyson | 32:bbf9c8b45a2e | 96 | void SetClockSyncedHysterisPpb(int value) { ClkGovFreqSyncedHysPpb = value; FramWrite(iClkGovSyncedHysterisPpb, 4, &ClkGovFreqSyncedHysPpb ); } |
andrewboyson | 32:bbf9c8b45a2e | 97 | void SetClockMaxOffsetSecs (int value) { ClkGovSlewOffsetMaxSecs = value; FramWrite(iClkGovMaxOffsetSecs, 4, &ClkGovSlewOffsetMaxSecs); } |
andrewboyson | 32:bbf9c8b45a2e | 98 | void ChgTraceSync () { ClkGovTrace = !ClkGovTrace ; FramWrite(iClkGov, 1, &ClkGovTrace ); } |
andrewboyson | 8:8b5e0bb28da0 | 99 | |
andrewboyson | 45:21033b9620c1 | 100 | //Log settings |
andrewboyson | 45:21033b9620c1 | 101 | void ChgLogUart () { LogUart = !LogUart; FramWrite(iLogUart, 1, &LogUart ); } |
andrewboyson | 45:21033b9620c1 | 102 | |
andrewboyson | 8:8b5e0bb28da0 | 103 | //Heating settings |
andrewboyson | 13:2ca12dd42e91 | 104 | void ChgTraceOneWire () { OneWireTrace = !OneWireTrace ; FramWrite(iOneWire, 1, &OneWireTrace ); } |
andrewboyson | 8:8b5e0bb28da0 | 105 | |
andrewboyson | 8:8b5e0bb28da0 | 106 | //Net settings |
andrewboyson | 28:bb55def47737 | 107 | void ChgDnsSendRequestsViaIp4 () { DnsSendRequestsViaIp4 = !DnsSendRequestsViaIp4; FramWrite( iDnsSendRequestsViaIp4, 1, &DnsSendRequestsViaIp4); } |
andrewboyson | 28:bb55def47737 | 108 | void ChgNtpSendRequestsViaIp4 () { NtpClientQuerySendRequestsViaIp4 = !NtpClientQuerySendRequestsViaIp4; FramWrite( iNtpSendRequestsViaIp4, 1, &NtpClientQuerySendRequestsViaIp4); } |
andrewboyson | 28:bb55def47737 | 109 | void ChgTftpSendRequestsViaIp4 () { TftpSendRequestsViaIp4 = !TftpSendRequestsViaIp4; FramWrite(iTftpSendRequestsViaIp4, 1, &TftpSendRequestsViaIp4); } |
andrewboyson | 8:8b5e0bb28da0 | 110 | |
andrewboyson | 8:8b5e0bb28da0 | 111 | void SetTraceNetHost (char* text) |
andrewboyson | 8:8b5e0bb28da0 | 112 | { |
andrewboyson | 8:8b5e0bb28da0 | 113 | int value = strtol(text, NULL, 16); |
andrewboyson | 8:8b5e0bb28da0 | 114 | NetTraceHost[1] = value & 0xFF; |
andrewboyson | 8:8b5e0bb28da0 | 115 | NetTraceHost[0] = (value >> 8) & 0xFF; |
andrewboyson | 8:8b5e0bb28da0 | 116 | FramWrite(iNetHost, 2, NetTraceHost); |
andrewboyson | 8:8b5e0bb28da0 | 117 | } |
andrewboyson | 8:8b5e0bb28da0 | 118 | void ChgTraceNetStack () { NetTraceStack = !NetTraceStack; FramWrite(iNetStack, 1, &NetTraceStack ); } |
andrewboyson | 8:8b5e0bb28da0 | 119 | void ChgTraceNetNewLine() { NetTraceNewLine = !NetTraceNewLine; FramWrite(iNetNewLine, 1, &NetTraceNewLine); } |
andrewboyson | 8:8b5e0bb28da0 | 120 | void ChgTraceNetVerbose() { NetTraceVerbose = !NetTraceVerbose; FramWrite(iNetVerbose, 1, &NetTraceVerbose); } |
andrewboyson | 8:8b5e0bb28da0 | 121 | void ChgTraceLink () { LinkTrace = !LinkTrace; FramWrite(iLink, 1, &LinkTrace ); } |
andrewboyson | 8:8b5e0bb28da0 | 122 | void ChgTraceDnsName () { DnsNameTrace = !DnsNameTrace; FramWrite(iDnsName, 1, &DnsNameTrace ); } |
andrewboyson | 8:8b5e0bb28da0 | 123 | void ChgTraceDnsQuery () { DnsQueryTrace = !DnsQueryTrace; FramWrite(iDnsQuery, 1, &DnsQueryTrace ); } |
andrewboyson | 8:8b5e0bb28da0 | 124 | void ChgTraceDnsReply () { DnsReplyTrace = !DnsReplyTrace; FramWrite(iDnsReply, 1, &DnsReplyTrace ); } |
andrewboyson | 8:8b5e0bb28da0 | 125 | void ChgTraceDnsServer () { DnsServerTrace = !DnsServerTrace; FramWrite(iDnsServer, 1, &DnsServerTrace ); } |
andrewboyson | 8:8b5e0bb28da0 | 126 | void ChgTraceNtp () { NtpTrace = !NtpTrace; FramWrite(iNtp, 1, &NtpTrace ); } |
andrewboyson | 8:8b5e0bb28da0 | 127 | void ChgTraceDhcp () { DhcpTrace = !DhcpTrace; FramWrite(iDhcp, 1, &DhcpTrace ); } |
andrewboyson | 8:8b5e0bb28da0 | 128 | void ChgTraceNsRecvSol () { NsTraceRecvSol = !NsTraceRecvSol; FramWrite(iNsRecvSol, 1, &NsTraceRecvSol); } |
andrewboyson | 8:8b5e0bb28da0 | 129 | void ChgTraceNsRecvAdv () { NsTraceRecvAdv = !NsTraceRecvAdv; FramWrite(iNsRecvAdv, 1, &NsTraceRecvAdv); } |
andrewboyson | 8:8b5e0bb28da0 | 130 | void ChgTraceNsSendSol () { NsTraceSendSol = !NsTraceSendSol; FramWrite(iNsSendSol, 1, &NsTraceSendSol); } |
andrewboyson | 8:8b5e0bb28da0 | 131 | void ChgTraceNr4 () { Nr4Trace = !Nr4Trace ; FramWrite(iNr4, 1, &Nr4Trace ); } |
andrewboyson | 101:77fd93f0bde1 | 132 | void ChgTraceNr6 () { NrTrace = !NrTrace ; FramWrite(iNr, 1, &NrTrace ); } |
andrewboyson | 8:8b5e0bb28da0 | 133 | void ChgTraceNtpClient () { NtpClientTrace = !NtpClientTrace ; FramWrite(iNtpClient, 1, &NtpClientTrace ); } |
andrewboyson | 8:8b5e0bb28da0 | 134 | void ChgTraceEcho4 () { Echo4Trace = !Echo4Trace ; FramWrite(iEcho4, 1, &Echo4Trace ); } |
andrewboyson | 8:8b5e0bb28da0 | 135 | void ChgTraceEcho6 () { Echo6Trace = !Echo6Trace ; FramWrite(iEcho6, 1, &Echo6Trace ); } |
andrewboyson | 8:8b5e0bb28da0 | 136 | void ChgTraceDest6 () { Dest6Trace = !Dest6Trace ; FramWrite(iDest6, 1, &Dest6Trace ); } |
andrewboyson | 8:8b5e0bb28da0 | 137 | void ChgTraceRa () { RaTrace = !RaTrace ; FramWrite(iRa, 1, &RaTrace ); } |
andrewboyson | 8:8b5e0bb28da0 | 138 | void ChgTraceRs () { RsTrace = !RsTrace ; FramWrite(iRs, 1, &RsTrace ); } |
andrewboyson | 8:8b5e0bb28da0 | 139 | void ChgTraceAr4 () { Ar4Trace = !Ar4Trace ; FramWrite(iAr4, 1, &Ar4Trace ); } |
andrewboyson | 8:8b5e0bb28da0 | 140 | void ChgTraceAr6 () { Ar6Trace = !Ar6Trace ; FramWrite(iAr6, 1, &Ar6Trace ); } |
andrewboyson | 8:8b5e0bb28da0 | 141 | void ChgTraceArp () { ArpTrace = !ArpTrace ; FramWrite(iArp, 1, &ArpTrace ); } |
andrewboyson | 8:8b5e0bb28da0 | 142 | void ChgTraceIp4 () { Ip4Trace = !Ip4Trace ; FramWrite(iIp4, 1, &Ip4Trace ); } |
andrewboyson | 8:8b5e0bb28da0 | 143 | void ChgTraceIp6 () { Ip6Trace = !Ip6Trace ; FramWrite(iIp6, 1, &Ip6Trace ); } |
andrewboyson | 8:8b5e0bb28da0 | 144 | void ChgTraceUdp () { UdpTrace = !UdpTrace ; FramWrite(iUdp, 1, &UdpTrace ); } |
andrewboyson | 8:8b5e0bb28da0 | 145 | void ChgTraceTcp () { TcpTrace = !TcpTrace ; FramWrite(iTcp, 1, &TcpTrace ); } |
andrewboyson | 74:8228f0297227 | 146 | void ChgTraceHttp () { WebTrace = !WebTrace ; FramWrite(iHttp, 1, &WebTrace ); } |
andrewboyson | 8:8b5e0bb28da0 | 147 | void ChgTraceTftp () { TftpTrace = !TftpTrace ; FramWrite(iTftp, 1, &TftpTrace ); } |
andrewboyson | 0:3c04f4b47041 | 148 | |
andrewboyson | 28:bb55def47737 | 149 | |
andrewboyson | 28:bb55def47737 | 150 | |
andrewboyson | 28:bb55def47737 | 151 | static int iServerName; |
andrewboyson | 28:bb55def47737 | 152 | static int iInitialInterval; |
andrewboyson | 28:bb55def47737 | 153 | static int iNormalInterval; |
andrewboyson | 28:bb55def47737 | 154 | static int iRetryInterval; |
andrewboyson | 28:bb55def47737 | 155 | static int iOffsetMs; |
andrewboyson | 28:bb55def47737 | 156 | static int iMaxDelayMs; |
andrewboyson | 28:bb55def47737 | 157 | |
andrewboyson | 38:2bfeefa8709a | 158 | void SetNtpClientServerName ( char* value) { DnsLabelCopy(NtpClientQueryServerName, value); FramWrite(iServerName, DNS_MAX_LABEL_LENGTH, NtpClientQueryServerName ); } |
andrewboyson | 28:bb55def47737 | 159 | void SetNtpClientInitialInterval ( int value) { NtpClientQueryInitialInterval = (int32_t)value ; FramWrite(iInitialInterval, 4, &NtpClientQueryInitialInterval ); } |
andrewboyson | 28:bb55def47737 | 160 | void SetNtpClientNormalInterval ( int value) { NtpClientQueryNormalInterval = (int32_t)value ; FramWrite(iNormalInterval, 4, &NtpClientQueryNormalInterval ); } |
andrewboyson | 28:bb55def47737 | 161 | void SetNtpClientRetryInterval ( int value) { NtpClientQueryRetryInterval = (int32_t)value ; FramWrite(iRetryInterval, 4, &NtpClientQueryRetryInterval ); } |
andrewboyson | 28:bb55def47737 | 162 | void SetNtpClientOffsetMs ( int value) { NtpClientReplyOffsetMs = (int32_t)value ; FramWrite(iOffsetMs, 4, &NtpClientReplyOffsetMs ); } |
andrewboyson | 28:bb55def47737 | 163 | void SetNtpClientMaxDelayMs ( int value) { NtpClientReplyMaxDelayMs = (int32_t)value ; FramWrite(iMaxDelayMs, 4, &NtpClientReplyMaxDelayMs ); } |
andrewboyson | 28:bb55def47737 | 164 | |
andrewboyson | 28:bb55def47737 | 165 | int SettingsNtpInit() |
andrewboyson | 28:bb55def47737 | 166 | { |
andrewboyson | 28:bb55def47737 | 167 | int address; |
andrewboyson | 28:bb55def47737 | 168 | int32_t def4; |
andrewboyson | 28:bb55def47737 | 169 | |
andrewboyson | 28:bb55def47737 | 170 | def4 = 0; address = FramLoad( DNS_MAX_LABEL_LENGTH+1, NtpClientQueryServerName, NULL ); if (address < 0) return -1; iServerName = address; |
andrewboyson | 28:bb55def47737 | 171 | def4 = 1; address = FramLoad( 4, &NtpClientQueryInitialInterval, &def4); if (address < 0) return -1; iInitialInterval = address; |
andrewboyson | 28:bb55def47737 | 172 | def4 = 600; address = FramLoad( 4, &NtpClientQueryNormalInterval, &def4); if (address < 0) return -1; iNormalInterval = address; |
andrewboyson | 28:bb55def47737 | 173 | def4 = 60; address = FramLoad( 4, &NtpClientQueryRetryInterval, &def4); if (address < 0) return -1; iRetryInterval = address; |
andrewboyson | 28:bb55def47737 | 174 | def4 = 0; address = FramLoad( 4, &NtpClientReplyOffsetMs, &def4); if (address < 0) return -1; iOffsetMs = address; |
andrewboyson | 28:bb55def47737 | 175 | def4 = 50; address = FramLoad( 4, &NtpClientReplyMaxDelayMs, &def4); if (address < 0) return -1; iMaxDelayMs = address; |
andrewboyson | 28:bb55def47737 | 176 | |
andrewboyson | 28:bb55def47737 | 177 | return 0; |
andrewboyson | 28:bb55def47737 | 178 | } |
andrewboyson | 28:bb55def47737 | 179 | |
andrewboyson | 0:3c04f4b47041 | 180 | int SettingsInit() |
andrewboyson | 0:3c04f4b47041 | 181 | { |
andrewboyson | 0:3c04f4b47041 | 182 | int address; |
andrewboyson | 0:3c04f4b47041 | 183 | int32_t def4; |
andrewboyson | 0:3c04f4b47041 | 184 | char b; |
andrewboyson | 0:3c04f4b47041 | 185 | |
andrewboyson | 32:bbf9c8b45a2e | 186 | def4 = 10; address = FramLoad( 4, &ClkGovSlewDivisor, &def4); if (address < 0) return -1; iClkGovSlewDivisor = address; |
andrewboyson | 32:bbf9c8b45a2e | 187 | def4 = 20; address = FramLoad( 4, &ClkGovSlewChangeMaxMs, &def4); if (address < 0) return -1; iClkGovSlewMaxMs = address; |
andrewboyson | 32:bbf9c8b45a2e | 188 | def4 = 1000; address = FramLoad( 4, &ClkGovFreqDivisor, &def4); if (address < 0) return -1; iClkGovPpbDivisor = address; |
andrewboyson | 32:bbf9c8b45a2e | 189 | def4 = 10000000; address = FramLoad( 4, &ClkGovFreqChangeMaxPpb, &def4); if (address < 0) return -1; iClkGovPpbChangeMax = address; |
andrewboyson | 32:bbf9c8b45a2e | 190 | def4 = 100000; address = FramLoad( 4, &ClkGovSlewSyncedLimNs, &def4); if (address < 0) return -1; iClkGovSyncedLimitNs = address; |
andrewboyson | 32:bbf9c8b45a2e | 191 | def4 = 100000; address = FramLoad( 4, &ClkGovFreqSyncedLimPpb, &def4); if (address < 0) return -1; iClkGovSyncedLimitPpb = address; |
andrewboyson | 32:bbf9c8b45a2e | 192 | def4 = 10000; address = FramLoad( 4, &ClkGovSlewSyncedHysNs, &def4); if (address < 0) return -1; iClkGovSyncedHysterisNs = address; |
andrewboyson | 32:bbf9c8b45a2e | 193 | def4 = 1000; address = FramLoad( 4, &ClkGovFreqSyncedHysPpb, &def4); if (address < 0) return -1; iClkGovSyncedHysterisPpb = address; |
andrewboyson | 32:bbf9c8b45a2e | 194 | def4 = 3; address = FramLoad( 4, &ClkGovSlewOffsetMaxSecs, &def4); if (address < 0) return -1; iClkGovMaxOffsetSecs = address; |
andrewboyson | 32:bbf9c8b45a2e | 195 | address = FramLoad( 1, &b, NULL); ClkGovTrace = b; if (address < 0) return -1; iClkGov = address; |
andrewboyson | 32:bbf9c8b45a2e | 196 | address = FramLoad( 1, &b, NULL); OneWireTrace = b; if (address < 0) return -1; iOneWire = address; |
andrewboyson | 28:bb55def47737 | 197 | address = FramLoad( 1, &b, NULL); DnsSendRequestsViaIp4 = b; if (address < 0) return -1; iDnsSendRequestsViaIp4 = address; |
andrewboyson | 28:bb55def47737 | 198 | address = FramLoad( 1, &b, NULL); NtpClientQuerySendRequestsViaIp4 = b; if (address < 0) return -1; iNtpSendRequestsViaIp4 = address; |
andrewboyson | 28:bb55def47737 | 199 | address = FramLoad( 1, &b, NULL); TftpSendRequestsViaIp4 = b; if (address < 0) return -1; iTftpSendRequestsViaIp4 = address; |
andrewboyson | 13:2ca12dd42e91 | 200 | address = FramLoad( 1, &b, NULL); LogUart = b; if (address < 0) return -1; iLogUart = address; |
andrewboyson | 13:2ca12dd42e91 | 201 | address = FramLoad( 2, NetTraceHost, NULL) ; if (address < 0) return -1; iNetHost = address; |
andrewboyson | 13:2ca12dd42e91 | 202 | address = FramLoad( 1, &b, NULL); NetTraceStack = b; if (address < 0) return -1; iNetStack = address; |
andrewboyson | 13:2ca12dd42e91 | 203 | address = FramLoad( 1, &b, NULL); NetTraceNewLine = b; if (address < 0) return -1; iNetNewLine = address; |
andrewboyson | 13:2ca12dd42e91 | 204 | address = FramLoad( 1, &b, NULL); NetTraceVerbose = b; if (address < 0) return -1; iNetVerbose = address; |
andrewboyson | 13:2ca12dd42e91 | 205 | address = FramLoad( 1, &b, NULL); LinkTrace = b; if (address < 0) return -1; iLink = address; |
andrewboyson | 13:2ca12dd42e91 | 206 | address = FramLoad( 1, &b, NULL); DnsNameTrace = b; if (address < 0) return -1; iDnsName = address; |
andrewboyson | 13:2ca12dd42e91 | 207 | address = FramLoad( 1, &b, NULL); DnsQueryTrace = b; if (address < 0) return -1; iDnsQuery = address; |
andrewboyson | 13:2ca12dd42e91 | 208 | address = FramLoad( 1, &b, NULL); DnsReplyTrace = b; if (address < 0) return -1; iDnsReply = address; |
andrewboyson | 13:2ca12dd42e91 | 209 | address = FramLoad( 1, &b, NULL); DnsServerTrace = b; if (address < 0) return -1; iDnsServer = address; |
andrewboyson | 13:2ca12dd42e91 | 210 | address = FramLoad( 1, &b, NULL); NtpTrace = b; if (address < 0) return -1; iNtp = address; |
andrewboyson | 13:2ca12dd42e91 | 211 | address = FramLoad( 1, &b, NULL); DhcpTrace = b; if (address < 0) return -1; iDhcp = address; |
andrewboyson | 13:2ca12dd42e91 | 212 | address = FramLoad( 1, &b, NULL); NsTraceRecvSol = b; if (address < 0) return -1; iNsRecvSol = address; |
andrewboyson | 13:2ca12dd42e91 | 213 | address = FramLoad( 1, &b, NULL); NsTraceRecvAdv = b; if (address < 0) return -1; iNsRecvAdv = address; |
andrewboyson | 13:2ca12dd42e91 | 214 | address = FramLoad( 1, &b, NULL); NsTraceSendSol = b; if (address < 0) return -1; iNsSendSol = address; |
andrewboyson | 13:2ca12dd42e91 | 215 | address = FramLoad( 1, &b, NULL); Nr4Trace = b; if (address < 0) return -1; iNr4 = address; |
andrewboyson | 101:77fd93f0bde1 | 216 | address = FramLoad( 1, &b, NULL); NrTrace = b; if (address < 0) return -1; iNr = address; |
andrewboyson | 13:2ca12dd42e91 | 217 | address = FramLoad( 1, &b, NULL); NtpClientTrace = b; if (address < 0) return -1; iNtpClient = address; |
andrewboyson | 13:2ca12dd42e91 | 218 | address = FramLoad( 1, &b, NULL); Echo4Trace = b; if (address < 0) return -1; iEcho4 = address; |
andrewboyson | 13:2ca12dd42e91 | 219 | address = FramLoad( 1, &b, NULL); Echo6Trace = b; if (address < 0) return -1; iEcho6 = address; |
andrewboyson | 13:2ca12dd42e91 | 220 | address = FramLoad( 1, &b, NULL); Dest6Trace = b; if (address < 0) return -1; iDest6 = address; |
andrewboyson | 13:2ca12dd42e91 | 221 | address = FramLoad( 1, &b, NULL); RaTrace = b; if (address < 0) return -1; iRa = address; |
andrewboyson | 13:2ca12dd42e91 | 222 | address = FramLoad( 1, &b, NULL); RsTrace = b; if (address < 0) return -1; iRs = address; |
andrewboyson | 13:2ca12dd42e91 | 223 | address = FramLoad( 1, &b, NULL); Ar4Trace = b; if (address < 0) return -1; iAr4 = address; |
andrewboyson | 13:2ca12dd42e91 | 224 | address = FramLoad( 1, &b, NULL); Ar6Trace = b; if (address < 0) return -1; iAr6 = address; |
andrewboyson | 13:2ca12dd42e91 | 225 | address = FramLoad( 1, &b, NULL); ArpTrace = b; if (address < 0) return -1; iArp = address; |
andrewboyson | 13:2ca12dd42e91 | 226 | address = FramLoad( 1, &b, NULL); Ip4Trace = b; if (address < 0) return -1; iIp4 = address; |
andrewboyson | 13:2ca12dd42e91 | 227 | address = FramLoad( 1, &b, NULL); Ip6Trace = b; if (address < 0) return -1; iIp6 = address; |
andrewboyson | 13:2ca12dd42e91 | 228 | address = FramLoad( 1, &b, NULL); UdpTrace = b; if (address < 0) return -1; iUdp = address; |
andrewboyson | 13:2ca12dd42e91 | 229 | address = FramLoad( 1, &b, NULL); TcpTrace = b; if (address < 0) return -1; iTcp = address; |
andrewboyson | 74:8228f0297227 | 230 | address = FramLoad( 1, &b, NULL); WebTrace = b; if (address < 0) return -1; iHttp = address; |
andrewboyson | 13:2ca12dd42e91 | 231 | address = FramLoad( 1, &b, NULL); TftpTrace = b; if (address < 0) return -1; iTftp = address; |
andrewboyson | 8:8b5e0bb28da0 | 232 | |
andrewboyson | 0:3c04f4b47041 | 233 | return 0; |
andrewboyson | 0:3c04f4b47041 | 234 | } |