Skip to content

Commit 9476407

Browse files
committed
update to esp-idf 5.0
1 parent 9778d93 commit 9476407

File tree

6 files changed

+10
-7
lines changed

6 files changed

+10
-7
lines changed

components/ble/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ set(srcs "gap.c" "gatt.c" "ble.c")
22

33
idf_component_register(SRCS "${srcs}"
44
INCLUDE_DIRS "include"
5-
REQUIRES bt nimble_peripheral_utils ssd1306 crsf
5+
REQUIRES bt nimble_peripheral_utils ssd1306 crsf nvs_flash
66
PRIV_REQUIRES )

components/ble/ble.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ void initBLE(){
1818
}
1919
ESP_ERROR_CHECK(ret);
2020

21-
ESP_ERROR_CHECK(esp_nimble_hci_and_controller_init());
21+
//Controller initialization, enable and HCI initialization calls have been moved to nimble_port_init. This function can be deleted directly.
22+
//ESP_ERROR_CHECK(esp_nimble_hci_and_controller_init());
2223

2324
nimble_port_init();
2425

components/ble/gap.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,11 @@ int bleGAPEevent(struct ble_gap_event *event, void *arg) {
186186
if (event->passkey.params.action == BLE_SM_IOACT_DISP) {
187187
pkey.action = event->passkey.params.action;
188188
pkey.passkey = 123456; // This is the passkey to be entered on peer
189-
ESP_LOGI(tag_GAP, "Enter passkey %d on the peer side", pkey.passkey);
189+
ESP_LOGI(tag_GAP, "Enter passkey %d on the peer side", (int)pkey.passkey);
190190
rc = ble_sm_inject_io(event->passkey.conn_handle, &pkey);
191191
ESP_LOGI(tag_GAP, "ble_sm_inject_io result: %d\n", rc);
192192
} else if (event->passkey.params.action == BLE_SM_IOACT_NUMCMP) {
193-
ESP_LOGI(tag_GAP, "Passkey on device's display: %d", event->passkey.params.numcmp);
193+
ESP_LOGI(tag_GAP, "Passkey on device's display: %d", (int)event->passkey.params.numcmp);
194194
ESP_LOGI(tag_GAP, "Accept or reject the passkey through console in this format -> key Y or key N");
195195
pkey.action = event->passkey.params.action;
196196
if (scli_receive_key(&key)) {

components/crsf/crsf.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ void crsf_get_ChannelData_task(void *arg)
8383
if(length){
8484

8585
//read uart data
86-
int len = uart_read_bytes(UART_NUM_2, data, length, 20 / portTICK_RATE_MS);
86+
int len = uart_read_bytes(UART_NUM_2, data, length, 20 / portTICK_PERIOD_MS);
8787

8888
//RX Buffer leeren wenn Frame im temporären buffer
8989
uart_flush(UART_NUM_2);
@@ -227,6 +227,7 @@ void crsf_get_ChannelData_task(void *arg)
227227

228228
if(notify_state){
229229
om = ble_hs_mbuf_from_flat(&channelData, sizeof(channelData));
230+
//Deprecated. Should not be used. Use ble_gatts_notify_custom instead.
230231
rc = ble_gattc_notify_custom(conn_handle, report_data_handle, om);
231232

232233
//assert(rc == 0);

components/ssd1306/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
set(srcs "ssd1306.c")
22

33
idf_component_register(SRCS "${srcs}"
4-
INCLUDE_DIRS "include")
4+
INCLUDE_DIRS "include"
5+
REQUIRES driver)

components/ssd1306/include/ssd1306.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
#define SSD1306_CMD_DEACTIVE_SCROLL 0x2E
6767

6868
//buffer damit der aktuelle Output auch im Speicher des ESP vorhanden ist
69-
uint8_t* ssd1306_buffer;
69+
static uint8_t* ssd1306_buffer;
7070

7171
void ssd1306_init();
7272
void I2C_master_init();

0 commit comments

Comments
 (0)