Skip to content

Commit 9979ec1

Browse files
committed
Fix port initialization
1 parent 3b3d117 commit 9979ec1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

library/lcd/lcd.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
void lcd_init(void)
2121
{
2222
// Initialize LCD command and data lines
23-
LCD_PORT_DATA.DIRSET = LCD_RS | LCD_E;
24-
LCD_PORT_CTRL.DIRSET = LCD_DB3 | LCD_DB2 | LCD_DB1 | LCD_DB0;
23+
LCD_PORT_CTRL.DIRSET = LCD_RS | LCD_E;
24+
LCD_PORT_DATA.DIRSET = LCD_DB3 | LCD_DB2 | LCD_DB1 | LCD_DB0;
2525

26-
LCD_PORT_DATA.OUTCLR = LCD_RS | LCD_E;
27-
LCD_PORT_CTRL.OUTCLR = LCD_DB3 | LCD_DB2 | LCD_DB1 | LCD_DB0;
26+
LCD_PORT_CTRL.OUTCLR = LCD_RS | LCD_E;
27+
LCD_PORT_DATA.OUTCLR = LCD_DB3 | LCD_DB2 | LCD_DB1 | LCD_DB0;
2828

2929
// Wait until LCD has started
3030
_delay_ms(LCD_STARTUP_TIME);

0 commit comments

Comments
 (0)