Skip to content

Commit

Permalink
Merge pull request #181 from flipperzero-rs/github-actions/update-bin…
Browse files Browse the repository at this point in the history
…dings/sdk/1.0.1

build(bindings): bump SDK to `1.0.1`
  • Loading branch information
dcoles authored Oct 21, 2024
2 parents cb902c2 + 72ae68e commit 4b17d1e
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
26 changes: 26 additions & 0 deletions crates/sys/src/bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1573,6 +1573,27 @@ extern "C" {
#[doc = "Halt system"]
pub fn __furi_halt_implementation();
}
pub const FuriWait_FuriWaitForever: FuriWait = 4294967295;
pub type FuriWait = core::ffi::c_uint;
#[doc = "< Wait for any flag (default)."]
pub const FuriFlag_FuriFlagWaitAny: FuriFlag = 0;
#[doc = "< Wait for all flags."]
pub const FuriFlag_FuriFlagWaitAll: FuriFlag = 1;
#[doc = "< Do not clear flags which have been specified to wait for."]
pub const FuriFlag_FuriFlagNoClear: FuriFlag = 2;
#[doc = "< Error indicator."]
pub const FuriFlag_FuriFlagError: FuriFlag = 2147483648;
#[doc = "< FuriStatusError (-1)."]
pub const FuriFlag_FuriFlagErrorUnknown: FuriFlag = 4294967295;
#[doc = "< FuriStatusErrorTimeout (-2)."]
pub const FuriFlag_FuriFlagErrorTimeout: FuriFlag = 4294967294;
#[doc = "< FuriStatusErrorResource (-3)."]
pub const FuriFlag_FuriFlagErrorResource: FuriFlag = 4294967293;
#[doc = "< FuriStatusErrorParameter (-4)."]
pub const FuriFlag_FuriFlagErrorParameter: FuriFlag = 4294967292;
#[doc = "< FuriStatusErrorISR (-6)."]
pub const FuriFlag_FuriFlagErrorISR: FuriFlag = 4294967290;
pub type FuriFlag = core::ffi::c_uint;
#[doc = "< Operation completed successfully."]
pub const FuriStatus_FuriStatusOk: FuriStatus = 0;
pub const FuriStatus_FuriStatusError: FuriStatus = -1;
Expand All @@ -1587,6 +1608,11 @@ pub const FuriStatus_FuriStatusErrorISR: FuriStatus = -6;
#[doc = "< Prevents enum down-size compiler optimization."]
pub const FuriStatus_FuriStatusReserved: FuriStatus = 2147483647;
pub type FuriStatus = core::ffi::c_int;
#[doc = "< Request (graceful) exit."]
pub const FuriSignal_FuriSignalExit: FuriSignal = 0;
#[doc = "< Custom signal values start from here."]
pub const FuriSignal_FuriSignalCustom: FuriSignal = 100;
pub type FuriSignal = core::ffi::c_uchar;
#[doc = "Subscribe to In events.\n\n In events occur on the following conditions:\n - One or more items were inserted into a FuriMessageQueue,\n - Enough data has been written to a FuriStreamBuffer,\n - A FuriSemaphore has been released at least once,\n - A FuriMutex has been released."]
pub const FuriEventLoopEvent_FuriEventLoopEventIn: FuriEventLoopEvent = 1;
#[doc = "Subscribe to Out events.\n\n Out events occur on the following conditions:\n - One or more items were removed from a FuriMessageQueue,\n - Any amount of data has been read out of a FuriStreamBuffer,\n - A FuriSemaphore has been acquired at least once,\n - A FuriMutex has been acquired."]
Expand Down
5 changes: 5 additions & 0 deletions tools/src/bin/generate-bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const TOOLCHAIN: &str = "../../../toolchain/x86_64-linux/arm-none-eabi/include";
#[cfg(all(target_os = "macos", target_arch = "aarch64"))]
const TOOLCHAIN: &str = "../../../toolchain/x86_64-darwin/arm-none-eabi/include";
const VISIBILITY_PUBLIC: &str = "+";
const ALLOWLIST_EXTRAS: &[&str] = &["FuriWait", "FuriFlag", "FuriStatus", "FuriSignal"];

#[derive(Debug)]
struct ApiSymbols {
Expand Down Expand Up @@ -240,6 +241,10 @@ fn main() {
bindings = bindings.allowlist_var(variable);
}

for type_ in ALLOWLIST_EXTRAS {
bindings = bindings.allowlist_item(type_);
}

let bindings = match bindings.generate() {
Ok(b) => b,
Err(e) => {
Expand Down

0 comments on commit 4b17d1e

Please sign in to comment.