]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/RISC-V_Renode_Emulator_SoftConsole/Microsemi_Code/riscv_hal/riscv_hal.h
Retarget Softconsole RISC-V demo from IGLOO2 to Renode as it can have more RAM and...
[freertos] / FreeRTOS / Demo / RISC-V_Renode_Emulator_SoftConsole / Microsemi_Code / riscv_hal / riscv_hal.h
1 /*******************************************************************************\r
2  * (c) Copyright 2016-2018 Microsemi SoC Products Group. All rights reserved.\r
3  *\r
4  * @file riscv_hal.h\r
5  * @author Microsemi SoC Products Group\r
6  * @brief Hardware Abstraction Layer functions for Mi-V soft processors\r
7  *\r
8  * SVN $Revision: 9835 $\r
9  * SVN $Date: 2018-03-19 19:11:35 +0530 (Mon, 19 Mar 2018) $\r
10  */\r
11 \r
12 #ifndef RISCV_HAL_H\r
13 #define RISCV_HAL_H\r
14 \r
15 #include "riscv_plic.h"\r
16 \r
17 #ifdef __cplusplus\r
18 extern "C" {\r
19 #endif\r
20 \r
21 /*\r
22  *Return value from External IRQ handler. This will be used to disable the External\r
23  *interrupt.\r
24  */\r
25 #define EXT_IRQ_KEEP_ENABLED                0U\r
26 #define EXT_IRQ_DISABLE                     1U\r
27 \r
28 /*------------------------------------------------------------------------------\r
29  * Interrupt enable/disable.\r
30  */\r
31 void __disable_irq(void);\r
32 void __enable_irq(void);\r
33 \r
34 /*------------------------------------------------------------------------------\r
35  *  System tick handler. This is generated from the RISC-V machine timer.\r
36  */\r
37 void SysTick_Handler(void);\r
38 \r
39 /*------------------------------------------------------------------------------\r
40  * System tick configuration.\r
41  * Configures the machine timer to generate a system tick interrupt at regular\r
42  * intervals.\r
43  * Takes the number of system clock ticks between interrupts.\r
44  *\r
45  * Returns 0 if successful.\r
46  * Returns 1 if the interrupt interval cannot be achieved.\r
47  */\r
48 uint32_t SysTick_Config(uint32_t ticks);\r
49 \r
50 #ifdef __cplusplus\r
51 }\r
52 #endif\r
53 \r
54 #endif  /* RISCV_HAL_H */\r
55 \r