fix(ble): Removed the C5 support for examples in ble_get_started

This commit is contained in:
Yuhan Wei
2024-08-26 14:04:09 +08:00
committed by Wei Yu Han
parent d4b4f5c146
commit 89db2b75dc
7 changed files with 17 additions and 23 deletions

View File

@@ -1,5 +1,5 @@
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-H2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- |
# NimBLE Beacon Example
@@ -85,7 +85,7 @@ void app_main(void) {
}
```
Then, call `nimble_port_init` function to initialize NimBLE host stack.
Then, call `nimble_port_init` function to initialize NimBLE host stack.
``` C
void app_main(void) {
@@ -186,7 +186,7 @@ void app_main(void) {
/* Start NimBLE host task thread and return */
xTaskCreate(nimble_host_task, "NimBLE Host", 4*1024, NULL, 5, NULL);
return;
return;
}
```

View File

@@ -1,5 +1,5 @@
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-H2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- |
# NimBLE Connection Example
@@ -71,7 +71,7 @@ Please refer to the NimBLE Beacon Example for details.
### Start Advertising
There're some slight differences in this example when compared to NimBLE Beacon Example. First, in this example we are constructing a connectable peripheral, so connection mode is set to connectable, that is
There're some slight differences in this example when compared to NimBLE Beacon Example. First, in this example we are constructing a connectable peripheral, so connection mode is set to connectable, that is
``` C
static void start_advertising(void) {
@@ -201,7 +201,7 @@ static int gap_event_handler(struct ble_gap_event *event, void *arg) {
#### Disconnect Event
On disconnect event, we simply
On disconnect event, we simply
1. Print out disconnect reason and connection descriptor
2. Turn off the LED
@@ -254,7 +254,7 @@ static int gap_event_handler(struct ble_gap_event *event, void *arg) {
}
print_conn_desc(&desc);
return rc;
...
}
```

View File

@@ -1,2 +0,0 @@
CONFIG_BLINK_GPIO=6
CONFIG_BLINK_LED_STRIP=y

View File

@@ -1,5 +1,5 @@
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-H2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- |
# NimBLE GATT Server Example
@@ -69,7 +69,7 @@ See the [Getting Started Guide](https://idf.espressif.com/) for full steps to co
In this example, we call GATT `gatt_svr_init` function to initialize GATT server in `app_main` before NimBLE host configuration. This is a custom function defined in `gatt_svc.c`, and basically we just call GATT service initialization API and add services to registration queue.
And there's another code added in `nimble_host_config_init`, which is
And there's another code added in `nimble_host_config_init`, which is
``` C
static void nimble_host_config_init(void) {
@@ -147,7 +147,7 @@ static const struct ble_gatt_svc_def gatt_svr_svcs[] = {
.val_handle = &led_chr_val_handle},
{0}},
},
{
0, /* No more services. */
},
@@ -301,12 +301,12 @@ static int gap_event_handler(struct ble_gap_event *event, void *arg) {
/* GATT subscribe event callback */
gatt_svr_subscribe_cb(event);
return rc;
...
}
```
Then we'll check connection handle and attribute handle, if the attribute handle matches `heart_rate_chr_val_chandle`, `heart_rate_chr_conn_handle` and `heart_rate_ind_status` will be updated together.
Then we'll check connection handle and attribute handle, if the attribute handle matches `heart_rate_chr_val_chandle`, `heart_rate_chr_conn_handle` and `heart_rate_ind_status` will be updated together.
``` C
void gatt_svr_subscribe_cb(struct ble_gap_event *event) {

View File

@@ -1,2 +0,0 @@
CONFIG_BLINK_GPIO=6
CONFIG_BLINK_LED_STRIP=y

View File

@@ -1,5 +1,5 @@
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-H2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- |
# NimBLE Security Example

View File

@@ -1,2 +0,0 @@
CONFIG_BLINK_GPIO=6
CONFIG_BLINK_LED_STRIP=y