You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
#ifndef __OZONE_WORK_H__
#define __OZONE_WORK_H__
#include "adc.h"
#include "port.h"
#include "systick.h"
#include "timer.h"
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#define LED_INIT(_bool, _port_led_set) \
{ .set_led_state = _bool, .port_led_set = _port_led_set }
typedef void (*port_led_set_t)(bool state); typedef struct { bool set_led_state; port_led_set_t port_led_set; } led_t, rgb_t;
static led_t s_leds[] = { LED_INIT(false, port_led0_set), LED_INIT(false, port_led1_set), LED_INIT(false, port_led2_set), LED_INIT(false, port_led3_set), };
static rgb_t s_rgb[] = { LED_INIT(false, port_led_r_set), LED_INIT(false, port_led_g_set), LED_INIT(false, port_led_b_set), };
typedef struct { bool switch_key_state; bool interva_flag; bool ozone_interva_state; int ozone_work_state; uint8_t timing_rank; uint32_t ozone_work_time; uint32_t ozone_interval_time; uint32_t count_down_begin_sys_time; uint32_t count_interval_down_begin_sys_time; } ozone_message_t;
void gears_led_on(uint8_t led_number); void timing_led_on(uint8_t led_number); void set_ozen_gears(int ozen_gears); void ozone_work_mode(int mode); void set_ozone_work_time(void); void timing_ozone_work_over(void); void is_ozone_work_time_over(void); void is_ozone_interva_time_over(void); void set_interval_time(void); static void ozone_interval_begin(void); static void close_ozone_work(void); bool get_ozone_starting_up_state(void); void process_switch_key(void); void power_on_ozone_work_state(void); void process_voltage_abnormal(void); void set_rgb_flicker(void); void according_now_gear_set_pwm(void); #endif
|