repaper / gratis

EPD Source codes and Documentation
238 stars 132 forks source link

Alternate IO Pins on RPi #11

Closed GadgetUK closed 10 years ago

GadgetUK commented 10 years ago

I have an application that requires the use of the UART PINS on the RPi. Is it possible to make use of alternate free GPIO pins on the PI to drive the Functions on the epaper board ?

hxw commented 10 years ago

PlatformWithOS/RaspberryPi/epd_io.h defines the GPIO mapping, and the gpio.h defines the lines that should work. You can use the driver-common/gpio-test.c (or creat something similar) to try out the changed I/O lines by flashing LEDs to make sure that the gpio.c can drive the lines. (Just to note, "busy" is the only input and the rest are outputs)

hxw commented 10 years ago

Please let me know which pins you want to change. Just these two?

#define border_pin GPIO_P1_08
#define discharge_pin GPIO_P1_10
GadgetUK commented 10 years ago

Yes, freeing UART TXD and RXD is all thats needed.

hxw commented 10 years ago

Any specific pins you want to change to?

P1-08 -> ?
P1-10 -> ?
GadgetUK commented 10 years ago

I guess anything that is free avoiding the i2c pins.

hxw commented 10 years ago

Would these changes be sufficient?

border change from P1_08 to P1_13
discharge change from P1_10 to P1_13 <--- SHOULD BE P1_15

If you make these changes in PlatformWithOS/RaspberryPi/epd_io.h Move the wired, then recompile, reinstall and restart the epd-fuse are you able to use the UART?

The EPD is functional with these changes, but I don't have anything to test the UART at present.

GadgetUK commented 10 years ago

I'm assuming you mean

P1_13, and P1_14, I'll try this later and report back.

hxw commented 10 years ago

Sorry about my bad typing: Correct is:

border change from P1_08 to P1_13
discharge change from P1_10 to P1_15
GadgetUK commented 10 years ago

Great that appears to work. Many thanks.