1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-20 20:13:50 +01:00
Marian Buschsieweke e29bfedf44
cpu/sam*: update style to coding convention
- Use `#pragma once`
- Indent preprocessor directives inside conditional compilation
- Drop unused `#include`s
2025-05-05 08:59:00 +02:00

50 lines
1.2 KiB
C

/*
* Copyright (C) 2019 Koen Zandberg
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
#pragma once
/**
* @defgroup cpu_sam0_common_usb sam0 USB peripheral
* @ingroup cpu_sam0_common
* @brief USB interface functions for the sam0 class devices
*
* @{
*
* @file
* @brief USB interface functions for the sam0 class devices
*
* @author Koen Zandberg <koen@bergzand.net>
*/
#include "periph/usbdev.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* Number of USB IN and OUT endpoints
*/
#define SAM_USB_NUM_EP USBDEV_NUM_ENDPOINTS
/**
* @brief sam0 usb peripheral device context
*/
typedef struct {
usbdev_t usbdev; /**< Inherited usbdev struct */
const sam0_common_usb_config_t *config; /**< USB peripheral config */
UsbDeviceDescBank banks[2 * SAM_USB_NUM_EP]; /**< Device descriptor banks */
usbdev_ep_t endpoints[2 * SAM_USB_NUM_EP]; /**< Endpoints */
bool suspended; /**< Suspend active */
} sam0_common_usb_t;
#ifdef __cplusplus
}
#endif
/** @} */