Adjust logic.

This commit is contained in:
HiFiPhile
2024-05-13 22:26:19 +02:00
parent 0fce7d1f54
commit e250b82377
5 changed files with 24 additions and 16 deletions

View File

@@ -97,8 +97,7 @@ typedef struct TU_ATTR_ALIGNED(4) {
};
} dcd_event_t;
typedef enum _test_mode_selector
{
typedef enum {
TEST_J = 1,
TEST_K,
TEST_SE0_NAK,
@@ -158,12 +157,13 @@ void dcd_disconnect(uint8_t rhport) TU_ATTR_WEAK;
// Enable/Disable Start-of-frame interrupt. Default is disabled
void dcd_sof_enable(uint8_t rhport, bool en);
#if CFG_TUD_TEST_MODE
// Check if the test mode is supported, returns true is test mode selector is supported
bool dcd_check_test_mode_support(test_mode_t test_selector) TU_ATTR_WEAK;
// Put device into a test mode (needs power cycle to quit)
void dcd_enter_test_mode(uint8_t rhport, test_mode_t test_selector) TU_ATTR_WEAK;
#endif
//--------------------------------------------------------------------+
// Endpoint API
//--------------------------------------------------------------------+