[riot-notifications] [RIOT-OS/RIOT] E-paper driver samr21 using spi (#11756)

talalong notifications at github.com
Thu Jun 27 15:27:40 CEST 2019

#### Description
<!-- Please describe your use case, why you need this feature and why this
feature is important for RIOT. -->
I'm trying to control my 4.2inch e-paper display from waveshare using board samr21-xpro via SPI. There are libraries supporting this display, but they are all written in C++ and this feature #11078 is also not official yet and also did not work on my 400x300 display. So I decided to make my own '_driver_' with my little knowledge. If it works, it could be new pull request for driver of _samr21-xpro_ to control _epaper_ display :)

Here is my setup and little code:

Here is the wiring:
**Samr21**       <--->      **E-paper** 400x300
VCC-------------->     VCC
GND-------------->    GND
PB22------------->     DIN(MOSI)
PB23------------->     CLK
PA14-------------->    CS
PB02------------->     DC
PA16------------ ->     RST
PA08------------->     BUSY

int main(void)
    spi_t bus = SPI_DEV(1);
    spi_cs_t cs = (spi_cs_t)GPIO_PIN(PA, 14);
    spi_mode_t mode = SPI_MODE_1;
    spi_clk_t clk = SPI_CLK_10MHZ;
    gpio_t dc = (gpio_t)GPIO_PIN(PB,2);
    gpio_t reset = (gpio_t)GPIO_PIN(PA,16);

    spi_acquire(bus, cs, mode, clk);
    for (uint16_t i = 0; i < (32*32) - 1; i++) {
        spi_transfer_byte(bus, cs, true, 0xff);
    char line_buf[SHELL_DEFAULT_BUFSIZE];
    shell_run(NULL, line_buf, SHELL_DEFAULT_BUFSIZE);
    return 0;

No error has been found while compiling using `make flash term`. But nothing happened on my display. I thing I did miss something here, but I don't know what is missing.
i would very much appreciate for your helps.
### Useful links
<!-- Please include links to any documentation that you think is useful. -->
<!-- Thanks for contributing! -->

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190627/d954ecf0/attachment.html>

More information about the notifications mailing list