This repository has been archived by the owner on Sep 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 495
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
1,933 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,87 @@ | ||
# Object files | ||
# This file is copied from the Linux kernel sources | ||
# | ||
# NOTE! Don't add files that are generated in specific | ||
# subdirectories here. Add them in the ".gitignore" file | ||
# in that subdirectory instead. | ||
# | ||
# NOTE! Please use 'git ls-files -i --exclude-standard' | ||
# command after changing this file, to see if there are | ||
# any tracked files which get ignored after the change. | ||
# | ||
# Normal rules | ||
# | ||
.* | ||
*.o | ||
|
||
# Libraries | ||
*.lib | ||
*.o.* | ||
*.a | ||
|
||
# Shared objects (inc. Windows DLLs) | ||
*.dll | ||
*.s | ||
*.ko | ||
*.so | ||
*.so.* | ||
*.dylib | ||
*.so.dbg | ||
*.mod.c | ||
*.i | ||
*.lst | ||
*.symtypes | ||
*.order | ||
modules.builtin | ||
*.elf | ||
*.bin | ||
*.gz | ||
*.bz2 | ||
*.lzma | ||
*.xz | ||
*.lzo | ||
*.patch | ||
*.gcno | ||
|
||
# | ||
# Top-level generic files | ||
# | ||
/tags | ||
/TAGS | ||
/linux | ||
/vmlinux | ||
/vmlinuz | ||
/System.map | ||
/Module.markers | ||
/Module.symvers | ||
|
||
# | ||
# Debian directory (make deb-pkg) | ||
# | ||
/debian/ | ||
|
||
# | ||
# git files that we don't want to ignore even it they are dot-files | ||
# | ||
!.gitignore | ||
!.mailmap | ||
|
||
# | ||
# Generated include files | ||
# | ||
include/config | ||
include/linux/version.h | ||
include/generated | ||
arch/*/include/generated | ||
|
||
# stgit generated dirs | ||
patches-* | ||
|
||
# quilt's files | ||
patches | ||
series | ||
|
||
# cscope files | ||
cscope.* | ||
ncscope.* | ||
|
||
# gnu global files | ||
GPATH | ||
GRTAGS | ||
GSYMS | ||
GTAGS | ||
|
||
# Executables | ||
*.exe | ||
*.out | ||
*.app | ||
*.orig | ||
*~ | ||
\#*# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
menuconfig FB_TFT_SUPPORT | ||
tristate "Support for small TFT LCD display modules" | ||
depends on FB && SPI && GPIOLIB | ||
select FB_SYS_FILLRECT | ||
select FB_SYS_COPYAREA | ||
select FB_SYS_IMAGEBLIT | ||
select FB_SYS_FOPS | ||
select FB_DEFERRED_IO | ||
|
||
config FB_ADAFRUIT22 | ||
tristate "FB driver for the Adafruit 2.2\" LCD display" | ||
depends on FB_TFT_SUPPORT | ||
help | ||
Framebuffer support for the Adafruit 2.2\" LCD display in 9-bit SPI mode. | ||
|
||
config FB_SAINSMART18 | ||
tristate "FB driver for the Sainsmart 1.8\" LCD display" | ||
depends on FB_TFT_SUPPORT | ||
help | ||
Framebuffer support for the Sainsmart 1.8\" LCD display in 8-bit SPI mode. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# If KERNELRELEASE is defined, we've been invoked from the | ||
# kernel build system and can use its language. | ||
ifneq ($(KERNELRELEASE),) | ||
obj-m := fbtft.o | ||
|
||
obj-m += adafruit22fb.o | ||
obj-m += sainsmart18fb.o | ||
|
||
obj-m += spidevices.o | ||
|
||
#obj-$(CONFIG_FB_TFT_SUPPORT) += fbtft.o | ||
#obj-$(CONFIG_FB_ADAFRUIT22) += adafruit22fb.o | ||
#obj-$(CONFIG_FB_SAINSMART18) += sainsmart18fb.o | ||
|
||
# Otherwise we were called directly from the command | ||
# line; invoke the kernel build system. | ||
else | ||
KERNELDIR ?= /lib/modules/$(shell uname -r)/build | ||
PWD := $(shell pwd) | ||
default: | ||
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
FBTFT | ||
========= | ||
|
||
Linux Framebuffer drivers for small TFT LCD display modules. | ||
The drivers uses a module 'fbft' which makes writing these drivers very simple. | ||
|
||
Development is done on a Raspberry Pi running the Raspbian "wheezy" distribution. | ||
|
||
# uname -r | ||
3.2.27+ | ||
|
||
|
||
SUPPORTED LCD MODULES | ||
----------------------------------------------------------------------------------------- | ||
| Module | Driver | SPI | Controller | URL | | ||
----------------------------------------------------------------------------------------- | ||
| Adafruit 2.2" | adafruit22fb | 9 bit | HX8340bn | adafruit.com | | ||
| Sainsmart 1.8" | sainsmart18fb | 8 bit | ST7735Rn | www.sainsmart.com | | ||
----------------------------------------------------------------------------------------- | ||
|
||
adafruit22fb | ||
GPIOS | ||
reset (optional if handled by hardware) | ||
|
||
sainsmart18fb | ||
GPIOS | ||
dc (required) | ||
reset (optional if handled by hardware) | ||
|
||
|
||
KERNEL CONFIG | ||
The drivers require a kernel with SPI, GPIO, FB, FB_SYS_* and FB_DEFERRED_IO turned on. | ||
|
||
Check with these commands: | ||
grep "CONFIG_SPI[= ]\|CONFIG_FB[= ]\|CONFIG_FB_DEFERRED_IO\|CONFIG_FB_SYS" .config | ||
grep GPIO .config | ||
|
||
|
||
Set options with 'make menuconfig' | ||
|
||
CONFIG_SPI=y | ||
Device Drivers ---> [*] SPI support ---> <Some controller driver> | ||
|
||
CONFIG_GENERIC_GPIO=y | ||
CONFIG_BCM2708_GPIO=y | ||
Device Drivers ---> -*- GPIO Support | ||
|
||
|
||
CONFIG_FB=y | ||
Device Drivers ---> Graphics support ---> <*> Support for frame buffer devices | ||
|
||
|
||
The following options can not be set from menuconfig (can only be set by other config options) | ||
Use 'sed' to set them. | ||
|
||
CONFIG_FB_DEFERRED_IO=y | ||
sed -i '/CONFIG_FB_DEFERRED_IO/s/# \([A-Z0-9_]*\) is not set/\1=y/' .config | ||
|
||
CONFIG_FB_SYS_FILLRECT=y | ||
CONFIG_FB_SYS_COPYAREA=y | ||
CONFIG_FB_SYS_IMAGEBLIT=y | ||
CONFIG_FB_SYS_FOPS=y | ||
sed -i '/CONFIG_FB_SYS/s/# \([A-Z0-9_]*\) is not set/\1=y/' .config | ||
|
||
|
||
TOOLS | ||
spidevices | ||
This module can add and delete SPI devices to simplify driver testing and development. | ||
No need to change the arch/arm/mach-bcm2708/bcm2708.c (on rPi) platform file when testing. | ||
Values are hardcoded. | ||
|
||
|
||
KNOWN BUGS | ||
'fbtft' can't be used by more than one driver at a time. | ||
|
||
|
||
SOURCE CODE | ||
https://github.com/notro/fbtft/ |
Oops, something went wrong.