diff options
-rw-r--r-- | anzeige.c | 7 | ||||
-rw-r--r-- | multiplexer.c | 8 |
2 files changed, 11 insertions, 4 deletions
@@ -51,15 +51,16 @@ int main(int argc, char **argv) } memset(text_buffer, 0, TEXT_BUFFER_LENGTH); - ret_val = gadgets_retrieve_weather_warnings(text_buffer,TEXT_BUFFER_LENGTH); +/* ret_val = gadgets_retrieve_weather_warnings(text_buffer,TEXT_BUFFER_LENGTH); if (ret_val) { free(text_buffer); exit(ret_val); - } + }*/ + strcpy(text_buffer, "ABCDEFGHIJKLMNO"); scroll_buffers[0].scroll_len = render(text_buffer, TEXT_BUFFER_LENGTH, scroll_buffers[0].buf, sizeof(scroll_buffers[0].buf), 1); - for (i=0; i<250; i++) { + for (i=0; i>=0; i++) { usleep(100000); for (j=0; j<40; j++) display_data.buf[(display_data.should_buf+1)%3][j] = scroll_buffers[0].buf[(i+j) % scroll_buffers[0].scroll_len]; diff --git a/multiplexer.c b/multiplexer.c index 474f7e6..c81864b 100644 --- a/multiplexer.c +++ b/multiplexer.c @@ -81,20 +81,26 @@ void *put_on_display(void *param) for (column=0; column<8; column++) { GPIO_CLR = 1<<SER_CLK_PIN; GPIO_ALTER(column == line) = 1<<SER_DAT_PIN; + usleep(25); GPIO_SET = 1<<SER_CLK_PIN; + usleep(25); } for (column=39; column>=0; column--) { GPIO_CLR = 1<<SER_CLK_PIN; GPIO_ALTER((*(display_data -> buf[display_data -> is_buf] + column)>>line) & 0x01) = 1<<SER_DAT_PIN; + usleep(250); GPIO_SET = 1<<SER_CLK_PIN; + usleep(250); #endif } - usleep(1000); #ifdef SKIP_GPIO + usleep(1000); printf("\n"); #else GPIO_SET = 1<<GATE_PIN; // Licht aus + usleep(250); GPIO_CLR = 1<<PAR_CLK_PIN; + usleep(250); GPIO_SET = 1<<PAR_CLK_PIN; #endif } |