Common stuff for all my devices' web server pages: css, login, log, ipv4, ipv6, firmware update, clock, reset info etc.

Dependents:   oldheating gps motorhome heating

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers web-firmware-post.c Source File

web-firmware-post.c

00001 #include <stdint.h>
00002 #include <stdbool.h>
00003 
00004 #include "firmware.h"
00005 
00006 void WebFirmwarePost (int contentLength, int contentStart, int size, char* pRequestStream, uint32_t positionInRequestStream, bool* pComplete)
00007 {
00008     if (!positionInRequestStream)
00009     {
00010         FirmwareStart(contentLength);
00011     }
00012     char* pDataStart  = pRequestStream + contentStart;
00013     int    dataLength =           size - contentStart;
00014     *pComplete = FirmwareAdd(pDataStart, dataLength);
00015 }