You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
fate e7a3e15a9a Update 'README.md' 4 years ago
.gitignore add tty-battery.c 4 years ago
Makefile add tty-battery.c 4 years ago
README.md Update 'README.md' 4 years ago
battery_drv.c v1.0 4 years ago
tty-battery.c fix charging/discharging detection 4 years ago
ttybattery.service fix ttybattery.service ttyS1 4 years ago

README.md

  1. Builde driver
make modules
make tty-battery
  1. Install driver
    mkdir -p /lib/modules/`uname -r`/extra
    cp battery_drv.ko /lib/modules/`uname -r`/extra
    depmod -a
    echo battery_drv >> /etc/modules
    modprobe battery_drv
  1. Install service
    cp tty-battery /usr/bin/
    chmod 0755 /usr/bin/tty-battery
    cp ttybattery.service /etc/systemd/system
    chmod 0644 /etc/systemd/system/ttybattery.service
    systemctl enable ttybattery
    systemctl start ttybattery
    systemctl status ttybattery