Måns Fällman
/
EmbeddedTest3
EmbeddedTest3
Diff: main.cpp
- Revision:
- 0:971a1052693c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Apr 14 09:23:35 2020 +0000 @@ -0,0 +1,44 @@ +#include "mbed.h" +#include "SLCD.h" + +DigitalOut led(LED_RED); + +SLCD slcd; +void lcd_write(char ch) +{ + slcd.putc(ch); +} + +void lcd_set_cursor(uint8_t pos) +{ + slcd.CharPosition = pos; +} + +void lcd_clear() +{ + slcd.clear(); +} + +void lcd_write_string(const char *str, size_t size) +{ + +} + +int main() +{ + const char s1[] = "1234"; + const char s2[] = "12\f34"; + const char s3[] = "1\s2"; + /* + lcd_write_string(s1,...); + wait(5.0f); + lcd_write_string(s2,...); + wait(5.0f); + lcd_write_string(s3,...); + wait(5.0f); + */ + while (true) { + led = !led; // toggle led + wait(0.2f); + } +} \ No newline at end of file