aboutsummaryrefslogtreecommitdiffstats
path: root/src/lcd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lcd.c')
-rw-r--r--src/lcd.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lcd.c b/src/lcd.c
index 1c29d54..69be7d4 100644
--- a/src/lcd.c
+++ b/src/lcd.c
@@ -3,6 +3,8 @@
#include <gpio.h>
#include <string.h>
+//#define USE_DELAY
+
#define LCD_D0 GPIO_PORT(A, 0)
#define LCD_D1 GPIO_PORT(A, 1)
#define LCD_D2 GPIO_PORT(A, 4)
@@ -19,7 +21,12 @@
void lcd_pulse(void)
{
gpio_dout(LCD_E, 1);
+#ifdef USE_DELAY
delay(1);
+#else
+ for (uint16_t i = 0; i < 10000; i++)
+ asm("");
+#endif // USE_DELAY
gpio_dout(LCD_E, 0);
}