diff --git a/nrf52840/config/sdk_config.h b/nrf52840/config/sdk_config.h index dde6de0..1200955 100644 --- a/nrf52840/config/sdk_config.h +++ b/nrf52840/config/sdk_config.h @@ -6114,7 +6114,7 @@ // Enable processing power events in USB event handler. #ifndef APP_USBD_CONFIG_POWER_EVENTS_PROCESS -#define APP_USBD_CONFIG_POWER_EVENTS_PROCESS 1 +#define APP_USBD_CONFIG_POWER_EVENTS_PROCESS 0 #endif // APP_USBD_CONFIG_EVENT_QUEUE_ENABLE - Enable event queue. diff --git a/source/usb.cpp b/source/usb.cpp index eaaf117..a96eb29 100644 --- a/source/usb.cpp +++ b/source/usb.cpp @@ -40,8 +40,8 @@ void usbSetup() if (USBD_POWER_DETECTION) { - ret = app_usbd_power_events_enable(); - APP_ERROR_CHECK(ret); + //ret = app_usbd_power_events_enable(); + //APP_ERROR_CHECK(ret); NRF_LOG_INFO("USB POWER DETECTION"); } else diff --git a/source/usb.h b/source/usb.h index e96d1c8..7d1afe3 100644 --- a/source/usb.h +++ b/source/usb.h @@ -13,7 +13,7 @@ extern "C" * @brief Enable USB power detection */ #ifndef USBD_POWER_DETECTION -#define USBD_POWER_DETECTION true +#define USBD_POWER_DETECTION false #endif /** diff --git a/states/states.cpp b/states/states.cpp index f414460..06d66ff 100644 --- a/states/states.cpp +++ b/states/states.cpp @@ -926,7 +926,7 @@ State *GyroExampleState::handleEvent(INT_SOURCE intSource) State *returnStatep; if(intSource == INT_SOURCE::JOY_CENTER) { - //vTaskSuspend(gyroTask); + vTaskSuspend(gyroTask); returnStatep = new GyroMenuState(EPD_WRITE_METHOD::FULL); } else @@ -940,7 +940,7 @@ void GyroExampleState::displayOnEpd() { epd.drawImage(gyro1); writeToEpd(); - //vTaskResume(gyroTask); + vTaskResume(gyroTask); } BleMenuState::BleMenuState(){} @@ -1007,7 +1007,7 @@ void BleExampleState::displayOnEpd() { epd.drawImage(BleBeaconInMeni); writeToEpd(); - //vTaskResume(bleTask); + vTaskResume(bleTask); } diff --git a/tasks/aconnoTasks.cpp b/tasks/aconnoTasks.cpp index de6409b..74f8370 100644 --- a/tasks/aconnoTasks.cpp +++ b/tasks/aconnoTasks.cpp @@ -814,7 +814,7 @@ void usbFunction(void *arg) UNUSED_RETURN_VALUE(NRF_LOG_PROCESS()); /* Sleep CPU only if there was no interrupt since last loop processing */ __WFE(); - } + } while (app_usbd_event_queue_process())