Loading...
Searching...
No Matches
cpu_usbdev.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2016 Freie Universität Berlin
3 * 2017 OTA keys S.A.
4 *
5 * This file is subject to the terms and conditions of the GNU Lesser
6 * General Public License v2.1. See the file LICENSE in the top level
7 * directory for more details.
8 */
9
21#ifndef PERIPH_CPU_USBDEV_H
22#define PERIPH_CPU_USBDEV_H
23
24#include <stdint.h>
25
26#include "periph/cpu_gpio.h"
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
35#define USBDEV_CPU_DMA_ALIGNMENT (4)
36
40#define USBDEV_CPU_DMA_REQUIREMENTS __attribute__((aligned(USBDEV_CPU_DMA_ALIGNMENT)))
41
45typedef struct {
46 uintptr_t base_addr;
47 uint32_t rcc_mask;
48 uint8_t irqn;
49 uint8_t apb;
50 gpio_t dm;
51 gpio_t dp;
53 gpio_t disconn;
55
56#ifdef __cplusplus
57}
58#endif
59
60#endif /* PERIPH_CPU_USBDEV_H */
GPIO CPU definitions for the STM32 family.
gpio_af_t
Override alternative GPIO mode options.
Definition periph_cpu.h:166
stm32 USB device FS configuration
Definition cpu_usbdev.h:45
gpio_t dm
Data- gpio.
Definition cpu_usbdev.h:50
gpio_af_t af
Alternative function.
Definition cpu_usbdev.h:52
gpio_t disconn
GPIO if used for USB disconnect.
Definition cpu_usbdev.h:53
uint32_t rcc_mask
bit in clock enable register
Definition cpu_usbdev.h:47
uintptr_t base_addr
USB peripheral base address.
Definition cpu_usbdev.h:46
uint8_t irqn
IRQ channel.
Definition cpu_usbdev.h:48
uint8_t apb
APB bus.
Definition cpu_usbdev.h:49
gpio_t dp
Data+ gpio.
Definition cpu_usbdev.h:51