ciaa-nxp/board_ciaa_edu_4337/src/ponchos/LCD4Bit.c
//non-core stuff --------------------------------------
//move the cursor to the given absolute position.  line numbers start at 0.
non-core stuff
move the cursor to the given absolute position.  line numbers start at 0.
non - core stuff move the cursor to the given absolute position . line numbers start at 0 .
void LCD4Bit_cursorTo(int line_num, int x){
	int addr;
	switch(line_num){
		case 0:addr = LCD_LINE_1_ADDRESS;break;
		case 1:addr = LCD_LINE_2_ADDRESS;break;
		case 2:addr = LCD_LINE_3_ADDRESS;break;
		case 3:addr = LCD_LINE_4_ADDRESS;break;
		default:addr = LCD_LINE_1_ADDRESS;break;
	}
	currentLineNumber = line_num;
	if(line_num>=4)
		currentLineNumber=0;
	addr+=x;
	LCD4Bit_commandWrite(0x80|addr);
}
void LCD4Bit_cursorTo ( int line_num , int x ) { int addr ; switch ( line_num ) { case 0 : addr = LCD_LINE_1_ADDRESS ; break ; case 1 : addr = LCD_LINE_2_ADDRESS ; break ; case 2 : addr = LCD_LINE_3_ADDRESS ; break ; case 3 : addr = LCD_LINE_4_ADDRESS ; break ; default : addr = LCD_LINE_1_ADDRESS ; break ; } currentLineNumber = line_num ; if ( line_num >= 4 ) currentLineNumber = 0 ; addr += x ; LCD4Bit_commandWrite ( 0x80 | addr ) ; }
non-core stuff
move the cursor to the given absolute position.
non - core stuff move the cursor to the given absolute position .