X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=examples%2Flm3s1968%2Fhw%2Fhw_lcd.h;h=ed2ede9e251cdc4b3e04d79059c043221fd10b48;hb=7d62f20a0d0dd38aa03997583c69bbc085896308;hp=dd2d88d79d6bb45ec8a01ff4e3f7801f6d54b67b;hpb=0a4053ecfc25acc4b20c527ec8019e57498eb2e7;p=bertos.git diff --git a/examples/lm3s1968/hw/hw_lcd.h b/examples/lm3s1968/hw/hw_lcd.h index dd2d88d7..ed2ede9e 100644 --- a/examples/lm3s1968/hw/hw_lcd.h +++ b/examples/lm3s1968/hw/hw_lcd.h @@ -40,6 +40,7 @@ #include "cfg/macros.h" /* BV() */ #include "cfg/debug.h" +#include "cfg/cfg_lcd.h" /* CONFIG_LCD_4BIT */ #include #include @@ -68,17 +69,17 @@ */ /* Enter command mode */ #define LCD_SET_COMMAND() \ - lm3s_gpio_pin_write(GPIO_PORTH_BASE, GPIO_OLEDDC_PIN, 0) + lm3s_gpioPinWrite(GPIO_PORTH_BASE, GPIO_OLEDDC_PIN, 0) /* Enter data mode */ #define LCD_SET_DATA() \ - lm3s_gpio_pin_write(GPIO_PORTH_BASE, GPIO_OLEDDC_PIN, GPIO_OLEDDC_PIN) + lm3s_gpioPinWrite(GPIO_PORTH_BASE, GPIO_OLEDDC_PIN, GPIO_OLEDDC_PIN) /* Send data to the display */ #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); \ @@ -100,16 +101,16 @@ INLINE void lcd_bus_init(void) 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), + lm3s_gpioPinConfig(GPIO_PORTA_BASE, BV(2) | BV(3) | BV(5), GPIO_DIR_MODE_HW, GPIO_STRENGTH_8MA, GPIO_PIN_TYPE_STD_WPU); /* * Configure the GPIO port pin used as a D/C# signal (data/command * control) for OLED device, and the port pin used to enable power to * the OLED panel. */ - lm3s_gpio_pin_config(GPIO_PORTH_BASE, GPIO_OLEDDC_PIN | GPIO_OLEDEN_PIN, + lm3s_gpioPinConfig(GPIO_PORTH_BASE, GPIO_OLEDDC_PIN | GPIO_OLEDEN_PIN, GPIO_DIR_MODE_OUT, GPIO_STRENGTH_8MA, GPIO_PIN_TYPE_STD); - lm3s_gpio_pin_write(GPIO_PORTH_BASE, GPIO_OLEDDC_PIN | GPIO_OLEDEN_PIN, + lm3s_gpioPinWrite(GPIO_PORTH_BASE, GPIO_OLEDDC_PIN | GPIO_OLEDEN_PIN, GPIO_OLEDDC_PIN | GPIO_OLEDEN_PIN); /* Configure the SSI0 port for master mode */ @@ -119,7 +120,7 @@ INLINE void lcd_bus_init(void) * Configure the GPIO port pin used as a D/Cn signal for OLED device, * and the port pin used to enable power to the OLED panel. */ - lm3s_gpio_pin_config(GPIO_PORTA_BASE, GPIO_OLEDEN_PIN, + lm3s_gpioPinConfig(GPIO_PORTA_BASE, GPIO_OLEDEN_PIN, GPIO_DIR_MODE_HW, GPIO_STRENGTH_8MA, GPIO_PIN_TYPE_STD_WPU); /* Drain the SSI RX FIFO */