forked from Foundation-Devices/passport2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodpassport_lv.c
44 lines (37 loc) · 1.51 KB
/
modpassport_lv.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// SPDX-FileCopyrightText: © 2020 Foundation Devices, Inc. <[email protected]>
//
// SPDX-License-Identifier: GPL-3.0-or-later
//
// This code is specific to the Passport hardware build only. It is not shared
// with the unix simulator.
#include "py/obj.h"
// For lcd_deinit
#ifdef SCREEN_MODE_MONO
#include "lcd-sharp-ls018b7dh02.h"
#endif
#ifdef SCREEN_MODE_COLOR
#include "lcd-st7789.h"
#endif
#include "modpassport_lv-lcd.h"
#include "modpassport_lv-keypad.h"
/// package: passport_lv
/* Module Global configuration */
/* Define all properties of the module.
* Table entries are key/value pairs of the attribute name (a string)
* and the MicroPython object reference.
* All identifiers and strings are written as MP_QSTR_xxx and will be
* optimized to word-sized integers by the build system (interned strings).
* NOTE: Keep modules in alphabetical order.
*/
STATIC const mp_rom_map_elem_t passport_lv_module_globals_table[] = {
{MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_passport_lv)},
{MP_ROM_QSTR(MP_QSTR_lcd), MP_ROM_PTR(&mod_passport_lv_lcd_module)},
{MP_ROM_QSTR(MP_QSTR_Keypad), MP_ROM_PTR(&mod_passport_lv_Keypad_type)},
};
STATIC MP_DEFINE_CONST_DICT(passport_lv_module_globals, passport_lv_module_globals_table);
/* Define module object. */
const mp_obj_module_t passport_lv_user_cmodule = {
.base = {&mp_type_module},
.globals = (mp_obj_dict_t*)&passport_lv_module_globals,
};
MP_REGISTER_MODULE(MP_QSTR_passport_lv, passport_lv_user_cmodule, PASSPORT_FOUNDATION_ENABLED);