gps on /dev/ttyS1
Hello! I have gps device on ttyS1, but to use I must enable it by i2c-tools:
$ i2cset -y 0 0x20 2 0x80 b 0x80
and disable:
$ i2cset -y 0 0x20 2 0x0 b 0x80
I want add some wrapper code to start gps device when ttyS1 is open and shutdown device on close. How is is easy to do?