/*
 * @file ina230_interface.h
 *
 * @brief This file contains structures,function prototype to read and
 * store the data from digital thermostat
 *
 * @copyright Copyright 2023 Antaris, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef DRIVERS_SENSOR_INTERFACE_POWER_SENSOR_MONITOR_INC_INA230_INTERFACE_H_
#define DRIVERS_SENSOR_INTERFACE_POWER_SENSOR_MONITOR_INC_INA230_INTERFACE_H_

#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include "exo_ahw_al_psm_common.h"
#include "exo_osal_timer.h"
#include "sensor_driver_intf.h"

/**
 * @brief Power sense monitor data structure
 */
typedef struct
{
	float vbus_voltage;				/*!< vbus voltage			*/
	float vshunt_voltage;			/*!< vshunt voltage			*/
	float current;					/*!< current				*/
	uint32_t power;					/*!< power					*/

}__attribute__((packed, aligned(4)))psm_get_info_s;

/**
 * @brief Power sense monitor data unit structure
 */
typedef struct
{
	psm_get_info_s pwr;				/*!< Power sense monitor data structure variable    	*/
	uint64_t psm_epoch_time;		/*!< RTC time structure variable						*/

}__attribute__((packed, aligned(4)))psm_data_s;

/**
 * @brief Application API to get the power sense monitor data with the given instance id
 * @param psm_param - pointer to a power sense monitor data structure variable
 * @param psm_inst_id - power sense monitor instance id
 * @retval No return
 */
void psm_get_func(psm_get_info_s *psm_param,uint8_t psm_inst_id);

#endif /* DRIVERS_SENSOR_INTERFACE_POWER_SENSOR_MONITOR_INC_INA230_INTERFACE_H_ */
