upm
1.7.1
Sensor/Actuator repository for libmraa (v2.0.0)
|
Go to the source code of this file.
Data Structures | |
struct | _jhd1313m1_context |
Functions | |
jhd1313m1_context | jhd1313m1_init (int bus, int lcd_addr, int rgb_addr) |
void | jhd1313m1_close (jhd1313m1_context dev) |
upm_result_t | jhd1313m1_write (const jhd1313m1_context dev, char *buffer, int len) |
upm_result_t | jhd1313m1_set_cursor (const jhd1313m1_context dev, unsigned int row, unsigned int column) |
upm_result_t | jhd1313m1_clear (const jhd1313m1_context dev) |
upm_result_t | jhd1313m1_home (const jhd1313m1_context dev) |
upm_result_t | jhd1313m1_set_color (const jhd1313m1_context dev, uint8_t r, uint8_t g, uint8_t b) |
upm_result_t | jhd1313m1_create_char (const jhd1313m1_context dev, unsigned int slot, char *data) |
upm_result_t | jhd1313m1_display_on (const jhd1313m1_context dev, bool on) |
upm_result_t | jhd1313m1_cursor_on (const jhd1313m1_context dev, bool on) |
upm_result_t | jhd1313m1_cursor_blink_on (const jhd1313m1_context dev, bool on) |
upm_result_t | jhd1313m1_backlight_on (const jhd1313m1_context dev, bool on) |
upm_result_t | jhd1313m1_scroll (const jhd1313m1_context dev, bool direction) |
upm_result_t | jhd1313m1_scroll_display_left (const jhd1313m1_context dev) |
upm_result_t | jhd1313m1_scroll_display_right (const jhd1313m1_context dev) |
upm_result_t | jhd1313m1_entry_left_to_right (const jhd1313m1_context dev, bool on) |
upm_result_t | jhd1313m1_autoscroll_on (const jhd1313m1_context dev, bool on) |
upm_result_t | jhd1313m1_command (const jhd1313m1_context dev, uint8_t cmd) |
upm_result_t | jhd1313m1_data (const jhd1313m1_context dev, uint8_t data) |
Typedefs | |
typedef struct _jhd1313m1_context * | jhd1313m1_context |
jhd1313m1_context jhd1313m1_init | ( | int | bus, |
int | lcd_addr, | ||
int | rgb_addr | ||
) |
JHD1313M1 I2C initialization.
bus | I2C bus to use. |
lcd_addr | I2C address the LCD controller is on. |
rgb_addr | I2C address the RGB backlight controller is on. |
void jhd1313m1_close | ( | jhd1313m1_context | dev | ) |
JHD1313M1 close.
dev | The device context. |
upm_result_t jhd1313m1_write | ( | const jhd1313m1_context | dev, |
char * | buffer, | ||
int | len | ||
) |
Writes a string to the LCD.
dev | The device context. |
buffer | Character buffer containing characters to write to the display; note: only ASCII characters are supported |
len | The number of characters to write. |
upm_result_t jhd1313m1_set_cursor | ( | const jhd1313m1_context | dev, |
unsigned int | row, | ||
unsigned int | column | ||
) |
Sets the cursor to specified coordinates
dev | The device context. |
row | Row to set the cursor to. |
column | Column to set the cursor to. |
upm_result_t jhd1313m1_clear | ( | const jhd1313m1_context | dev | ) |
Clears the display of all characters.
dev | The device context. |
upm_result_t jhd1313m1_home | ( | const jhd1313m1_context | dev | ) |
Returns to the home coordinates (0,0).
dev | The device context. |
upm_result_t jhd1313m1_set_color | ( | const jhd1313m1_context | dev, |
uint8_t | r, | ||
uint8_t | g, | ||
uint8_t | b | ||
) |
Sets the color of the backlight Can be used to change the color even when the backlight is off
dev | The device context. |
r | 0-255 value for red |
g | 0-255 value for green |
b | 0-255 value for blue |
upm_result_t jhd1313m1_create_char | ( | const jhd1313m1_context | dev, |
unsigned int | slot, | ||
char * | data | ||
) |
Create a custom character.
dev | The device context. |
slot | The character slot to write, only 8 are available. |
data | The character data (8 bytes) making up the character. |
upm_result_t jhd1313m1_display_on | ( | const jhd1313m1_context | dev, |
bool | on | ||
) |
Turn the display on.
dev | The device context. |
on | true to turn display on, false otherwise. |
upm_result_t jhd1313m1_cursor_on | ( | const jhd1313m1_context | dev, |
bool | on | ||
) |
Turn the cursor on.
dev | The device context. |
on | true to turn cursor on, false otherwise. |
upm_result_t jhd1313m1_cursor_blink_on | ( | const jhd1313m1_context | dev, |
bool | on | ||
) |
Turn cursor blink on.
dev | The device context. |
on | true to turn cursor blink on, false otherwise. |
upm_result_t jhd1313m1_backlight_on | ( | const jhd1313m1_context | dev, |
bool | on | ||
) |
Turn backlight on.
dev | The device context. |
on | true to turn backlight on, false otherwise. |
upm_result_t jhd1313m1_scroll | ( | const jhd1313m1_context | dev, |
bool | direction | ||
) |
Makes the LCD scroll text
direction | True if scrolling to the right, false otherwise |
upm_result_t jhd1313m1_scroll_display_left | ( | const jhd1313m1_context | dev | ) |
Scroll the display left, without changing the character RAM.
dev | The device context. |
upm_result_t jhd1313m1_scroll_display_right | ( | const jhd1313m1_context | dev | ) |
Scroll the display right, without changing the character RAM.
dev | The device context. |
upm_result_t jhd1313m1_entry_left_to_right | ( | const jhd1313m1_context | dev, |
bool | on | ||
) |
Set the entry mode so that characters are added left to right.
dev | The device context. |
on | true to add characters left to right, false for right to left. |
upm_result_t jhd1313m1_autoscroll_on | ( | const jhd1313m1_context | dev, |
bool | on | ||
) |
Right justify text entered from the cursor.
dev | The device context. |
on | true right justify text, false to left justify text. |
upm_result_t jhd1313m1_command | ( | const jhd1313m1_context | dev, |
uint8_t | cmd | ||
) |
Send a command byte to the LCD controller. This is a low level function that should not be used directly unless you know what you are doing.
dev | The device context. |
cmd | The command byte to send. |
upm_result_t jhd1313m1_data | ( | const jhd1313m1_context | dev, |
uint8_t | data | ||
) |
Send a data byte the LCD controller. This is a low level function that should not be used directly unless you know what you are doing.
dev | The device context. |
cmd | The command byte to send. |
typedef struct _jhd1313m1_context * jhd1313m1_context |
Device context