#ifndef _USER_H
#define _USER_H
#include "bsp.h"
 #include <stdlib.h>
#include "stm8l15x_spi.h"
#include "CRC.h"
#include "stdio.h"
#include <string.h>
#include "QMC5883L.h"
#include "IIC.h"
#include "SPI.h"
#include "SX7x.h"
#include "platform.h"
#include "motor.h"
#include "protools.h"
#include "parameter.h"
#include "bsp_photoresistor.h"
#define LEDTEST 0
#define DiodeDrop (0.40/3.3*4096*10/308)
typedef struct
{
    bool Flag;
    u32 Cnt;
}USERSTR;
#define LOW_POWER_TEST 1
extern USERSTR LedStr;
extern USERSTR UartStr;
extern u8 count;
extern u8 ddd;
void Timer4Deal(void);
void data_deal(void);
void UserTest(void);
uint8_t Bubble_Sort(uint8_t a[],int n);
#endif