ndless 0.6.1

Rust library for interacting with Ndless for the TI-Nspire
pub fn assert_ndless_rev(required_version: u32) {
	unsafe { ndless_sys::assert_ndless_rev(required_version) }
}

pub fn is_startup() -> bool {
	unsafe { ndless_sys::nl_isstartup() > 0 }
}

/// Trigger a breakpoint. If no debugger is connected (i.e. a physical calculator), the calculator
/// will reset. This function will do nothing if compiled in release mode, allowing you to leave
/// this in when compiling for an actual calculator.
pub fn bkpt() {
	if cfg!(debug_assertions) { unsafe { asm!(".long 0xE1212374") } }
}

/// See
/// [Hackspire](https://hackspire.org/index.php/Ndless_features_and_limitations#Resident_programs)
pub fn set_resident() {
	unsafe { ndless_sys::nl_set_resident() }
}

/// Must be called at the end of a program that creates or deletes files,
/// to update the OS document browser.
pub fn refresh_documents() {
	unsafe { ndless_sys::refresh_osscr() }
}

/// return true if a third-party Launcher was used to boot the OS, such as nLaunch/nLaunchy
pub fn third_party_loader() -> bool {
	unsafe { ndless_sys::nl_loaded_by_3rd_party_loader() > 0 }
}