nsysccr/cdc: Add CCRCDCWowlWakeDrc and CCRCDCWakeStateEnum (#320)

This commit is contained in:
Andrew
2023-07-18 22:22:56 +01:00
committed by GitHub
parent b408a15fa1
commit 095a397e7e

View File

@@ -17,9 +17,11 @@ typedef struct CCRCDCMacAddress CCRCDCMacAddress;
typedef struct CCRCDCWpsArgs CCRCDCWpsArgs;
typedef struct CCRCDCSysMessage CCRCDCSysMessage;
typedef struct CCRCDCEepromData CCRCDCEepromData;
typedef struct CCRCDCWowlWakeDrcArg CCRCDCWowlWakeDrcArg;
typedef uint8_t CCRCDCDestination;
typedef uint32_t CCRCDCWpsStatusType;
typedef uint8_t CCRCDCDrcState;
typedef uint8_t CCRCDCWakeState;
typedef enum CCRCDCDestinationEnum
{
@@ -47,6 +49,14 @@ typedef enum CCRCDCDrcStateEnum
CCR_CDC_DRC_STATE_UNK15 = 15,
} CCRCDCDrcStateEnum;
typedef enum CCRCDCWakeStateEnum
{
//! Power on normally.
CCR_CDC_WAKE_STATE_ACTIVE = 1,
//! Connect in \c CCR_CDC_DRC_STATE_BACKGROUND state.
CCR_CDC_WAKE_STATE_BACKGROUND = 2,
} CCRCDCWakeStateEnum;
struct WUT_PACKED CCRCDCMacAddress
{
//! The device this mac address belongs to
@@ -92,6 +102,15 @@ struct WUT_PACKED CCRCDCEepromData
WUT_CHECK_OFFSET(CCRCDCEepromData, 0x0, version);
WUT_CHECK_SIZE(CCRCDCEepromData, 0x304);
struct WUT_PACKED CCRCDCWowlWakeDrcArg
{
WUT_PADDING_BYTES(0x6);
//! Must be one of \link CCRCDCWakeStateEnum \endlink
CCRCDCWakeState state;
};
WUT_CHECK_OFFSET(CCRCDCWowlWakeDrcArg, 0x6, state);
WUT_CHECK_SIZE(CCRCDCWowlWakeDrcArg, 0x7);
/**
* Send a command directly to the specified destination.
*
@@ -316,6 +335,16 @@ CCRCDCPerGetUicEepromEx(CCRCDCDestination dest,
int32_t
CCRCDCSysConsoleShutdownInd(CCRCDCDestination dest);
/**
* Wake on Wireless LAN (power on) the DRC(s).
*
* \return
* 0 on success or timeout (i.e. out of range/no battery).
* 0xFFE31B5B if DRC already connected.
*/
int32_t
CCRCDCWowlWakeDrc(CCRCDCWowlWakeDrcArg *arg);
#ifdef __cplusplus
}
#endif