https://github.com/makelinux/ldt
Linux Driver Template
https://github.com/makelinux/ldt
drivers linux-driver-template linux-kernel
Last synced: 2 months ago
JSON representation
Linux Driver Template
- Host: GitHub
- URL: https://github.com/makelinux/ldt
- Owner: makelinux
- Created: 2012-09-12T22:44:29.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2022-10-31T08:33:49.000Z (over 2 years ago)
- Last Synced: 2025-03-28T14:11:15.414Z (2 months ago)
- Topics: drivers, linux-driver-template, linux-kernel
- Language: C
- Homepage:
- Size: 146 KB
- Stars: 518
- Watchers: 80
- Forks: 196
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# LDT - Linux Driver Template
LDT project is useful for Linux driver development beginners and as starting point for a new drivers.
The driver uses following Linux facilities:
module, platform driver, file operations (read/write, mmap, ioctl, blocking and nonblocking mode, polling), kfifo, completion, interrupt, tasklet, work, kthread, timer, simple misc device, multiple char devices, Device Model, configfs, UART 0x3f8, HW loopback, SW loopback, ftracer.## Usage:
Just run
git clone --recurse-submodules git://github.com/makelinux/ldt.git && cd ldt && make && ./ldt-test && sudo ./misc_loop_drv_test
and explore sources.
## Files:
Main source file of LDT:
**[ldt.c](https://github.com/makelinux/ldt/blob/master/ldt.c)**Test script, run it: **[ldt-test](https://github.com/makelinux/ldt/blob/master/ldt-test)**
Generic testing utility for Device I/O: **[dio.c](https://github.com/makelinux/ldt/blob/master/dio.c)**
Simple misc driver with read, write, fifo, tasklet and IRQ:
**[misc_loop_drv.c](https://github.com/makelinux/ldt/blob/master/misc_loop_drv.c)**Browse the rest of source: https://github.com/makelinux/ldt/