ls027b7dh01_open ls027b7dh01_begin_draw navigation bar

Table of Contents

ls027b7dh01_close

Closes a Sharp LS027B7DH01 LCD display.

Description

The ls027b7dh01_close function closes the Sharp LS027B7DH01 LCD display, releasing any allocated resources. Once the display has been closed, the display handle is no longer valid and may not be used.

Prototype

t_error
ls027b7dh01_close(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 display is closed successfully. 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_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