Update README

This commit is contained in:
kylehawes 2018-05-17 13:05:21 -04:00 committed by GitHub
parent 94664f9355
commit 519566d30f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,6 +2,7 @@
**Note**: I did not write this driver. I only modified it to clean up compiler warnings/errors. The original can be found here: **Note**: I did not write this driver. I only modified it to clean up compiler warnings/errors. The original can be found here:
(http://www.librecalc.com/en/wp-content/uploads/sites/4/2014/10/sharp.c) (http://www.librecalc.com/en/wp-content/uploads/sites/4/2014/10/sharp.c)
More information can be found here: More information can be found here:
(http://www.librecalc.com/en/downloads/) (http://www.librecalc.com/en/downloads/)
@ -9,29 +10,38 @@ This driver is for the LS027B7DH01. It *should* work with other Sharp Mem LCD di
## Hookup Guide ## Hookup Guide
Connect the following pins: Connect the following pins:
| Display | RasPi |
| ------- | --------- | Display | RasPi
| VIN | 3.3V | ------- | ---------
| 3V3 | N/C | VIN | 3.3V
| GND | GND | 3V3 | N/C
| SCLK | 11 (SCLK) | GND | GND
| MOSI | 10 (MOSI) | SCLK | 11 (SCLK)
| CS | 23 | MOSI | 10 (MOSI)
| EXTMD | 3.3V | CS | 23
| DISP | 24 | EXTMD | 3.3V
| EXTIN | 25 | DISP | 24
EXTIN | 25
## Compile/Install the driver ## Compile/Install the driver
Verify that you have the linux kernel headers for your platform. For the RasPi these can be obtained by: Verify that you have the linux kernel headers for your platform. For the RasPi these can be obtained by:
```sudo apt-get install raspberrypi-kernel-headers``` ```
sudo apt-get install raspberrypi-kernel-headers
```
or more generally: or more generally:
```sudo apt-get install linux-headers-$(uname -r)``` ```
sudo apt-get install linux-headers-$(uname -r)
```
To compile the driver, run: To compile the driver, run:
```make``` ```
make
```
To install the driver, run: To install the driver, run:
```sudo make modules_install``` ```
sudo make modules_install
```
If you want the module to load at boot you'll need to add it to the /etc/modules file, like: If you want the module to load at boot you'll need to add it to the /etc/modules file, like:
``` ```
@ -43,20 +53,28 @@ sharp
## Compile/Install the Device Tree Overlay ## Compile/Install the Device Tree Overlay
The included sharp.dts file is for the Raspberry Pi Zero W. To compile it, run: The included sharp.dts file is for the Raspberry Pi Zero W. To compile it, run:
```dtc -@ -I dts -O dtb -o sharp.dtbo sharp.dts``` ```
dtc -@ -I dts -O dtb -o sharp.dtbo sharp.dts
```
To load it at runtime, copy it to /boot/overlays: To load it at runtime, copy it to /boot/overlays:
```sudo cp sharp.dtbo /boot/overlays``` ```
sudo cp sharp.dtbo /boot/overlays
```
And then add the following line to /boot/config.txt: And then add the following line to /boot/config.txt:
```dtoverlay=sharp``` ```
dtoverlay=sharp
```
## Console on Display ## Console on Display
If you want the boot console to show up on the display, you'll need to append `fbcon=map:10` to /boot/cmdline.txt after *rootwait*, like: If you want the boot console to show up on the display, you'll need to append `fbcon=map:10` to /boot/cmdline.txt after *rootwait*, like:
```... rootwait ... fbcon=map:10``` ```
... rootwait ... fbcon=map:10
```
To make sure the console fits on screen, uncomment the following lines in /boot/config.txt and set the resolution appropriately: To make sure the console fits on screen, uncomment the following lines in /boot/config.txt and set the resolution appropriately:
``` ```
framebuffer_width=400 framebuffer_width=400
framebuffer_height=240 framebuffer_height=240
``` ```