s3w 0.1.0
“Safe wrappers over the S3Wear mini app API for no_std wasm32 apps”
Contains an unbounded block loopPackage first published within seven days
SHA-256b60270218e4c3e6e591493d387a7bd82c77264b628878eaa20429355c2df5d7c
MaleculeH(Db)Md
Evidence
1//! Safe wrappers over the S3Wear mini app API (`sdk/include/s3w.h`, api_level 1) for `no_std`
2//! wasm32 apps. The raw imports are in [`sys`]; this crate covers what most apps need. Every app
3//! calls [`export_event_buf!`] once and defines the lifecycle exports it uses
4//! (`#[no_mangle] pub extern "C" fn s3w_on_start()`, `s3 …
4:65… ent`, `s3w_on_frame`, ...).
5#![no_std]
6
7pub use s3w_sys as sys;
8
9/// An event passed to `s3w_on_event` (`S3W_EV_*` in `sys`).
10pub type Event = sys::s3w …
74:8… imer (≥ 20 ms, ≤ 8 at once): `S3W_EV_TIMER` with the returned id.
75pub fn timer_start(period_ms: u32, repeat: bool) -> Result<i32, Error> {
76 c …
85:7… t mut n = (v as i64).unsigned_abs();
86 let mut i = buf.len();
87 loop {
88 i -= 1;
89 buf[i] = b'0' + (n % 10) as u8;
⋯5 lines
102:82… -----------------
103
104pub mod ui {
105 use super::{check, len, sys, Error};
106
107 /// A widget handle.
⋯4 lines
No evidence locations were recorded for this file. Raw result