format code
This commit is contained in:
parent
a5503a4a71
commit
d6f5fbcd5b
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2006-2020, RT-Thread Development Team
|
* Copyright (c) 2006-2021, RT-Thread Development Team
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2006-2020, RT-Thread Development Team
|
* Copyright (c) 2006-2021, RT-Thread Development Team
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
|
|
|
@ -49,8 +49,6 @@
|
||||||
#define PLIC_PRIORITY(id) (VIRT_PLIC_BASE + PLIC_PRIORITY_OFFSET + (id) * 4)
|
#define PLIC_PRIORITY(id) (VIRT_PLIC_BASE + PLIC_PRIORITY_OFFSET + (id) * 4)
|
||||||
#define PLIC_PENDING(id) (VIRT_PLIC_BASE + PLIC_PENDING_OFFSET + ((id) / 32))
|
#define PLIC_PENDING(id) (VIRT_PLIC_BASE + PLIC_PENDING_OFFSET + ((id) / 32))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void plic_set_priority(int irq, int priority);
|
void plic_set_priority(int irq, int priority);
|
||||||
void plic_irq_enable(int irq);
|
void plic_irq_enable(int irq);
|
||||||
void plic_irq_disable(int irq);
|
void plic_irq_disable(int irq);
|
||||||
|
|
|
@ -28,7 +28,6 @@ rt_hw_interrupt_disable:
|
||||||
#endif
|
#endif
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* void rt_hw_interrupt_enable(rt_base_t level);
|
* void rt_hw_interrupt_enable(rt_base_t level);
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2006-2018, RT-Thread Development Team
|
* Copyright (c) 2006-2021, RT-Thread Development Team
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2006-2018, RT-Thread Development Team
|
* Copyright (c) 2006-2021, RT-Thread Development Team
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
|
@ -36,8 +36,7 @@ int tick_isr(void)
|
||||||
#ifdef RISCV_S_MODE
|
#ifdef RISCV_S_MODE
|
||||||
sbi_set_timer(get_ticks() + tick_cycles);
|
sbi_set_timer(get_ticks() + tick_cycles);
|
||||||
#else
|
#else
|
||||||
int id = r_mhartid();
|
*(uint64_t*)CLINT_MTIMECMP(r_mhartid()) = *(uint64_t*)CLINT_MTIME + tick_cycles;
|
||||||
*(uint64_t*)CLINT_MTIMECMP(id) = *(uint64_t*)CLINT_MTIME + tick_cycles;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -63,8 +62,7 @@ int rt_hw_tick_init(void)
|
||||||
#else
|
#else
|
||||||
clear_csr(mie, MIP_MTIP);
|
clear_csr(mie, MIP_MTIP);
|
||||||
clear_csr(mip, MIP_MTIP);
|
clear_csr(mip, MIP_MTIP);
|
||||||
int id = r_mhartid();
|
*(uint64_t*)CLINT_MTIMECMP(r_mhartid()) = *(uint64_t*)CLINT_MTIME + interval;
|
||||||
*(uint64_t*)CLINT_MTIMECMP(id) = *(uint64_t*)CLINT_MTIME + interval;
|
|
||||||
set_csr(mie, MIP_MTIP);
|
set_csr(mie, MIP_MTIP);
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2006-2018, RT-Thread Development Team
|
* Copyright (c) 2006-2021, RT-Thread Development Team
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue