7 #ifndef __FIB_BOOTLOADER_H__
8 #define __FIB_BOOTLOADER_H__
13 #define FIB_RESET_GO_ZERO 0xF00F0100
15 #define FIB_RESET_GO_JUMP 0xF00F0110
16 #define FIB_RESET_BAUD_RATE 0xF00F0111
17 #define FIB_RESET_READ_UNPROTECT 0xF00F0112
18 #define FIB_RESET_GPIO_BOOTMODE 0xF00F0113
19 #define FIB_RESET_PART_DATA 0xF00F0114
20 #define FIB_RESET_NMI_HARD_FAULT 0xF00F0115
25 typedef int32u FibStatus;
28 #define FIB_ERR_UNALIGNED 1
29 #define FIB_ERR_INVALID_ADDRESS 2
30 #define FIB_ERR_INVALID_TYPE 3
31 #define FIB_ERR_WRITE_PROTECTED 4
32 #define FIB_ERR_WRITE_FAILED 5
33 #define FIB_ERR_ERASE_REQUIRED 6
34 #define FIB_ERR_VERIFY_FAILED 7
39 typedef int32u FibEraseType;
41 #define MFB_MASS_ERASE 0x01
42 #define MFB_PAGE_ERASE 0x02
43 #define CIB_ERASE 0x03
45 #define DO_ERASE 0x0100
46 #define DO_VERIFY 0x0200
51 FibStatus fibFlashWrite(int32u address, int8u *data,
52 int32u writeLength, int32u verifyLength);
54 FibStatus fibFlashErase(FibEraseType eraseType, int32u address);
56 #endif //__FIB_BOOTLOADER_H__