Skip to content

Instantly share code, notes, and snippets.

Krzysztof A. Adamski kadamski

Block or report user

Report or block kadamski

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kadamski
kadamski / opc_boot.sh
Created Feb 26, 2016
Script for booting OrangePI PC in FEL mode
View opc_boot.sh
g#!/bin/bash
UBOOTDIR=./u-boot/
KERNELDIR=./linux-sunxi/
INITRAMFS=~/Downloads/buildroot-2015.11.1/output/images/rootfs.cpio.uboot
KERNEL_ADDR=0x42000000
RAMDISK_ADDR=0x43300000
FDT_ADDR=0x43000000
SCRIPT_ADDR=0x43100000
@kadamski
kadamski / sds011
Last active Mar 11, 2020
SDS011 dust sensor reading
View sds011
#!/usr/bin/python
# coding=utf-8
# "DATASHEET": http://cl.ly/ekot
from __future__ import print_function
import serial, struct, sys, time
DEBUG = 1
CMD_MODE = 2
CMD_QUERY_DATA = 4
CMD_DEVICE_ID = 5
@kadamski
kadamski / gist:69ea849f9564d0b9a8c1
Created May 2, 2015
Those kthread_stop will oops
View gist:69ea849f9564d0b9a8c1
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/miscdevice.h>
#include <linux/fs.h>
#include <linux/uaccess.h>
#include <linux/kthread.h>
#include <linux/ratelimit.h>
You can’t perform that action at this time.