Software APIs
Functions
hart.h File Reference

(30d7e787c7)

This header provides functions for controlling the excution of a hart, such as halt-like functionality. More...

#include <stddef.h>
#include <stdint.h>
#include <stdnoreturn.h>
#include "sw/device/lib/base/macros.h"
#include "sw/device/lib/base/stdasm.h"

Go to the source code of this file.

Functions

void wait_for_interrupt (void)
 Hints to the processor that we don't have anything better to be doing, and to go into low-power mode until an interrupt is serviced. More...
 
void icache_invalidate (void)
 Invalidates the instruction cache.
 
void busy_spin_micros (uint32_t usec)
 Spin for at least the given number of microseconds. More...
 
noreturn void abort (void)
 Immediately halt program execution. More...
 

Detailed Description

This header provides functions for controlling the excution of a hart, such as halt-like functionality.

Definition in file hart.h.

Function Documentation

◆ abort()

noreturn void abort ( void  )

Immediately halt program execution.

This function conforms to the semantics defined in ISO C11 S7.22.4.1.

Definition at line 20 of file hart.c.

◆ busy_spin_micros()

void busy_spin_micros ( uint32_t  usec)

Spin for at least the given number of microseconds.

Parameters
usecDuration in microseconds.

Definition at line 13 of file hart.c.

◆ wait_for_interrupt()

void wait_for_interrupt ( void  )
inline

Hints to the processor that we don't have anything better to be doing, and to go into low-power mode until an interrupt is serviced.

This function may behave as if it is a no-op.

Definition at line 27 of file hart.h.