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 
22 #ifndef SAM_USB_H
23 #define SAM_USB_H
24 
25 #include <stdint.h>
26 #include <stdlib.h>
27 #include "periph_cpu.h"
28 #include "periph/usbdev.h"
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
37 #define SAM_USB_NUM_EP USBDEV_NUM_ENDPOINTS
38 
42 typedef struct {
45  UsbDeviceDescBank banks[2 * SAM_USB_NUM_EP];
46  usbdev_ep_t endpoints[2 * SAM_USB_NUM_EP];
47  bool suspended;
49 
50 #ifdef __cplusplus
51 }
52 #endif
53 #endif /* SAM_USB_H */
#define SAM_USB_NUM_EP
Number of USB IN and OUT endpoints.
Definition: sam_usb.h:37
USB peripheral parameters.
sam0 usb peripheral device context
Definition: sam_usb.h:42
usbdev_t usbdev
Inherited usbdev struct.
Definition: sam_usb.h:43
const sam0_common_usb_config_t * config
USB peripheral config
Definition: sam_usb.h:44
bool suspended
Suspend active
Definition: sam_usb.h:47
usbdev endpoint descriptor
Definition: usbdev.h:259
usbdev device descriptor
Definition: usbdev.h:247
Definitions low-level USB driver interface.