mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-23 14:58:09 +00:00
import qualified const()
This commit is contained in:
parent
c9fbac7a0b
commit
407169af01
@ -1,3 +1,4 @@
|
|||||||
|
from micropython import const
|
||||||
from trezor import config
|
from trezor import config
|
||||||
|
|
||||||
|
|
||||||
@ -14,4 +15,4 @@ def set_storage(session_id, buf):
|
|||||||
|
|
||||||
|
|
||||||
def clear_storage(session_id):
|
def clear_storage(session_id):
|
||||||
set_storage(session_id, '')
|
set_storage(session_id, b'')
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
from micropython import const
|
||||||
from trezor import wire, ui
|
from trezor import wire, ui
|
||||||
from trezor.utils import unimport, chunks
|
from trezor.utils import unimport, chunks
|
||||||
|
|
||||||
|
@ -10,6 +10,8 @@ Value format: ((field_type, field_flags, field_name), field_value)
|
|||||||
field_value: Depends on field_type. EmbeddedMessage has `field_value == None`.
|
field_value: Depends on field_type. EmbeddedMessage has `field_value == None`.
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
|
|
||||||
def build_protobuf_message(message_type, callback, *args):
|
def build_protobuf_message(message_type, callback, *args):
|
||||||
message = message_type()
|
message = message_type()
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
from micropython import const
|
||||||
|
|
||||||
if not __debug__:
|
if not __debug__:
|
||||||
raise ImportError('This module can be loaded only in DEBUG mode')
|
raise ImportError('This module can be loaded only in DEBUG mode')
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
from micropython import const
|
||||||
import uio
|
import uio
|
||||||
import sys
|
import sys
|
||||||
import utime
|
import utime
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import utime
|
import utime
|
||||||
|
from micropython import const
|
||||||
from uheapq import heappop, heappush, heapify
|
from uheapq import heappop, heappush, heapify
|
||||||
from .utils import type_gen
|
from .utils import type_gen
|
||||||
from . import msg
|
from . import msg
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
from . import display, in_area, rotate_coords
|
from micropython import const
|
||||||
from trezor import ui, loop
|
from trezor import ui, loop
|
||||||
|
from . import display, in_area, rotate_coords
|
||||||
|
|
||||||
|
|
||||||
DEFAULT_BUTTON = {
|
DEFAULT_BUTTON = {
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
|
from micropython import const
|
||||||
|
from trezor import loop
|
||||||
from .button import Button, BTN_CLICKED, BTN_STARTED
|
from .button import Button, BTN_CLICKED, BTN_STARTED
|
||||||
from .button import CONFIRM_BUTTON, CONFIRM_BUTTON_ACTIVE
|
from .button import CONFIRM_BUTTON, CONFIRM_BUTTON_ACTIVE
|
||||||
from .button import CANCEL_BUTTON, CANCEL_BUTTON_ACTIVE
|
from .button import CANCEL_BUTTON, CANCEL_BUTTON_ACTIVE
|
||||||
from .loader import Loader
|
from .loader import Loader
|
||||||
from trezor import loop
|
|
||||||
|
|
||||||
|
|
||||||
CONFIRMED = const(1)
|
CONFIRMED = const(1)
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import utime
|
import utime
|
||||||
|
from micropython import const
|
||||||
from trezor import ui
|
from trezor import ui
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
from . import display
|
from micropython import const
|
||||||
from .button import Button, BTN_CLICKED, CLEAR_BUTTON, CLEAR_BUTTON_ACTIVE
|
|
||||||
from trezor import ui, res
|
|
||||||
from trezor.crypto import random
|
from trezor.crypto import random
|
||||||
|
from trezor import ui, res
|
||||||
|
from .button import Button, BTN_CLICKED, CLEAR_BUTTON, CLEAR_BUTTON_ACTIVE
|
||||||
|
from . import display
|
||||||
|
|
||||||
|
|
||||||
def digit_area(i):
|
def digit_area(i):
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
from .swipe import Swipe, SWIPE_UP, SWIPE_DOWN
|
from micropython import const
|
||||||
from trezor import loop, ui
|
from trezor import loop, ui
|
||||||
|
from .swipe import Swipe, SWIPE_UP, SWIPE_DOWN
|
||||||
|
|
||||||
|
|
||||||
async def change_page(page, page_count):
|
async def change_page(page, page_count):
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import utime
|
import utime
|
||||||
|
from micropython import const
|
||||||
from . import in_area, rotate_coords
|
|
||||||
from trezor import loop
|
from trezor import loop
|
||||||
|
from . import in_area, rotate_coords
|
||||||
|
|
||||||
|
|
||||||
SWIPE_DISTANCE_THRESHOLD = const(20) # Min pixels in the primary direction
|
SWIPE_DISTANCE_THRESHOLD = const(20) # Min pixels in the primary direction
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
from micropython import const
|
||||||
from trezor import ui
|
from trezor import ui
|
||||||
|
|
||||||
TEXT_HEADER_HEIGHT = const(44)
|
TEXT_HEADER_HEIGHT = const(44)
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
from micropython import const
|
||||||
import ustruct
|
import ustruct
|
||||||
import ubinascii
|
import ubinascii
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
from micropython import const
|
||||||
import ustruct
|
import ustruct
|
||||||
|
|
||||||
SESSION_V1 = const(0)
|
SESSION_V1 = const(0)
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
import ubinascii
|
import ubinascii
|
||||||
|
from micropython import const
|
||||||
from trezor import msg
|
from trezor import msg, loop, log
|
||||||
from trezor import loop
|
|
||||||
from trezor import log
|
|
||||||
|
|
||||||
_DEFAULT_IFACE = const(0)
|
_DEFAULT_IFACE = const(0)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user