Skip to content

Commit

Permalink
Using CLOCK_MONOTONIC_RAW for arbitrary epoch
Browse files Browse the repository at this point in the history
  • Loading branch information
RainerZ committed Oct 31, 2024
1 parent c3c36be commit 33b30f8
Show file tree
Hide file tree
Showing 24 changed files with 1,136 additions and 2,453 deletions.
75 changes: 38 additions & 37 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,43 +3,44 @@ fn main() {

// Generate XCPlite C code bindings
// Uncomment this to regenerate the bindings

let bindings = bindgen::Builder::default()
.header("xcplib/wrapper.h")
.clang_arg("-Ixcplib/src")
.clang_arg("-Ixcplib")
.parse_callbacks(Box::new(bindgen::CargoCallbacks::new()))
//
.blocklist_type("T_CLOCK_INFO")
// Protocol layer
.allowlist_function("XcpInit")
.allowlist_function("XcpStart")
.allowlist_function("XcpDisconnect")
// Transport layer
.allowlist_function("XcpTlInit")
.allowlist_function("XcpTlShutdown")
.allowlist_function("XcpTlCommand")
.allowlist_function("XcpTlTransmitQueuePeekMsg")
.allowlist_function("XcpTlTransmitQueueNextMsg")
.allowlist_function("XcpTlTransmitQueueHasMsg")
// ETH server
.allowlist_function("XcpEthServerInit")
.allowlist_function("XcpEthServerShutdown")
.allowlist_function("XcpEthServerStatus")
.allowlist_function("XcpGetSessionStatus")
// DAQ
.allowlist_function("XcpEvent")
.allowlist_function("XcpEventExt")
// Misc
.allowlist_function("XcpPrint")
.allowlist_function("ApplXcpSetLogLevel")
.allowlist_function("ApplXcpSetA2lName")
.allowlist_function("ApplXcpGetAddr")
.allowlist_function("ApplXcpRegisterCallbacks")
//
.generate()
.expect("Unable to generate bindings");
bindings.write_to_file("src/xcp/xcplib.rs").expect("Couldn't write bindings!");
/*
let bindings = bindgen::Builder::default()
.header("xcplib/wrapper.h")
.clang_arg("-Ixcplib/src")
.clang_arg("-Ixcplib")
.parse_callbacks(Box::new(bindgen::CargoCallbacks::new()))
//
.blocklist_type("T_CLOCK_INFO")
// Protocol layer
.allowlist_function("XcpInit")
.allowlist_function("XcpStart")
.allowlist_function("XcpDisconnect")
// Transport layer
.allowlist_function("XcpTlInit")
.allowlist_function("XcpTlShutdown")
.allowlist_function("XcpTlCommand")
.allowlist_function("XcpTlTransmitQueuePeekMsg")
.allowlist_function("XcpTlTransmitQueueNextMsg")
.allowlist_function("XcpTlTransmitQueueHasMsg")
// ETH server
.allowlist_function("XcpEthServerInit")
.allowlist_function("XcpEthServerShutdown")
.allowlist_function("XcpEthServerStatus")
.allowlist_function("XcpGetSessionStatus")
// DAQ
.allowlist_function("XcpEvent")
.allowlist_function("XcpEventExt")
// Misc
.allowlist_function("XcpPrint")
.allowlist_function("ApplXcpSetLogLevel")
.allowlist_function("ApplXcpSetA2lName")
.allowlist_function("ApplXcpGetAddr")
.allowlist_function("ApplXcpRegisterCallbacks")
//
.generate()
.expect("Unable to generate bindings");
bindings.write_to_file("src/xcp/xcplib.rs").expect("Couldn't write bindings!");
*/

// Build a XCP on ETH version of XCPlite as a library
cc::Build::new()
Expand Down
Loading

0 comments on commit 33b30f8

Please sign in to comment.