forked from Foundation-Devices/passport-firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
common.py
72 lines (51 loc) · 1.19 KB
/
common.py
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# SPDX-FileCopyrightText: 2020 Foundation Devices, Inc. <[email protected]>
# SPDX-License-Identifier: GPL-3.0-or-later
#
# Get the async event loop to pass in where needed
loop = None
# System
system = None
# Keypad
keypad = None
# Internal flash-based settings
settings = None
# External SPI flash cache
flash_cache = None
# Display
dis = None
# Camera buffers
qr_buf = None
viewfinder_buf = None
# PinAttempts
pa = None
# External SPI Flash
sf = None
# Avalanche noise source
noise = None
# Battery level
battery_voltage = 0
battery_level = 100
# Demo
demo_active = False
demo_count = 0
# Last time the user interacted (i.e., pressed/released any key)
import utime
last_activity_time = utime.ticks_ms()
# Screenshot mode
screenshot_mode_enabled = False
# Snapshot mode
snapshot_mode_enabled = False
# Power monitor
powermon = None
# Battery Monitor
enable_battery_mon = False
# Active account
active_account = None
# Multisig wallet to associate with New Account flow
new_multisig_wallet = None
is_new_wallet_a_duplicate = False
# The QRTYpe of the last QR code that was scanned
last_scanned_qr_type = None
last_scanned_ur_prefix = None
# Cached Developer PubKey
cached_pubkey = None