Table of Contents
ls027b7dh01_set_rotation
Determines whether to rotate the Sharp LS027B7DH01 LCD display 180 degrees.
Description
The ls027b7dh01_set_rotation function determines whether to rotate the display 180 degrees.
Prototype
t_error ls027b7dh01_set_rotation(t_ls027b7dh01 display, t_boolean rotate);
Parameters
t_ls027b7dh01 display
A handle to the display returned by the ls027b7dh01_open function.
t_boolean rotate
Set to true to rotate the display 180 degrees. If this argument is false then the display is not rotated.
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_rotate(display, true); /* Rotate display */ 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.