56 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
		
		
			
		
	
	
			56 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
| 
								 | 
							
								/****************************************************************************
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								Copyright(c) 2019 by Aerospace C.Power (Chongqing) Microelectronics. ALL RIGHTS RESERVED.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								This Information is proprietary to Aerospace C.Power (Chongqing) Microelectronics and MAY NOT
							 | 
						||
| 
								 | 
							
								be copied by any method or incorporated into another program without
							 | 
						||
| 
								 | 
							
								the express written consent of Aerospace C.Power. This Information or any portion
							 | 
						||
| 
								 | 
							
								thereof remains the property of Aerospace C.Power. The Information contained herein
							 | 
						||
| 
								 | 
							
								is believed to be accurate and Aerospace C.Power assumes no responsibility or
							 | 
						||
| 
								 | 
							
								liability for its use in any way and conveys no license or title under
							 | 
						||
| 
								 | 
							
								any patent or copyright and makes no representation or warranty that this
							 | 
						||
| 
								 | 
							
								Information is free from patent or copyright infringement.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								****************************************************************************/
							 | 
						||
| 
								 | 
							
								#ifndef _IOT_HTM_EXT_API_H
							 | 
						||
| 
								 | 
							
								#define _IOT_HTM_EXT_API_H
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								#ifdef __cplusplus
							 | 
						||
| 
								 | 
							
								extern "C" {
							 | 
						||
| 
								 | 
							
								#endif
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 * @brief:  initialize humidity and temperature sensor.
							 | 
						||
| 
								 | 
							
								 * @retval: ERR_OK    - case successfully.
							 | 
						||
| 
								 | 
							
								 * @retval: otherwise - error code. see ERR_XXX
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								uint32_t iot_htm_ext_init(void);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 * @brief:  deinit humidity and temperature sensor.
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								void iot_htm_ext_deinit(void);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 * @brief:  get real-time temperature, unit centigrade, range -40 - 125.
							 | 
						||
| 
								 | 
							
								 * @param:  temp - the para preserved temperature, the temperature value has
							 | 
						||
| 
								 | 
							
								            been amplified 10 times (* 10) avoiding float calculation.
							 | 
						||
| 
								 | 
							
								 * @retval: ERR_OK    - case successfully.
							 | 
						||
| 
								 | 
							
								 * @retval: otherwise - error code. see ERR_XXX
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								uint32_t iot_htm_ext_get_temp(int32_t *temp);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 * @brief:  get relative humidity, uint %RH, range 0 - 100.
							 | 
						||
| 
								 | 
							
								 * @param:  hum - the para preserved humidity, the humidity value has
							 | 
						||
| 
								 | 
							
								            been amplified 10 times (* 10) avoiding float calculation.
							 | 
						||
| 
								 | 
							
								 * @retval: ERR_OK    - case successfully.
							 | 
						||
| 
								 | 
							
								 * @retval: otherwise - error code. see ERR_XXX
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								uint32_t iot_htm_ext_get_hum(int32_t *hum);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								#ifdef __cplusplus
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								#endif
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								#endif //_IOT_HTM_EXT_API_H
							 |