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
10#pragma once
11
22
23#include <stdint.h>
24
25#include "periph/cpu_gpio.h"
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
34#define USBDEV_CPU_DMA_ALIGNMENT (4)
35
39#define USBDEV_CPU_DMA_REQUIREMENTS __attribute__((aligned(USBDEV_CPU_DMA_ALIGNMENT)))
40
44typedef struct {
45 uintptr_t base_addr;
46 uint32_t rcc_mask;
47 uint8_t irqn;
48 uint8_t apb;
49 gpio_t dm;
50 gpio_t dp;
52 gpio_t disconn;
54
55#ifdef __cplusplus
56}
57#endif
58
GPIO CPU definitions for the STM32 family.
gpio_af_t
Override alternative GPIO mode options.
Definition periph_cpu.h:165
stm32 USB device FS configuration
Definition cpu_usbdev.h:44
gpio_t dm
Data- gpio.
Definition cpu_usbdev.h:49
gpio_af_t af
Alternative function.
Definition cpu_usbdev.h:51
gpio_t disconn
GPIO if used for USB disconnect.
Definition cpu_usbdev.h:52
uint32_t rcc_mask
bit in clock enable register
Definition cpu_usbdev.h:46
uintptr_t base_addr
USB peripheral base address.
Definition cpu_usbdev.h:45
uint8_t irqn
IRQ channel.
Definition cpu_usbdev.h:47
uint8_t apb
APB bus.
Definition cpu_usbdev.h:48
gpio_t dp
Data+ gpio.
Definition cpu_usbdev.h:50