Microchip® Advanced Software Framework

common/components/wifi/winc1500/http_downloader_example/main.h File Reference

HTTP File Downloader Example.

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

Macros

#define IPV4_BYTE(val, index)   ((val >> (index * 8)) & 0xFF)
 IP address parsing. More...
 
#define MAIN_BUFFER_MAX_SIZE   (1446)
 Maximum size for packet buffer. More...
 
#define MAIN_HTTP_FILE_URL   "http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-45154-Product-Selection-Guide_Brochure.pdf"
 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_WLAN_AUTH   M2M_WIFI_SEC_WPA_PSK
 Security manner. More...
 
#define MAIN_WLAN_PSK   "12345678"
 Password for Destination SSID. More...
 
#define MAIN_WLAN_SSID   "DEMO_AP"
 Wi-Fi AP Settings. More...
 
#define MAIN_ZERO_FMT(SZ)   (SZ == 4) ? "%04d" : (SZ == 3) ? "%03d" : (SZ == 2) ? "%02d" : "%d"
 Output format with '0'. More...
 

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
}
 

#define IPV4_BYTE (   val,
  index 
)    ((val >> (index * 8)) & 0xFF)

IP address parsing.

#define MAIN_BUFFER_MAX_SIZE   (1446)

Maximum size for packet buffer.

Referenced by configure_http_client(), and http_client_callback().

#define MAIN_HTTP_FILE_URL   "http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-45154-Product-Selection-Guide_Brochure.pdf"

Content URI for download.

Referenced by certificate_download(), start_download(), and store_file_packet().

#define MAIN_MAX_FILE_EXT_LENGTH   (8)

Maximum file extension length.

Referenced by rename_to_unique().

#define MAIN_MAX_FILE_NAME_LENGTH   (250)

Maximum file name length.

Referenced by rename_to_unique(), and store_file_packet().

#define MAIN_WLAN_AUTH   M2M_WIFI_SEC_WPA_PSK

Security manner.

#define MAIN_WLAN_PSK   "12345678"

Password for Destination SSID.

#define MAIN_WLAN_SSID   "DEMO_AP"

Wi-Fi AP Settings.

Destination SSID

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

Output format with '0'.

Referenced by rename_to_unique().

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.