summaryrefslogtreecommitdiff
path: root/bsp/hifive1
diff options
context:
space:
mode:
Diffstat (limited to 'bsp/hifive1')
-rw-r--r--bsp/hifive1/applications/main.c2
-rw-r--r--bsp/hifive1/drivers/drv_usart.c2
-rw-r--r--bsp/hifive1/drivers/interrupt.c10
-rw-r--r--bsp/hifive1/drivers/interrupt.h2
4 files changed, 8 insertions, 8 deletions
diff --git a/bsp/hifive1/applications/main.c b/bsp/hifive1/applications/main.c
index ef6521a942..e3cd69f303 100644
--- a/bsp/hifive1/applications/main.c
+++ b/bsp/hifive1/applications/main.c
@@ -14,5 +14,5 @@
int main(void)
{
- return 0;
+ return 0;
}
diff --git a/bsp/hifive1/drivers/drv_usart.c b/bsp/hifive1/drivers/drv_usart.c
index c7c88d6861..935d39105f 100644
--- a/bsp/hifive1/drivers/drv_usart.c
+++ b/bsp/hifive1/drivers/drv_usart.c
@@ -23,7 +23,7 @@ static rt_err_t usart_configure(struct rt_serial_device *serial,
{
RT_ASSERT(serial != RT_NULL);
RT_ASSERT(cfg != RT_NULL);
-
+
GPIO_REG(GPIO_IOF_SEL) &= ~IOF0_UART0_MASK;
GPIO_REG(GPIO_IOF_EN) |= IOF0_UART0_MASK;
diff --git a/bsp/hifive1/drivers/interrupt.c b/bsp/hifive1/drivers/interrupt.c
index 1d4ae50626..75e8e8ac59 100644
--- a/bsp/hifive1/drivers/interrupt.c
+++ b/bsp/hifive1/drivers/interrupt.c
@@ -48,13 +48,13 @@ rt_isr_handler_t rt_hw_interrupt_handle(rt_uint32_t vector, void *param)
void rt_hw_interrupt_init(void)
{
int idx;
-
+
/* config interrupt vector*/
asm volatile(
"la t0, trap_entry\n"
"csrw mtvec, t0"
);
-
+
/* enable global interrupt*/
PLIC_init(&g_plic,
PLIC_CTRL_ADDR,
@@ -72,8 +72,8 @@ void rt_hw_interrupt_init(void)
irq_desc[idx].counter = 0;
#endif
}
-
- // enable machine external interrupt
+
+ // enable machine external interrupt
set_csr(mie, MIP_MEIP);
}
@@ -118,7 +118,7 @@ rt_isr_handler_t rt_hw_interrupt_install(int vector, rt_isr_handler_t handler,
}
/**
- * This function will be call when external machine-level
+ * This function will be call when external machine-level
* interrupt from PLIC occurred.
*/
void handle_m_ext_interrupt(void)
diff --git a/bsp/hifive1/drivers/interrupt.h b/bsp/hifive1/drivers/interrupt.h
index aee7ded426..52d378233a 100644
--- a/bsp/hifive1/drivers/interrupt.h
+++ b/bsp/hifive1/drivers/interrupt.h
@@ -19,5 +19,5 @@ rt_uint32_t rt_hw_interrupt_get_active(rt_uint32_t fiq_irq);
void rt_hw_interrupt_ack(rt_uint32_t fiq_irq, rt_uint32_t id);
rt_isr_handler_t rt_hw_interrupt_install(int vector, rt_isr_handler_t handler,
void *param, const char *name);
-
+
#endif