Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
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
29
extern
"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
45
typedef
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
;
52
gpio_af_t
af
;
53
gpio_t
disconn
;
54
}
stm32_usbdev_fs_config_t
;
55
56
#ifdef __cplusplus
57
}
58
#endif
59
60
#endif
/* PERIPH_CPU_USBDEV_H */
cpu_gpio.h
GPIO CPU definitions for the STM32 family.
gpio_af_t
gpio_af_t
Override alternative GPIO mode options.
Definition
periph_cpu.h:166
gpio_t
uint16_t gpio_t
GPIO type identifier.
Definition
periph_cpu.h:117
stm32_usbdev_fs_config_t
stm32 USB device FS configuration
Definition
cpu_usbdev.h:45
stm32_usbdev_fs_config_t::dm
gpio_t dm
Data- gpio.
Definition
cpu_usbdev.h:50
stm32_usbdev_fs_config_t::af
gpio_af_t af
Alternative function.
Definition
cpu_usbdev.h:52
stm32_usbdev_fs_config_t::disconn
gpio_t disconn
GPIO if used for USB disconnect.
Definition
cpu_usbdev.h:53
stm32_usbdev_fs_config_t::rcc_mask
uint32_t rcc_mask
bit in clock enable register
Definition
cpu_usbdev.h:47
stm32_usbdev_fs_config_t::base_addr
uintptr_t base_addr
USB peripheral base address.
Definition
cpu_usbdev.h:46
stm32_usbdev_fs_config_t::irqn
uint8_t irqn
IRQ channel.
Definition
cpu_usbdev.h:48
stm32_usbdev_fs_config_t::apb
uint8_t apb
APB bus.
Definition
cpu_usbdev.h:49
stm32_usbdev_fs_config_t::dp
gpio_t dp
Data+ gpio.
Definition
cpu_usbdev.h:51
Generated on Thu Jan 30 2025 14:58:34 by
1.12.0