3#include "main-header.h"
8int flash_app_close(
int fd,
int reason);
9int flash_app_init(
void *base, uint32_t flags);
16#define FLASH_FLAGS_USE 0
18#define FLASH_FLAGS_SET_LATEST_APP 1
20#define FLASH_FLAGS_STOP_USERAPP 2
22#define FLASH_FLAGS_START_USERAPP 3
24#define FLASH_FLAGS_SET_LATEST_USERAPP 4
26#define FLASH_FLAGS_PRE_ERASE 5
28#define FLASH_FLAGS_RETURN_APP_SLOT 6
30#define FLASH_FLAGS_USE_DIRECT_WRITE 7
32#define FLASH_FLAGS_WRITE_OLD 8
int flash_write(byte *b, void *adr, int size)
unlock, erase, write, lock
int flash_app_consumer(int fd, byte *b, int size)
called by stream whenever we got sufficient bytes (and only on full blocks!)
void flashcom(struct command *com)
set up a flash connection, associate with stream, called by command-handler for command "flash-app"