Macros | |
| #define | _CY_USB_COMMON_H_ |
| Indicates the use of cy_usb_common. | |
| #define | CY_USBD_ENDP_DIR_MASK (uint8_t)0x80 |
| Mask used to get endpoint direction bit from descriptor. | |
| #define | CY_USBD_ENDP_NUM_MASK (uint8_t)0x7F |
| Mask used to get endpoint index from descriptor. | |
| #define | CY_USB_SET 0x01 |
| Value used to set control fields in registers. | |
| #define | CY_USB_CLEAR 0x00 |
| Value used to clear control fields in registers. | |
| #define | CY_USB_MAX_ENDP_NUMBER 16 |
| Maximum number of endpoints supported by the device. | |
| #define | CY_USBD_MAX_STR_DSCR_INDX 16 |
| Maximum number of string descriptors which are managed by the USBD stack. | |
| #define | CY_USB_MAX_TERMINATION_DETECTION_COUNT 0x05 |
| Number of SS termination detect attempts to be made by the device. | |
| #define | CY_USB_ARG_ZLP 0x01 |
| Parameter passed to Cy_USBD_ClearZlpSlpIntrEnableMask API to select ZLP interrupt. | |
| #define | CY_USB_ARG_SLP 0x00 |
| Parameter passed to Cy_USBD_ClearZlpSlpIntrEnableMask API to select SLP interrupt. | |
| #define | CY_USB_MIN(arg1, arg2) (((arg1) <= (arg2)) ? (arg1): (arg2)) |
| Get minimum from among two numbers. | |
| #define | CY_USB_MAX(arg1, arg2) (((arg1) >= (arg2)) ? (arg1): (arg2)) |
| Get maximum from among two numbers. | |
| #define | CY_USB_DWORD_GET_BYTE0(d) ((uint8_t)((d) & 0xFF)) |
| Retrieves byte 0 from a 32 bit number. | |
| #define | CY_USB_DWORD_GET_BYTE1(d) ((uint8_t)(((d) >> 8) & 0xFF)) |
| Retrieves byte 1 from a 32 bit number. | |
| #define | CY_USB_DWORD_GET_BYTE2(d) ((uint8_t)(((d) >> 16) & 0xFF)) |
| Retrieves byte 2 from a 32 bit number. | |
| #define | CY_USB_DWORD_GET_BYTE3(d) ((uint8_t)(((d) >> 24) & 0xFF)) |
| Retrieves byte 3 from a 32 bit number. | |
| #define | CY_USB_GET_LSB(w) ((uint8_t)((w) & UINT8_MAX)) |
| Get the LS byte from a 16-bit number. | |
| #define | CY_USB_GET_LSW(d) ((uint16_t)((d) & UINT16_MAX)) |
| Get the LS word from a 32-bit number. | |
| #define | CY_USB_GET_MSB(w) ((uint8_t)((w) >> 8)) |
| Get the MS byte from a 16-bit number. | |
| #define | CY_USB_GET_MSW(d) ((uint16_t)((d) >> 16)) |
| Get the MS word from a 32-bit number. | |
| #define | DWORD_MSB_BYTES(val) |
| Get the most significant two bytes from a 32-bit number. More... | |
| #define | DWORD_LSB_BYTES(val) |
| Get the least significant two bytes from a 32-bit number. More... | |
| #define | LITTLE_ENDIAN_32(val) |
| Get all the bytes from a 32-bit number in little endian order. More... | |
| #define | LITTLE_ENDIAN_64(msb, lsb) |
| Get all the bytes from a 64-bit number in little endian order. More... | |
| #define | CY_USB_BUILD_2B_WORD(byte1, byte0) ((uint16_t)((byte1 << 8) | byte0)) |
| Combine two byte values into a 16-bit integer. | |
| #define | CY_USB_BUILD_4B_WORD(byte3, byte2, byte1, byte0) |
| Combine four byte values into a 32-bit integer. More... | |
| #define | CY_EVT_LOG_DBG_MSG (0x80000000UL) |
| Field mask that indicates a 32-bit debug value in the event log buffer. | |
| #define | CY_LOG_VALUE(logmsg) (Cy_USBD_AddEvtToLog(pCalCtxt->pUsbdCtxt, CY_EVT_LOG_DBG_MSG | (logmsg))) |
| Add a 32-bit debug value to the event log buffer. | |
| #define | CY_LOG_EVENT(event) (Cy_USBD_AddEvtToLog(pCalCtxt->pUsbdCtxt, event)) |
| Add an 8-bit event code along with timestamp to the event log buffer. | |
| #define | CY_USB_USBD_H |
| Indicates the use of cy_usb_usbd. | |
| #define | CY_USB_DSCR_OFFSET_LEN (0x00) |
| Offset of descriptor length field in any USB descriptor. | |
| #define | CY_USB_DSCR_OFFSET_TYPE (0x01) |
| Offset of type field in any USB descriptor. | |
| #define | CY_USB_DEVICE_DSCR_LEN (18) |
| Length of standard device descriptor. | |
| #define | CY_USB_DEVICE_QUAL_DSCR_LEN (10) |
| Length of device qualifier descriptor. | |
| #define | CY_USB_ENDP_SS_COMP_DSCR_LEN (6) |
| Length of SS endpoint companion descriptor. | |
| #define | CY_USB_ENDP_SSP_ISO_COMP_DSCR_LEN (8) |
| Length of SSP isochronous endpoint companion descriptor. | |
| #define | CY_USB_BMREQUEST_SETUP0_MASK (0x000000FFu) |
| Mask to get bmRequestType field from control request data. | |
| #define | CY_USB_BMREQUEST_SETUP0_POS (0u) |
| Bit position of bmRequestType field in control request data. | |
| #define | CY_USB_BREQUEST_SETUP0_MASK (0x0000FF00u) |
| Mask to get bRequest field from control request data. | |
| #define | CY_USB_BREQUEST_SETUP0_POS (8u) |
| Bit position of bRequest field in control request data. | |
| #define | CY_USB_WVALUE_SETUP0_MASK (0xFFFF0000u) |
| Mask to get wValue field from control request data. | |
| #define | CY_USB_WVALUE_SETUP0_POS (16u) |
| Bit position of wValue field in control request data. | |
| #define | CY_USB_WINDEX_SETUP1_MASK (0x0000FFFFu) |
| Mask to get wIndex field from control request data. | |
| #define | CY_USB_WINDEX_SETUP1_POS (0u) |
| Bit position of wIndex field in control request data. | |
| #define | CY_USB_WLENGTH_SETUP1_MASK (0xFFFF0000u) |
| Mask to get wLength field from control request data. | |
| #define | CY_USB_WLENGTH_SETUP1_POS (16u) |
| Bit position of wLength field in control request data. | |
| #define | CY_USB_USBD_MSG_QUEUE_SIZE (32) |
| Depth of message queue used by USBD stack to get messages from USBHS/USBSS CAL drivers. | |
| #define | CY_USB_USBD_MSG_SIZE (sizeof(cy_stc_usb_cal_msg_t)) |
| Size of each message in the USBD message queue. | |
| #define | CY_USB_MAX_INTF (17) |
| Maximum number of interfaces supported in the configuration. | |
| #define | CY_USBD_TASK_STACK_DEPTH (512) |
| Stack size reserved for USBD task in 32-bit words. More... | |
| #define | CY_USBD_TASK_PRIORITY (10) |
| USBD task priority level. | |
| #define | _CY_USBD_VERSION_H_ |
| Indicates the use of cy_usbd_version. | |
| #define | USBD_VERSION_MAJOR (1u) |
| USBD middleware major version. | |
| #define | USBD_VERSION_MINOR (3u) |
| USBD middleware minor version. | |
| #define | USBD_VERSION_PATCH (2u) |
| USBD middleware patch version. | |
| #define | USBD_VERSION_BUILD (107u) |
| USBD middleware build number. | |
| #define | USBD_VERSION_NUM |
| USBD middleware version number. More... | |
| #define | CY_USBHS_CAL_DRV_H |
| Indicates the use of cy_usbd_cal_drv. | |
| #define | CY_USBHS_PLL_LOCK_TIMEOUT_MS (10) |
| Time to wait for PLL lock in ms. | |
| #define | CY_EXTERNAL_CLK_PIN (P5_1_PIN) |
| Primary pin for external clock input: XTALOUT or P5.1. | |
| #define | CY_EXTERNAL_CLK_PIN_ALT (P5_0_PIN) |
| Alternate pin for external clock input: XTALIN or P5.0. | |
| #define | USBHSDEV_LPM_L1_WAKE_DURATION (0x05DCUL) |
| Duration for which remote wake signal should be driven in the LPM-L1 state. More... | |
| #define | USBHSDEV_LPM_L2_WAKE_DURATION (0x33450UL) |
| Duration for which remote wake signal should be driven in the L2 (Suspend) state. More... | |
| #define | USBHSDEV_LEGFEAT_BYPASS_FLOP_EN (0x0008UL) |
| Control bit to be set in LEGACY_FEATURE_EN register to reduce round trip latency. | |
| #define | CY_USBSS_CAL_DRV_H |
| Indicates the use of cy_usbss_cal_drv. | |
| #define | CY_SSCAL_PRESHOOT_DFLT_x10 (12) |
| #define | CY_SSCAL_DEEMPH_DFLT_x10 (-21) |
| #define | CY_SSCAL_TXSWING_MAX (1150U) |
| #define | CY_SSCAL_TXSWING_MIN (200U) |
| #define | CY_SSCAL_CC_ADC_MAX (0x7Fu) |
| #define | CY_SSCAL_CC_VOLT_0P1 (8u) |
| #define | CY_SSCAL_CC_VOLT_0P3 (22u) |
| #define | DEF_LUT_MASK_GEN1X1 (0x0FFF) /* LUT index 0-11 */ |
| #define | DEF_LUT_MASK_GEN2X1 (0xFFFF) /* LUT index 0-15 */ |
| #define | DEF_LUT_MASK_GEN1X2 (0x3BA9) /* LUT index 0,3,5,7,8,9,11,12,13 */ |
| #define | DEF_LUT_MASK_GEN2X2 (0x03FF) /* LUT index 0-9 */ |
| #define | MIN_LUT_GEN1X2 (0x18A0) /* LUT index 5,7,11,12 */ |
| #define | LUT_WIDTH (16) |
| #define DWORD_MSB_BYTES | ( | val | ) |
Get the most significant two bytes from a 32-bit number.
| #define DWORD_LSB_BYTES | ( | val | ) |
Get the least significant two bytes from a 32-bit number.
| #define LITTLE_ENDIAN_32 | ( | val | ) |
Get all the bytes from a 32-bit number in little endian order.
| #define LITTLE_ENDIAN_64 | ( | msb, | |
| lsb | |||
| ) |
Get all the bytes from a 64-bit number in little endian order.
| #define CY_USB_BUILD_4B_WORD | ( | byte3, | |
| byte2, | |||
| byte1, | |||
| byte0 | |||
| ) |
Combine four byte values into a 32-bit integer.
| #define CY_USBD_TASK_STACK_DEPTH (512) |
Stack size reserved for USBD task in 32-bit words.
Budgeting extra space to cover for callbacks.
| #define USBD_VERSION_NUM |
USBD middleware version number.
| #define USBHSDEV_LPM_L1_WAKE_DURATION (0x05DCUL) |
Duration for which remote wake signal should be driven in the LPM-L1 state.
1500 cycles at 30 MHz = 50 us.
| #define USBHSDEV_LPM_L2_WAKE_DURATION (0x33450UL) |
Duration for which remote wake signal should be driven in the L2 (Suspend) state.
210000 cycles at 30 MHz = 7 ms.