- #define PDI_CMD_LDS 0x00
- #define PDI_CMD_LD 0x20
- #define PDI_CMD_STS 0x40
- #define PDI_CMD_ST 0x60
- #define PDI_CMD_LDCS 0x80
- #define PDI_CMD_REPEAT 0xA0
- #define PDI_CMD_STCS 0xC0
- #define PDI_CMD_KEY 0xE0
-
- #define PDI_STATUS_REG 0
- #define PDI_RESET_REG 1
- #define PDI_CTRL_REG 2
+ /** \name PDI Related Constants
+ * @{
+ */
+ #define PDI_CMD_LDS(AddressSize, DataSize) (0x00 | ( AddressSize << 2) | DataSize)
+ #define PDI_CMD_LD(PointerAccess, DataSize) (0x20 | (PointerAccess << 2) | DataSize)
+ #define PDI_CMD_STS(AddressSize, DataSize) (0x40 | ( AddressSize << 2) | DataSize)
+ #define PDI_CMD_ST(PointerAccess, DataSize) (0x60 | (PointerAccess << 2) | DataSize)
+ #define PDI_CMD_LDCS(PDIReg) (0x80 | PDIReg)
+ #define PDI_CMD_REPEAT(DataSize) (0xA0 | DataSize)
+ #define PDI_CMD_STCS(PDIReg) (0xC0 | PDIReg)
+ #define PDI_CMD_KEY 0xE0
+
+ #define PDI_REG_STATUS 0
+ #define PDI_REG_RESET 1
+ #define PDI_REG_CTRL 2