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.
132 lines
2.8 KiB
132 lines
2.8 KiB
/** \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 1 // max 9
|
|
#define VERSION_MINOR 0 // max 9
|
|
|
|
|
|
|
|
|
|
#define ACTION_INIT_LED_ON_WAIT_TIME 2000
|
|
|
|
#define ACTION_LE1_IDLE_ON_TIME 250
|
|
#define ACTION_LE1_IDLE_OFF_TIME 750
|
|
#define ACTION_LE1_RUN_ON_TIME 500
|
|
#define ACTION_LE1_RUN_OFF_TIME 1500
|
|
|
|
#define ACTION_SENSOR_READ_INTERVAL 5000
|
|
|
|
#define ACTION_RETURN_MAINVIEW_TIME 10000
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define DEFAULT_KEY_PUSH_COUNT 50
|
|
#define DEFAULT_LONGKEY_PUSH_COUNT 1000
|
|
|
|
#define KEY_POWER_ON_CHECK_PUSH_COUNT 1000
|
|
#define KEY_POWER_OFF_CHECK_PUSH_COUNT 2000
|
|
|
|
#define DEFAULT_SENSOR_MAX_DATA 3000
|
|
#define DEFAULT_SENSOR_MIN_DATA 0
|
|
|
|
|
|
|
|
|
|
|
|
#define DEFAULT_KEY_PUSH_BUZZER_TIME_COUNT 80
|
|
|
|
#define SEGMENT_TOGGLE_TIME 250
|
|
|
|
|
|
|
|
#if 0
|
|
#define SEGMENT_CHECK_WAIT_TIME 300 //
|
|
#define SEGMENT_VERSION_WAIT_TIME 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
|
|
|
|
#endif
|
|
|