Skip to content

Commit a5128ff

Browse files
committed
app: minor update
1 parent 50631d0 commit a5128ff

File tree

3 files changed

+12
-14
lines changed

3 files changed

+12
-14
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ cmake_minimum_required(VERSION 3.5)
22

33
set(SUPPORTED_TARGETS esp32)
44
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
5-
project(bluetooth_hci_uart_controller)
5+
project(uart_hci_bluetooth_module)

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
Bluetooth HCI UART Controller
2-
=============================
1+
UART HCI Bluetooth Module
2+
=========================
33

4-
BTDM controller inside the ESP32 chip, use UART(H4) as HCI IO.
4+
There is a Bluetooth 4.2 dual-mode controller inside the ESP32 chip, which can use UART(H4) as HCI IO.
55

66
## Pinmap
77

8-
| UART | TX | RX | CTS | RTS |
9-
| :--: | -: | -: | --: | --: |
10-
| Pin | 5 | 18 | 19 | 23 |
8+
| HOST | RX | TX | RTS | CTS |
9+
| :---- | -: | -: | --: | --: |
10+
| ESP32 | TX | RX | CTS | RTS |
11+
| Pin | 5 | 18 | 19 | 23 |
1112

1213
* HCI UART protocol: `H4`
1314
* HCI UART baudrate: `921600 bps`
@@ -17,7 +18,7 @@ BTDM controller inside the ESP32 chip, use UART(H4) as HCI IO.
1718
### Obtain the Source
1819

1920
```
20-
git clone --recursive https://github.com/redchenjs/bluetooth_hci_uart_controller_esp32.git
21+
git clone --recursive https://github.com/redchenjs/uart_hci_bluetooth_module_esp32.git
2122
```
2223

2324
### Update an existing repository

main/app_main.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
#include "soc/uhci_periph.h"
1515
#include "driver/periph_ctrl.h"
1616

17-
#define NVS_TAG "nvs"
18-
#define BT_TAG "bt"
17+
#define TAG "uart_hci"
1918

2019
int app_main(void)
2120
{
@@ -26,18 +25,16 @@ int app_main(void)
2625
}
2726
ESP_ERROR_CHECK(ret);
2827

29-
ESP_LOGI(NVS_TAG, "initialized.");
30-
3128
periph_module_enable(PERIPH_UART1_MODULE);
3229
periph_module_enable(PERIPH_UHCI0_MODULE);
3330

34-
uart_set_pin(UART_NUM_1, 5, 18, 19, 23);
31+
ESP_ERROR_CHECK(uart_set_pin(UART_NUM_1, 5, 18, 19, 23));
3532

3633
esp_bt_controller_config_t bt_cfg = BT_CONTROLLER_INIT_CONFIG_DEFAULT();
3734
ESP_ERROR_CHECK(esp_bt_controller_init(&bt_cfg));
3835
ESP_ERROR_CHECK(esp_bt_controller_enable(ESP_BT_MODE_BTDM));
3936

40-
ESP_LOGI(BT_TAG, "initialized, tx: 5, rx: 18, cts: 23, rts: 19");
37+
ESP_LOGI(TAG, "initialized, tx: 5, rx: 18, cts: 23, rts: 19");
4138

4239
return 0;
4340
}

0 commit comments

Comments
 (0)