| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160 |
- /*********************************************************************************************************
- * Module : main.h
- * Abstract : main modules is defined data structure!
- * Version : 1.0.0
- * Author : Leopul(COPYRIGHT 2025 - 2027 Leopul. All rights reserved.)
- * Complete : 2025-02-16
- * Content : None
- * Note : None
- *********************************************************************************************************/
- #ifndef __MAIN_H
- #define __MAIN_H
- #include "stdint.h"
- #define IIC_INPUT_THRESHOLD_START (10)
- #define IIC_INPUT_THRESHOLD_LENTH (20)
- #define IIC_OUTPUT_THRESHOLD_START (50)
- #define IIC_OUTPUT_THRESHOLD_LENTH (30)
- #define IIC_TEMPRATURE_THRESHOLD_START (100)
- #define IIC_TEMPRATURE_THRESHOLD_LENTH (4)
- #define IIC_OVER_FUNC_START (110)
- #define IIC_OVER_FUNC_LENTH (1)
- //#pragma pack (2)
- typedef struct {
- uint32_t uniq_ID_64_95;
- uint32_t uniq_ID_32_63;
- uint32_t uniq_ID_00_31;
- uint32_t channels;
- char ver[12];
- char date[32];
- }md_information_t;
- typedef struct {
- uint32_t voltage;
- uint32_t current;
- uint32_t power;
- uint32_t consumer;
- uint32_t freq;
- uint32_t factor;
- uint32_t angle;
- }md_out_power_info;
- typedef struct {
- uint32_t voltage;
- uint32_t freq;
- }md_input_info;
- typedef struct{
- uint16_t choise_ch;
- }md_chiose_ch;
- typedef struct{
- uint16_t input_status[2];
- }md_input_status;
- typedef struct{
- uint16_t fan_status;
- }md_fans;
- typedef struct{
- uint16_t waning[2]; /* two input */
- }md_in_wanning;
- typedef struct {
- uint16_t waning;
- }md_out_wanning;
- typedef struct {
- uint32_t voltage_max;
- uint32_t voltage_min;
- uint32_t current_max;
- uint32_t power_max;
- uint32_t consumer_max;
- }iic_out_threshold_t;
- typedef struct {
- uint32_t voltage_max;
- uint32_t voltage_min;
- uint32_t freq_max;
- uint32_t freq_min;
- }iic_in_threshold_t;
- typedef struct{
- uint16_t fans_max_temp;
- uint16_t fans_min_temp;
- }iic_temp_threshold_t;
- typedef uint16_t iic_over_func;
- typedef struct{
- uint16_t dev;
- md_information_t info;
- md_input_info input[2];
- md_chiose_ch md_choise;
- md_input_status input_status;
- md_in_wanning input_wanning;
- md_out_wanning output_waning;
- md_out_power_info out_power;
- iic_in_threshold_t input_th[2];
- iic_out_threshold_t output_th;
- iic_temp_threshold_t temprature;
- iic_over_func over_func;
- }md_data_t;
- typedef struct{
- uint8_t led_flag;
- uint8_t count_start_flag;
- uint8_t switch_flag;
- uint8_t over_func_flag;
- md_data_t data;
- }sts_data_t;
- //#pragma pack ()
- sts_data_t *get_sts(void);
- #endif
|