Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- uint8_t yPosition = LCD_LINE1;
- uint8_t xPosition = 0;
- void LCD_Locate(uint8_t x, uint8_t y)
- {
- switch (y)
- {
- case 0:
- y = LCD_LINE1;
- break;
- case 1:
- y = LCD_LINE2;
- break;
- }
- xPosition = x;
- ##
- ##
- t yPosition = LCD_LINE1;
- uint8_t xPosition = 0;
- void LCD_Locate(uint8_t x, uint8_t y)
- {
- switch (y)
- {
- case 0:
- y = LCD_LINE1;
- break;
- case 1:
- y = LCD_LINE2;
- break;
- }
- xPosition = x;
- ##
- {
- case 0:
- y = LCD_LINE1;
- break;
- case 1:
- y = LCD_LINE2;
- break;
- }
- xPosition = x;
- yPosition = y;
- LCD_WriteCmd((LCDC_SET_DDRAM | (y + x)));
- }
- void LCD_Char(char c)
- {
- xPosition++;
- ##
- r)
- {
- char c;
- while ((c = *(str++)))
- {
- LCD_Position();
- LCD_Char(c);
- }
- }
- void LCD_Position(){
- if (xPosition > 15 && yPosition == LCD_LINE1)
- {
- yPosition = LCD_LINE2;
- LCD_Locate(
- ##
- ition = LCD_LINE2;
- LCD_Locate(0, 1);
- }
- else if (xPosition > 15 && yPosition == LCD_LINE2)
- {
- yPosition = LCD_LINE1;
- LCD_Locate(0, 0);
- }
- }
- ##
- https://pastebin.com/raw/cAh0JBXb
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement