rom_iap: Clean up comments and realign with spaces.
This commit is contained in:
@ -24,72 +24,71 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
/* TODO define other commands */
|
/* TODO define other commands */
|
||||||
|
|
||||||
IAP_CMD_INIT_IAP = 49,
|
IAP_CMD_INIT_IAP = 49,
|
||||||
/* Command Init IAP
|
/* Command Init IAP
|
||||||
Input Command code: 49 (decimal)
|
Input: Command code: 49 (decimal)
|
||||||
Return Code CMD_SUCCESS
|
Return Code: CMD_SUCCESS
|
||||||
Result None
|
Result: None
|
||||||
Description Initializes and prepares the flash for erase and write operations.
|
Description Initializes and prepares the flash for erase and write operations.
|
||||||
Stack usage 88 B */
|
Stack usage 88 B */
|
||||||
|
|
||||||
IAP_CMD_READ_PART_ID_NO = 54,
|
IAP_CMD_READ_PART_ID_NO = 54,
|
||||||
/* Read part identification number
|
/* Read part identification number
|
||||||
Command Read part identification number
|
Input: Command code: 54 (decimal)
|
||||||
Input Command code: 54 (decimal)
|
Parameters:None
|
||||||
Parameters:None
|
Return Code: CMD_SUCCESS
|
||||||
Return Code CMD_SUCCESS |
|
Result Result0:Part Identification Number.
|
||||||
Result Result0:Part Identification Number.
|
Result1:Part Identification Number.
|
||||||
Result1:Part Identification Number.
|
Description: This command is used to read the part identification number. See Table 1082
|
||||||
Description This command is used to read the part identification number. See Table 1082
|
'LPC43xx part identification numbers'. The command returns two words: word0
|
||||||
“LPC43xx part identification numbers”.
|
followed by word1. Word 0 corresponds to the part id and word1 indicates the flash
|
||||||
The command returns two words: word0 followed by word1. Word 0 corresponds
|
configuration or contains 0x0 for flashless parts.
|
||||||
to the part id and word1 indicates the flash configuration or contains 0x0 for
|
Stack usage: 8 B */
|
||||||
flashless parts.
|
|
||||||
Stack usage 8 B */
|
|
||||||
|
|
||||||
IAP_CMD_READ_SERIAL_NO = 58
|
IAP_CMD_READ_SERIAL_NO = 58
|
||||||
/* Read device serial number
|
/* Read device serial number
|
||||||
Input Command code: 58 (decimal)
|
Input: Command code: 58 (decimal)
|
||||||
Parameters: None
|
Parameters: None
|
||||||
Return Code CMD_SUCCESS
|
Return Code: CMD_SUCCESS
|
||||||
Result Result0:First 32-bit word of Device Identification Number (at the lowest address)
|
Result: Result0: First 32-bit word of Device Identification Number (at the lowest address)
|
||||||
Result1:Second 32-bit word of Device Identification Number
|
Result1: Second 32-bit word of Device Identification Number
|
||||||
Result2:Third 32-bit word of Device Identification Number
|
Result2: Third 32-bit word of Device Identification Number
|
||||||
Result3:Fourth 32-bit word of Device Identification Number
|
Result3: Fourth 32-bit word of Device Identification Number
|
||||||
Description This command is used to read the device identification number. The serial number
|
Description: This command is used to read the device identification number. The serial number
|
||||||
may be used to uniquely identify a single unit among all LPC43xx devices.
|
may be used to uniquely identify a single unit among all LPC43xx devices.
|
||||||
Stack usage 8 B */
|
Stack usage: 8 B */
|
||||||
} iap_cmd_code_t;
|
} iap_cmd_code_t;
|
||||||
|
|
||||||
/* ISP/IAP Return Code */
|
/* ISP/IAP Return Code */
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
CMD_SUCCESS = 0x00000000, /* CMD_SUCCESS Command is executed successfully. Sent by ISP handler only when command given by the host has been completely and successfully executed. */
|
CMD_SUCCESS = 0x00000000, /* CMD_SUCCESS Command is executed successfully.
|
||||||
INVALID_COMMAND = 0x00000001, /* Invalid command. */
|
Sent by ISP handler only when command given by the host has been completely and successfully executed. */
|
||||||
SRC_ADDR_ERROR = 0x00000002, /* Source address is not on word boundary. */
|
|
||||||
DST_ADDR_ERROR = 0x00000003, /* Destination address not on word or 256 byte boundary. */
|
INVALID_COMMAND = 0x00000001, /* Invalid command. */
|
||||||
SRC_ADDR_NOT_MAPPED = 0x00000004, /* Source address is not mapped in the memory map. Count value is taken into consideration where applicable. */
|
SRC_ADDR_ERROR = 0x00000002, /* Source address is not on word boundary. */
|
||||||
DST_ADDR_NOT_MAPPED = 0x00000005, /* Destination address is not mapped in the memory map. Count value is taken into consideration where applicable.*/
|
DST_ADDR_ERROR = 0x00000003, /* Destination address not on word or 256 byte boundary. */
|
||||||
|
SRC_ADDR_NOT_MAPPED = 0x00000004, /* Source address is not mapped in the memory map. Count value is taken into consideration where applicable. */
|
||||||
|
DST_ADDR_NOT_MAPPED = 0x00000005, /* Destination address is not mapped in the memory map. Count value is taken into consideration where applicable.*/
|
||||||
COUNT_ERROR = 0x00000006, /* Byte count is not multiple of 4 or is not a permitted value. */
|
COUNT_ERROR = 0x00000006, /* Byte count is not multiple of 4 or is not a permitted value. */
|
||||||
INVALID_SECTOR = 0x00000007, /* Sector number is invalid or end sector number is greater than start sector number. */
|
INVALID_SECTOR = 0x00000007, /* Sector number is invalid or end sector number is greater than start sector number. */
|
||||||
SECTOR_NOT_BLANK = 0x00000008, /* Sector is not blank. */
|
SECTOR_NOT_BLANK = 0x00000008, /* Sector is not blank. */
|
||||||
SECTOR_NOT_PREP_WRITE_OP = 0x00000009, /* Command to prepare sector for write operation was not executed. */
|
SECTOR_NOT_PREP_WRITE_OP = 0x00000009, /* Command to prepare sector for write operation was not executed. */
|
||||||
COMPARE_ERROR = 0x0000000A, /* Source and destination data not equal. */
|
COMPARE_ERROR = 0x0000000A, /* Source and destination data not equal. */
|
||||||
BUSY = 0x0000000B, /* Flash programming hardware interface is busy. */
|
BUSY = 0x0000000B, /* Flash programming hardware interface is busy. */
|
||||||
PARAM_ERROR = 0x0000000C, /* Insufficient number of parameters or invalid parameter. */
|
PARAM_ERROR = 0x0000000C, /* Insufficient number of parameters or invalid parameter. */
|
||||||
ADDR_ERROR = 0x0000000D, /* Address is not on word boundary. */
|
ADDR_ERROR = 0x0000000D, /* Address is not on word boundary. */
|
||||||
ADDR_NOT_MAPPED = 0x0000000E, /* Address is not mapped in the memory map. Count value is taken in to consideration where applicable. */
|
ADDR_NOT_MAPPED = 0x0000000E, /* Address is not mapped in the memory map. Count value is taken in to consideration where applicable. */
|
||||||
CMD_LOCKED = 0x0000000F, /* Command is locked. */
|
CMD_LOCKED = 0x0000000F, /* Command is locked. */
|
||||||
INVALID_CODE = 0x00000010, /* Unlock code is invalid. */
|
INVALID_CODE = 0x00000010, /* Unlock code is invalid. */
|
||||||
INVALID_BAUD_RATE = 0x00000011, /* Invalid baud rate setting. */
|
INVALID_BAUD_RATE = 0x00000011, /* Invalid baud rate setting. */
|
||||||
INVALID_STOP_BIT = 0x00000012, /* Invalid stop bit setting. */
|
INVALID_STOP_BIT = 0x00000012, /* Invalid stop bit setting. */
|
||||||
CODE_READ_PROTECTION_ENABLED = 0x00000013, /* Code read protection enabled. */
|
CODE_READ_PROTECTION_ENABLED = 0x00000013, /* Code read protection enabled. */
|
||||||
INVALID_FLASH_UNIT = 0x00000014, /* Invalid flash unit. */
|
INVALID_FLASH_UNIT = 0x00000014, /* Invalid flash unit. */
|
||||||
USER_CODE_CHECKSUM = 0x00000015,
|
USER_CODE_CHECKSUM = 0x00000015,
|
||||||
ERROR_SETTING_ACTIVE_PARTITION = 0x00000016,
|
ERROR_SETTING_ACTIVE_PARTITION = 0x00000016,
|
||||||
|
|
||||||
/* Special Error */
|
/* Special Error */
|
||||||
|
Reference in New Issue
Block a user