Skip to content
Snippets Groups Projects
Commit 8df66532 authored by Gregory Nutt's avatar Gregory Nutt
Browse files

SAMA5 UDPHS: Bring in UDPHS endpoint interrupt handling logic

parent 4a9748df
Branches
Tags
No related merge requests found
......@@ -52,10 +52,20 @@
* Pre-processor Definitions
********************************************************************************************/
/* General Definitions **********************************************************************/
/* Number of endpoints and DMA channels */
#define SAM_UDPHS_NENDPOINTS 15
#define SAM_UDPHS_NDMACHANNELS 7 /* For EP1-7 */
/* Capabilities and characteristics of endpoints */
#define SAM_UDPHS_MAXPACKETSIZE(ep) \
(((unsigned)(ep) < 1) ? 64 : 1024)
#define SAM_UDPHS_NBANKS(ep) \
(((unsigned)(ep) < 1) ? 1 : (((unsigned)(ep) < 3) ? 3 : 2))
#define SAM_UDPHS_DMA(ep) \
(((unsigned)(ep) < 1) ? false : (((unsigned)(ep) < 8) ? true : false))
/* Register offsets *************************************************************************/
/* Global Registers */
......@@ -298,7 +308,7 @@
#define UDPHS_EPTCFG_DIR (1 << 3) /* Bit 3: Endpoint Direction */
#define UDPHS_EPTCFG_TYPE_SHIFT (4) /* Bits 4-5: Endpoint Type */
#define UDPHS_EPTCFG_TYPE_MASK (3 << UDPHS_EPTCFG_TYPE_SHIFT)
# define UDPHS_EPTCFG_TYPE_CTRL (0 << UDPHS_EPTCFG_TYPE_SHIFT) /* Control endpoint */
# define UDPHS_EPTCFG_TYPE_CTRL8 (0 << UDPHS_EPTCFG_TYPE_SHIFT) /* Control endpoint */
# define UDPHS_EPTCFG_TYPE_ISO (1 << UDPHS_EPTCFG_TYPE_SHIFT) /* Isochronous endpoint */
# define UDPHS_EPTCFG_TYPE_BULK (2 << UDPHS_EPTCFG_TYPE_SHIFT) /* Bulk endpoint */
# define UDPHS_EPTCFG_TYPE_INT (3 << UDPHS_EPTCFG_TYPE_SHIFT) /* Interrupt endpoint */
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment