sam_usb.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2019 Koen Zandberg
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
9 #pragma once
10 
24 #include "periph/usbdev.h"
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
33 #define SAM_USB_NUM_EP USBDEV_NUM_ENDPOINTS
34 
38 typedef struct {
41  UsbDeviceDescBank banks[2 * SAM_USB_NUM_EP];
42  usbdev_ep_t endpoints[2 * SAM_USB_NUM_EP];
43  bool suspended;
45 
46 #ifdef __cplusplus
47 }
48 #endif
#define SAM_USB_NUM_EP
Number of USB IN and OUT endpoints.
Definition: sam_usb.h:33
USB peripheral parameters.
sam0 usb peripheral device context
Definition: sam_usb.h:38
usbdev_t usbdev
Inherited usbdev struct.
Definition: sam_usb.h:39
const sam0_common_usb_config_t * config
USB peripheral config
Definition: sam_usb.h:40
bool suspended
Suspend active
Definition: sam_usb.h:43
usbdev endpoint descriptor
Definition: usbdev.h:259
usbdev device descriptor
Definition: usbdev.h:247
Definitions low-level USB driver interface.