Table of Contents
ls027b7dh01_set_inversion
Determines whether to invert the colours of the Sharp LS027B7DH01 LCD display.
Description
The ls027b7dh01_set_inversion function determines whether to invert the colours of the display so that text appears as white text on a black background, instead of black text on a white background. Inverted output is also known as "dark mode".
Prototype
t_error ls027b7dh01_set_inversion(t_ls027b7dh01 display, t_boolean invert);
Parameters
t_ls027b7dh01 display
A handle to the display returned by the ls027b7dh01_open function.
t_boolean invert
Set to true to invert the colours of the display so that text appears as white text on a black background. If this argument is false then text appears as black text on a white background.
Return value
The return value is zero if the operation is successful. Otherwise a negative
error code is returned. Error codes are
defined in quanser_errors.h
. A suitable error message
may be retrieved using msg_get_error_message.
Error codes
QERR_INVALID_ARGUMENT
One of the arguments is invalid.
Requirements
Include Files |
Libraries |
---|---|
quanser_lcd_display.h |
quanser_devices.lib;quanser_communications.lib;quanser_runtime.lib;quanser_common.lib |
Examples
t_ls027b7dh01 display; t_error result = ls027b7dh01_open("spi-cpu://localhost:1?word='8',baud='45000000',polarity='on',phase='on',memsize='8192',frame='0'", LCD_ACCESS_EXCLUSIVE, &display); if (result == 0) { const char message[] = "Hello world!"; ls027b7dh01_set_inversion(display, true); /* Dark mode */ ls027b7dh01_print(display, 0, 0, message, ARRAY_LENGTH(message)); ... ls027b7dh01_close(display); } else { TCHAR message[512]; msg_get_error_message(NULL, result, message, sizeof(message)); _tprintf(_T("Failed to open LCD display. %s (error %d)\n"), message, -result); }
See Also
Copyright ©2024 Quanser Inc. This page was generated 2024-10-17. Submit feedback to Quanser about this page.
Link to this page.