Skip to content

Instantly share code, notes, and snippets.

View QB4-dev's full-sized avatar
💭
I may be slow to respond.

Kuba QB4-dev

💭
I may be slow to respond.
  • Poland
View GitHub Profile
# go to kernel source: tmp/work/machine/linux-imx
make ARCH=arm defconfig KBUILD_DEFCONFIG=imx_v6_v7_defconfig
# build selected devicetree blob from sources in arch/arm/boot/dts
make ARCH=arm my_device.dtb
# dtb file will be in arch/arm/boot/dts
@QB4-dev
QB4-dev / mac_eeprom.dts
Created March 9, 2023 08:06 — forked from znuh/mac_eeprom.dts
devicetree excerpt for reading a MAC address from an EEPROM
i2c2: i2c@f8024000 {
status = "okay";
id: eeprom@50 {
compatible = "microchip,24c02"; /* actually it's a 24AA025E48 */
pagesize = <16>;
read-only;
reg = <0x50>;
#address-cells = <1>;
@QB4-dev
QB4-dev / add splash
Last active November 9, 2021 20:21
Add splash to raspberry pi lite image
sudo apt -y install rpd-plym-splash
#reload browser from CLI
DISPLAY=:0 xdotool search --onlyvisible --class chromium windowfocus key ctrl+r
@QB4-dev
QB4-dev / Wifi
Last active November 3, 2021 20:34
Raspberry Pi TL-WN725N V3 install
sudo wget http://downloads.fars-robotics.net/wifi-drivers/install-wifi -O /usr/bin/install-wifi
sudo chmod +x /usr/bin/install-wifi
static uint16_t adc_lowpass_filt(uint16_t _new_val, uint8_t _filter_pow)
{
static uint16_t filt_val;
static uint32_t sum;
sum = sum - filt_val + _new_val;
filt_val = (sum >> _filter_pow);
return filt_val;
}
@QB4-dev
QB4-dev / Makefile
Created February 23, 2018 07:51
ESP8266 Makefile template
# Makefile for ESP8266 projects
#
# Thanks to:
# - zarya
# - Jeroen Domburg (Sprite_tm)
# - Christian Klippel (mamalala)
# - Tommie Gannert (tommie)
#
# Changelog:
# - 2014-10-06: Changed the variables to include the header file directory