#ifndef HW_LCD_H
#define HW_LCD_H
-#include <cfg/macros.h> /* BV() */
-#include <cfg/debug.h>
+#include "cfg/macros.h" /* BV() */
+#include "cfg/debug.h"
+#include "cfg/cfg_lcd.h" /* CONFIG_LCD_4BIT */
#include <cpu/attr.h>
#include <cpu/irq.h>
#define LCD_WRITE(x) lm3s_ssiWriteFrame(SSI0_BASE, x)
/* Read data from the display */
-#define LCD_READ() \
+#define LCD_READ \
({ \
uint32_t frame; \
lm3s_ssiReadFrame(SSI0_BASE, &frame); \
SYSCTL_RCGC1_R |= SYSCTL_RCGC1_SSI0;
SYSCTL_RCGC2_R |= SYSCTL_RCGC2_GPIOA;
SYSCTL_RCGC2_R |= SYSCTL_RCGC2_GPIOH;
- __delay(512);
+ lm3s_busyWait(512);
/* Configure the SSI0CLK and SSIOTX pins for SSI operation. */
lm3s_gpio_pin_config(GPIO_PORTA_BASE, BV(2) | BV(3) | BV(5),