1
0
Fork 0
mirror of https://github.com/CTCaer/hekate.git synced 2024-12-24 00:46:03 +00:00
hekate/nyx/nyx_gui/thermal/tmp451.h
ctcaer@gmail.com c41f98039c [Nyx] Introducing hekate GUI, named Nyx!
Version 0.8.0.

Expect dragons!
2019-06-30 04:03:00 +03:00

37 lines
1.2 KiB
C

/*
* SOC/PCB Temperature driver for Nintendo Switch's TI TMP451
*
* Copyright (c) 2018 CTCaer
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __TMP451_H_
#define __TMP451_H_
#include "../utils/types.h"
#define TMP451_I2C_ADDR 0x4C
#define TMP451_PCB_TEMP_REG 0x00
#define TMP451_SOC_TEMP_REG 0x01
#define TMP451_SOC_TMP_DEC_REG 0x10
#define TMP451_PCB_TMP_DEC_REG 0x15
// If input is false, the return value is packed. MSByte is the integer in oC
// and the LSByte is the decimal point truncated to 2 decimal places.
// Otherwise it's an integer oC.
u16 tmp451_get_soc_temp(bool integer);
u16 tmp451_get_pcb_temp(bool integer);
#endif /* __TMP451_H_ */