Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nsysccr/cdc: Implement CCRCDCSysSetDrhState #356

Merged
merged 7 commits into from
Apr 9, 2024
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 39 additions & 1 deletion include/nsysccr/cdc.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ typedef struct CCRCDCWowlWakeDrcArg CCRCDCWowlWakeDrcArg;
typedef struct CCRCDCUicConfig CCRCDCUicConfig;
typedef struct CCRCDCFWInfo CCRCDCFWInfo;
typedef struct CCRCDCSoftwareVersion CCRCDCSoftwareVersion;
typedef struct CCRCDCDrhState CCRCDCDrhState;
typedef struct CCRCDCDrcState CCRCDCDrcState;
typedef uint8_t CCRCDCDestination;
typedef uint32_t CCRCDCWpsStatusType;
typedef uint8_t CCRCDCDrcState;
typedef uint8_t CCRCDCWakeState;
typedef uint8_t CCRCDCUicConfigId;

Expand Down Expand Up @@ -120,6 +121,12 @@ typedef enum CCRCDCExt
CCR_CDC_EXT_UNK4 = 4,
} CCRCDCExt;

typedef enum CCRCDCDrhStateEnum
{
CCR_CDC_SYS_DRH_STATE_ECO = 0x04,
CCR_CDC_SYS_DRH_STATE_CAFE = 0xFF,
Maschell marked this conversation as resolved.
Show resolved Hide resolved
} CCRCDCDrhStateEnum;

struct WUT_PACKED CCRCDCMacAddress
{
//! The device this mac address belongs to
Expand Down Expand Up @@ -213,6 +220,20 @@ WUT_CHECK_OFFSET(CCRCDCSoftwareVersion, 0x0, runningVersion);
WUT_CHECK_OFFSET(CCRCDCSoftwareVersion, 0x4, activeVersion);
WUT_CHECK_SIZE(CCRCDCSoftwareVersion, 0x8);

struct CCRCDCDrcState {
//! Must be one of \link CCRCDCDrcStateEnum \endlink
uint8_t state;
};
WUT_CHECK_OFFSET(CCRCDCDrcState, 0x0, state);
WUT_CHECK_SIZE(CCRCDCDrcState, 0x1);

struct CCRCDCDrhState {
//! Must be one of \link CCRCDCDrhStateEnum \endlink
uint8_t state;
};
WUT_CHECK_OFFSET(CCRCDCDrhState, 0x0, state);
WUT_CHECK_SIZE(CCRCDCDrhState, 0x1);

/**
* Send a command directly to the specified destination.
*
Expand Down Expand Up @@ -327,6 +348,23 @@ int32_t
CCRCDCSysSetDrcState(CCRCDCDestination dest,
CCRCDCDrcState *state);

/**
* Gets the Drh State
*
* \return
* 0 on success.
*/
int32_t
CCRCDCSysGetDrhState(CCRCDCDrhState * state);
Maschell marked this conversation as resolved.
Show resolved Hide resolved
/**
* Sets the Drh State
*
* \return
* 0 on success.
*/
int32_t
CCRCDCSysSetDrhState(CCRCDCDrhState * state);
Maschell marked this conversation as resolved.
Show resolved Hide resolved

/**
* Start WPS (WiFi Protected Setup) on the DRH.
*
Expand Down
Loading