libnx  v4.8.0
Data Structures | Enumerations | Functions
ts.h File Reference

Temperature measurement (ts) service IPC wrapper. More...

#include "../types.h"
#include "../sf/service.h"

Go to the source code of this file.

Data Structures

struct  TsSession
 

Enumerations

enum  TsLocation {
  TsLocation_Internal = 0 ,
  TsLocation_External = 1
}
 Location. More...
 
enum  TsDeviceCode {
  TsDeviceCode_LocationInternal = 0x41000001u ,
  TsDeviceCode_LocationExternal = 0x41000002u
}
 

Functions

Result tsInitialize (void)
 Initialize ts.
 
void tsExit (void)
 Exit ts.
 
ServicetsGetServiceSession (void)
 Gets the Service for ts.
 
Result tsGetTemperatureRange (TsLocation location, s32 *min_temperature, s32 *max_temperature)
 Gets the min/max temperature for the specified TsLocation. More...
 
Result tsGetTemperature (TsLocation location, s32 *temperature)
 Gets the temperature for the specified TsLocation. More...
 
Result tsGetTemperatureMilliC (TsLocation location, s32 *temperature)
 Gets the temperature for the specified TsLocation, in MilliC. More...
 
Result tsOpenSession (TsSession *s, u32 device_code)
 [8.0.0+]
 
Result tsSessionGetTemperature (TsSession *s, float *temperature)
 [10.0.0+]
 
void tsSessionClose (TsSession *s)
 

Detailed Description

Temperature measurement (ts) service IPC wrapper.

Author
yellows8

Enumeration Type Documentation

◆ TsLocation

enum TsLocation

Location.

Enumerator
TsLocation_Internal 

TMP451 Internal: PCB.

TsLocation_External 

TMP451 External: SoC.

Function Documentation

◆ tsGetTemperature()

Result tsGetTemperature ( TsLocation  location,
s32 temperature 
)

Gets the temperature for the specified TsLocation.

Parameters
[in]locationTsLocation
[out]temperatureOutput temperature in Celsius.

◆ tsGetTemperatureMilliC()

Result tsGetTemperatureMilliC ( TsLocation  location,
s32 temperature 
)

Gets the temperature for the specified TsLocation, in MilliC.

[1.0.0-13.2.1]

Parameters
[in]locationTsLocation
[out]temperatureOutput temperature in MilliC.

◆ tsGetTemperatureRange()

Result tsGetTemperatureRange ( TsLocation  location,
s32 min_temperature,
s32 max_temperature 
)

Gets the min/max temperature for the specified TsLocation.

Parameters
[in]locationTsLocation
[out]min_temperatureOutput minimum temperature in Celsius.
[out]max_temperatureOutput maximum temperature in Celsius.