Mbed OS version of IoT.js implementation running on GR-PEACH

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers iotjs_module_display.h Source File

iotjs_module_display.h

00001 /* Copyright 2017-present Renesas Electronics Corporation and other contributors
00002  *
00003  * Licensed under the Apache License, Version 2.0 (the "License");
00004  * you may not use this file except in compliance with the License.
00005  * You may obtain a copy of the License at
00006  *
00007  *     http://www.apache.org/licenses/LICENSE-2.0
00008  *
00009  * Unless required by applicable law or agreed to in writing, software
00010  * distributed under the License is distributed on an "AS IS" BASIS
00011  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00012  * See the License for the specific language governing permissions and
00013  * limitations under the License.
00014  */
00015 
00016 #ifndef IOTJS_MODULE_DISPLAY_H
00017 #define IOTJS_MODULE_DISPLAY_H
00018 
00019 #include "iotjs_def.h"
00020 #include "iotjs_handlewrap.h"
00021 #include "iotjs_ext_module_periph_common.h"
00022 #include "iotjs_reqwrap.h"
00023 
00024 typedef struct iotjs_display_platform_data_s iotjs_display_platform_data_t;
00025 
00026 typedef struct {
00027   jerry_value_t jobject;
00028   iotjs_display_platform_data_t* platform_data;
00029 
00030   lcd_t lcd;                                /* display.open() */
00031   lcd_layer_t lcd_layer[LCDLAYER_MAX];      /* lcd.start() */
00032   lcd_layer_id_t layer_id[LCDLAYER_MAX];    /* lcd.stop() */
00033 } iotjs_display_t;
00034 
00035 bool iotjs_display_open(iotjs_display_t* display);
00036 bool iotjs_display_start(iotjs_display_t* display);
00037 bool iotjs_display_stop(iotjs_display_t* display);
00038 bool iotjs_display_update(iotjs_display_t* display);
00039 bool iotjs_display_close(iotjs_display_t* display);
00040 
00041 void iotjs_display_create_platform_data(iotjs_display_t* display);
00042 void iotjs_display_destroy_platform_data(iotjs_display_platform_data_t* pdata);
00043 jerry_value_t iotjs_display_set_platform_config(iotjs_display_t* display,
00044                                              const jerry_value_t jconfig);
00045 
00046 #endif /* IOTJS_MODULE_DISPLAY_H */