1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

cpu/stm32/periph: Use uintptr_t for periph addr

The peripheral register addresses are fixed, properly aligned addresses. Storing
them as uintptr_t makes live easier when casting them to helper structs, as no
intermediate cast to uintptr_t is needed to silence -Wcast-align.
This commit is contained in:
Marian Buschsieweke 2020-11-20 11:09:47 +01:00
parent c9eb0ae3de
commit 7cd9d615fa
No known key found for this signature in database
GPG Key ID: CB8E3238CE715A94
3 changed files with 3 additions and 3 deletions

View File

@ -36,7 +36,7 @@ extern "C" {
*/
static const stm32_usb_otg_fshs_config_t stm32_usb_otg_fshs_config[] = {
{
.periph = (uint8_t *)USB_OTG_FS_PERIPH_BASE,
.periph = USB_OTG_FS_PERIPH_BASE,
.rcc_mask = RCC_AHB2ENR_OTGFSEN,
.phy = STM32_USB_OTG_PHY_BUILTIN,
.type = STM32_USB_OTG_FS,

View File

@ -36,7 +36,7 @@ extern "C" {
*/
static const stm32_usb_otg_fshs_config_t stm32_usb_otg_fshs_config[] = {
{
.periph = (uint8_t *)USB_OTG_HS_PERIPH_BASE,
.periph = USB_OTG_HS_PERIPH_BASE,
.rcc_mask = RCC_AHB1ENR_OTGHSEN,
.phy = STM32_USB_OTG_PHY_BUILTIN,
.type = STM32_USB_OTG_HS,

View File

@ -821,7 +821,7 @@ typedef enum {
* @brief stm32 USB OTG configuration
*/
typedef struct {
uint8_t *periph; /**< USB peripheral base address */
uintptr_t periph; /**< USB peripheral base address */
uint32_t rcc_mask; /**< bit in clock enable register */
stm32_usb_otg_fshs_phy_t phy; /**< Built-in or ULPI phy */
stm32_usb_otg_fshs_type_t type; /**< FS or HS type */