fixes inline declarations of functions
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
* Copyright (c) 2023 - 2024 MINRES Technologies GmbH
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Generated at 2024-12-06 09:43:24 UTC
|
||||
* by peakrdl_mnrs version 1.2.9
|
||||
*/
|
||||
* Copyright (c) 2023 - 2024 MINRES Technologies GmbH
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Generated at 2024-12-06 09:43:24 UTC
|
||||
* by peakrdl_mnrs version 1.2.9
|
||||
*/
|
||||
|
||||
#ifndef _BSP_GPIO_H
|
||||
#define _BSP_GPIO_H
|
||||
@@ -13,21 +13,21 @@
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct {
|
||||
volatile uint32_t VALUE;
|
||||
volatile uint32_t WRITE;
|
||||
volatile uint32_t WRITEENABLE;
|
||||
volatile uint32_t PULLUP;
|
||||
volatile uint32_t PULDOWN;
|
||||
volatile uint32_t DRIVESTRENGTH_0;
|
||||
volatile uint32_t DRIVESTRENGTH_1;
|
||||
volatile uint32_t DRIVESTRENGTH_2;
|
||||
volatile uint32_t DRIVESTRENGTH_3;
|
||||
volatile uint32_t IE;
|
||||
volatile uint32_t IP;
|
||||
volatile uint32_t IRQ_TRIGGER;
|
||||
volatile uint32_t IRQ_TYPE;
|
||||
volatile uint32_t BOOT_SEL;
|
||||
}gpio_t;
|
||||
volatile uint32_t VALUE;
|
||||
volatile uint32_t WRITE;
|
||||
volatile uint32_t WRITEENABLE;
|
||||
volatile uint32_t PULLUP;
|
||||
volatile uint32_t PULDOWN;
|
||||
volatile uint32_t DRIVESTRENGTH_0;
|
||||
volatile uint32_t DRIVESTRENGTH_1;
|
||||
volatile uint32_t DRIVESTRENGTH_2;
|
||||
volatile uint32_t DRIVESTRENGTH_3;
|
||||
volatile uint32_t IE;
|
||||
volatile uint32_t IP;
|
||||
volatile uint32_t IRQ_TRIGGER;
|
||||
volatile uint32_t IRQ_TYPE;
|
||||
volatile uint32_t BOOT_SEL;
|
||||
} gpio_t;
|
||||
|
||||
#define GPIO_VALUE_OFFS 0
|
||||
#define GPIO_VALUE_MASK 0xffffffff
|
||||
@@ -197,305 +197,197 @@ typedef struct {
|
||||
#define GPIO_BOOT_SEL_MASK 0x7
|
||||
#define GPIO_BOOT_SEL(V) ((V & GPIO_BOOT_SEL_MASK) << GPIO_BOOT_SEL_OFFS)
|
||||
|
||||
//GPIO_VALUE
|
||||
inline uint32_t get_gpio_value(volatile gpio_t* reg){
|
||||
return (reg->VALUE >> 0) & 0xffffffff;
|
||||
// GPIO_VALUE
|
||||
static inline uint32_t get_gpio_value(volatile gpio_t* reg) { return (reg->VALUE >> 0) & 0xffffffff; }
|
||||
|
||||
// GPIO_WRITE
|
||||
static inline uint32_t get_gpio_write(volatile gpio_t* reg) { return (reg->WRITE >> 0) & 0xffffffff; }
|
||||
static inline void set_gpio_write(volatile gpio_t* reg, uint32_t value) { reg->WRITE = (reg->WRITE & ~(0xffffffffU << 0)) | (value << 0); }
|
||||
|
||||
// GPIO_WRITEENABLE
|
||||
static inline uint32_t get_gpio_writeEnable(volatile gpio_t* reg) { return (reg->WRITEENABLE >> 0) & 0xffffffff; }
|
||||
static inline void set_gpio_writeEnable(volatile gpio_t* reg, uint32_t value) {
|
||||
reg->WRITEENABLE = (reg->WRITEENABLE & ~(0xffffffffU << 0)) | (value << 0);
|
||||
}
|
||||
|
||||
//GPIO_WRITE
|
||||
inline uint32_t get_gpio_write(volatile gpio_t* reg){
|
||||
return (reg->WRITE >> 0) & 0xffffffff;
|
||||
}
|
||||
inline void set_gpio_write(volatile gpio_t* reg, uint32_t value){
|
||||
reg->WRITE = (reg->WRITE & ~(0xffffffffU << 0)) | (value << 0);
|
||||
// GPIO_PULLUP
|
||||
static inline uint32_t get_gpio_pullup(volatile gpio_t* reg) { return (reg->PULLUP >> 0) & 0xffffffff; }
|
||||
static inline void set_gpio_pullup(volatile gpio_t* reg, uint32_t value) {
|
||||
reg->PULLUP = (reg->PULLUP & ~(0xffffffffU << 0)) | (value << 0);
|
||||
}
|
||||
|
||||
//GPIO_WRITEENABLE
|
||||
inline uint32_t get_gpio_writeEnable(volatile gpio_t* reg){
|
||||
return (reg->WRITEENABLE >> 0) & 0xffffffff;
|
||||
}
|
||||
inline void set_gpio_writeEnable(volatile gpio_t* reg, uint32_t value){
|
||||
reg->WRITEENABLE = (reg->WRITEENABLE & ~(0xffffffffU << 0)) | (value << 0);
|
||||
// GPIO_PULDOWN
|
||||
static inline uint32_t get_gpio_puldown(volatile gpio_t* reg) { return (reg->PULDOWN >> 0) & 0xffffffff; }
|
||||
static inline void set_gpio_puldown(volatile gpio_t* reg, uint32_t value) {
|
||||
reg->PULDOWN = (reg->PULDOWN & ~(0xffffffffU << 0)) | (value << 0);
|
||||
}
|
||||
|
||||
//GPIO_PULLUP
|
||||
inline uint32_t get_gpio_pullup(volatile gpio_t* reg){
|
||||
return (reg->PULLUP >> 0) & 0xffffffff;
|
||||
// GPIO_DRIVESTRENGTH_0
|
||||
static inline uint32_t get_gpio_driveStrength_0(volatile gpio_t* reg) { return reg->DRIVESTRENGTH_0; }
|
||||
static inline void set_gpio_driveStrength_0(volatile gpio_t* reg, uint32_t value) { reg->DRIVESTRENGTH_0 = value; }
|
||||
static inline uint32_t get_gpio_driveStrength_0_pin_0(volatile gpio_t* reg) { return (reg->DRIVESTRENGTH_0 >> 0) & 0x7; }
|
||||
static inline void set_gpio_driveStrength_0_pin_0(volatile gpio_t* reg, uint8_t value) {
|
||||
reg->DRIVESTRENGTH_0 = (reg->DRIVESTRENGTH_0 & ~(0x7U << 0)) | (value << 0);
|
||||
}
|
||||
inline void set_gpio_pullup(volatile gpio_t* reg, uint32_t value){
|
||||
reg->PULLUP = (reg->PULLUP & ~(0xffffffffU << 0)) | (value << 0);
|
||||
static inline uint32_t get_gpio_driveStrength_0_pin_1(volatile gpio_t* reg) { return (reg->DRIVESTRENGTH_0 >> 4) & 0x7; }
|
||||
static inline void set_gpio_driveStrength_0_pin_1(volatile gpio_t* reg, uint8_t value) {
|
||||
reg->DRIVESTRENGTH_0 = (reg->DRIVESTRENGTH_0 & ~(0x7U << 4)) | (value << 4);
|
||||
}
|
||||
static inline uint32_t get_gpio_driveStrength_0_pin_2(volatile gpio_t* reg) { return (reg->DRIVESTRENGTH_0 >> 8) & 0x7; }
|
||||
static inline void set_gpio_driveStrength_0_pin_2(volatile gpio_t* reg, uint8_t value) {
|
||||
reg->DRIVESTRENGTH_0 = (reg->DRIVESTRENGTH_0 & ~(0x7U << 8)) | (value << 8);
|
||||
}
|
||||
static inline uint32_t get_gpio_driveStrength_0_pin_3(volatile gpio_t* reg) { return (reg->DRIVESTRENGTH_0 >> 12) & 0x7; }
|
||||
static inline void set_gpio_driveStrength_0_pin_3(volatile gpio_t* reg, uint8_t value) {
|
||||
reg->DRIVESTRENGTH_0 = (reg->DRIVESTRENGTH_0 & ~(0x7U << 12)) | (value << 12);
|
||||
}
|
||||
static inline uint32_t get_gpio_driveStrength_0_pin_4(volatile gpio_t* reg) { return (reg->DRIVESTRENGTH_0 >> 16) & 0x7; }
|
||||
static inline void set_gpio_driveStrength_0_pin_4(volatile gpio_t* reg, uint8_t value) {
|
||||
reg->DRIVESTRENGTH_0 = (reg->DRIVESTRENGTH_0 & ~(0x7U << 16)) | (value << 16);
|
||||
}
|
||||
static inline uint32_t get_gpio_driveStrength_0_pin_5(volatile gpio_t* reg) { return (reg->DRIVESTRENGTH_0 >> 20) & 0x7; }
|
||||
static inline void set_gpio_driveStrength_0_pin_5(volatile gpio_t* reg, uint8_t value) {
|
||||
reg->DRIVESTRENGTH_0 = (reg->DRIVESTRENGTH_0 & ~(0x7U << 20)) | (value << 20);
|
||||
}
|
||||
static inline uint32_t get_gpio_driveStrength_0_pin_6(volatile gpio_t* reg) { return (reg->DRIVESTRENGTH_0 >> 24) & 0x7; }
|
||||
static inline void set_gpio_driveStrength_0_pin_6(volatile gpio_t* reg, uint8_t value) {
|
||||
reg->DRIVESTRENGTH_0 = (reg->DRIVESTRENGTH_0 & ~(0x7U << 24)) | (value << 24);
|
||||
}
|
||||
static inline uint32_t get_gpio_driveStrength_0_pin_7(volatile gpio_t* reg) { return (reg->DRIVESTRENGTH_0 >> 28) & 0x7; }
|
||||
static inline void set_gpio_driveStrength_0_pin_7(volatile gpio_t* reg, uint8_t value) {
|
||||
reg->DRIVESTRENGTH_0 = (reg->DRIVESTRENGTH_0 & ~(0x7U << 28)) | (value << 28);
|
||||
}
|
||||
|
||||
//GPIO_PULDOWN
|
||||
inline uint32_t get_gpio_puldown(volatile gpio_t* reg){
|
||||
return (reg->PULDOWN >> 0) & 0xffffffff;
|
||||
// GPIO_DRIVESTRENGTH_1
|
||||
static inline uint32_t get_gpio_driveStrength_1(volatile gpio_t* reg) { return reg->DRIVESTRENGTH_1; }
|
||||
static inline void set_gpio_driveStrength_1(volatile gpio_t* reg, uint32_t value) { reg->DRIVESTRENGTH_1 = value; }
|
||||
static inline uint32_t get_gpio_driveStrength_1_pin_8(volatile gpio_t* reg) { return (reg->DRIVESTRENGTH_1 >> 0) & 0x7; }
|
||||
static inline void set_gpio_driveStrength_1_pin_8(volatile gpio_t* reg, uint8_t value) {
|
||||
reg->DRIVESTRENGTH_1 = (reg->DRIVESTRENGTH_1 & ~(0x7U << 0)) | (value << 0);
|
||||
}
|
||||
inline void set_gpio_puldown(volatile gpio_t* reg, uint32_t value){
|
||||
reg->PULDOWN = (reg->PULDOWN & ~(0xffffffffU << 0)) | (value << 0);
|
||||
static inline uint32_t get_gpio_driveStrength_1_pin_9(volatile gpio_t* reg) { return (reg->DRIVESTRENGTH_1 >> 4) & 0x7; }
|
||||
static inline void set_gpio_driveStrength_1_pin_9(volatile gpio_t* reg, uint8_t value) {
|
||||
reg->DRIVESTRENGTH_1 = (reg->DRIVESTRENGTH_1 & ~(0x7U << 4)) | (value << 4);
|
||||
}
|
||||
static inline uint32_t get_gpio_driveStrength_1_pin_10(volatile gpio_t* reg) { return (reg->DRIVESTRENGTH_1 >> 8) & 0x7; }
|
||||
static inline void set_gpio_driveStrength_1_pin_10(volatile gpio_t* reg, uint8_t value) {
|
||||
reg->DRIVESTRENGTH_1 = (reg->DRIVESTRENGTH_1 & ~(0x7U << 8)) | (value << 8);
|
||||
}
|
||||
static inline uint32_t get_gpio_driveStrength_1_pin_11(volatile gpio_t* reg) { return (reg->DRIVESTRENGTH_1 >> 12) & 0x7; }
|
||||
static inline void set_gpio_driveStrength_1_pin_11(volatile gpio_t* reg, uint8_t value) {
|
||||
reg->DRIVESTRENGTH_1 = (reg->DRIVESTRENGTH_1 & ~(0x7U << 12)) | (value << 12);
|
||||
}
|
||||
static inline uint32_t get_gpio_driveStrength_1_pin_12(volatile gpio_t* reg) { return (reg->DRIVESTRENGTH_1 >> 16) & 0x7; }
|
||||
static inline void set_gpio_driveStrength_1_pin_12(volatile gpio_t* reg, uint8_t value) {
|
||||
reg->DRIVESTRENGTH_1 = (reg->DRIVESTRENGTH_1 & ~(0x7U << 16)) | (value << 16);
|
||||
}
|
||||
static inline uint32_t get_gpio_driveStrength_1_pin_13(volatile gpio_t* reg) { return (reg->DRIVESTRENGTH_1 >> 20) & 0x7; }
|
||||
static inline void set_gpio_driveStrength_1_pin_13(volatile gpio_t* reg, uint8_t value) {
|
||||
reg->DRIVESTRENGTH_1 = (reg->DRIVESTRENGTH_1 & ~(0x7U << 20)) | (value << 20);
|
||||
}
|
||||
static inline uint32_t get_gpio_driveStrength_1_pin_14(volatile gpio_t* reg) { return (reg->DRIVESTRENGTH_1 >> 24) & 0x7; }
|
||||
static inline void set_gpio_driveStrength_1_pin_14(volatile gpio_t* reg, uint8_t value) {
|
||||
reg->DRIVESTRENGTH_1 = (reg->DRIVESTRENGTH_1 & ~(0x7U << 24)) | (value << 24);
|
||||
}
|
||||
static inline uint32_t get_gpio_driveStrength_1_pin_15(volatile gpio_t* reg) { return (reg->DRIVESTRENGTH_1 >> 28) & 0x7; }
|
||||
static inline void set_gpio_driveStrength_1_pin_15(volatile gpio_t* reg, uint8_t value) {
|
||||
reg->DRIVESTRENGTH_1 = (reg->DRIVESTRENGTH_1 & ~(0x7U << 28)) | (value << 28);
|
||||
}
|
||||
|
||||
//GPIO_DRIVESTRENGTH_0
|
||||
inline uint32_t get_gpio_driveStrength_0(volatile gpio_t* reg){
|
||||
return reg->DRIVESTRENGTH_0;
|
||||
// GPIO_DRIVESTRENGTH_2
|
||||
static inline uint32_t get_gpio_driveStrength_2(volatile gpio_t* reg) { return reg->DRIVESTRENGTH_2; }
|
||||
static inline void set_gpio_driveStrength_2(volatile gpio_t* reg, uint32_t value) { reg->DRIVESTRENGTH_2 = value; }
|
||||
static inline uint32_t get_gpio_driveStrength_2_pin_16(volatile gpio_t* reg) { return (reg->DRIVESTRENGTH_2 >> 0) & 0x7; }
|
||||
static inline void set_gpio_driveStrength_2_pin_16(volatile gpio_t* reg, uint8_t value) {
|
||||
reg->DRIVESTRENGTH_2 = (reg->DRIVESTRENGTH_2 & ~(0x7U << 0)) | (value << 0);
|
||||
}
|
||||
inline void set_gpio_driveStrength_0(volatile gpio_t* reg, uint32_t value){
|
||||
reg->DRIVESTRENGTH_0 = value;
|
||||
static inline uint32_t get_gpio_driveStrength_2_pin_17(volatile gpio_t* reg) { return (reg->DRIVESTRENGTH_2 >> 4) & 0x7; }
|
||||
static inline void set_gpio_driveStrength_2_pin_17(volatile gpio_t* reg, uint8_t value) {
|
||||
reg->DRIVESTRENGTH_2 = (reg->DRIVESTRENGTH_2 & ~(0x7U << 4)) | (value << 4);
|
||||
}
|
||||
inline uint32_t get_gpio_driveStrength_0_pin_0(volatile gpio_t* reg){
|
||||
return (reg->DRIVESTRENGTH_0 >> 0) & 0x7;
|
||||
static inline uint32_t get_gpio_driveStrength_2_pin_18(volatile gpio_t* reg) { return (reg->DRIVESTRENGTH_2 >> 8) & 0x7; }
|
||||
static inline void set_gpio_driveStrength_2_pin_18(volatile gpio_t* reg, uint8_t value) {
|
||||
reg->DRIVESTRENGTH_2 = (reg->DRIVESTRENGTH_2 & ~(0x7U << 8)) | (value << 8);
|
||||
}
|
||||
inline void set_gpio_driveStrength_0_pin_0(volatile gpio_t* reg, uint8_t value){
|
||||
reg->DRIVESTRENGTH_0 = (reg->DRIVESTRENGTH_0 & ~(0x7U << 0)) | (value << 0);
|
||||
static inline uint32_t get_gpio_driveStrength_2_pin_19(volatile gpio_t* reg) { return (reg->DRIVESTRENGTH_2 >> 12) & 0x7; }
|
||||
static inline void set_gpio_driveStrength_2_pin_19(volatile gpio_t* reg, uint8_t value) {
|
||||
reg->DRIVESTRENGTH_2 = (reg->DRIVESTRENGTH_2 & ~(0x7U << 12)) | (value << 12);
|
||||
}
|
||||
inline uint32_t get_gpio_driveStrength_0_pin_1(volatile gpio_t* reg){
|
||||
return (reg->DRIVESTRENGTH_0 >> 4) & 0x7;
|
||||
static inline uint32_t get_gpio_driveStrength_2_pin_20(volatile gpio_t* reg) { return (reg->DRIVESTRENGTH_2 >> 16) & 0x7; }
|
||||
static inline void set_gpio_driveStrength_2_pin_20(volatile gpio_t* reg, uint8_t value) {
|
||||
reg->DRIVESTRENGTH_2 = (reg->DRIVESTRENGTH_2 & ~(0x7U << 16)) | (value << 16);
|
||||
}
|
||||
inline void set_gpio_driveStrength_0_pin_1(volatile gpio_t* reg, uint8_t value){
|
||||
reg->DRIVESTRENGTH_0 = (reg->DRIVESTRENGTH_0 & ~(0x7U << 4)) | (value << 4);
|
||||
static inline uint32_t get_gpio_driveStrength_2_pin_21(volatile gpio_t* reg) { return (reg->DRIVESTRENGTH_2 >> 20) & 0x7; }
|
||||
static inline void set_gpio_driveStrength_2_pin_21(volatile gpio_t* reg, uint8_t value) {
|
||||
reg->DRIVESTRENGTH_2 = (reg->DRIVESTRENGTH_2 & ~(0x7U << 20)) | (value << 20);
|
||||
}
|
||||
inline uint32_t get_gpio_driveStrength_0_pin_2(volatile gpio_t* reg){
|
||||
return (reg->DRIVESTRENGTH_0 >> 8) & 0x7;
|
||||
static inline uint32_t get_gpio_driveStrength_2_pin_22(volatile gpio_t* reg) { return (reg->DRIVESTRENGTH_2 >> 24) & 0x7; }
|
||||
static inline void set_gpio_driveStrength_2_pin_22(volatile gpio_t* reg, uint8_t value) {
|
||||
reg->DRIVESTRENGTH_2 = (reg->DRIVESTRENGTH_2 & ~(0x7U << 24)) | (value << 24);
|
||||
}
|
||||
inline void set_gpio_driveStrength_0_pin_2(volatile gpio_t* reg, uint8_t value){
|
||||
reg->DRIVESTRENGTH_0 = (reg->DRIVESTRENGTH_0 & ~(0x7U << 8)) | (value << 8);
|
||||
}
|
||||
inline uint32_t get_gpio_driveStrength_0_pin_3(volatile gpio_t* reg){
|
||||
return (reg->DRIVESTRENGTH_0 >> 12) & 0x7;
|
||||
}
|
||||
inline void set_gpio_driveStrength_0_pin_3(volatile gpio_t* reg, uint8_t value){
|
||||
reg->DRIVESTRENGTH_0 = (reg->DRIVESTRENGTH_0 & ~(0x7U << 12)) | (value << 12);
|
||||
}
|
||||
inline uint32_t get_gpio_driveStrength_0_pin_4(volatile gpio_t* reg){
|
||||
return (reg->DRIVESTRENGTH_0 >> 16) & 0x7;
|
||||
}
|
||||
inline void set_gpio_driveStrength_0_pin_4(volatile gpio_t* reg, uint8_t value){
|
||||
reg->DRIVESTRENGTH_0 = (reg->DRIVESTRENGTH_0 & ~(0x7U << 16)) | (value << 16);
|
||||
}
|
||||
inline uint32_t get_gpio_driveStrength_0_pin_5(volatile gpio_t* reg){
|
||||
return (reg->DRIVESTRENGTH_0 >> 20) & 0x7;
|
||||
}
|
||||
inline void set_gpio_driveStrength_0_pin_5(volatile gpio_t* reg, uint8_t value){
|
||||
reg->DRIVESTRENGTH_0 = (reg->DRIVESTRENGTH_0 & ~(0x7U << 20)) | (value << 20);
|
||||
}
|
||||
inline uint32_t get_gpio_driveStrength_0_pin_6(volatile gpio_t* reg){
|
||||
return (reg->DRIVESTRENGTH_0 >> 24) & 0x7;
|
||||
}
|
||||
inline void set_gpio_driveStrength_0_pin_6(volatile gpio_t* reg, uint8_t value){
|
||||
reg->DRIVESTRENGTH_0 = (reg->DRIVESTRENGTH_0 & ~(0x7U << 24)) | (value << 24);
|
||||
}
|
||||
inline uint32_t get_gpio_driveStrength_0_pin_7(volatile gpio_t* reg){
|
||||
return (reg->DRIVESTRENGTH_0 >> 28) & 0x7;
|
||||
}
|
||||
inline void set_gpio_driveStrength_0_pin_7(volatile gpio_t* reg, uint8_t value){
|
||||
reg->DRIVESTRENGTH_0 = (reg->DRIVESTRENGTH_0 & ~(0x7U << 28)) | (value << 28);
|
||||
static inline uint32_t get_gpio_driveStrength_2_pin_23(volatile gpio_t* reg) { return (reg->DRIVESTRENGTH_2 >> 28) & 0x7; }
|
||||
static inline void set_gpio_driveStrength_2_pin_23(volatile gpio_t* reg, uint8_t value) {
|
||||
reg->DRIVESTRENGTH_2 = (reg->DRIVESTRENGTH_2 & ~(0x7U << 28)) | (value << 28);
|
||||
}
|
||||
|
||||
//GPIO_DRIVESTRENGTH_1
|
||||
inline uint32_t get_gpio_driveStrength_1(volatile gpio_t* reg){
|
||||
return reg->DRIVESTRENGTH_1;
|
||||
// GPIO_DRIVESTRENGTH_3
|
||||
static inline uint32_t get_gpio_driveStrength_3(volatile gpio_t* reg) { return reg->DRIVESTRENGTH_3; }
|
||||
static inline void set_gpio_driveStrength_3(volatile gpio_t* reg, uint32_t value) { reg->DRIVESTRENGTH_3 = value; }
|
||||
static inline uint32_t get_gpio_driveStrength_3_pin_24(volatile gpio_t* reg) { return (reg->DRIVESTRENGTH_3 >> 0) & 0x7; }
|
||||
static inline void set_gpio_driveStrength_3_pin_24(volatile gpio_t* reg, uint8_t value) {
|
||||
reg->DRIVESTRENGTH_3 = (reg->DRIVESTRENGTH_3 & ~(0x7U << 0)) | (value << 0);
|
||||
}
|
||||
inline void set_gpio_driveStrength_1(volatile gpio_t* reg, uint32_t value){
|
||||
reg->DRIVESTRENGTH_1 = value;
|
||||
static inline uint32_t get_gpio_driveStrength_3_pin_25(volatile gpio_t* reg) { return (reg->DRIVESTRENGTH_3 >> 4) & 0x7; }
|
||||
static inline void set_gpio_driveStrength_3_pin_25(volatile gpio_t* reg, uint8_t value) {
|
||||
reg->DRIVESTRENGTH_3 = (reg->DRIVESTRENGTH_3 & ~(0x7U << 4)) | (value << 4);
|
||||
}
|
||||
inline uint32_t get_gpio_driveStrength_1_pin_8(volatile gpio_t* reg){
|
||||
return (reg->DRIVESTRENGTH_1 >> 0) & 0x7;
|
||||
static inline uint32_t get_gpio_driveStrength_3_pin_26(volatile gpio_t* reg) { return (reg->DRIVESTRENGTH_3 >> 8) & 0x7; }
|
||||
static inline void set_gpio_driveStrength_3_pin_26(volatile gpio_t* reg, uint8_t value) {
|
||||
reg->DRIVESTRENGTH_3 = (reg->DRIVESTRENGTH_3 & ~(0x7U << 8)) | (value << 8);
|
||||
}
|
||||
inline void set_gpio_driveStrength_1_pin_8(volatile gpio_t* reg, uint8_t value){
|
||||
reg->DRIVESTRENGTH_1 = (reg->DRIVESTRENGTH_1 & ~(0x7U << 0)) | (value << 0);
|
||||
static inline uint32_t get_gpio_driveStrength_3_pin_27(volatile gpio_t* reg) { return (reg->DRIVESTRENGTH_3 >> 12) & 0x7; }
|
||||
static inline void set_gpio_driveStrength_3_pin_27(volatile gpio_t* reg, uint8_t value) {
|
||||
reg->DRIVESTRENGTH_3 = (reg->DRIVESTRENGTH_3 & ~(0x7U << 12)) | (value << 12);
|
||||
}
|
||||
inline uint32_t get_gpio_driveStrength_1_pin_9(volatile gpio_t* reg){
|
||||
return (reg->DRIVESTRENGTH_1 >> 4) & 0x7;
|
||||
static inline uint32_t get_gpio_driveStrength_3_pin_28(volatile gpio_t* reg) { return (reg->DRIVESTRENGTH_3 >> 16) & 0x7; }
|
||||
static inline void set_gpio_driveStrength_3_pin_28(volatile gpio_t* reg, uint8_t value) {
|
||||
reg->DRIVESTRENGTH_3 = (reg->DRIVESTRENGTH_3 & ~(0x7U << 16)) | (value << 16);
|
||||
}
|
||||
inline void set_gpio_driveStrength_1_pin_9(volatile gpio_t* reg, uint8_t value){
|
||||
reg->DRIVESTRENGTH_1 = (reg->DRIVESTRENGTH_1 & ~(0x7U << 4)) | (value << 4);
|
||||
static inline uint32_t get_gpio_driveStrength_3_pin_29(volatile gpio_t* reg) { return (reg->DRIVESTRENGTH_3 >> 20) & 0x7; }
|
||||
static inline void set_gpio_driveStrength_3_pin_29(volatile gpio_t* reg, uint8_t value) {
|
||||
reg->DRIVESTRENGTH_3 = (reg->DRIVESTRENGTH_3 & ~(0x7U << 20)) | (value << 20);
|
||||
}
|
||||
inline uint32_t get_gpio_driveStrength_1_pin_10(volatile gpio_t* reg){
|
||||
return (reg->DRIVESTRENGTH_1 >> 8) & 0x7;
|
||||
static inline uint32_t get_gpio_driveStrength_3_pin_30(volatile gpio_t* reg) { return (reg->DRIVESTRENGTH_3 >> 24) & 0x7; }
|
||||
static inline void set_gpio_driveStrength_3_pin_30(volatile gpio_t* reg, uint8_t value) {
|
||||
reg->DRIVESTRENGTH_3 = (reg->DRIVESTRENGTH_3 & ~(0x7U << 24)) | (value << 24);
|
||||
}
|
||||
inline void set_gpio_driveStrength_1_pin_10(volatile gpio_t* reg, uint8_t value){
|
||||
reg->DRIVESTRENGTH_1 = (reg->DRIVESTRENGTH_1 & ~(0x7U << 8)) | (value << 8);
|
||||
}
|
||||
inline uint32_t get_gpio_driveStrength_1_pin_11(volatile gpio_t* reg){
|
||||
return (reg->DRIVESTRENGTH_1 >> 12) & 0x7;
|
||||
}
|
||||
inline void set_gpio_driveStrength_1_pin_11(volatile gpio_t* reg, uint8_t value){
|
||||
reg->DRIVESTRENGTH_1 = (reg->DRIVESTRENGTH_1 & ~(0x7U << 12)) | (value << 12);
|
||||
}
|
||||
inline uint32_t get_gpio_driveStrength_1_pin_12(volatile gpio_t* reg){
|
||||
return (reg->DRIVESTRENGTH_1 >> 16) & 0x7;
|
||||
}
|
||||
inline void set_gpio_driveStrength_1_pin_12(volatile gpio_t* reg, uint8_t value){
|
||||
reg->DRIVESTRENGTH_1 = (reg->DRIVESTRENGTH_1 & ~(0x7U << 16)) | (value << 16);
|
||||
}
|
||||
inline uint32_t get_gpio_driveStrength_1_pin_13(volatile gpio_t* reg){
|
||||
return (reg->DRIVESTRENGTH_1 >> 20) & 0x7;
|
||||
}
|
||||
inline void set_gpio_driveStrength_1_pin_13(volatile gpio_t* reg, uint8_t value){
|
||||
reg->DRIVESTRENGTH_1 = (reg->DRIVESTRENGTH_1 & ~(0x7U << 20)) | (value << 20);
|
||||
}
|
||||
inline uint32_t get_gpio_driveStrength_1_pin_14(volatile gpio_t* reg){
|
||||
return (reg->DRIVESTRENGTH_1 >> 24) & 0x7;
|
||||
}
|
||||
inline void set_gpio_driveStrength_1_pin_14(volatile gpio_t* reg, uint8_t value){
|
||||
reg->DRIVESTRENGTH_1 = (reg->DRIVESTRENGTH_1 & ~(0x7U << 24)) | (value << 24);
|
||||
}
|
||||
inline uint32_t get_gpio_driveStrength_1_pin_15(volatile gpio_t* reg){
|
||||
return (reg->DRIVESTRENGTH_1 >> 28) & 0x7;
|
||||
}
|
||||
inline void set_gpio_driveStrength_1_pin_15(volatile gpio_t* reg, uint8_t value){
|
||||
reg->DRIVESTRENGTH_1 = (reg->DRIVESTRENGTH_1 & ~(0x7U << 28)) | (value << 28);
|
||||
static inline uint32_t get_gpio_driveStrength_3_pin_31(volatile gpio_t* reg) { return (reg->DRIVESTRENGTH_3 >> 28) & 0x7; }
|
||||
static inline void set_gpio_driveStrength_3_pin_31(volatile gpio_t* reg, uint8_t value) {
|
||||
reg->DRIVESTRENGTH_3 = (reg->DRIVESTRENGTH_3 & ~(0x7U << 28)) | (value << 28);
|
||||
}
|
||||
|
||||
//GPIO_DRIVESTRENGTH_2
|
||||
inline uint32_t get_gpio_driveStrength_2(volatile gpio_t* reg){
|
||||
return reg->DRIVESTRENGTH_2;
|
||||
}
|
||||
inline void set_gpio_driveStrength_2(volatile gpio_t* reg, uint32_t value){
|
||||
reg->DRIVESTRENGTH_2 = value;
|
||||
}
|
||||
inline uint32_t get_gpio_driveStrength_2_pin_16(volatile gpio_t* reg){
|
||||
return (reg->DRIVESTRENGTH_2 >> 0) & 0x7;
|
||||
}
|
||||
inline void set_gpio_driveStrength_2_pin_16(volatile gpio_t* reg, uint8_t value){
|
||||
reg->DRIVESTRENGTH_2 = (reg->DRIVESTRENGTH_2 & ~(0x7U << 0)) | (value << 0);
|
||||
}
|
||||
inline uint32_t get_gpio_driveStrength_2_pin_17(volatile gpio_t* reg){
|
||||
return (reg->DRIVESTRENGTH_2 >> 4) & 0x7;
|
||||
}
|
||||
inline void set_gpio_driveStrength_2_pin_17(volatile gpio_t* reg, uint8_t value){
|
||||
reg->DRIVESTRENGTH_2 = (reg->DRIVESTRENGTH_2 & ~(0x7U << 4)) | (value << 4);
|
||||
}
|
||||
inline uint32_t get_gpio_driveStrength_2_pin_18(volatile gpio_t* reg){
|
||||
return (reg->DRIVESTRENGTH_2 >> 8) & 0x7;
|
||||
}
|
||||
inline void set_gpio_driveStrength_2_pin_18(volatile gpio_t* reg, uint8_t value){
|
||||
reg->DRIVESTRENGTH_2 = (reg->DRIVESTRENGTH_2 & ~(0x7U << 8)) | (value << 8);
|
||||
}
|
||||
inline uint32_t get_gpio_driveStrength_2_pin_19(volatile gpio_t* reg){
|
||||
return (reg->DRIVESTRENGTH_2 >> 12) & 0x7;
|
||||
}
|
||||
inline void set_gpio_driveStrength_2_pin_19(volatile gpio_t* reg, uint8_t value){
|
||||
reg->DRIVESTRENGTH_2 = (reg->DRIVESTRENGTH_2 & ~(0x7U << 12)) | (value << 12);
|
||||
}
|
||||
inline uint32_t get_gpio_driveStrength_2_pin_20(volatile gpio_t* reg){
|
||||
return (reg->DRIVESTRENGTH_2 >> 16) & 0x7;
|
||||
}
|
||||
inline void set_gpio_driveStrength_2_pin_20(volatile gpio_t* reg, uint8_t value){
|
||||
reg->DRIVESTRENGTH_2 = (reg->DRIVESTRENGTH_2 & ~(0x7U << 16)) | (value << 16);
|
||||
}
|
||||
inline uint32_t get_gpio_driveStrength_2_pin_21(volatile gpio_t* reg){
|
||||
return (reg->DRIVESTRENGTH_2 >> 20) & 0x7;
|
||||
}
|
||||
inline void set_gpio_driveStrength_2_pin_21(volatile gpio_t* reg, uint8_t value){
|
||||
reg->DRIVESTRENGTH_2 = (reg->DRIVESTRENGTH_2 & ~(0x7U << 20)) | (value << 20);
|
||||
}
|
||||
inline uint32_t get_gpio_driveStrength_2_pin_22(volatile gpio_t* reg){
|
||||
return (reg->DRIVESTRENGTH_2 >> 24) & 0x7;
|
||||
}
|
||||
inline void set_gpio_driveStrength_2_pin_22(volatile gpio_t* reg, uint8_t value){
|
||||
reg->DRIVESTRENGTH_2 = (reg->DRIVESTRENGTH_2 & ~(0x7U << 24)) | (value << 24);
|
||||
}
|
||||
inline uint32_t get_gpio_driveStrength_2_pin_23(volatile gpio_t* reg){
|
||||
return (reg->DRIVESTRENGTH_2 >> 28) & 0x7;
|
||||
}
|
||||
inline void set_gpio_driveStrength_2_pin_23(volatile gpio_t* reg, uint8_t value){
|
||||
reg->DRIVESTRENGTH_2 = (reg->DRIVESTRENGTH_2 & ~(0x7U << 28)) | (value << 28);
|
||||
// GPIO_IE
|
||||
static inline uint32_t get_gpio_ie(volatile gpio_t* reg) { return (reg->IE >> 0) & 0xffffffff; }
|
||||
static inline void set_gpio_ie(volatile gpio_t* reg, uint32_t value) { reg->IE = (reg->IE & ~(0xffffffffU << 0)) | (value << 0); }
|
||||
|
||||
// GPIO_IP
|
||||
static inline uint32_t get_gpio_ip(volatile gpio_t* reg) { return (reg->IP >> 0) & 0xffffffff; }
|
||||
static inline void set_gpio_ip(volatile gpio_t* reg, uint32_t value) { reg->IP = (reg->IP & ~(0xffffffffU << 0)) | (value << 0); }
|
||||
|
||||
// GPIO_IRQ_TRIGGER
|
||||
static inline uint32_t get_gpio_irq_trigger(volatile gpio_t* reg) { return (reg->IRQ_TRIGGER >> 0) & 0xffffffff; }
|
||||
static inline void set_gpio_irq_trigger(volatile gpio_t* reg, uint32_t value) {
|
||||
reg->IRQ_TRIGGER = (reg->IRQ_TRIGGER & ~(0xffffffffU << 0)) | (value << 0);
|
||||
}
|
||||
|
||||
//GPIO_DRIVESTRENGTH_3
|
||||
inline uint32_t get_gpio_driveStrength_3(volatile gpio_t* reg){
|
||||
return reg->DRIVESTRENGTH_3;
|
||||
}
|
||||
inline void set_gpio_driveStrength_3(volatile gpio_t* reg, uint32_t value){
|
||||
reg->DRIVESTRENGTH_3 = value;
|
||||
}
|
||||
inline uint32_t get_gpio_driveStrength_3_pin_24(volatile gpio_t* reg){
|
||||
return (reg->DRIVESTRENGTH_3 >> 0) & 0x7;
|
||||
}
|
||||
inline void set_gpio_driveStrength_3_pin_24(volatile gpio_t* reg, uint8_t value){
|
||||
reg->DRIVESTRENGTH_3 = (reg->DRIVESTRENGTH_3 & ~(0x7U << 0)) | (value << 0);
|
||||
}
|
||||
inline uint32_t get_gpio_driveStrength_3_pin_25(volatile gpio_t* reg){
|
||||
return (reg->DRIVESTRENGTH_3 >> 4) & 0x7;
|
||||
}
|
||||
inline void set_gpio_driveStrength_3_pin_25(volatile gpio_t* reg, uint8_t value){
|
||||
reg->DRIVESTRENGTH_3 = (reg->DRIVESTRENGTH_3 & ~(0x7U << 4)) | (value << 4);
|
||||
}
|
||||
inline uint32_t get_gpio_driveStrength_3_pin_26(volatile gpio_t* reg){
|
||||
return (reg->DRIVESTRENGTH_3 >> 8) & 0x7;
|
||||
}
|
||||
inline void set_gpio_driveStrength_3_pin_26(volatile gpio_t* reg, uint8_t value){
|
||||
reg->DRIVESTRENGTH_3 = (reg->DRIVESTRENGTH_3 & ~(0x7U << 8)) | (value << 8);
|
||||
}
|
||||
inline uint32_t get_gpio_driveStrength_3_pin_27(volatile gpio_t* reg){
|
||||
return (reg->DRIVESTRENGTH_3 >> 12) & 0x7;
|
||||
}
|
||||
inline void set_gpio_driveStrength_3_pin_27(volatile gpio_t* reg, uint8_t value){
|
||||
reg->DRIVESTRENGTH_3 = (reg->DRIVESTRENGTH_3 & ~(0x7U << 12)) | (value << 12);
|
||||
}
|
||||
inline uint32_t get_gpio_driveStrength_3_pin_28(volatile gpio_t* reg){
|
||||
return (reg->DRIVESTRENGTH_3 >> 16) & 0x7;
|
||||
}
|
||||
inline void set_gpio_driveStrength_3_pin_28(volatile gpio_t* reg, uint8_t value){
|
||||
reg->DRIVESTRENGTH_3 = (reg->DRIVESTRENGTH_3 & ~(0x7U << 16)) | (value << 16);
|
||||
}
|
||||
inline uint32_t get_gpio_driveStrength_3_pin_29(volatile gpio_t* reg){
|
||||
return (reg->DRIVESTRENGTH_3 >> 20) & 0x7;
|
||||
}
|
||||
inline void set_gpio_driveStrength_3_pin_29(volatile gpio_t* reg, uint8_t value){
|
||||
reg->DRIVESTRENGTH_3 = (reg->DRIVESTRENGTH_3 & ~(0x7U << 20)) | (value << 20);
|
||||
}
|
||||
inline uint32_t get_gpio_driveStrength_3_pin_30(volatile gpio_t* reg){
|
||||
return (reg->DRIVESTRENGTH_3 >> 24) & 0x7;
|
||||
}
|
||||
inline void set_gpio_driveStrength_3_pin_30(volatile gpio_t* reg, uint8_t value){
|
||||
reg->DRIVESTRENGTH_3 = (reg->DRIVESTRENGTH_3 & ~(0x7U << 24)) | (value << 24);
|
||||
}
|
||||
inline uint32_t get_gpio_driveStrength_3_pin_31(volatile gpio_t* reg){
|
||||
return (reg->DRIVESTRENGTH_3 >> 28) & 0x7;
|
||||
}
|
||||
inline void set_gpio_driveStrength_3_pin_31(volatile gpio_t* reg, uint8_t value){
|
||||
reg->DRIVESTRENGTH_3 = (reg->DRIVESTRENGTH_3 & ~(0x7U << 28)) | (value << 28);
|
||||
// GPIO_IRQ_TYPE
|
||||
static inline uint32_t get_gpio_irq_type(volatile gpio_t* reg) { return (reg->IRQ_TYPE >> 0) & 0xffffffff; }
|
||||
static inline void set_gpio_irq_type(volatile gpio_t* reg, uint32_t value) {
|
||||
reg->IRQ_TYPE = (reg->IRQ_TYPE & ~(0xffffffffU << 0)) | (value << 0);
|
||||
}
|
||||
|
||||
//GPIO_IE
|
||||
inline uint32_t get_gpio_ie(volatile gpio_t* reg){
|
||||
return (reg->IE >> 0) & 0xffffffff;
|
||||
}
|
||||
inline void set_gpio_ie(volatile gpio_t* reg, uint32_t value){
|
||||
reg->IE = (reg->IE & ~(0xffffffffU << 0)) | (value << 0);
|
||||
}
|
||||
|
||||
//GPIO_IP
|
||||
inline uint32_t get_gpio_ip(volatile gpio_t* reg){
|
||||
return (reg->IP >> 0) & 0xffffffff;
|
||||
}
|
||||
inline void set_gpio_ip(volatile gpio_t* reg, uint32_t value){
|
||||
reg->IP = (reg->IP & ~(0xffffffffU << 0)) | (value << 0);
|
||||
}
|
||||
|
||||
//GPIO_IRQ_TRIGGER
|
||||
inline uint32_t get_gpio_irq_trigger(volatile gpio_t* reg){
|
||||
return (reg->IRQ_TRIGGER >> 0) & 0xffffffff;
|
||||
}
|
||||
inline void set_gpio_irq_trigger(volatile gpio_t* reg, uint32_t value){
|
||||
reg->IRQ_TRIGGER = (reg->IRQ_TRIGGER & ~(0xffffffffU << 0)) | (value << 0);
|
||||
}
|
||||
|
||||
//GPIO_IRQ_TYPE
|
||||
inline uint32_t get_gpio_irq_type(volatile gpio_t* reg){
|
||||
return (reg->IRQ_TYPE >> 0) & 0xffffffff;
|
||||
}
|
||||
inline void set_gpio_irq_type(volatile gpio_t* reg, uint32_t value){
|
||||
reg->IRQ_TYPE = (reg->IRQ_TYPE & ~(0xffffffffU << 0)) | (value << 0);
|
||||
}
|
||||
|
||||
//GPIO_BOOT_SEL
|
||||
inline uint32_t get_gpio_boot_sel(volatile gpio_t* reg){
|
||||
return reg->BOOT_SEL;
|
||||
}
|
||||
inline uint32_t get_gpio_boot_sel_bootSel(volatile gpio_t* reg){
|
||||
return (reg->BOOT_SEL >> 0) & 0x7;
|
||||
}
|
||||
// GPIO_BOOT_SEL
|
||||
static inline uint32_t get_gpio_boot_sel(volatile gpio_t* reg) { return reg->BOOT_SEL; }
|
||||
static inline uint32_t get_gpio_boot_sel_bootSel(volatile gpio_t* reg) { return (reg->BOOT_SEL >> 0) & 0x7; }
|
||||
|
||||
#endif /* _BSP_GPIO_H */
|
Reference in New Issue
Block a user