Common definitions and declarations for NVIDIA DRIVE® Update.
Macros | |
#define | DU_UID_COMMON (0U) |
Drive Update unit ids. More... | |
#define | DU_UID_TRANSPORT (1U) |
Defines the DU-Transport unit id. More... | |
#define | DU_UID_LINK (2U) |
Defines the DU-Link unit id. More... | |
#define | DU_UID_TII (3U) |
Defines the DU-TII unit id. More... | |
#define | DU_UID_MASTER (4U) |
Defines the DU-Master unit id. More... | |
#define | DU_UID_BHC (5U) |
Defines the DU-BHC unit id. More... | |
#define | DU_UID_RPE (6U) |
Defines the DU-RPE unit id. More... | |
#define | DU_UID_CCHECK (7U) |
Defines the DU-CCHECK unit id. More... | |
#define | DU_UID_AUTH (8U) |
Defines the DU-AUTH unit id. More... | |
#define | DU_UID_CONTENT (9U) |
Defines the DU content provider unit id. More... | |
#define | DU_UID_DECOMP (10U) |
Defines the DU-DECOMP unit id. More... | |
#define | DU_ECODE(uid, suid, err) DU_ERR_CODE(uid, suid, err) |
Helper macro to define a unique error code, in which uid is the unit id, suid is the sub-unit id and err is an integer code. More... | |
#define | DU_ERR_UID_OFFSET (24U) |
Offset of UID in DU_ERR_CODE. More... | |
#define | DU_ERR_UID_MASK ((uint32_t) 0xFFU) |
Mask of UID in DU_ERR_CODE. More... | |
#define | DU_ERR_SUID_OFFSET (20U) |
Offset of SUID in DU_ERR_CODE. More... | |
#define | DU_ERR_SUID_MASK ((uint32_t) 0xFU) |
Mask of SUID in DU_ERR_CODE. More... | |
#define | DU_ERR_MASK ((uint32_t) 0xFFFFFU) |
Mask of ERR in DU_ERR_CODE. More... | |
#define | DU_ERR_CODE(uid, suid, err) |
Generates a unique error code. More... | |
#define | DU_ECODE_GET_UID(rcode) (((rcode) >> 24U) & 0xFFU) |
Gets the unit id. More... | |
#define | DU_ECODE_GET_SUID(rcode) (((rcode) >> 20U) & 0xFU) |
Gets the sub-unit. More... | |
#define | DU_ECODE_GET_ERR(rcode) ((rcode) & 0xFFFFFU) |
Gets the integer error code. More... | |
#define | DU_OK (DU_RCODE)(0U) |
Defines the success code. More... | |
#define | DUCOMMON_ECODE(err) DU_ECODE(DU_UID_COMMON, 0U, (err)) |
#define | DUCOMMON_ERR_GENERIC DUCOMMON_ECODE(1U) |
#define | DUCOMMON_ERR_INVALID_ARGUMENT DUCOMMON_ECODE(2U) |
#define | DUCOMMON_ERR_NOT_FOUND DUCOMMON_ECODE(3U) |
#define | DUCOMMON_ERR_BUFFER_TOO_SMALL DUCOMMON_ECODE(4U) |
#define | DUCOMMON_ERR_SYNTAX DUCOMMON_ECODE(5U) |
#define | DU_STR_LONG_BUF_SIZE (128U) |
Defines the default long string buffer size. More... | |
#define | DU_STR_SHORT_BUF_SIZE (32U) |
Defines the default short string buffer size. More... | |
#define | DU_PATH_MAX (512U) |
Defines the max path size. More... | |
#define | DU_MAX_CMD_LEN (512U) |
Defines the max command length. More... | |
#define | DU_1KB (1024U) |
Defines the buffer size of 1KB. More... | |
#define | DU_2KB (2U * DU_1KB) |
Defines the buffer size of 2KB. More... | |
#define | DU_4KB (4U * DU_1KB) |
Defines the buffer size of 4KB. More... | |
#define | DU_8KB (8U * DU_1KB) |
Defines the buffer size of 8KB. More... | |
#define | DU_16KB (16U * DU_1KB) |
Defines the buffer size of 16KB. More... | |
#define | DU_32KB (32U * DU_1KB) |
Defines the buffer size of 32KB. More... | |
#define | DU_64KB (64U * DU_1KB) |
Defines the buffer size of 64KB. More... | |
#define | DU_128KB (128U * DU_1KB) |
Defines the buffer size of 128KB. More... | |
#define | DU_256KB (256U * DU_1KB) |
Defines the buffer size of 256KB. More... | |
#define | DU_512KB (512U * DU_1KB) |
Defines the buffer size of 512KB. More... | |
#define | DU_1MB (1024U * DU_1KB) |
Defines the buffer size of 1MB. More... | |
#define | DU_RUNLEVEL_STR_MAX_SIZE (16U) |
Defines the max size of the run level string. More... | |
Typedefs | |
typedef uint32_t | DU_RCODE |
Drive Update error codes. More... | |
typedef enum DU_RUN_LEVEL | DU_RUN_LEVEL |
Defines the run level. More... | |
Enumerations | |
enum | DU_RUN_LEVEL { RL_DORMANT = 0U, RL_MONITOR, RL_TELECAST, RL_XFER, RL_BG_APPLY, RL_FULL_APPLY, RL_UNRESTRICTED, RL_INVALID } |
Defines the run level. More... | |
#define DU_128KB (128U * DU_1KB) |
Defines the buffer size of 128KB.
Definition at line 149 of file ducommon.h.
#define DU_16KB (16U * DU_1KB) |
Defines the buffer size of 16KB.
Definition at line 143 of file ducommon.h.
#define DU_1KB (1024U) |
Defines the buffer size of 1KB.
Definition at line 135 of file ducommon.h.
#define DU_1MB (1024U * DU_1KB) |
Defines the buffer size of 1MB.
Definition at line 155 of file ducommon.h.
#define DU_256KB (256U * DU_1KB) |
Defines the buffer size of 256KB.
Definition at line 151 of file ducommon.h.
#define DU_2KB (2U * DU_1KB) |
Defines the buffer size of 2KB.
Definition at line 137 of file ducommon.h.
#define DU_32KB (32U * DU_1KB) |
Defines the buffer size of 32KB.
Definition at line 145 of file ducommon.h.
#define DU_4KB (4U * DU_1KB) |
Defines the buffer size of 4KB.
Definition at line 139 of file ducommon.h.
#define DU_512KB (512U * DU_1KB) |
Defines the buffer size of 512KB.
Definition at line 153 of file ducommon.h.
#define DU_64KB (64U * DU_1KB) |
Defines the buffer size of 64KB.
Definition at line 147 of file ducommon.h.
#define DU_8KB (8U * DU_1KB) |
Defines the buffer size of 8KB.
Definition at line 141 of file ducommon.h.
#define DU_ECODE | ( | uid, | |
suid, | |||
err | |||
) | DU_ERR_CODE(uid, suid, err) |
Helper macro to define a unique error code, in which uid
is the unit id, suid
is the sub-unit id and err
is an integer code.
Definition at line 80 of file ducommon.h.
#define DU_ECODE_GET_ERR | ( | rcode | ) | ((rcode) & 0xFFFFFU) |
Gets the integer error code.
Definition at line 108 of file ducommon.h.
#define DU_ECODE_GET_SUID | ( | rcode | ) | (((rcode) >> 20U) & 0xFU) |
Gets the sub-unit.
Definition at line 106 of file ducommon.h.
#define DU_ECODE_GET_UID | ( | rcode | ) | (((rcode) >> 24U) & 0xFFU) |
Gets the unit id.
Definition at line 104 of file ducommon.h.
#define DU_ERR_CODE | ( | uid, | |
suid, | |||
err | |||
) |
Generates a unique error code.
Definition at line 98 of file ducommon.h.
#define DU_ERR_MASK ((uint32_t) 0xFFFFFU) |
Mask of ERR in DU_ERR_CODE.
Definition at line 95 of file ducommon.h.
#define DU_ERR_SUID_MASK ((uint32_t) 0xFU) |
Mask of SUID in DU_ERR_CODE.
Definition at line 92 of file ducommon.h.
#define DU_ERR_SUID_OFFSET (20U) |
Offset of SUID in DU_ERR_CODE.
Definition at line 89 of file ducommon.h.
#define DU_ERR_UID_MASK ((uint32_t) 0xFFU) |
Mask of UID in DU_ERR_CODE.
Definition at line 86 of file ducommon.h.
#define DU_ERR_UID_OFFSET (24U) |
Offset of UID in DU_ERR_CODE.
Definition at line 83 of file ducommon.h.
#define DU_MAX_CMD_LEN (512U) |
Defines the max command length.
Definition at line 132 of file ducommon.h.
#define DU_OK (DU_RCODE)(0U) |
Defines the success code.
Definition at line 111 of file ducommon.h.
#define DU_PATH_MAX (512U) |
Defines the max path size.
Definition at line 129 of file ducommon.h.
#define DU_RUNLEVEL_STR_MAX_SIZE (16U) |
Defines the max size of the run level string.
Definition at line 206 of file ducommon.h.
#define DU_STR_LONG_BUF_SIZE (128U) |
Defines the default long string buffer size.
Definition at line 123 of file ducommon.h.
#define DU_STR_SHORT_BUF_SIZE (32U) |
Defines the default short string buffer size.
Definition at line 126 of file ducommon.h.
#define DU_UID_AUTH (8U) |
Defines the DU-AUTH unit id.
Definition at line 60 of file ducommon.h.
#define DU_UID_BHC (5U) |
Defines the DU-BHC unit id.
Definition at line 54 of file ducommon.h.
#define DU_UID_CCHECK (7U) |
Defines the DU-CCHECK unit id.
Definition at line 58 of file ducommon.h.
#define DU_UID_COMMON (0U) |
Drive Update unit ids.
The unit id can be used to generate a unique error code for each unit. The range of the unit id is from 0 to 255, in which 0-127 are reserved by DRIVE Update's released units, and 128-255 can be used by the plug-ins implemented by the user.
Defines the common code unit id.
Definition at line 44 of file ducommon.h.
#define DU_UID_CONTENT (9U) |
Defines the DU content provider unit id.
Definition at line 62 of file ducommon.h.
#define DU_UID_DECOMP (10U) |
Defines the DU-DECOMP unit id.
Definition at line 64 of file ducommon.h.
#define DU_UID_LINK (2U) |
Defines the DU-Link unit id.
Definition at line 48 of file ducommon.h.
#define DU_UID_MASTER (4U) |
Defines the DU-Master unit id.
Definition at line 52 of file ducommon.h.
#define DU_UID_RPE (6U) |
Defines the DU-RPE unit id.
Definition at line 56 of file ducommon.h.
#define DU_UID_TII (3U) |
Defines the DU-TII unit id.
Definition at line 50 of file ducommon.h.
#define DU_UID_TRANSPORT (1U) |
Defines the DU-Transport unit id.
Definition at line 46 of file ducommon.h.
#define DUCOMMON_ECODE | ( | err | ) | DU_ECODE(DU_UID_COMMON, 0U, (err)) |
Definition at line 114 of file ducommon.h.
#define DUCOMMON_ERR_BUFFER_TOO_SMALL DUCOMMON_ECODE(4U) |
Definition at line 119 of file ducommon.h.
#define DUCOMMON_ERR_GENERIC DUCOMMON_ECODE(1U) |
Definition at line 116 of file ducommon.h.
#define DUCOMMON_ERR_INVALID_ARGUMENT DUCOMMON_ECODE(2U) |
Definition at line 117 of file ducommon.h.
#define DUCOMMON_ERR_NOT_FOUND DUCOMMON_ECODE(3U) |
Definition at line 118 of file ducommon.h.
#define DUCOMMON_ERR_SYNTAX DUCOMMON_ECODE(5U) |
Definition at line 120 of file ducommon.h.
typedef uint32_t DU_RCODE |
Drive Update error codes.
The error code type is defined as an unsigned 32-bit integer. There are two classes of error codes: common codes and unit specific codes. The common error codes can be applied to multiple units, while the unit specific error codes is applied to one certain unit only.
Definition at line 74 of file ducommon.h.
typedef enum DU_RUN_LEVEL DU_RUN_LEVEL |
Defines the run level.
enum DU_RUN_LEVEL |
Defines the run level.
Definition at line 159 of file ducommon.h.