forked from Foundation-Devices/passport2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdispatch.h
29 lines (26 loc) · 946 Bytes
/
dispatch.h
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
// SPDX-FileCopyrightText: © 2020 Foundation Devices, Inc. <[email protected]>
// SPDX-License-Identifier: GPL-3.0-or-later
//
// SPDX-FileCopyrightText: 2018 Coinkite, Inc. <coldcardwallet.com>
// SPDX-License-Identifier: GPL-3.0-only
//
/*
* (c) Copyright 2018 by Coinkite Inc. This file is part of Coldcard <coldcardwallet.com>
* and is covered by GPLv3 license found in COPYING.
*/
#pragma once
/* Temporary declaration for unit-testing */
extern int se_dispatch(
int method_num, uint8_t* buf_io, int len_in, uint32_t arg2, uint32_t incoming_sp, uint32_t incoming_lr);
#define CMD_IS_BRICKED 5
#define CMD_READ_SE_SLOT 15
#define CMD_GET_ANTI_PHISHING_WORDS 16
#define CMD_GET_RANDOM_BYTES 17
#define CMD_PIN_CONTROL 18
#define CMD_GET_SE_CONFIG 20
#define CMD_GET_SUPPLY_CHAIN_VALIDATION_WORDS 21
// Subcommands for CMD_PIN_CONTROL
#define PIN_SETUP 0
#define PIN_ATTEMPT 1
#define PIN_CHANGE 2
#define PIN_GET_SECRET 3