58 lines
1006 B
C
58 lines
1006 B
C
|
|
#ifndef __MAIN_H
|
|||
|
|
#define __MAIN_H
|
|||
|
|
|
|||
|
|
// ST lib
|
|||
|
|
#include "stm32f10x.h"
|
|||
|
|
// C lib
|
|||
|
|
#include <stdio.h>
|
|||
|
|
#include <stdlib.h>
|
|||
|
|
#include <string.h>
|
|||
|
|
#include <stdarg.h>
|
|||
|
|
// system
|
|||
|
|
#include "delay.h"
|
|||
|
|
|
|||
|
|
// drive
|
|||
|
|
#include "flexible_button.h"
|
|||
|
|
#include "bsp_led.h"
|
|||
|
|
#include "bsp_button.h"
|
|||
|
|
#include "bsp_usart.h"
|
|||
|
|
#include "bsp_chipid.h"
|
|||
|
|
#include "bsp_bat.h"
|
|||
|
|
#include "bsp_mod.h"
|
|||
|
|
#include "easyflash.h"
|
|||
|
|
|
|||
|
|
#define LOCK 0
|
|||
|
|
#define UNLOCK 1
|
|||
|
|
|
|||
|
|
extern uint8_t Lora_recbuff[];
|
|||
|
|
|
|||
|
|
/*<2A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݽṹ<DDBD><E1B9B9>*/
|
|||
|
|
typedef struct rc_data
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
uint8_t Lock_state; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬
|
|||
|
|
uint8_t Asr_state; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬
|
|||
|
|
uint8_t Key_data[4]; //<2F><>ǰ<EFBFBD><C7B0>ֵ
|
|||
|
|
uint8_t Lock_time_tick; //<2F><EFBFBD><DEB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ
|
|||
|
|
uint8_t isLEDTog; //<2F><>˸<EFBFBD>ź<EFBFBD>
|
|||
|
|
uint8_t isSend; //<2F><><EFBFBD><EFBFBD>ʹ<EFBFBD><CAB9>
|
|||
|
|
|
|||
|
|
union
|
|||
|
|
{
|
|||
|
|
struct
|
|||
|
|
{
|
|||
|
|
char lock_time; // <20><><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
|
|||
|
|
uint8_t password[8]; // <20><><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>
|
|||
|
|
uint16_t key_en_table; // <20><><EFBFBD><EFBFBD>ʹ<EFBFBD>ܱ<EFBFBD> 10<31><30><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
} Kv_get;
|
|||
|
|
};
|
|||
|
|
} rc_data_t;
|
|||
|
|
|
|||
|
|
rc_data_t *rc_data(void);
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
#endif
|
|||
|
|
|
|||
|
|
|