Skip to content

Instantly share code, notes, and snippets.

Avatar

solsTiCe d'Hiver solsticedhiver

View GitHub Profile
@solsticedhiver
solsticedhiver / 0_README.md
Created Jan 31, 2019 — forked from Lahorde/0_README.md
Initialize an external I2C RTC module on raspberry using udev and systemd
View 0_README.md

Description

Enable i2c RTC using systemd. A udev rules triggers an I2C systemd service on I2C kernel module adding. Service then loads I2C driver adding a new I2C device to /sys Then kernel loads I2C RTC driver and adds an RTC device It triggers a udev rules that updates hardware clock

Application on raspberry pi

Enable I2C

  • enable I2C in config.txt, adding device_tree_param=i2c1=on
View killsnaps.sh
#!/bin/bash
set -e
export IFS='
'
# that's a dangerous script to run because it removes all your snaps. Don't do that
function echo_cmd() {
echo "$@"
#$@
}
You can’t perform that action at this time.