diff options
author | Erich Eckner <git@eckner.net> | 2018-11-05 13:39:36 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-11-05 13:39:36 +0100 |
commit | c6454367c84a99a4b17b69117f6eb803da610e72 (patch) | |
tree | e5deb68905529bafd4e8d2c93f6f976cda4551bf | |
parent | 93fa65bd29cf735f680ed112c9b0a6ee012f21cb (diff) | |
download | anzeige-c6454367c84a99a4b17b69117f6eb803da610e72.tar.xz |
multiplexer: wait_tpic_settle_time new
-rw-r--r-- | multiplexer.c | 8 | ||||
-rw-r--r-- | multiplexer.h | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/multiplexer.c b/multiplexer.c index db1c572..50da183 100644 --- a/multiplexer.c +++ b/multiplexer.c @@ -92,14 +92,18 @@ void *put_on_display(void *param) break; } for (column=0; column<8; column++) { - GPIO_CLR = 1<<SER_CLK_PIN; GPIO_ALTER(column + line == 7) = 1<<SER_DAT_PIN; + GPIO_CLR = 1<<SER_CLK_PIN; + wait_tpic_settle_time GPIO_SET = 1<<SER_CLK_PIN; + wait_tpic_settle_time } for (column=39; column>=0; column--) { - GPIO_CLR = 1<<SER_CLK_PIN; GPIO_ALTER(display_data -> buf[display_data -> is_buf][column] & (0x01 << line)) = 1<<SER_DAT_PIN; + GPIO_CLR = 1<<SER_CLK_PIN; + wait_tpic_settle_time GPIO_SET = 1<<SER_CLK_PIN; + wait_tpic_settle_time #endif // SKIP_GPIO } #ifdef SKIP_GPIO diff --git a/multiplexer.h b/multiplexer.h index 738d6ad..4f94f17 100644 --- a/multiplexer.h +++ b/multiplexer.h @@ -49,6 +49,8 @@ static uint8_t gpioToPUDCLK [] = #define SCROLL_BUF_LEN 4096 +#define wait_tpic_settle_time for (int i=0; i<100; i++) { asm volatile("" : : "r" (i)); } + int mem_fd; void *gpio_map; |