This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* automatically generated by rust-bindgen */ | |
| #[repr(C)] | |
| pub struct __BindgenUnionField<T>(::std::marker::PhantomData<T>); | |
| impl <T> __BindgenUnionField<T> { | |
| #[inline] | |
| pub fn new() -> Self { __BindgenUnionField(::std::marker::PhantomData) } | |
| #[inline] | |
| pub unsafe fn as_ref(&self) -> &T { ::std::mem::transmute(self) } | |
| #[inline] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fn main() { | |
| loop { | |
| print!("."); | |
| ::std::thread::sleep(::std::time::Duration::from_millis(1000)); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DEBUG: Executing shell function do_compile | |
| NOTE: which rustc: /home/smueller/.cargo/bin/rustc | |
| NOTE: rustc --version rustc 1.17.0-nightly (c49d10207 2017-02-07) | |
| NOTE: which cargo: /home/smueller/.cargo/bin/cargo | |
| NOTE: cargo --version cargo-0.18.0-nightly (de2919f 2017-02-06) | |
| NOTE: cargo build --verbose --manifest-path /mnt/src/poky/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/xmz-mod-touch-server/0.21.4-r9/git/Cargo.toml --target=armv7-unknown-linux-gnueabihf --release | |
| Updating registry `https://github.com/rust-lang/crates.io-index` | |
| Updating git repository `https://github.com/zzeroo/libmodbus-rs.git` | |
| Downloading rand v0.3.15 | |
| Downloading sysfs_gpio v0.4.4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ==1492== Memcheck, a memory error detector | |
| ==1492== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al. | |
| ==1492== Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyright info | |
| ==1492== Command: target/debug/treeview | |
| ==1492== | |
| --1492-- Valgrind options: | |
| --1492-- -v | |
| --1492-- Contents of /proc/version: | |
| --1492-- Linux version 4.6.0-yocto-standard-custom (smueller@nb-smueller) (gcc version 6.3.0 (GCC) ) #1 SMP Thu Feb 2 15:02:39 CET 2017 | |
| --1492-- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Compiling kalibrator v0.3.3 (file:///mnt/src/xMZ-Mod-Touch-Software/CO-NO2-Kombisensor-Mod-Kalibrator) | |
| error[E0308]: mismatched types | |
| --> src/gui/gtk3/mod.rs:379:42 | |
| | | |
| 379 | self::gobject_ffi::g_object_set (gtk_ffi::gtk_settings_get_default () as gpointer, | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `gui::gtk3::gobject_ffi::GObject`, found enum `gui::gtk3::libc::c_void` | |
| | | |
| = note: expected type `*mut gui::gtk3::gobject_ffi::GObject` | |
| = note: found type `*mut gui::gtk3::libc::c_void` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {"0.8469382100523445":"-----BEGIN PGP PUBLIC KEY BLOCK-----\r\nCharset: UTF-8\r\n\r\nxv8AAABSBAAAAAATCCqGSM49AwEHAgMEWHdRA7nc2jKBPILHrCSbRcl5sAx2vYEu\r\nMcDmK9YTBxzt4L6/sI1xjOSwGzOk+QdY0GRsUhjBwAhCoRPKWICyvc3/AAAACDxn\r\naXRodWI+wv8AAACOBBATCABA/wAAAAWCWArsU/8AAAACiwn/AAAACZAFQEg7X5sb\r\nzv8AAAAFlQgJCgv/AAAABJYDAQL/AAAAApsD/wAAAAKeAQAAfU0BAPZVdeCrvCuh\r\nEkdYAA1OXsryJjM6laCgeY3iqqueLXoKAP9qKfldHebU7+Wi9ugwRYA1Koqk03f4\r\nXYyCNvyRKt+sn87/AAAAVgQAAAAAEggqhkjOPQMBBwIDBCFetdv/ywewfD68cBZ3\r\nR7ajQ2+zh8HTLEjA08r2l0YqOtK+/3p8ezxbnSKcgYbfX2MkSmZNr6m1gQPgGskg\r\nlX4DAQgHwv8AAABtBBgTCAAf/wAAAAWCWArsU/8AAAAJkAVASDtfmxvO/wAAAAKb\r\nDAAAyvgBAI42FIiyA3IFg68T75KYruFCSpB5Ru5Pc8Gs4QCkb/IXAPoDNva+xzYr\r\n41aRXeDXAcmzkMf7rgdwTdsSMUJ2Zogwjg==\r\n=ACO+\r\n-----END PGP PUBLIC KEY BLOCK-----\r\n"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // rustc crc16.rs && ./crc16 2 7 # ./crc16 0x2 0x7 # geht auch .oO | |
| use std::env; | |
| use std::mem; | |
| // CRC-16 Funktion nach dem Modbus Standard http://www.modbus.org/docs/Modbus_over_serial_line_V1_02.pdf | |
| // Seite 39ff | |
| fn crc16(message: Vec<u8>) -> u16 { | |
| // Zum Start wird der CRC Buffer mit Einsen gefüllt | |
| let mut crc = 0xFFFF; | |
| // Dann wird jedes Byte des übergebenen Arrays (Vector in Rust genant) durchlaufen |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // gcc -o crc16 crc16.c && ./crc16 2 7 # ./crc16 0x2 0x7 # geht auch .oO | |
| #include <stdio.h> | |
| #include <stdint.h> | |
| #include <stdlib.h> | |
| // CRC-16 Funktion nach dem Vorbild von https://ctlsys.com/how_to_compute_the_modbus_rtu_message_crc/ | |
| unsigned short crc16(unsigned char buf[], int len) { | |
| // Start Definition nach Modbus Standard http://www.modbus.org/docs/Modbus_over_serial_line_V1_02.pdf | |
| // Seite 39ff |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extern crate gtk; | |
| extern crate gdk; | |
| use gtk::prelude::*; | |
| use gdk::enums::key; | |
| fn main() { | |
| gtk::init().unwrap_or_else(|_| { | |
| panic!(format!("{}: Could not initalise Gtk.", | |
| env!("CARGO_PKG_NAME"))) |