Skip to content

Entry mode flags are confusing #68

Open
@iflyhigh

Description

@iflyhigh

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 

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: codeRelated to content of the project itselftype: enhancementProposed improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions