forked from logzhan/RobotHardware-UESTC
32 lines
1.1 KiB
C
32 lines
1.1 KiB
C
#ifndef __BLUETOOTH_H
|
|
#define __BLUETOOTH_H
|
|
|
|
#include "bsp_sys.h"
|
|
#include "stm32f10x.h"
|
|
|
|
/**----------------------------------------------------------------------
|
|
* Function : Bluetooth_Init
|
|
* Description : 串口1初始化函数,PA2->RXD, PA3->TXD, bound为设置波特率
|
|
* Author : zhanli&719901725@qq.com
|
|
* Date : 2023/05/20 zhanli
|
|
*---------------------------------------------------------------------**/
|
|
void Bluetooth_Init(u32 bound);
|
|
|
|
/**----------------------------------------------------------------------
|
|
* Function : USART2_Send
|
|
* Description : 蓝牙通过USART2发送到手机
|
|
* Author : zhanli&719901725@qq.com
|
|
* Date : 2023/05/20 zhanli
|
|
*---------------------------------------------------------------------**/
|
|
void USART2_Send(unsigned char *tx_buf, int len);
|
|
|
|
/**----------------------------------------------------------------------
|
|
* Function : USART2_Receive
|
|
* Description : 蓝牙接受,从手机接收
|
|
* Author : zhanli&719901725@qq.com
|
|
* Date : 2023/05/20 zhanli
|
|
*---------------------------------------------------------------------**/
|
|
void USART2_Receive(unsigned char *rx_buf, int len);
|
|
|
|
#endif
|