libctru  v1.6.0
Enumerations | Functions
mcuhwc.h File Reference

mcuHwc service. More...

Go to the source code of this file.

Enumerations

enum  powerLedState {
  LED_NORMAL = 1,
  LED_SLEEP_MODE,
  LED_OFF,
  LED_RED,
  LED_BLUE,
  LED_BLINK_RED
}
 

Functions

Result mcuHwcInit (void)
 Initializes mcuHwc.
 
void mcuHwcExit (void)
 Exits mcuHwc.
 
Result MCUHWC_ReadRegister (u8 reg, void *data, u32 size)
 Reads data from an i2c device3 register. More...
 
Result MCUHWC_WriteRegister (u8 reg, const void *data, u32 size)
 Writes data to a i2c device3 register. More...
 
Result MCUHWC_GetBatteryVoltage (u8 *voltage)
 Gets the battery voltage. More...
 
Result MCUHWC_GetBatteryLevel (u8 *level)
 Gets the battery level. More...
 
Result MCUHWC_GetSoundSliderLevel (u8 *level)
 Gets the sound slider level. More...
 
Result MCUHWC_SetWifiLedState (bool state)
 Sets Wifi LED state. More...
 
Result MCUHWC_SetPowerLedState (powerLedState state)
 Sets Power LED state. More...
 
Result MCUHWC_Get3dSliderLevel (u8 *level)
 Gets 3d slider level. More...
 
Result MCUHWC_GetFwVerHigh (u8 *out)
 Gets the major MCU firmware version. More...
 
Result MCUHWC_GetFwVerLow (u8 *out)
 Gets the minor MCU firmware version. More...
 

Detailed Description

mcuHwc service.

Enumeration Type Documentation

◆ powerLedState

Enumerator
LED_NORMAL 

The normal mode of the led.

LED_SLEEP_MODE 

The led pulses slowly as it does in the sleep mode.

LED_OFF 

Switch off power led.

LED_RED 

Red state of the led.

LED_BLUE 

Blue state of the led.

LED_BLINK_RED 

Blinking red state of power led and notification led.

Function Documentation

◆ MCUHWC_Get3dSliderLevel()

Result MCUHWC_Get3dSliderLevel ( u8 level)

Gets 3d slider level.

Parameters
levelPointer to write 3D slider level to.

◆ MCUHWC_GetBatteryLevel()

Result MCUHWC_GetBatteryLevel ( u8 level)

Gets the battery level.

Parameters
levelPointer to write the current battery level to.

◆ MCUHWC_GetBatteryVoltage()

Result MCUHWC_GetBatteryVoltage ( u8 voltage)

Gets the battery voltage.

Parameters
voltagePointer to write the battery voltage to.

◆ MCUHWC_GetFwVerHigh()

Result MCUHWC_GetFwVerHigh ( u8 out)

Gets the major MCU firmware version.

Parameters
outPointer to write the major firmware version to.

◆ MCUHWC_GetFwVerLow()

Result MCUHWC_GetFwVerLow ( u8 out)

Gets the minor MCU firmware version.

Parameters
outPointer to write the minor firmware version to.

◆ MCUHWC_GetSoundSliderLevel()

Result MCUHWC_GetSoundSliderLevel ( u8 level)

Gets the sound slider level.

Parameters
levelPointer to write the slider level to.

◆ MCUHWC_ReadRegister()

Result MCUHWC_ReadRegister ( u8  reg,
void *  data,
u32  size 
)

Reads data from an i2c device3 register.

Parameters
regRegister number. See https://www.3dbrew.org/wiki/I2C_Registers#Device_3 for more info
dataPointer to write the data to.
sizeSize of data to be read

◆ MCUHWC_SetPowerLedState()

Result MCUHWC_SetPowerLedState ( powerLedState  state)

Sets Power LED state.

Parameters
statepowerLedState State of power LED.

◆ MCUHWC_SetWifiLedState()

Result MCUHWC_SetWifiLedState ( bool  state)

Sets Wifi LED state.

Parameters
stateState of Wifi LED. (True/False)

◆ MCUHWC_WriteRegister()

Result MCUHWC_WriteRegister ( u8  reg,
const void *  data,
u32  size 
)

Writes data to a i2c device3 register.

Parameters
regRegister number. See https://www.3dbrew.org/wiki/I2C_Registers#Device_3 for more info
dataPointer to write the data to.
sizeSize of data to be written