|
本模塊支持UART,SPI接口,并支持?jǐn)?shù)據(jù)透 傳和直驅(qū),具有成本低、體積小、功耗低、收 發(fā)靈敏性高等優(yōu)點(diǎn),只需配備少許的外圍元件就 能實(shí)現(xiàn)其強(qiáng)大功能。
單片機(jī)源程序如下:
- #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次分組設(shè)置就ok
- //Led_Init();
- //Key_Init();
- //Beep_Init();
- //Exti_Init();
- Uart1_Init(9600);
- Uart3_Init(9600);
-
-
- while(1)
- {
- ;
- }
-
- return 0;
- }
復(fù)制代碼
所有資料51hei提供下載:
bluetooth.7z
(289.65 KB, 下載次數(shù): 39)
2019-6-7 05:51 上傳
點(diǎn)擊文件名下載附件
下載積分: 黑幣 -5
|
|