https://github.com/pravinraghul/gpioserdev-driver
Custom GPIO serial data transfer driver using a bit-banging technique.
https://github.com/pravinraghul/gpioserdev-driver
gpio kernel-driver linux-device-drivers linux-kernel raspberry-pi-3
Last synced: 8 months ago
JSON representation
Custom GPIO serial data transfer driver using a bit-banging technique.
- Host: GitHub
- URL: https://github.com/pravinraghul/gpioserdev-driver
- Owner: pravinraghul
- Created: 2024-10-02T13:51:16.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-26T16:56:13.000Z (about 1 year ago)
- Last Synced: 2025-03-28T19:23:19.812Z (12 months ago)
- Topics: gpio, kernel-driver, linux-device-drivers, linux-kernel, raspberry-pi-3
- Language: C
- Homepage:
- Size: 78.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Custom GPIO Serial Communication Driver
## Purpose
To develop my understanding of device driver concepts, I focused on developing loadable kernel modules with configurable parameters, implementing ioctl calls, and working with device tree overlays. This improved project based on the final project I completed as part of the [Advanced Embedded Linux Development specialization](https://coursera.org/share/984470e36325dfdacdcdbbe11a76e00d)
## Data Transfer Design
In this design, the strobe signal controls the timing, and on each rising edge, the value on the data line is captured. The data is transmitted sequentially, with each bit being read on the strobe's rising edge.
The data is transmitted in the order of the least significant bit (LSB) to the most significant bit (MSB) in the below example, but it can be configured to transmit in the opposite direction.

## Testing Driver
Once the driver loaded we can use `echo` command to transfer data.,
```bash
$ echo helloworld > /dev/gpioserdev
```
To receive the transferred data, a `test/recv.py` python script is used.,
```bash
$ cd test/
$ python3 recv.py
```