2024-02-22 17:09:35 +01:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2023 - 2024 MINRES Technologies GmbH
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*
|
2024-05-29 20:50:30 +02:00
|
|
|
* Generated at 2024-04-22 11:11:53 UTC
|
2024-02-22 17:09:35 +01:00
|
|
|
* by peakrdl_mnrs version 1.2.2
|
|
|
|
*/
|
|
|
|
|
2024-05-29 20:50:30 +02:00
|
|
|
#ifndef _BSP_GPIOMODULE_H
|
|
|
|
#define _BSP_GPIOMODULE_H
|
2024-02-22 17:09:35 +01:00
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
typedef struct __attribute((__packed__)) {
|
|
|
|
volatile uint32_t VALUE;
|
|
|
|
volatile uint32_t WRITE;
|
|
|
|
volatile uint32_t WRITEENABLE;
|
2024-05-29 20:50:30 +02:00
|
|
|
}gpiomodule_t;
|
2024-02-22 17:09:35 +01:00
|
|
|
|
2024-05-29 20:50:30 +02:00
|
|
|
static inline uint32_t get_gpiomodule_value(volatile gpiomodule_t *reg){
|
2024-02-22 17:09:35 +01:00
|
|
|
return (reg->VALUE >> 0) & 0xffffffff;
|
|
|
|
}
|
2024-05-29 20:50:30 +02:00
|
|
|
|
|
|
|
static inline uint32_t get_gpiomodule_write(volatile gpiomodule_t *reg){
|
2024-02-22 17:09:35 +01:00
|
|
|
return (reg->WRITE >> 0) & 0xffffffff;
|
|
|
|
}
|
2024-05-29 20:50:30 +02:00
|
|
|
|
|
|
|
static inline void set_gpiomodule_write(volatile gpiomodule_t *reg, uint32_t value){
|
2024-02-22 17:09:35 +01:00
|
|
|
reg->WRITE = (reg->WRITE & ~(0xffffffffU << 0)) | (value << 0);
|
|
|
|
}
|
2024-05-29 20:50:30 +02:00
|
|
|
|
|
|
|
static inline uint32_t get_gpiomodule_writeEnable(volatile gpiomodule_t *reg){
|
2024-02-22 17:09:35 +01:00
|
|
|
return (reg->WRITEENABLE >> 0) & 0xffffffff;
|
|
|
|
}
|
2024-05-29 20:50:30 +02:00
|
|
|
|
|
|
|
static inline void set_gpiomodule_writeEnable(volatile gpiomodule_t *reg, uint32_t value){
|
2024-02-22 17:09:35 +01:00
|
|
|
reg->WRITEENABLE = (reg->WRITEENABLE & ~(0xffffffffU << 0)) | (value << 0);
|
|
|
|
}
|
2024-05-29 20:50:30 +02:00
|
|
|
|
|
|
|
#endif /* _BSP_GPIOMODULE_H */
|