blob: 17dd484adac6576726ae387491cfcf4a9265d3b2 [file]
/******************************************************************************
* @file USBController.h
*
* @brief for TLSR chips
*
* @author public@telink-semi.com;
* @date Sep. 30, 2010
*
* @attention
*
* Copyright (C) 2019-2020 Telink Semiconductor (Shanghai) Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*****************************************************************************/
#pragma once
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
extern "C" {
#endif
/**If Isochronous endpoint,
Bits 3..2 = Synchronisation Type (Iso Mode)
00 = No Synchonisation
01 = Asynchronous
10 = Adaptive
11 = Synchronous
Bits 5..4 = Usage Type (Iso Mode)
00 = Data Endpoint
01 = Feedback Endpoint
10 = Explicit Feedback Data Endpoint
11 = Reserved
*/
#define EP_SYNC_TYPE_NO_SYNC 0
#define EP_SYNC_TYPE_ASYN 1
#define EP_SYNC_TYPE_ADAPTIVE 2
#define EP_SYNC_TYPE_SYNC 3
#define EP_USAGE_TYPE_DATA 0
#define EP_USAGE_TYPE_FEEDBACK 1
#define EP_USAGE_TYPE_FEEDBACK_DATA 2
#define EP_USAGE_TYPE_RSV 3
#define ENDPOINT_DIR_MASK BIT(7)
#define ENDPOINT_DIR_OUT 0
#define ENDPOINT_DIR_IN BIT(7)
#define EP_TYPE_MASK 3
#define EP_TYPE_CONTROL 0
#define EP_TYPE_ISOCHRONOUS 1
#define EP_TYPE_BULK 2
#define EP_TYPE_INTERRUPT 3
/* Disable C linkage for C++ Compilers: */
#if defined(__cplusplus)
}
#endif