MeterLogger
Data Structures | Macros | Typedefs | Functions
upgrade.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  upgrade_server_info
 

Macros

#define SPI_FLASH_SEC_SIZE   4096
 
#define LIMIT_ERASE_SIZE   0x10000
 
#define USER_BIN1   0x00
 
#define USER_BIN2   0x01
 
#define UPGRADE_FLAG_IDLE   0x00
 
#define UPGRADE_FLAG_START   0x01
 
#define UPGRADE_FLAG_FINISH   0x02
 
#define UPGRADE_FW_BIN1   0x00
 
#define UPGRADE_FW_BIN2   0x01
 
#define UPGRADE_FLAG_IDLE   0x00
 
#define UPGRADE_FLAG_START   0x01
 
#define UPGRADE_FLAG_FINISH   0x02
 

Typedefs

typedef void(* upgrade_states_check_callback) (void *arg)
 

Functions

void system_upgrade_init ()
 
void system_upgrade_deinit ()
 
bool system_upgrade (uint8 *data, uint16 len)
 
bool system_upgrade_start (struct upgrade_server_info *server)
 

Macro Definition Documentation

◆ LIMIT_ERASE_SIZE

#define LIMIT_ERASE_SIZE   0x10000

Definition at line 29 of file upgrade.h.

◆ SPI_FLASH_SEC_SIZE

#define SPI_FLASH_SEC_SIZE   4096

Definition at line 28 of file upgrade.h.

◆ UPGRADE_FLAG_FINISH [1/2]

#define UPGRADE_FLAG_FINISH   0x02

Definition at line 63 of file upgrade.h.

◆ UPGRADE_FLAG_FINISH [2/2]

#define UPGRADE_FLAG_FINISH   0x02

Definition at line 63 of file upgrade.h.

◆ UPGRADE_FLAG_IDLE [1/2]

#define UPGRADE_FLAG_IDLE   0x00

Definition at line 61 of file upgrade.h.

◆ UPGRADE_FLAG_IDLE [2/2]

#define UPGRADE_FLAG_IDLE   0x00

Definition at line 61 of file upgrade.h.

◆ UPGRADE_FLAG_START [1/2]

#define UPGRADE_FLAG_START   0x01

Definition at line 62 of file upgrade.h.

◆ UPGRADE_FLAG_START [2/2]

#define UPGRADE_FLAG_START   0x01

Definition at line 62 of file upgrade.h.

◆ UPGRADE_FW_BIN1

#define UPGRADE_FW_BIN1   0x00

Definition at line 38 of file upgrade.h.

◆ UPGRADE_FW_BIN2

#define UPGRADE_FW_BIN2   0x01

Definition at line 39 of file upgrade.h.

◆ USER_BIN1

#define USER_BIN1   0x00

Definition at line 31 of file upgrade.h.

◆ USER_BIN2

#define USER_BIN2   0x01

Definition at line 32 of file upgrade.h.

Typedef Documentation

◆ upgrade_states_check_callback

typedef void(* upgrade_states_check_callback) (void *arg)

Definition at line 41 of file upgrade.h.

Function Documentation

◆ system_upgrade()

bool system_upgrade ( uint8 data,
uint16  len 
)

◆ system_upgrade_deinit()

void system_upgrade_deinit ( )

◆ system_upgrade_init()

void system_upgrade_init ( )

◆ system_upgrade_start()

bool system_upgrade_start ( struct upgrade_server_info server)