Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entry mode flags are confusing #68

Open
iflyhigh opened this issue Apr 2, 2023 · 0 comments
Open

Entry mode flags are confusing #68

iflyhigh opened this issue Apr 2, 2023 · 0 comments
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement

Comments

@iflyhigh
Copy link

iflyhigh commented Apr 2, 2023

Current implementation is confusing. Entry mode set command uses 2 bits - lowest one is for disabling (0) or enabling (1) display shift, and shift direction is specified by second bit (0 shifts right, 1 shifts left). Second bit itself is used to increment (1) or decrement (0) the DDRAM address (cursor position) when new character is put to DDRAM.

Suggesting the following naming:

// flags for display entry mode
#define LCD_ENTRYSHIFTDISABLE 0x00
#define LCD_ENTRYSHIFTENABLE 0x01
#define LCD_ENTRYDECREMENTADDRESS 0x00
#define LCD_ENTRYINCREMENTADDRESS 0x02
#define LCD_ENTRYRIGHTTOLEFT LCD_ENTRYDECREMENTADDRESS
#define LCD_ENTRYLEFTTORIGHT LCD_ENTRYINCREMENTADDRESS 
@per1234 per1234 added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Apr 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

No branches or pull requests

2 participants