Microchip® Advanced Software Framework

httpdownloader.h File Reference

HTTP File Downloader Configuration.

Copyright (c) 2018 Microchip Technology Inc. and its subsidiaries.

Macros

#define FAILURE   -1
 
#define MAIN_BUFFER_MAX_SIZE   (1446)
 Content URI for download. More...
 
#define MAIN_MAX_FILE_EXT_LENGTH   (8)
 Maximum file extension length. More...
 
#define MAIN_MAX_FILE_NAME_LENGTH   (250)
 Maximum file name length. More...
 
#define MAIN_ZERO_FMT(SZ)   (SZ == 4) ? "%04d" : (SZ == 3) ? "%03d" : (SZ == 2) ? "%02d" : "%d"
 Output format with '0'. More...
 
#define SUCCESS   0
 

Enumerations

enum  download_state {
  NOT_READY = 0,
  STORAGE_READY = 0x01,
  WIFI_CONNECTED = 0x02,
  GET_REQUESTED = 0x04,
  DOWNLOADING = 0x08,
  COMPLETED = 0x10,
  CANCELED = 0x20,
  NOT_READY = 0,
  WIFI_CONNECTED = 0x01,
  HTTP_DOWNLOAD_INITIATED = 0x02,
  GET_REQUESTED = 0x04,
  DOWNLOADING = 0x08,
  COMPLETED = 0x10,
  CANCELED = 0x20,
  ROOT_CERT_DOWNLOAD = 0x40,
  TLS_CERT_DOWNLOAD = 0x80
}
 

Functions

int http_downloader (char *)
 http downloader function. More...
 
void setFirmwareDownload (int)
 

#define FAILURE   -1
#define MAIN_BUFFER_MAX_SIZE   (1446)

Content URI for download.

Maximum size for packet buffer.

Referenced by configure_http_client(), and http_client_callback().

#define MAIN_MAX_FILE_EXT_LENGTH   (8)

Maximum file extension length.

#define MAIN_MAX_FILE_NAME_LENGTH   (250)

Maximum file name length.

#define MAIN_ZERO_FMT (   SZ)    (SZ == 4) ? "%04d" : (SZ == 3) ? "%03d" : (SZ == 2) ? "%02d" : "%d"

Output format with '0'.

Enumerator
NOT_READY 

Not ready.

STORAGE_READY 

Storage is ready.

WIFI_CONNECTED 

Wi-Fi is connected.

GET_REQUESTED 

GET request is sent.

DOWNLOADING 

Running to download.

COMPLETED 

Download completed.

CANCELED 

Download canceled.

NOT_READY 

Not ready.

WIFI_CONNECTED 

Wi-Fi is connected.

HTTP_DOWNLOAD_INITIATED 

Start download is called

GET_REQUESTED 

GET request is sent.

DOWNLOADING 

Running to download.

COMPLETED 

Download completed.

CANCELED 

Download canceled.

ROOT_CERT_DOWNLOAD 

Root cert Download.

TLS_CERT_DOWNLOAD 

TLS cert Download.

void setFirmwareDownload ( int  )

References is_firmware.