replaces ehrenberg with new implementations
This commit is contained in:
1 parent
f419b1a3e6
commit
9ff9727bd6
25 files changed
No files matched your search
@@ -0,0 +1,28 @@
|
||||
#ifndef _DEVICES_ACLINT_H
|
||||
#define _DEVICES_ACLINT_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "gen/aclint.h"
|
||||
|
||||
|
||||
static void set_aclint_mtime(volatile aclint_t* reg, uint64_t value){
|
||||
set_aclint_mtime_hi(reg, (uint32_t)(value >> 32));
|
||||
set_aclint_mtime_lo(reg, (uint32_t)value);
|
||||
}
|
||||
|
||||
static uint64_t get_aclint_mtime(volatile aclint_t* reg){
|
||||
uint64_t value = ((uint64_t)get_aclint_mtime_hi(reg) << 32) | (uint64_t)get_aclint_mtime_lo(reg);
|
||||
return value;
|
||||
}
|
||||
|
||||
static void set_aclint_mtimecmp(volatile aclint_t* reg, uint64_t value){
|
||||
set_aclint_mtimecmp0hi(reg, (uint32_t)(value >> 32));
|
||||
set_aclint_mtimecmp0lo(reg, (uint32_t)value);
|
||||
}
|
||||
|
||||
static uint64_t get_aclint_mtimecmp(volatile aclint_t* reg){
|
||||
uint64_t value = ((uint64_t)get_aclint_mtimecmp0hi(reg) << 32) | (uint64_t)get_aclint_mtimecmp0lo(reg);
|
||||
return value;
|
||||
}
|
||||
|
||||
#endif /* _DEVICES_ACLINT_H */
|
||||
Reference in new issue
Block a user