32 lines
917 B
C
32 lines
917 B
C
|
/*
|
||
|
* Copyright (c) 2023 - 2024 MINRES Technologies GmbH
|
||
|
*
|
||
|
* SPDX-License-Identifier: Apache-2.0
|
||
|
*
|
||
|
* Generated at 2024-02-19 14:24:37 UTC
|
||
|
* by peakrdl_mnrs version 1.2.2
|
||
|
*/
|
||
|
|
||
|
#ifndef _BSP_APB3IRQCTRL_H
|
||
|
#define _BSP_APB3IRQCTRL_H
|
||
|
|
||
|
#include <stdint.h>
|
||
|
|
||
|
typedef struct __attribute((__packed__)) {
|
||
|
volatile uint32_t PENDINGSREG;
|
||
|
volatile uint32_t MASKSREG;
|
||
|
}apb3irqctrl_t;
|
||
|
|
||
|
inline uint32_t get_irq_pendingsReg(volatile apb3irqctrl_t *reg){
|
||
|
return (reg->PENDINGSREG >> 0) & 0xf;
|
||
|
}
|
||
|
inline void set_irq_pendingsReg(volatile apb3irqctrl_t *reg, uint8_t value){
|
||
|
reg->PENDINGSREG = (reg->PENDINGSREG & ~(0xfU << 0)) | (value << 0);
|
||
|
}
|
||
|
inline uint32_t get_irq_masksReg(volatile apb3irqctrl_t *reg){
|
||
|
return (reg->MASKSREG >> 0) & 0xf;
|
||
|
}
|
||
|
inline void set_irq_masksReg(volatile apb3irqctrl_t *reg, uint8_t value){
|
||
|
reg->MASKSREG = (reg->MASKSREG & ~(0xfU << 0)) | (value << 0);
|
||
|
}
|
||
|
#endif /* _BSP_APB3IRQCTRL_H */
|