more q1 capabilities
This commit is contained in:
parent
f02b6aa9de
commit
82cf526f43
@ -75,7 +75,7 @@ def serial_number():
|
||||
def probe_system():
|
||||
# run-once code to determine what hardware we are running on
|
||||
global hw_label, has_608, is_factory_mode, is_devmode
|
||||
global has_se2, mk_num, has_nfc, has_qr, num_sd_slots
|
||||
global has_se2, mk_num, has_nfc, has_qr, num_sd_slots, has_qwerty, has_battery
|
||||
global MAX_UPLOAD_LEN, MAX_TXN_LEN
|
||||
|
||||
from sigheader import RAM_BOOT_FLAGS, RBF_FACTORY_MODE
|
||||
@ -87,18 +87,22 @@ def probe_system():
|
||||
has_qr = False # QR scanner
|
||||
num_sd_slots = 1 # might have dual slots on Q1
|
||||
mk_num = 4
|
||||
has_battery = False
|
||||
has_qwerty = False
|
||||
|
||||
cpuid = ckcc.get_cpu_id()
|
||||
assert cpuid == 0x470 # STM32L4S5VI
|
||||
|
||||
# detect Q1 based on pins.csv
|
||||
try:
|
||||
machine.Pin('LCD_TEAR') # only on Q1 build, will error otherwise
|
||||
machine.Pin('LCD_TEAR') # only defined on Q1 build, will error otherwise
|
||||
has_qr = True
|
||||
num_sd_slots = 2
|
||||
hw_label = 'q1'
|
||||
has_battery = True
|
||||
has_qwerty = True
|
||||
# but, still mk_num = 4
|
||||
except:
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
# Boot loader needs to tell us stuff about how we were booted, sometimes:
|
||||
|
||||
@ -42,6 +42,8 @@ has_psram = True
|
||||
has_nfc = True
|
||||
has_qr = False
|
||||
num_sd_slots = 1
|
||||
has_battery = False
|
||||
has_qwerty = False
|
||||
|
||||
if '--mk1' in sys.argv:
|
||||
# doubt this works still
|
||||
@ -75,6 +77,8 @@ if '--q1' in sys.argv:
|
||||
hw_label = 'q1'
|
||||
has_qr = True
|
||||
num_sd_slots = 2
|
||||
has_battery = True
|
||||
has_qwerty = True
|
||||
|
||||
from public_constants import MAX_TXN_LEN, MAX_UPLOAD_LEN
|
||||
from public_constants import MAX_TXN_LEN_MK4, MAX_UPLOAD_LEN_MK4
|
||||
|
||||
Loading…
Reference in New Issue
Block a user