mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-02 12:24:07 -04:00
Add starting point for IGLOO2 RISV-V demo project.
This commit is contained in:
parent
483f4a8c4b
commit
9119e1e0e3
42 changed files with 13068 additions and 0 deletions
|
@ -0,0 +1,36 @@
|
|||
/***************************************************************************//**
|
||||
* (c) Copyright 2007-2018 Microsemi SoC Products Group. All rights reserved.
|
||||
*
|
||||
* Legacy interrupt control functions for the Microsemi driver library hardware
|
||||
* abstraction layer.
|
||||
*
|
||||
* SVN $Revision: 9661 $
|
||||
* SVN $Date: 2018-01-15 16:13:33 +0530 (Mon, 15 Jan 2018) $
|
||||
*/
|
||||
#include "hal.h"
|
||||
#include "riscv_hal.h"
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
*
|
||||
*/
|
||||
void HAL_enable_interrupts(void) {
|
||||
__enable_irq();
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
*
|
||||
*/
|
||||
psr_t HAL_disable_interrupts(void) {
|
||||
psr_t psr;
|
||||
psr = read_csr(mstatus);
|
||||
__disable_irq();
|
||||
return(psr);
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
*
|
||||
*/
|
||||
void HAL_restore_interrupts(psr_t saved_psr) {
|
||||
write_csr(mstatus, saved_psr);
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue