ls027b7dh01_begin_draw ls027b7dh01_print navigation bar

Table of Contents

ls027b7dh01_end_draw

Takes the Sharp LS027B7DH01 LCD display out of drawing mode.

Description

The ls027b7dh01_end_draw function takes the Sharp LS027B7DH01 LCD display out of drawing mode and updates the display. This allows both graphics and text to be mixed on the display as an atomic update.

Prototype

t_error
ls027b7dh01_end_draw(t_ls027b7dh01 display);
    

Parameters

t_ls027b7dh01 display

A handle to the display returned by the ls027b7dh01_open function.

Return value

The return value is 0 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) {
    ls027b7dh01_begin_draw(display);
    ls027b7dh01_draw_image(display, 0, 0, 400, 240, background_image);
    ls027b7dh01_print(display, 6, 9, "Quanser", 7);
    ls027b7dh01_end_draw(display);
    ...
    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

 

navigation bar