Merge branch 'master' into release/v3.1.x
This commit is contained in:
commit
e3499bc4b7
3 changed files with 19 additions and 3 deletions
|
|
@ -453,7 +453,15 @@ __attribute__((weak)) int32_t tud_msc_scsi_cb(uint8_t lun, uint8_t const scsi_cm
|
||||||
__attribute__((weak)) bool tud_msc_is_writable_cb(uint8_t lun) {
|
__attribute__((weak)) bool tud_msc_is_writable_cb(uint8_t lun) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
#if CFG_TUD_NCM
|
||||||
|
__attribute__((weak)) bool tud_network_recv_cb(const uint8_t *src, uint16_t size) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
__attribute__((weak)) uint16_t tud_network_xmit_cb(uint8_t *dst, void *ref, uint16_t arg) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
__attribute__((weak)) void tud_network_init_cb(void) {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -259,7 +259,7 @@ uint16_t tud_hid_get_report_cb(uint8_t instance, uint8_t report_id, hid_report_t
|
||||||
// Invoked when received SET_REPORT control request or
|
// Invoked when received SET_REPORT control request or
|
||||||
// received data on OUT endpoint ( Report ID = 0, Type = 0 )
|
// received data on OUT endpoint ( Report ID = 0, Type = 0 )
|
||||||
void tud_hid_set_report_cb(uint8_t instance, uint8_t report_id, hid_report_type_t report_type, uint8_t const *buffer, uint16_t bufsize) {
|
void tud_hid_set_report_cb(uint8_t instance, uint8_t report_id, hid_report_type_t report_type, uint8_t const *buffer, uint16_t bufsize) {
|
||||||
if (!report_id && !report_type) {
|
if (!report_id && (!report_type || report_type == HID_REPORT_TYPE_OUTPUT)) {
|
||||||
if (!tinyusb_on_set_output(0, buffer, bufsize) && !tinyusb_on_set_output(buffer[0], buffer + 1, bufsize - 1)) {
|
if (!tinyusb_on_set_output(0, buffer, bufsize) && !tinyusb_on_set_output(buffer[0], buffer + 1, bufsize - 1)) {
|
||||||
log_d(
|
log_d(
|
||||||
"instance: %u, report_id: %u, report_type: %s, bufsize: %u", instance, buffer[0], tinyusb_hid_device_report_types[HID_REPORT_TYPE_OUTPUT], bufsize - 1
|
"instance: %u, report_id: %u, report_type: %s, bufsize: %u", instance, buffer[0], tinyusb_hid_device_report_types[HID_REPORT_TYPE_OUTPUT], bufsize - 1
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,15 @@ WPS (pin is 00000000)
|
||||||
#define ESP_WPS_MODE WPS_TYPE_PBC
|
#define ESP_WPS_MODE WPS_TYPE_PBC
|
||||||
|
|
||||||
void wpsStart() {
|
void wpsStart() {
|
||||||
esp_wps_config_t config = WPS_CONFIG_INIT_DEFAULT(ESP_WPS_MODE);
|
esp_wps_config_t config;
|
||||||
|
memset(&config, 0, sizeof(esp_wps_config_t));
|
||||||
|
//Same as config = WPS_CONFIG_INIT_DEFAULT(ESP_WPS_MODE);
|
||||||
|
config.wps_type = ESP_WPS_MODE;
|
||||||
|
strcpy(config.factory_info.manufacturer, "ESPRESSIF");
|
||||||
|
strcpy(config.factory_info.model_number, CONFIG_IDF_TARGET);
|
||||||
|
strcpy(config.factory_info.model_name, "ESPRESSIF IOT");
|
||||||
|
strcpy(config.factory_info.device_name, "ESP DEVICE");
|
||||||
|
strcpy(config.pin, "00000000");
|
||||||
esp_err_t err = esp_wifi_wps_enable(&config);
|
esp_err_t err = esp_wifi_wps_enable(&config);
|
||||||
if (err != ESP_OK) {
|
if (err != ESP_OK) {
|
||||||
Serial.printf("WPS Enable Failed: 0x%x: %s\n", err, esp_err_to_name(err));
|
Serial.printf("WPS Enable Failed: 0x%x: %s\n", err, esp_err_to_name(err));
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue