Function halt

Source
pub fn halt()
Expand description

Halts the CPU until an interrupt occurs.

The CPU is switched to a low-power mode but all other subsystems continue running. You would mainly use this if you are stopping the game, and want to put an infinite loop without using 100% of the CPU.

Once an interrupt occurs, this function will return.

#![no_std]
#![no_main]

use agb::Gba;

#[agb::entry]
fn main(mut gba: Gba) -> ! {
    // your game code here    

    loop {
        agb::halt();
    }
}