12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- #ifndef __HTTPD_H__
- #define __HTTPD_H__
- #include "lwip/def.h"
- #include "fsdata.h"
- #include "stm32f4xx.h"
- #include "stdbool.h"
- #define SET_FWINVALID_FLAG() do {\
- fInvalidFw = true;\
- RTC_WriteBackupRegister(RTC_BKP_DR7, fInvalidFw);\
- } while(0)
- #define CLEAR_FWINVALID_FLAG() do {\
- fInvalidFw = false;\
- RTC_WriteBackupRegister(RTC_BKP_DR7, fInvalidFw);\
- } while(0)
- #define SET_FWUPDATED_FLAG() do {\
- RTC_WriteBackupRegister(RTC_BKP_DR3, 0x01);\
- } while(0)
- typedef enum
- {
- LoginPage = 0,
- FileUploadPage,
- UploadDonePage,
- UploadErrorPage,
- ResetDonePage
-
- }htmlpageState;
- struct fs_file {
- char *data;
- int len;
- };
- void IAP_httpd_init(void);
- uint16_t Finder(char* data, uint16_t len);
- uint32_t ReturnFlashWriteAddress(void);
- bool GetFileName(char *inStr, char *fileName, uint8_t *fileNameLen);
- uint8_t update_timeout;
- #endif
|