Skip to content

Commit 669a63b

Browse files
nsysccr/cdc: Implement CCRCDCSysSetDrhState (#356)
* nsysccr: Implement CCRCDCSysSetDrhState * nsysccr: Add CCRCDCSysGetDrhState * nsysccr: Turn CCRCDCDrcState into a struct * nsysccr: Rename CCRCDCSysDrhState to CCRCDCDrhState to stay consistent with other structs * Update include/nsysccr/cdc.h Co-authored-by: GaryOderNichts <12049776+GaryOderNichts@users.noreply.github.com> * Update include/nsysccr/cdc.h Co-authored-by: GaryOderNichts <12049776+GaryOderNichts@users.noreply.github.com> * Update include/nsysccr/cdc.h Co-authored-by: GaryOderNichts <12049776+GaryOderNichts@users.noreply.github.com> --------- Co-authored-by: GaryOderNichts <12049776+GaryOderNichts@users.noreply.github.com>
1 parent b38d014 commit 669a63b

1 file changed

Lines changed: 44 additions & 1 deletion

File tree

include/nsysccr/cdc.h

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ typedef struct CCRCDCWowlWakeDrcArg CCRCDCWowlWakeDrcArg;
2121
typedef struct CCRCDCUicConfig CCRCDCUicConfig;
2222
typedef struct CCRCDCFWInfo CCRCDCFWInfo;
2323
typedef struct CCRCDCSoftwareVersion CCRCDCSoftwareVersion;
24+
typedef struct CCRCDCDrhState CCRCDCDrhState;
25+
typedef struct CCRCDCDrcState CCRCDCDrcState;
2426
typedef uint8_t CCRCDCDestination;
2527
typedef uint32_t CCRCDCWpsStatusType;
26-
typedef uint8_t CCRCDCDrcState;
2728
typedef uint8_t CCRCDCWakeState;
2829
typedef uint8_t CCRCDCUicConfigId;
2930

@@ -120,6 +121,17 @@ typedef enum CCRCDCExt
120121
CCR_CDC_EXT_UNK4 = 4,
121122
} CCRCDCExt;
122123

124+
typedef enum CCRCDCDrhStateEnum
125+
{
126+
CCR_CDC_SYS_DRH_STATE_UNK0 = 0x00,
127+
CCR_CDC_SYS_DRH_STATE_UNK1 = 0x01,
128+
CCR_CDC_SYS_DRH_STATE_UNK2 = 0x02,
129+
CCR_CDC_SYS_DRH_STATE_UNK3 = 0x03,
130+
CCR_CDC_SYS_DRH_STATE_ECO = 0x04,
131+
CCR_CDC_SYS_DRH_STATE_UNK7F = 0x7F,
132+
CCR_CDC_SYS_DRH_STATE_CAFE = 0xFF,
133+
} CCRCDCDrhStateEnum;
134+
123135
struct WUT_PACKED CCRCDCMacAddress
124136
{
125137
//! The device this mac address belongs to
@@ -213,6 +225,20 @@ WUT_CHECK_OFFSET(CCRCDCSoftwareVersion, 0x0, runningVersion);
213225
WUT_CHECK_OFFSET(CCRCDCSoftwareVersion, 0x4, activeVersion);
214226
WUT_CHECK_SIZE(CCRCDCSoftwareVersion, 0x8);
215227

228+
struct CCRCDCDrcState {
229+
//! Must be one of \link CCRCDCDrcStateEnum \endlink
230+
uint8_t state;
231+
};
232+
WUT_CHECK_OFFSET(CCRCDCDrcState, 0x0, state);
233+
WUT_CHECK_SIZE(CCRCDCDrcState, 0x1);
234+
235+
struct CCRCDCDrhState {
236+
//! Must be one of \link CCRCDCDrhStateEnum \endlink
237+
uint8_t state;
238+
};
239+
WUT_CHECK_OFFSET(CCRCDCDrhState, 0x0, state);
240+
WUT_CHECK_SIZE(CCRCDCDrhState, 0x1);
241+
216242
/**
217243
* Send a command directly to the specified destination.
218244
*
@@ -327,6 +353,23 @@ int32_t
327353
CCRCDCSysSetDrcState(CCRCDCDestination dest,
328354
CCRCDCDrcState *state);
329355

356+
/**
357+
* Gets the Drh State
358+
*
359+
* \return
360+
* 0 on success.
361+
*/
362+
int32_t
363+
CCRCDCSysGetDrhState(CCRCDCDrhState *state);
364+
/**
365+
* Sets the Drh State
366+
*
367+
* \return
368+
* 0 on success.
369+
*/
370+
int32_t
371+
CCRCDCSysSetDrhState(CCRCDCDrhState *state);
372+
330373
/**
331374
* Start WPS (WiFi Protected Setup) on the DRH.
332375
*

0 commit comments

Comments
 (0)