| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- #ifndef __SOFT_FLOW_H__
- #define __SOFT_FLOW_H__
- #include "stdbool.h"
- #include "stdint.h"
- #define FlOW_KP 22
- //霍尔流量计
- #pragma pack(1)
- typedef struct
- {
- bool count_flag;
- uint32_t time;
- uint32_t last_time;
- uint32_t irq_count; //单位时间内经过的液体体积
- uint32_t irq_last_count;
- bool exti_error;
- int speed;
- bool rising_delay_flag;
- bool falling_delay_falg;
- uint32_t cal_delay_time;
- uint8_t irq_flag;
- bool sem_flag;
- uint32_t rising_delay_time;
- uint32_t falling_delay_time;
- }flow_hl;
- extern flow_hl flow_dev1;
- extern flow_hl flow_dev2;
- #pragma pack()
- typedef struct
- {
- uint16_t speed;
- uint32_t flow_ml;
- uint16_t warn;
- }vk_flow;
- extern bool Start_80_hz, Start_10_hz, Start_5_hz, Start_1_hz;
- extern void Flow_Function();
- #endif
|