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
#include <stdio.h> | |
#include <libusb.h> | |
#include <string.h> | |
int main(void) | |
{ | |
int r; | |
libusb_device_handle* handle = NULL; |
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
import logging | |
import struct | |
import aioblescan as aiobs | |
TH_STRUCT = struct.Struct("<hH") | |
H_STRUCT = struct.Struct("<H") | |
T_STRUCT = struct.Struct("<h") | |
CND_STRUCT = struct.Struct("<H") | |
ILL_STRUCT = struct.Struct("<I") |
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
class HCI_Cmd_LE_Set_Random_Address(aiobs.HCI_Command): | |
def __init__(self,peer_addr="24:2B:EC:17:76:4D"): | |
super(self.__class__, self).__init__(b"\x08",b"\x05") | |
self.payload.append(aiobs.MACAddr("address",mac=peer_addr)) | |
class BLEScanRequester(asyncio.Protocol): | |
'''Protocol handling the requests''' | |
def __init__(self): | |
self.transport = None |
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
zigbee2mqtt:info 2020-01-16 19:52:29: Logging to console and directory: '/home/ilya/source/zigbee/zigbee2mqtt/data/log/2020-01-16.19-52-29' | |
zigbee2mqtt:debug 2020-01-16 19:52:29: Removing old log directory '/home/ilya/source/zigbee/zigbee2mqtt/data/log/2020-01-16.19-28-38' | |
zigbee2mqtt:debug 2020-01-16 19:52:29: Loaded state from file /home/ilya/source/zigbee/zigbee2mqtt/data/state.json | |
zigbee2mqtt:info 2020-01-16 19:52:29: Starting zigbee2mqtt version 1.8.0 (commit #da4d26a) | |
zigbee2mqtt:info 2020-01-16 19:52:29: Starting zigbee-herdsman... | |
zigbee2mqtt:debug 2020-01-16 19:52:29: Using zigbee-herdsman with settings: '{"network":{"panID":6754,"extendedPanID":[221,221,221,221,221,221,221,221],"channelList":[11],"networkKey":"HIDDEN"},"databasePath":"/home/ilya/source/zigbee/zigbee2mqtt/data/database.db","databaseBackupPath":"/home/ilya/source/zigbee/zigbee2mqtt/data/database.db.backup","backupPath":"/home/ilya/source/zigbee/zigbee2mqtt/data/coordinator_backup.json","serialPort":{"baudRate":115200,"rtscts":fals |
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
match pkg_config::probe_library("libudev") { | |
Ok(lib) => { | |
for lib_dir in &lib.link_paths { | |
println!("cargo:lib={}", lib_dir.to_str().unwrap()); | |
} | |
for include_dir in &lib.include_paths { | |
println!("cargo:include={}", include_dir.to_str().unwrap()); | |
} | |
base_config.define("USE_UDEV", Some("1")); |
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 mount_( | |
c_source: Option<&CString>, | |
c_target: &CString, | |
c_fstype: &CString, | |
flags: MountFlags, | |
c_data: *const c_void, | |
) -> io::Result<()> { | |
let result = unsafe { | |
mount( | |
c_source.map_or_else(ptr::null, |s| s.as_ptr()), |
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
#!/usr/bin/env python3 | |
import struct | |
from sys import stdin | |
import os | |
from io import FileIO | |
hiddev = os.open("/dev/hidraw5", os.O_RDWR | os.O_NONBLOCK) | |
pf = FileIO(hiddev, "wb+", closefd=False) | |
#pf=open("ds_my.bin", "wb+") |
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
#include <iostream> | |
#include <stdint.h> | |
using namespace std; | |
uint32_t* graph; | |
uint32_t V = 0,V_vis=0; | |
bool *visited; | |
void dfs(uint32_t v,uint32_t tank) | |
{ |
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
#include <iostream> | |
#include <stdint.h> | |
#include <vector> | |
using namespace std; | |
uint32_t* graph; | |
uint32_t V = 0; | |
uint32_t V_c=0; | |
bool *visited; |
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
diff --git a/linux-2.6/arch/arm/mach-s3c2440/mach-mini2440.c b/linux-2.6/arch/arm/mach-s3c2440/mach-mini2440.c | |
index 20da524..7baf3b2 100644 | |
--- a/linux-2.6/arch/arm/mach-s3c2440/mach-mini2440.c | |
+++ b/linux-2.6/arch/arm/mach-s3c2440/mach-mini2440.c | |
@@ -545,6 +545,12 @@ static struct i2c_board_info mini2440_i2c_devs[] __initdata = { | |
}, | |
}; | |
+static struct platform_device uda1340_codec = { | |
+ .name = "uda134x-codec", |