|
|
|
@ -6,9 +6,11 @@
|
|
|
|
|
#error "You set TIMECMP_IN_MEMORY but did not provide a memory addres in TIMECMP_MEM_ADDR!"
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
void write_mtimecmp(unsigned long long int mtimecmp) {
|
|
|
|
|
void write_mtimecmp(unsigned long long int mtimecmp)
|
|
|
|
|
{
|
|
|
|
|
unsigned int lo = mtimecmp;
|
|
|
|
|
unsigned int hi = mtimecmp >> 32;
|
|
|
|
|
|
|
|
|
|
__asm__ (
|
|
|
|
|
"li t0, %0\n"
|
|
|
|
|
"sw %1, 0(t0)\n"
|
|
|
|
@ -19,9 +21,11 @@ void write_mtimecmp(unsigned long long int mtimecmp) {
|
|
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
|
|
void write_mtimecmp(unsigned long long int mtimecmp) {
|
|
|
|
|
void write_mtimecmp(unsigned long long int mtimecmp)
|
|
|
|
|
{
|
|
|
|
|
unsigned int lower = mtimecmp;
|
|
|
|
|
unsigned int higher = mtimecmp >> 32;
|
|
|
|
|
|
|
|
|
|
__asm__ (
|
|
|
|
|
"csrw %0, %2\n"
|
|
|
|
|
"csrw %1, %3" ::
|
|
|
|
|