Open
Conversation
* pifacecad_lcd_right_to_left and pifacecad_lcd_autoscroll_off modified
cur_display_control instead of cur_entry_mode.
* The descriptions of function in pifacecad.h had been copy and
pasted, but the function names was not updated in the examples.
pifacecad.c
void pifacecad_lcd_right_to_left(void)
// This will 'right justify' text from the cursor
void pifacecad_lcd_autoscroll_on(void)
{
- cur_display_control |= LCD_ENTRYSHIFTINCREMENT;
- pifacecad_lcd_send_command(LCD_ENTRYMODESET | cur_display_control);
+ cur_entry_mode |= LCD_ENTRYSHIFTINCREMENT;
+ pifacecad_lcd_send_command(LCD_ENTRYMODESET | cur_entry_mode);
}
// This will 'left justify' text from the cursor
void pifacecad_lcd_autoscroll_off(void)
{
- cur_display_control &= 0xff ^ LCD_ENTRYSHIFTINCREMENT;
- pifacecad_lcd_send_command(LCD_ENTRYMODESET | cur_display_control);
+ cur_entry_mode &= 0xff ^ LCD_ENTRYSHIFTINCREMENT;
+ pifacecad_lcd_send_command(LCD_ENTRYMODESET | cur_entry_mode);
}
pifacecad.h
- * pifacecad_lcd_display_on();
+ * pifacecad_lcd_blink_on();
- * pifacecad_lcd_display_off();
+ * pifacecad_lcd_blink_off();
- * pifacecad_lcd_display_on();
+ * pifacecad_lcd_cursor_on();
- * pifacecad_lcd_display_off();
+ * pifacecad_lcd_cursor_off();
- * pifacecad_lcd_display_on();
+ * pifacecad_lcd_backlight_on();
- * pifacecad_lcd_display_off();
+ * pifacecad_lcd_backlight_off();
Added utility funcitons: void pifacecad_lcd_display_control(uint8_t attr, uint8_t state); void pifacecad_lcd_entry_mode(uint8_t attr, uint8_t state); Added functions that take a parameter instead of having to call two diffrerent functions for turning a thing on or off. void pifacecad_lcd_display(uint8_t state) void pifacecad_lcd_blink(uint8_t state) void pifacecad_lcd_cursor(uint8_t state) void pifacecad_lcd_autoscroll(uint8_t state)
-static const uint8_t ROW_OFFSETS[] = {0, 0x40};
+static const uint8_t ROW_OFFSETS[] = {0, 40};
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pifacecad_lcd_right_to_left and pifacecad_lcd_autoscroll_off modified
cur_display_control instead of cur_entry_mode.
The descriptions of function in pifacecad.h had been copy and
pasted, but the function names was not updated in the examples.
pifacecad.c
void pifacecad_lcd_right_to_left(void)
// This will 'right justify' text from the cursor
void pifacecad_lcd_autoscroll_on(void)
{
}
// This will 'left justify' text from the cursor
void pifacecad_lcd_autoscroll_off(void)
{
}
pifacecad.h