RDK Documentation (Open Sourced RDK Components)

Description

Described herein are the DeviceSettings HAL types and functions that are part of the Host subsystem. The Host subsystem manages system-specific hardware operations.

Functions

dsError_t dsHostInit ()
 Initialize the Host sub-system. More...
 
dsError_t dsSetHostPowerMode (int newPower)
 Set the power mode. More...
 
dsError_t dsGetHostPowerMode (int *currPower)
 Get the current power mode. More...
 
dsError_t dsHostTerm ()
 Terminate the Host sub-system. More...
 
dsError_t dsGetPreferredSleepMode (dsSleepMode_t *pMode)
 This function returns the preferred sleep mode which is persisted. More...
 
dsError_t dsSetPreferredSleepMode (dsSleepMode_t mode)
 This function sets the preferred sleep mode which needs to be persisted. More...
 
dsError_t dsGetCPUTemperature (float *cpuTemperature)
 This function gets the CPU temperature in centrigade. More...
 
dsError_t dsGetVersion (uint32_t *versionNumber)
 Get DS HAL API Version. More...
 
dsError_t dsSetVersion (uint32_t versionNumber)
 Allows the application to set the runtime version of the dsHAL. More...
 
dsError_t dsGetSocIDFromSDK (char *socID)
 This function returns SOC ID. More...
 
dsError_t dsGetHostEDID (unsigned char *edid, int *length)
 This function is used to get the host EDID and length. More...
 

Function Documentation

◆ dsHostInit()

dsError_t dsHostInit ( )

Initialize the Host sub-system.

This function must initialize all the system specific drivers to be initialized prior to any driver specific calls.

Returns
Device Settings error code
Return values
dsError_t

◆ dsSetHostPowerMode()

dsError_t dsSetHostPowerMode ( int  newPower)

Set the power mode.

This function sets the power mode of the host to active or standby and turns on/off all the ouput ports.

Parameters
[in]newPowerThe power mode of the host (dsPOWER_STANDBY or dsPOWER_ON)
Returns
Device Settings error code
Return values
dsError_t
Note
dsPOWER_OFF is not currently being used.

◆ dsGetHostPowerMode()

dsError_t dsGetHostPowerMode ( int *  currPower)

Get the current power mode.

This function gets the current power mode of the host.

Parameters
[out]*currPowerThe address of a location to hold the host's current power mode on return. It returns one of:
Returns
Device Settings error code
Return values
dsError_t

◆ dsHostTerm()

dsError_t dsHostTerm ( )

Terminate the Host sub-system.

This function resets the data structures used within the Host module and releases any handles specific to the host module.

Returns
Device Settings error code
Return values
dsError_t

◆ dsGetPreferredSleepMode()

dsError_t dsGetPreferredSleepMode ( dsSleepMode_t pMode)

This function returns the preferred sleep mode which is persisted.

Parameters
[out]pModeData will be copied to this. This shall be preallocated before the call.
Returns
Device Settings error code
Return values
dsERR_NONEIf sucessfully dsGetPreferredSleepMode api has been called using IARM support.
dsERR_GENERALGeneral failure.

Definition at line 63 of file dsHost.cpp.

◆ dsSetPreferredSleepMode()

dsError_t dsSetPreferredSleepMode ( dsSleepMode_t  mode)

This function sets the preferred sleep mode which needs to be persisted.

Parameters
[in]modeSleep mode that is expected to be persisted.
Returns
Device Settings error code
Return values
dsERR_NONEIf sucessfully dsSetPreferredSleepMode api has been called using IARM support.
dsERR_GENERALGeneral failure.

Definition at line 43 of file dsHost.cpp.

◆ dsGetCPUTemperature()

dsError_t dsGetCPUTemperature ( float *  cpuTemperature)

This function gets the CPU temperature in centrigade.

Parameters
[in]cpuTemperatureThe address of a location to hold the CPU Temperature
Returns
Device Settings error code
Return values
dsERR_NONEIf sucessfully dsGetCPUTemperature api has been called using IARM support.
dsERR_GENERALGeneral failure.

Definition at line 88 of file dsHost.cpp.

◆ dsGetVersion()

dsError_t dsGetVersion ( uint32_t *  versionNumber)

Get DS HAL API Version.

In 4 byte VersionNumber, Two Most significant Bytes are Major number and Two Least Significant Bytes are minor number.

Parameters
[out]versionNumber4 Bytes of version number of DS HAL
Returns
Returns 4 byte Version Number
Return values
dsERR_NONESuccessfully got the version number from dsHAL.
dsERR_GENERALFailed to get the version number.

Definition at line 114 of file dsHost.cpp.

◆ dsSetVersion()

dsError_t dsSetVersion ( uint32_t  versionNumber)

Allows the application to set the runtime version of the dsHAL.

Parameters
[in]versionNumber4 Bytes of version number of DS HAL
Return values
dsERR_NONESuccessfully set the version for dsHAL.
dsERR_GENERALFailed to set the version.

Definition at line 139 of file dsHost.cpp.

◆ dsGetSocIDFromSDK()

dsError_t dsGetSocIDFromSDK ( char *  socID)

This function returns SOC ID.

Parameters
[in]socIDThe address of a location to hold SOC ID
Returns
Device Settings error code
Return values
dsERR_NONEIf sucessfully dsSetPreferredSleepMode api has been called using IARM support.
dsERR_UNKNOWNGeneral failure.

Definition at line 162 of file dsHost.cpp.

◆ dsGetHostEDID()

dsError_t dsGetHostEDID ( unsigned char *  edid,
int *  length 
)

This function is used to get the host EDID and length.

Parameters
[out]edidhost EDID.
[out]lengthlength of host EDID
Returns
Device Settings error code
Return values
dsERR_NONEIf sucessfully dsGetHostEDID api has been called using IARM support.
dsERR_GENERALGeneral failure.

Definition at line 191 of file dsHost.cpp.