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.

96 lines
2.2 KiB

6 months ago
/** \file define.h */
#if !defined(DEFINE_H__8F668E66_FF75_45CB_850C_2513B033D139__INCLUDED_)
#define DEFINE_H__8F668E66_FF75_45CB_850C_2513B033D139__INCLUDED_
#include <stdio.h>
#include <stdint.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <math.h>
#include "A31G12x.h"
#include "A31G12x_hal_aa_types.h"
#include "A31G12x_hal_adc.h"
#include "A31G12x_hal_crc.h"
#include "A31G12x_hal_debug_frmwrk.h"
#include "A31G12x_hal_fmc.h"
#include "A31G12x_hal_i2cn.h"
#include "A31G12x_hal_intc.h"
#include "A31G12x_hal_lcd.h"
#include "A31G12x_hal_libcfg.h"
#include "A31G12x_hal_pcu.h"
#include "A31G12x_hal_pwr.h"
#include "A31G12x_hal_scu.h"
#include "A31G12x_hal_sculv.h"
#include "A31G12x_hal_timer1n.h"
#include "A31G12x_hal_timer2n.h"
#include "A31G12x_hal_timer3n.h"
#include "A31G12x_hal_uartn.h"
#include "A31G12x_hal_usart1n.h"
#include "A31G12x_hal_wdt.h"
#include "A31G12x_hal_wt.h"
#include "A31G12x_hal_wtidky.h"
#include "A31G12x_SystemClock.h"
#include "systick_timer.h"
#define SETBIT(ADDRESS,BIT) (ADDRESS |= (1<<BIT))
#define CLEARBIT(ADDRESS,BIT) (ADDRESS &= ~(1<<BIT))
#define TESTBIT(ADDRESS,BIT) ((ADDRESS & (1<<BIT)) ? 1 : 0)
#define TOGGLEBIT(ADDRESS, BIT) (ADDRESS ^= (1<<BIT))
#define VERSION_MAJOR 0 // max 9
#define VERSION_MINOR 0 // max 9
#define VERSION_PATCH 1 // max 99
#define SEGMENT_CHECK_WAIT_TIME 300 //
#define SEGMENT_VERSION_WAIT_TIME 1000
#define DEFAULT_KEY_PUSH_COUNT 50
#define DEFAULT_LONGKEY_PUSH_COUNT 1000
#define DUST_SENSOR_POWER_ON_WAIT_TIME_COUNT 100
#define DUST_SENSOR_POWER_OFF_WAIT_TIME_COUNT 100
#define DUST_SENSOR_PM4P0_VIEW_TIME 5 // sec
#define DUST_SENSOR_PM1P0_VIEW_TIME 5 // sec
#define DUST_SENSOR_MODE_1_TIME 1000
#define DUST_SENSOR_MODE_2_TIME 2000
#define DUST_SENSOR_MODE_3_TIME 3000
#define DUST_SENSOR_MODE_4_TIME 4000
#define DUST_SENSOR_MODE_5_TIME 5000
#define DUST_SENSOR_PM40_SELECT_1 SEGMENT_OUTPUT_F3C1
#define DUST_SENSOR_PM40_SELECT_2 SEGMENT_OUTPUT_F3C2
#define SEGMENT_TOGGLE_TIME 250
#endif