Skip to main content

entry

Attribute Macro entry 

Source
#[entry]
Available on crate feature rt only.
Expand description

Attribute to declare the entry point of the program

Exactly one entry point must be declared in the entire dependency tree.

#[arduino_hal::entry]
fn main() -> ! {
    // ...
}

The entry function must have a signature of [unsafe] fn() -> !.

This macro is a reexport of avr_device::entry. It is only available when the rt (runtime) feature is selected (it is by default). Attribute to declare the entry point of the program

Exactly one entry point must be declared in the entire dependency tree.

#[avr_device::entry]
fn main() -> ! {
    loop {
        // ...
    }
}

ยงConstraints

  • The entry function must have a signature of [unsafe] fn() -> !.
  • This macro requires the avr-device rt crate feature.