本模块支持UART,SPI接口,并支持数据透 传和直驱,具有成本低、体积小、功耗低、收 发灵敏性高等优点,只需配备少许的外围元件就 能实现其强大功能。
单片机源程序如下:
- #include "stm32f4xx.h"
- #include "Delay.h"
- #include "Led.h"
- #include "Key.h"
- #include "Beep.h"
- #include "exti.h"
- #include "usart.h"
- #include "stdio.h"
- uint8_t uart1_rx_buf[5]={0xAA,0x00,0x00,0x00,0x00};
- uint8_t uart1_flag = 0;
- int main(void)
- {
- uint16_t data;
-
- NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2); //只做1次分组设置就ok
- //Led_Init();
- //Key_Init();
- //Beep_Init();
- //Exti_Init();
- Uart1_Init(9600);
- Uart3_Init(9600);
-
-
- while(1)
- {
- ;
- }
-
- return 0;
- }
复制代码
所有资料51hei提供下载:
bluetooth.7z
(289.65 KB, 下载次数: 39)
|