snRuntime/api/riscv_decls.h
Functions
Name | |
---|---|
void | snrt_wfi() |
uint32_t | mcycle() |
void | snrt_interrupt_enable(uint32_t irq) Enable interrupt source irq. |
void | snrt_interrupt_disable(uint32_t irq) Disable interrupt source. |
void | snrt_interrupt_global_enable(void ) Globally enable M-mode interrupts. |
void | snrt_interrupt_global_disable(void ) Globally disable interrupts. |
Functions Documentation
function snrt_wfi
static inline void snrt_wfi()
function mcycle
static inline uint32_t mcycle()
function snrt_interrupt_enable
inline void snrt_interrupt_enable(
uint32_t irq
)
Enable interrupt source irq.
Parameters:
- irq one of IRQ_[S/H/M]_[SOFT/TIMER/EXT] interrupts
Enable interrupt, either wakes from wfi or if global interrupts are enabled, jumps to the IRQ handler
function snrt_interrupt_disable
inline void snrt_interrupt_disable(
uint32_t irq
)
Disable interrupt source.
Parameters:
- irq one of IRQ_[S/H/M]_[SOFT/TIMER/EXT]
See snrt_interrupt_enable
function snrt_interrupt_global_enable
inline void snrt_interrupt_global_enable(
void
)
Globally enable M-mode interrupts.
On an interrupt event the core will jump to __snrt_crt0_interrupt_handler service the interrupt and continue normal execution. Enable interrupt sources with snrt_interrupt_enable
function snrt_interrupt_global_disable
inline void snrt_interrupt_global_disable(
void
)
Globally disable interrupts.
Source code
// Copyright 2023 ETH Zurich and University of Bologna.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
#include "encoding.h"
static inline void snrt_wfi();
static inline uint32_t mcycle();
inline void snrt_interrupt_enable(uint32_t irq);
inline void snrt_interrupt_disable(uint32_t irq);
inline void snrt_interrupt_global_enable(void);
inline void snrt_interrupt_global_disable(void);
Updated on 2023-06-19 at 09:43:56 +0000