pub trait EntryPoint {
    const TRAP_HANDLER: unsafe extern "C" fn() -> !;

    // Required method
    unsafe fn start() -> !;
}
Expand description

Defines the entry points of a port instantiation. Implemented by use_port!.

Required Associated Constants§

source

const TRAP_HANDLER: unsafe extern "C" fn() -> !

The trap handler.

It’s aligned to a 4-byte boundary so that it can be set to mtvec.

Safety
  • The processor should be in the privilege mode specified by ThreadingOptions::PRIVILEGE_LEVEL and have interrupts masked for this privilege level
  • The register state of the background context should be preserved so that the handler can restore it later.

Required Methods§

source

unsafe fn start() -> !

Proceed with the boot process.

Safety
  • The processor should be in the privilege mode specified by ThreadingOptions::PRIVILEGE_LEVEL and have interrupts masked for this privilege level.
  • This method hasn’t been entered yet.

Implementors§