63 lines
1.9 KiB
C
63 lines
1.9 KiB
C
/*
|
|
* Copyright (c) 2023 - 2024 MINRES Technologies GmbH
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*
|
|
* Generated at 2024-04-22 11:11:53 UTC
|
|
* by peakrdl_mnrs version 1.2.2
|
|
*/
|
|
|
|
#ifndef _BSP_ACLINTMODULE_H
|
|
#define _BSP_ACLINTMODULE_H
|
|
|
|
#include <stdint.h>
|
|
|
|
typedef struct __attribute((__packed__)) {
|
|
volatile uint32_t MSIP0;
|
|
volatile uint32_t MTIMECMP0LO;
|
|
volatile uint32_t MTIMECMP0HI;
|
|
volatile uint32_t MTIME_LO;
|
|
volatile uint32_t MTIME_HI;
|
|
}aclintmodule_t;
|
|
|
|
static inline uint32_t get_aclintmodule_msip(volatile aclintmodule_t *reg){
|
|
return (reg->MSIP0 >> 0) & 0x1;
|
|
}
|
|
|
|
static inline void set_aclintmodule_msip(volatile aclintmodule_t *reg, uint8_t value){
|
|
reg->MSIP0 = (reg->MSIP0 & ~(0x1U << 0)) | (value << 0);
|
|
}
|
|
|
|
static inline uint32_t get_aclintmodule_mtimecmp_lo(volatile aclintmodule_t *reg){
|
|
return (reg->MTIMECMP0LO >> 0) & 0xffffffff;
|
|
}
|
|
|
|
static inline void set_aclintmodule_mtimecmp_lo(volatile aclintmodule_t *reg, uint32_t value){
|
|
reg->MTIMECMP0LO = (reg->MTIMECMP0LO & ~(0xffffffffU << 0)) | (value << 0);
|
|
}
|
|
|
|
static inline uint32_t get_aclintmodule_mtimecmp_hi(volatile aclintmodule_t *reg){
|
|
return (reg->MTIMECMP0HI >> 0) & 0xffffffff;
|
|
}
|
|
|
|
static inline void set_aclintmodule_mtimecmp_hi(volatile aclintmodule_t *reg, uint32_t value){
|
|
reg->MTIMECMP0HI = (reg->MTIMECMP0HI & ~(0xffffffffU << 0)) | (value << 0);
|
|
}
|
|
|
|
static inline uint32_t get_aclintmodule_mtime_ho(volatile aclintmodule_t *reg){
|
|
return (reg->MTIME_LO >> 0) & 0xffffffff;
|
|
}
|
|
|
|
static inline void set_aclintmodule_mtime_ho(volatile aclintmodule_t *reg, uint32_t value){
|
|
reg->MTIME_LO = (reg->MTIME_LO & ~(0xffffffffU << 0)) | (value << 0);
|
|
}
|
|
|
|
static inline uint32_t get_aclintmodule_mtime_hi(volatile aclintmodule_t *reg){
|
|
return (reg->MTIME_HI >> 0) & 0xffffffff;
|
|
}
|
|
|
|
static inline void set_aclintmodule_mtime_hi(volatile aclintmodule_t *reg, uint32_t value){
|
|
reg->MTIME_HI = (reg->MTIME_HI & ~(0xffffffffU << 0)) | (value << 0);
|
|
}
|
|
|
|
#endif /* _BSP_ACLINTMODULE_H */ |