Skip to content

Commit

Permalink
nsysccr/cdc: Add CCRCDCSysGetInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
GaryOderNichts committed Aug 4, 2024
1 parent 9a32ef1 commit 07a8630
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions include/nsysccr/cdc.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ extern "C" {
typedef struct CCRCDCMacAddress CCRCDCMacAddress;
typedef struct CCRCDCWpsArgs CCRCDCWpsArgs;
typedef struct CCRCDCSysMessage CCRCDCSysMessage;
typedef struct CCRCDCSysInfo CCRCDCSysInfo;
typedef struct CCRCDCEepromData CCRCDCEepromData;
typedef struct CCRCDCWowlWakeDrcArg CCRCDCWowlWakeDrcArg;
typedef struct CCRCDCUicConfig CCRCDCUicConfig;
Expand Down Expand Up @@ -80,6 +81,34 @@ typedef enum CCRCDCWakeStateEnum
CCR_CDC_WAKE_STATE_BACKGROUND = 2,
} CCRCDCWakeStateEnum;

typedef enum CCRCDCSysBoardVersion
{
BOARD_VERSION_DK1 = 0,
BOARD_VERSION_DK1_EP_DK2 = 1,
BOARD_VERSION_DP1 = 2,
BOARD_VERSION_DP2 = 3,
BOARD_VERSION_DK3 = 4,
BOARD_VERSION_DK4 = 5,
BOARD_VERSION_PREDP3_DP3 = 6,
BOARD_VERSION_DK5 = 7,
BOARD_VERSION_DP4 = 8,
BOARD_VERSION_DKMP = 9,
BOARD_VERSION_DP5 = 10,
BOARD_VERSION_MASS = 11,
BOARD_VERSION_DKMP2 = 12,
BOARD_VERSION_DRC_I = 13,
BOARD_VERSION_DKTVMP = 14,
} CCRCDCSysBoardVersion;

typedef enum CCRCDCSysChipVersion
{
CHIP_VERSION_TS = 0x10,
CHIP_VERSION_ES1 = 0x20,
CHIP_VERSION_ES2 = 0x30,
CHIP_VERSION_ES3 = 0x40,
CHIP_VERSION_MS01 = 0x41,
} CCRCDCSysChipVersion;

typedef enum CCRCDCUicConfigIdEnum
{
//! EEPROM offset 0x200, Size 0x3
Expand Down Expand Up @@ -187,6 +216,25 @@ WUT_CHECK_OFFSET(CCRCDCSysMessage, 0x0, message);
WUT_CHECK_OFFSET(CCRCDCSysMessage, 0x2, timeout);
WUT_CHECK_SIZE(CCRCDCSysMessage, 0x4);

struct WUT_PACKED CCRCDCSysInfo
{
CCRCDCSysBoardVersion boardVersion;
CCRCDCSysChipVersion chipVersion;
uint32_t lvcVersion;
uint32_t umiVersion;
uint32_t unknown;
uint32_t sdCis;
uint32_t splId;
};
WUT_CHECK_OFFSET(CCRCDCSysInfo, 0x00, boardVersion);
WUT_CHECK_OFFSET(CCRCDCSysInfo, 0x04, chipVersion);
WUT_CHECK_OFFSET(CCRCDCSysInfo, 0x08, lvcVersion);
WUT_CHECK_OFFSET(CCRCDCSysInfo, 0x0C, umiVersion);
WUT_CHECK_OFFSET(CCRCDCSysInfo, 0x10, unknown);
WUT_CHECK_OFFSET(CCRCDCSysInfo, 0x14, sdCis);
WUT_CHECK_OFFSET(CCRCDCSysInfo, 0x18, splId);
WUT_CHECK_SIZE(CCRCDCSysInfo, 0x1C);

struct WUT_PACKED CCRCDCEepromData
{
uint32_t version;
Expand Down Expand Up @@ -432,6 +480,23 @@ CCRCDCWpsStatus(CCRCDCWpsStatusType *status);
int32_t
CCRCDCWpsStop(void);

/**
* Get system information.
*
* \param dest
* The device to get the information from.
* See \link CCRCDCDestinationEnum \endlink.
*
* \param info
* Pointer to store the info struct to.
*
* \return
* 0 on success.
*/
int32_t
CCRCDCSysGetInfo(CCRCDCDestination dest,
CCRCDCSysInfo *info);

/**
* Display a message on the specified DRC.
*
Expand Down

0 comments on commit 07a8630

Please sign in to comment.