Skip to content

Commit 84315c6

Browse files
committed
Fixes for the latest IDF v5.1
1 parent 999f82d commit 84315c6

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

Diff for: libraries/BluetoothSerial/src/BTAdvertisedDevice.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#define __BTADVERTISEDDEVICE_H__
1010

1111
#include "BTAddress.h"
12-
12+
#include <string>
1313

1414
class BTAdvertisedDevice {
1515
public:

Diff for: libraries/SD_MMC/src/SD_MMC.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ bool SDMMCFS::begin(const char * mountpoint, bool mode1bit, bool format_if_mount
148148
void SDMMCFS::end()
149149
{
150150
if(_card) {
151-
esp_vfs_fat_sdmmc_unmount();
151+
esp_vfs_fat_sdcard_unmount(_impl->mountpoint(), _card);
152152
_impl->mountpoint(NULL);
153153
_card = NULL;
154154
}

Diff for: libraries/USB/src/USBHIDKeyboard.cpp

+2-5
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ USBHIDKeyboard::USBHIDKeyboard(): hid(){
3636
static bool initialized = false;
3737
if(!initialized){
3838
initialized = true;
39+
memset(&_keyReport, 0, sizeof(KeyReport));
3940
hid.addDevice(this, sizeof(report_descriptor));
4041
}
4142
}
@@ -72,11 +73,7 @@ void USBHIDKeyboard::sendReport(KeyReport* keys)
7273
hid_keyboard_report_t report;
7374
report.reserved = 0;
7475
report.modifier = keys->modifiers;
75-
if (keys->keys) {
76-
memcpy(report.keycode, keys->keys, 6);
77-
} else {
78-
memset(report.keycode, 0, 6);
79-
}
76+
memcpy(report.keycode, keys->keys, 6);
8077
hid.SendReport(HID_REPORT_ID_KEYBOARD, &report, sizeof(report));
8178
}
8279

Diff for: libraries/WebServer/src/WebServer.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include <Arduino.h>
2525
#include <esp32-hal-log.h>
2626
#include <libb64/cencode.h>
27+
#include "esp_random.h"
2728
#include "WiFiServer.h"
2829
#include "WiFiClient.h"
2930
#include "WebServer.h"

0 commit comments

Comments
 (0)