Andrew Boyson / web

Dependents:   oldheating gps motorhome heating

Committer:
andrewboyson
Date:
Thu Feb 28 13:13:05 2019 +0000
Revision:
48:4e678727c4c9
Parent:
47:cf7d4c34158e
Child:
53:27d56a22a450
Updated firmware module in lpc1768 library

Who changed what in which revision?

UserRevisionLine numberNew contents of line
andrewboyson 46:1822fdbe6c0c 1 #include <string.h>
andrewboyson 46:1822fdbe6c0c 2 #include <stdlib.h>
andrewboyson 47:cf7d4c34158e 3 #include "http.h"
andrewboyson 46:1822fdbe6c0c 4 #include "settings.h"
andrewboyson 46:1822fdbe6c0c 5 #include "semihost.h"
andrewboyson 47:cf7d4c34158e 6 #include "http-server.h"
andrewboyson 47:cf7d4c34158e 7 #include "firmware.h"
andrewboyson 46:1822fdbe6c0c 8
andrewboyson 46:1822fdbe6c0c 9 void HttpFirmwareQuery(char* pQuery)
andrewboyson 46:1822fdbe6c0c 10 {
andrewboyson 46:1822fdbe6c0c 11 while (pQuery)
andrewboyson 46:1822fdbe6c0c 12 {
andrewboyson 46:1822fdbe6c0c 13 char* pName;
andrewboyson 46:1822fdbe6c0c 14 char* pValue;
andrewboyson 46:1822fdbe6c0c 15 pQuery = HttpQuerySplit(pQuery, &pName, &pValue);
andrewboyson 46:1822fdbe6c0c 16
andrewboyson 46:1822fdbe6c0c 17 int value = (int)strtol(pValue, NULL, 10);
andrewboyson 46:1822fdbe6c0c 18
andrewboyson 46:1822fdbe6c0c 19 if (HttpSameStr(pName, "restart" )) SemihostReset();
andrewboyson 47:cf7d4c34158e 20
andrewboyson 48:4e678727c4c9 21 FirmwareTargetCheckSum = 0;
andrewboyson 48:4e678727c4c9 22 if (HttpSameStr(pName, "checksum")) FirmwareTargetCheckSum = value;
andrewboyson 46:1822fdbe6c0c 23 }
andrewboyson 46:1822fdbe6c0c 24 }