Commit 1c6e9de53ba47afacd26fb784818aeb63a01baad
Committed by
Anatolij Gustschin
1 parent
45ae2546ef
Exists in
master
and in
50 other branches
video, formike: change tag/val write
write first the "tag" 8 bit value and then the "val" 8-bit to the display. Tested on the rut board. Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Anatolij Gustschin <agust@denx.de>
Showing 1 changed file with 4 additions and 3 deletions Side-by-side Diff
drivers/video/formike.c
... | ... | @@ -27,10 +27,11 @@ |
27 | 27 | int ret; |
28 | 28 | |
29 | 29 | buf[0] = tag; |
30 | - buf[1] = val; | |
31 | - flags |= SPI_XFER_END; | |
30 | + ret = spi_xfer(spi, 8, buf, NULL, flags); | |
31 | + buf[0] = val; | |
32 | + flags = SPI_XFER_END; | |
33 | + ret = spi_xfer(spi, 8, buf, NULL, flags); | |
32 | 34 | |
33 | - ret = spi_xfer(spi, 16, buf, NULL, flags); | |
34 | 35 | #ifdef KWH043ST20_F01_SPI_DEBUG |
35 | 36 | printf("spi_write_tag_val: tag=%02X, val=%02X ret: %d\n", |
36 | 37 | tag, val, ret); |