41 lines
933 B
C
41 lines
933 B
C
#ifndef __BC25_H
|
|
#define __BC25_H
|
|
|
|
#include "sys.h"
|
|
#include "general_type.h"
|
|
#include "stm32l1xx.h"
|
|
#include "stm32l1xx_gpio.h"
|
|
#include "stm32l1xx_rcc.h"
|
|
|
|
|
|
|
|
|
|
#define PWRKEY_H GPIO_SetBits(GPIOA,GPIO_Pin_1) //BC25电源开关
|
|
#define PWRKEY_L GPIO_ResetBits(GPIOA,GPIO_Pin_1)
|
|
void BC25CTR_Init(void);
|
|
void BC25_PWRKEY_ON(void);
|
|
void BC25_RECData(void);
|
|
void BC25_Senddata(int len,char *data);
|
|
void BC25_CreateSokcet(char *ip,char *port);
|
|
void BC25_CloseSocket(void);
|
|
u8 BC25_Init(void);
|
|
void BC25_POWERON(void);
|
|
void BC25_POWEROFF(void);
|
|
void BC25_Process(void);
|
|
u8 BC25_Senddata_mode(int len,char *data);
|
|
void BC25_time_RTC(void);
|
|
typedef struct
|
|
{
|
|
uint8_t CSQ;
|
|
uint8_t Socketnum; //编号
|
|
uint8_t reclen[10]; //获取到数据的长度
|
|
uint8_t res;
|
|
uint8_t recdatalen[10];
|
|
uint8_t recdata[100];
|
|
uint8_t netstatus;//网络指示灯
|
|
uint8_t socket;//网络指示灯
|
|
} BC25;
|
|
|
|
extern BC25 BC25_Status;
|
|
#endif
|