mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 22:38:08 +00:00
remove self from documentation where it should not be
This commit is contained in:
parent
d76477674d
commit
7fb1d7247c
60
docs/api.md
60
docs/api.md
@ -24,19 +24,19 @@ def trezor.crypto.base58.decode_check(string: str) -> bytes
|
||||
####trezor.crypto.curve.ed25519
|
||||
|
||||
``` python
|
||||
def trezor.crypto.curve.ed25519.publickey(self, secret_key: bytes) -> bytes
|
||||
def trezor.crypto.curve.ed25519.publickey(secret_key: bytes) -> bytes
|
||||
```
|
||||
|
||||
Computes public key from secret key.
|
||||
|
||||
``` python
|
||||
def trezor.crypto.curve.ed25519.sign(self, secret_key: bytes, message: bytes) -> bytes
|
||||
def trezor.crypto.curve.ed25519.sign(secret_key: bytes, message: bytes) -> bytes
|
||||
```
|
||||
|
||||
Uses secret key to produce the signature of message.
|
||||
|
||||
``` python
|
||||
def trezor.crypto.curve.ed25519.verify(self, public_key: bytes, signature: bytes, message: bytes) -> bool
|
||||
def trezor.crypto.curve.ed25519.verify(public_key: bytes, signature: bytes, message: bytes) -> bool
|
||||
```
|
||||
|
||||
Uses public key to verify the signature of the message
|
||||
@ -46,19 +46,19 @@ Returns True on success.
|
||||
####trezor.crypto.curve.nist256p1
|
||||
|
||||
``` python
|
||||
def trezor.crypto.curve.nist256p1.publickey(self, secret_key: bytes, compressed: bool=True) -> bytes
|
||||
def trezor.crypto.curve.nist256p1.publickey(secret_key: bytes, compressed: bool=True) -> bytes
|
||||
```
|
||||
|
||||
Computes public key from secret key.
|
||||
|
||||
``` python
|
||||
def trezor.crypto.curve.nist256p1.sign(self, secret_key: bytes, message: bytes) -> bytes
|
||||
def trezor.crypto.curve.nist256p1.sign(secret_key: bytes, message: bytes) -> bytes
|
||||
```
|
||||
|
||||
Uses secret key to produce the signature of message.
|
||||
|
||||
``` python
|
||||
def trezor.crypto.curve.nist256p1.verify(self, public_key: bytes, signature: bytes, message: bytes) -> bool
|
||||
def trezor.crypto.curve.nist256p1.verify(public_key: bytes, signature: bytes, message: bytes) -> bool
|
||||
```
|
||||
|
||||
Uses public key to verify the signature of the message
|
||||
@ -68,19 +68,19 @@ Returns True on success.
|
||||
####trezor.crypto.curve.secp256k1
|
||||
|
||||
``` python
|
||||
def trezor.crypto.curve.secp256k1.publickey(self, secret_key: bytes, compressed: bool=True) -> bytes
|
||||
def trezor.crypto.curve.secp256k1.publickey(secret_key: bytes, compressed: bool=True) -> bytes
|
||||
```
|
||||
|
||||
Computes public key from secret key.
|
||||
|
||||
``` python
|
||||
def trezor.crypto.curve.secp256k1.sign(self, secret_key: bytes, message: bytes) -> bytes
|
||||
def trezor.crypto.curve.secp256k1.sign(secret_key: bytes, message: bytes) -> bytes
|
||||
```
|
||||
|
||||
Uses secret key to produce the signature of message.
|
||||
|
||||
``` python
|
||||
def trezor.crypto.curve.secp256k1.verify(self, public_key: bytes, signature: bytes, message: bytes) -> bool
|
||||
def trezor.crypto.curve.secp256k1.verify(public_key: bytes, signature: bytes, message: bytes) -> bool
|
||||
```
|
||||
|
||||
Uses public key to verify the signature of the message
|
||||
@ -92,7 +92,7 @@ Returns True on success.
|
||||
####trezor.crypto.hashlib.ripemd160
|
||||
|
||||
``` python
|
||||
def trezor.crypto.hashlib.ripemd160(self, data: bytes=None) -> Ripemd160
|
||||
def trezor.crypto.hashlib.ripemd160(data: bytes=None) -> Ripemd160
|
||||
```
|
||||
|
||||
Creates a hash context object.
|
||||
@ -113,7 +113,7 @@ Returns the digest of hashed data.
|
||||
####trezor.crypto.hashlib.sha256
|
||||
|
||||
``` python
|
||||
def trezor.crypto.hashlib.sha256(self, data: bytes=None) -> Sha256
|
||||
def trezor.crypto.hashlib.sha256(data: bytes=None) -> Sha256
|
||||
```
|
||||
|
||||
Creates a hash context object.
|
||||
@ -134,7 +134,7 @@ Returns the digest of hashed data.
|
||||
####trezor.crypto.hashlib.sha512
|
||||
|
||||
``` python
|
||||
def trezor.crypto.hashlib.sha512(self, data: bytes=None) -> Sha512
|
||||
def trezor.crypto.hashlib.sha512(data: bytes=None) -> Sha512
|
||||
```
|
||||
|
||||
Creates a hash context object.
|
||||
@ -155,7 +155,7 @@ Returns the digest of hashed data.
|
||||
####trezor.crypto.hashlib.sha3_256
|
||||
|
||||
``` python
|
||||
def trezor.crypto.hashlib.sha3_256(self, data: bytes=None) -> Sha3_256
|
||||
def trezor.crypto.hashlib.sha3_256(data: bytes=None) -> Sha3_256
|
||||
```
|
||||
|
||||
Creates a hash context object.
|
||||
@ -176,7 +176,7 @@ Returns the digest of hashed data.
|
||||
####trezor.crypto.hashlib.sha3_512
|
||||
|
||||
``` python
|
||||
def trezor.crypto.hashlib.sha3_512(self, data: bytes=None) -> Sha3_512
|
||||
def trezor.crypto.hashlib.sha3_512(data: bytes=None) -> Sha3_512
|
||||
```
|
||||
|
||||
Creates a hash context object.
|
||||
@ -203,13 +203,13 @@ def trezor.crypto.hmac.new(key, msg, digestmod) -> Hmac
|
||||
##trezor.msg
|
||||
|
||||
``` python
|
||||
def trezor.msg.send(self, message) -> int
|
||||
def trezor.msg.send(message) -> int
|
||||
```
|
||||
|
||||
Sends message using USB HID (device) or UDP (emulator).
|
||||
|
||||
``` python
|
||||
def trezor.msg.select(self, timeout_us: int) -> tuple
|
||||
def trezor.msg.select(timeout_us: int) -> tuple
|
||||
```
|
||||
|
||||
Polls the event queue and returns the event object.
|
||||
@ -234,69 +234,69 @@ def trezor.ui.animate_pulse(func, ca, cb, speed=200000, delay=30000)
|
||||
###trezor.ui.display
|
||||
|
||||
``` python
|
||||
def trezor.ui.display.bar(self, x: int, y: int, w: int, h: int, fgcolor: int, bgcolor: int=None) -> None
|
||||
def trezor.ui.display.bar(x: int, y: int, w: int, h: int, fgcolor: int, bgcolor: int=None) -> None
|
||||
```
|
||||
|
||||
Renders a bar at position (x,y = upper left corner) with width w and height h of color fgcolor.
|
||||
When a bgcolor is set, the bar is drawn with rounded corners and bgcolor is used for background.
|
||||
|
||||
``` python
|
||||
def trezor.ui.display.blit(self, x: int, y: int, w: int, h: int, data: bytes) -> None
|
||||
def trezor.ui.display.blit(x: int, y: int, w: int, h: int, data: bytes) -> None
|
||||
```
|
||||
|
||||
Renders rectangle at position (x,y = upper left corner) with width w and height h with data.
|
||||
The data needs to have the correct format.
|
||||
|
||||
``` python
|
||||
def trezor.ui.display.image(self, x: int, y: int, image: bytes) -> None
|
||||
def trezor.ui.display.image(x: int, y: int, image: bytes) -> None
|
||||
```
|
||||
|
||||
Renders an image at position (x,y).
|
||||
The image needs to be in TREZOR Optimized Image Format (TOIF) - full-color mode.
|
||||
|
||||
``` python
|
||||
def trezor.ui.display.icon(self, x: int, y: int, icon: bytes, fgcolor: int, bgcolor: int) -> None
|
||||
def trezor.ui.display.icon(x: int, y: int, icon: bytes, fgcolor: int, bgcolor: int) -> None
|
||||
```
|
||||
|
||||
Renders an icon at position (x,y), fgcolor is used as foreground color, bgcolor as background.
|
||||
The image needs to be in TREZOR Optimized Image Format (TOIF) - gray-scale mode.
|
||||
|
||||
``` python
|
||||
def trezor.ui.display.text(self, x: int, y: int, text: bytes, font: int, fgcolor: int, bgcolor: int) -> None
|
||||
def trezor.ui.display.text(x: int, y: int, text: bytes, font: int, fgcolor: int, bgcolor: int) -> None
|
||||
```
|
||||
|
||||
Renders left-aligned text at position (x,y) where x is left position and y is baseline.
|
||||
Font font is used for rendering, fgcolor is used as foreground color, bgcolor as background.
|
||||
|
||||
``` python
|
||||
def trezor.ui.display.text_center(self, x: int, y: int, text: bytes, font: int, fgcolor: int, bgcolor: int) -> None
|
||||
def trezor.ui.display.text_center(x: int, y: int, text: bytes, font: int, fgcolor: int, bgcolor: int) -> None
|
||||
```
|
||||
|
||||
Renders text centered at position (x,y) where x is text center and y is baseline.
|
||||
Font font is used for rendering, fgcolor is used as foreground color, bgcolor as background.
|
||||
|
||||
``` python
|
||||
def trezor.ui.display.text_right(self, x: int, y: int, text: bytes, font: int, fgcolor: int, bgcolor: int) -> None
|
||||
def trezor.ui.display.text_right(x: int, y: int, text: bytes, font: int, fgcolor: int, bgcolor: int) -> None
|
||||
```
|
||||
|
||||
Renders right-aligned text at position (x,y) where x is right position and y is baseline.
|
||||
Font font is used for rendering, fgcolor is used as foreground color, bgcolor as background.
|
||||
|
||||
``` python
|
||||
def trezor.ui.display.text_width(self, text: bytes, font: int) -> int
|
||||
def trezor.ui.display.text_width(text: bytes, font: int) -> int
|
||||
```
|
||||
|
||||
Returns a width of text in pixels. Font font is used for rendering.
|
||||
|
||||
``` python
|
||||
def trezor.ui.display.qrcode(self, x: int, y: int, data: bytes, scale: int) -> None
|
||||
def trezor.ui.display.qrcode(x: int, y: int, data: bytes, scale: int) -> None
|
||||
```
|
||||
|
||||
Renders data encoded as a QR code at position (x,y).
|
||||
Scale determines a zoom factor.
|
||||
|
||||
``` python
|
||||
def trezor.ui.display.loader(self, progress: int, fgcolor: int, bgcolor: int, icon: bytes=None, iconfgcolor: int=None) -> None
|
||||
def trezor.ui.display.loader(progress: int, fgcolor: int, bgcolor: int, icon: bytes=None, iconfgcolor: int=None) -> None
|
||||
```
|
||||
|
||||
Renders a rotating loader graphic.
|
||||
@ -305,20 +305,20 @@ When icon and iconfgcolor are provided, an icon is drawn in the middle using the
|
||||
Icon needs to be of exaclty 96x96 pixels size.
|
||||
|
||||
``` python
|
||||
def trezor.ui.display.orientation(self, degrees: int) -> None
|
||||
def trezor.ui.display.orientation(degrees: int) -> None
|
||||
```
|
||||
|
||||
Sets display orientation to 0, 90, 180 or 270 degrees.
|
||||
Everything needs to be redrawn again when this function is used.
|
||||
|
||||
``` python
|
||||
def trezor.ui.display.backlight(self, val: int) -> None
|
||||
def trezor.ui.display.backlight(val: int) -> None
|
||||
```
|
||||
|
||||
Sets backlight intensity to the value specified in val.
|
||||
|
||||
``` python
|
||||
def trezor.ui.display.raw(self, reg: int, data: bytes) -> None
|
||||
def trezor.ui.display.raw(reg: int, data: bytes) -> None
|
||||
```
|
||||
|
||||
Performs a raw command on the display. Read the datasheet to learn more.
|
||||
@ -327,7 +327,7 @@ Performs a raw command on the display. Read the datasheet to learn more.
|
||||
###trezor.utils
|
||||
|
||||
``` python
|
||||
def trezor.utils.memaccess(self, address: int, length: int) -> bytes
|
||||
def trezor.utils.memaccess(address: int, length: int) -> bytes
|
||||
```
|
||||
|
||||
Creates a bytes object that can be used to access certain memory location.
|
||||
|
@ -20,7 +20,7 @@ STATIC mp_obj_t mod_TrezorCrypto_Ed25519_make_new(const mp_obj_type_t *type, siz
|
||||
return MP_OBJ_FROM_PTR(o);
|
||||
}
|
||||
|
||||
/// def trezor.crypto.curve.ed25519.publickey(self, secret_key: bytes) -> bytes
|
||||
/// def trezor.crypto.curve.ed25519.publickey(secret_key: bytes) -> bytes
|
||||
///
|
||||
/// Computes public key from secret key.
|
||||
///
|
||||
@ -37,7 +37,7 @@ STATIC mp_obj_t mod_TrezorCrypto_Ed25519_publickey(mp_obj_t self, mp_obj_t secre
|
||||
}
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_2(mod_TrezorCrypto_Ed25519_publickey_obj, mod_TrezorCrypto_Ed25519_publickey);
|
||||
|
||||
/// def trezor.crypto.curve.ed25519.sign(self, secret_key: bytes, message: bytes) -> bytes
|
||||
/// def trezor.crypto.curve.ed25519.sign(secret_key: bytes, message: bytes) -> bytes
|
||||
///
|
||||
/// Uses secret key to produce the signature of message.
|
||||
///
|
||||
@ -57,7 +57,7 @@ STATIC mp_obj_t mod_TrezorCrypto_Ed25519_sign(mp_obj_t self, mp_obj_t secret_key
|
||||
}
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_3(mod_TrezorCrypto_Ed25519_sign_obj, mod_TrezorCrypto_Ed25519_sign);
|
||||
|
||||
/// def trezor.crypto.curve.ed25519.verify(self, public_key: bytes, signature: bytes, message: bytes) -> bool
|
||||
/// def trezor.crypto.curve.ed25519.verify(public_key: bytes, signature: bytes, message: bytes) -> bool
|
||||
///
|
||||
/// Uses public key to verify the signature of the message
|
||||
/// Returns True on success.
|
||||
|
@ -21,7 +21,7 @@ STATIC mp_obj_t mod_TrezorCrypto_Nist256p1_make_new(const mp_obj_type_t *type, s
|
||||
return MP_OBJ_FROM_PTR(o);
|
||||
}
|
||||
|
||||
/// def trezor.crypto.curve.nist256p1.publickey(self, secret_key: bytes, compressed: bool=True) -> bytes
|
||||
/// def trezor.crypto.curve.nist256p1.publickey(secret_key: bytes, compressed: bool=True) -> bytes
|
||||
///
|
||||
/// Computes public key from secret key.
|
||||
///
|
||||
@ -44,7 +44,7 @@ STATIC mp_obj_t mod_TrezorCrypto_Nist256p1_publickey(size_t n_args, const mp_obj
|
||||
}
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_TrezorCrypto_Nist256p1_publickey_obj, 2, 3, mod_TrezorCrypto_Nist256p1_publickey);
|
||||
|
||||
/// def trezor.crypto.curve.nist256p1.sign(self, secret_key: bytes, message: bytes) -> bytes
|
||||
/// def trezor.crypto.curve.nist256p1.sign(secret_key: bytes, message: bytes) -> bytes
|
||||
///
|
||||
/// Uses secret key to produce the signature of message.
|
||||
///
|
||||
@ -66,7 +66,7 @@ STATIC mp_obj_t mod_TrezorCrypto_Nist256p1_sign(mp_obj_t self, mp_obj_t secret_k
|
||||
}
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_3(mod_TrezorCrypto_Nist256p1_sign_obj, mod_TrezorCrypto_Nist256p1_sign);
|
||||
|
||||
/// def trezor.crypto.curve.nist256p1.verify(self, public_key: bytes, signature: bytes, message: bytes) -> bool
|
||||
/// def trezor.crypto.curve.nist256p1.verify(public_key: bytes, signature: bytes, message: bytes) -> bool
|
||||
///
|
||||
/// Uses public key to verify the signature of the message
|
||||
/// Returns True on success.
|
||||
|
@ -20,7 +20,7 @@ typedef struct _mp_obj_Pbkdf2_t {
|
||||
|
||||
STATIC mp_obj_t mod_TrezorCrypto_Pbkdf2_update(mp_obj_t self, mp_obj_t data);
|
||||
|
||||
/// def trezor.crypto.pbkdf2(self, prf: str, password: bytes, salt: bytes, iterations: int=None) -> Pbkdf2
|
||||
/// def trezor.crypto.pbkdf2(prf: str, password: bytes, salt: bytes, iterations: int=None) -> Pbkdf2
|
||||
STATIC mp_obj_t mod_TrezorCrypto_Pbkdf2_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
|
||||
mp_arg_check_num(n_args, n_kw, 3, 4, false);
|
||||
mp_obj_Pbkdf2_t *o = m_new_obj(mp_obj_Pbkdf2_t);
|
||||
|
@ -19,7 +19,7 @@ typedef struct _mp_obj_Ripemd160_t {
|
||||
|
||||
STATIC mp_obj_t mod_TrezorCrypto_Ripemd160_update(mp_obj_t self, mp_obj_t data);
|
||||
|
||||
/// def trezor.crypto.hashlib.ripemd160(self, data: bytes=None) -> Ripemd160
|
||||
/// def trezor.crypto.hashlib.ripemd160(data: bytes=None) -> Ripemd160
|
||||
///
|
||||
/// Creates a hash context object.
|
||||
///
|
||||
|
@ -21,7 +21,7 @@ STATIC mp_obj_t mod_TrezorCrypto_Secp256k1_make_new(const mp_obj_type_t *type, s
|
||||
return MP_OBJ_FROM_PTR(o);
|
||||
}
|
||||
|
||||
/// def trezor.crypto.curve.secp256k1.publickey(self, secret_key: bytes, compressed: bool=True) -> bytes
|
||||
/// def trezor.crypto.curve.secp256k1.publickey(secret_key: bytes, compressed: bool=True) -> bytes
|
||||
///
|
||||
/// Computes public key from secret key.
|
||||
///
|
||||
@ -44,7 +44,7 @@ STATIC mp_obj_t mod_TrezorCrypto_Secp256k1_publickey(size_t n_args, const mp_obj
|
||||
}
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_TrezorCrypto_Secp256k1_publickey_obj, 2, 3, mod_TrezorCrypto_Secp256k1_publickey);
|
||||
|
||||
/// def trezor.crypto.curve.secp256k1.sign(self, secret_key: bytes, message: bytes) -> bytes
|
||||
/// def trezor.crypto.curve.secp256k1.sign(secret_key: bytes, message: bytes) -> bytes
|
||||
///
|
||||
/// Uses secret key to produce the signature of message.
|
||||
///
|
||||
@ -66,7 +66,7 @@ STATIC mp_obj_t mod_TrezorCrypto_Secp256k1_sign(mp_obj_t self, mp_obj_t secret_k
|
||||
}
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_3(mod_TrezorCrypto_Secp256k1_sign_obj, mod_TrezorCrypto_Secp256k1_sign);
|
||||
|
||||
/// def trezor.crypto.curve.secp256k1.verify(self, public_key: bytes, signature: bytes, message: bytes) -> bool
|
||||
/// def trezor.crypto.curve.secp256k1.verify(public_key: bytes, signature: bytes, message: bytes) -> bool
|
||||
///
|
||||
/// Uses public key to verify the signature of the message
|
||||
/// Returns True on success.
|
||||
|
@ -19,7 +19,7 @@ typedef struct _mp_obj_Sha256_t {
|
||||
|
||||
STATIC mp_obj_t mod_TrezorCrypto_Sha256_update(mp_obj_t self, mp_obj_t data);
|
||||
|
||||
/// def trezor.crypto.hashlib.sha256(self, data: bytes=None) -> Sha256
|
||||
/// def trezor.crypto.hashlib.sha256(data: bytes=None) -> Sha256
|
||||
///
|
||||
/// Creates a hash context object.
|
||||
///
|
||||
|
@ -19,7 +19,7 @@ typedef struct _mp_obj_Sha3_256_t {
|
||||
|
||||
STATIC mp_obj_t mod_TrezorCrypto_Sha3_256_update(mp_obj_t self, mp_obj_t data);
|
||||
|
||||
/// def trezor.crypto.hashlib.sha3_256(self, data: bytes=None) -> Sha3_256
|
||||
/// def trezor.crypto.hashlib.sha3_256(data: bytes=None) -> Sha3_256
|
||||
///
|
||||
/// Creates a hash context object.
|
||||
///
|
||||
|
@ -19,7 +19,7 @@ typedef struct _mp_obj_Sha3_512_t {
|
||||
|
||||
STATIC mp_obj_t mod_TrezorCrypto_Sha3_512_update(mp_obj_t self, mp_obj_t data);
|
||||
|
||||
/// def trezor.crypto.hashlib.sha3_512(self, data: bytes=None) -> Sha3_512
|
||||
/// def trezor.crypto.hashlib.sha3_512(data: bytes=None) -> Sha3_512
|
||||
///
|
||||
/// Creates a hash context object.
|
||||
///
|
||||
|
@ -19,7 +19,7 @@ typedef struct _mp_obj_Sha512_t {
|
||||
|
||||
STATIC mp_obj_t mod_TrezorCrypto_Sha512_update(mp_obj_t self, mp_obj_t data);
|
||||
|
||||
/// def trezor.crypto.hashlib.sha512(self, data: bytes=None) -> Sha512
|
||||
/// def trezor.crypto.hashlib.sha512(data: bytes=None) -> Sha512
|
||||
///
|
||||
/// Creates a hash context object.
|
||||
///
|
||||
|
@ -36,7 +36,7 @@ STATIC mp_obj_t mod_TrezorMsg_Msg_make_new(const mp_obj_type_t *type, size_t n_a
|
||||
return MP_OBJ_FROM_PTR(o);
|
||||
}
|
||||
|
||||
/// def trezor.msg.send(self, message) -> int
|
||||
/// def trezor.msg.send(message) -> int
|
||||
///
|
||||
/// Sends message using USB HID (device) or UDP (emulator).
|
||||
///
|
||||
@ -50,7 +50,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(mod_TrezorMsg_Msg_send_obj, mod_TrezorMsg_Msg_s
|
||||
|
||||
#define TICK_RESOLUTION 1000
|
||||
|
||||
/// def trezor.msg.select(self, timeout_us: int) -> tuple
|
||||
/// def trezor.msg.select(timeout_us: int) -> tuple
|
||||
///
|
||||
/// Polls the event queue and returns the event object.
|
||||
/// Function returns None if timeout specified in microseconds is reached.
|
||||
|
@ -291,7 +291,7 @@ STATIC mp_obj_t mod_TrezorUi_Display_make_new(const mp_obj_type_t *type, size_t
|
||||
return MP_OBJ_FROM_PTR(o);
|
||||
}
|
||||
|
||||
/// def trezor.ui.display.bar(self, x: int, y: int, w: int, h: int, fgcolor: int, bgcolor: int=None) -> None
|
||||
/// def trezor.ui.display.bar(x: int, y: int, w: int, h: int, fgcolor: int, bgcolor: int=None) -> None
|
||||
///
|
||||
/// Renders a bar at position (x,y = upper left corner) with width w and height h of color fgcolor.
|
||||
/// When a bgcolor is set, the bar is drawn with rounded corners and bgcolor is used for background.
|
||||
@ -315,7 +315,7 @@ STATIC mp_obj_t mod_TrezorUi_Display_bar(size_t n_args, const mp_obj_t *args) {
|
||||
}
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_TrezorUi_Display_bar_obj, 6, 7, mod_TrezorUi_Display_bar);
|
||||
|
||||
/// def trezor.ui.display.blit(self, x: int, y: int, w: int, h: int, data: bytes) -> None
|
||||
/// def trezor.ui.display.blit(x: int, y: int, w: int, h: int, data: bytes) -> None
|
||||
///
|
||||
/// Renders rectangle at position (x,y = upper left corner) with width w and height h with data.
|
||||
/// The data needs to have the correct format.
|
||||
@ -335,7 +335,7 @@ STATIC mp_obj_t mod_TrezorUi_Display_blit(size_t n_args, const mp_obj_t *args) {
|
||||
}
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_TrezorUi_Display_blit_obj, 6, 6, mod_TrezorUi_Display_blit);
|
||||
|
||||
/// def trezor.ui.display.image(self, x: int, y: int, image: bytes) -> None
|
||||
/// def trezor.ui.display.image(x: int, y: int, image: bytes) -> None
|
||||
///
|
||||
/// Renders an image at position (x,y).
|
||||
/// The image needs to be in TREZOR Optimized Image Format (TOIF) - full-color mode.
|
||||
@ -363,7 +363,7 @@ STATIC mp_obj_t mod_TrezorUi_Display_image(size_t n_args, const mp_obj_t *args)
|
||||
}
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_TrezorUi_Display_image_obj, 4, 4, mod_TrezorUi_Display_image);
|
||||
|
||||
/// def trezor.ui.display.icon(self, x: int, y: int, icon: bytes, fgcolor: int, bgcolor: int) -> None
|
||||
/// def trezor.ui.display.icon(x: int, y: int, icon: bytes, fgcolor: int, bgcolor: int) -> None
|
||||
///
|
||||
/// Renders an icon at position (x,y), fgcolor is used as foreground color, bgcolor as background.
|
||||
/// The image needs to be in TREZOR Optimized Image Format (TOIF) - gray-scale mode.
|
||||
@ -393,7 +393,7 @@ STATIC mp_obj_t mod_TrezorUi_Display_icon(size_t n_args, const mp_obj_t *args) {
|
||||
}
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_TrezorUi_Display_icon_obj, 6, 6, mod_TrezorUi_Display_icon);
|
||||
|
||||
/// def trezor.ui.display.text(self, x: int, y: int, text: bytes, font: int, fgcolor: int, bgcolor: int) -> None
|
||||
/// def trezor.ui.display.text(x: int, y: int, text: bytes, font: int, fgcolor: int, bgcolor: int) -> None
|
||||
///
|
||||
/// Renders left-aligned text at position (x,y) where x is left position and y is baseline.
|
||||
/// Font font is used for rendering, fgcolor is used as foreground color, bgcolor as background.
|
||||
@ -411,7 +411,7 @@ STATIC mp_obj_t mod_TrezorUi_Display_text(size_t n_args, const mp_obj_t *args) {
|
||||
}
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_TrezorUi_Display_text_obj, 7, 7, mod_TrezorUi_Display_text);
|
||||
|
||||
/// def trezor.ui.display.text_center(self, x: int, y: int, text: bytes, font: int, fgcolor: int, bgcolor: int) -> None
|
||||
/// def trezor.ui.display.text_center(x: int, y: int, text: bytes, font: int, fgcolor: int, bgcolor: int) -> None
|
||||
///
|
||||
/// Renders text centered at position (x,y) where x is text center and y is baseline.
|
||||
/// Font font is used for rendering, fgcolor is used as foreground color, bgcolor as background.
|
||||
@ -430,7 +430,7 @@ STATIC mp_obj_t mod_TrezorUi_Display_text_center(size_t n_args, const mp_obj_t *
|
||||
}
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_TrezorUi_Display_text_center_obj, 7, 7, mod_TrezorUi_Display_text_center);
|
||||
|
||||
/// def trezor.ui.display.text_right(self, x: int, y: int, text: bytes, font: int, fgcolor: int, bgcolor: int) -> None
|
||||
/// def trezor.ui.display.text_right(x: int, y: int, text: bytes, font: int, fgcolor: int, bgcolor: int) -> None
|
||||
///
|
||||
/// Renders right-aligned text at position (x,y) where x is right position and y is baseline.
|
||||
/// Font font is used for rendering, fgcolor is used as foreground color, bgcolor as background.
|
||||
@ -449,7 +449,7 @@ STATIC mp_obj_t mod_TrezorUi_Display_text_right(size_t n_args, const mp_obj_t *a
|
||||
}
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_TrezorUi_Display_text_right_obj, 7, 7, mod_TrezorUi_Display_text_right);
|
||||
|
||||
/// def trezor.ui.display.text_width(self, text: bytes, font: int) -> int
|
||||
/// def trezor.ui.display.text_width(text: bytes, font: int) -> int
|
||||
///
|
||||
/// Returns a width of text in pixels. Font font is used for rendering.
|
||||
///
|
||||
@ -462,7 +462,7 @@ STATIC mp_obj_t mod_TrezorUi_Display_text_width(mp_obj_t self, mp_obj_t text, mp
|
||||
}
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_3(mod_TrezorUi_Display_text_width_obj, mod_TrezorUi_Display_text_width);
|
||||
|
||||
/// def trezor.ui.display.qrcode(self, x: int, y: int, data: bytes, scale: int) -> None
|
||||
/// def trezor.ui.display.qrcode(x: int, y: int, data: bytes, scale: int) -> None
|
||||
///
|
||||
/// Renders data encoded as a QR code at position (x,y).
|
||||
/// Scale determines a zoom factor.
|
||||
@ -488,7 +488,7 @@ static void inflate_callback_loader(uint8_t byte, uint32_t pos, void *userdata)
|
||||
out[pos] = byte;
|
||||
}
|
||||
|
||||
/// def trezor.ui.display.loader(self, progress: int, fgcolor: int, bgcolor: int, icon: bytes=None, iconfgcolor: int=None) -> None
|
||||
/// def trezor.ui.display.loader(progress: int, fgcolor: int, bgcolor: int, icon: bytes=None, iconfgcolor: int=None) -> None
|
||||
///
|
||||
/// Renders a rotating loader graphic.
|
||||
/// Progress determines its position (0-1000), fgcolor is used as foreground color, bgcolor as background.
|
||||
@ -531,7 +531,7 @@ STATIC mp_obj_t mod_TrezorUi_Display_loader(size_t n_args, const mp_obj_t *args)
|
||||
}
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_TrezorUi_Display_loader_obj, 4, 6, mod_TrezorUi_Display_loader);
|
||||
|
||||
/// def trezor.ui.display.orientation(self, degrees: int) -> None
|
||||
/// def trezor.ui.display.orientation(degrees: int) -> None
|
||||
///
|
||||
/// Sets display orientation to 0, 90, 180 or 270 degrees.
|
||||
/// Everything needs to be redrawn again when this function is used.
|
||||
@ -546,7 +546,7 @@ STATIC mp_obj_t mod_TrezorUi_Display_orientation(mp_obj_t self, mp_obj_t degrees
|
||||
}
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_2(mod_TrezorUi_Display_orientation_obj, mod_TrezorUi_Display_orientation);
|
||||
|
||||
/// def trezor.ui.display.backlight(self, val: int) -> None
|
||||
/// def trezor.ui.display.backlight(val: int) -> None
|
||||
///
|
||||
/// Sets backlight intensity to the value specified in val.
|
||||
///
|
||||
@ -556,7 +556,7 @@ STATIC mp_obj_t mod_TrezorUi_Display_backlight(mp_obj_t self, mp_obj_t reg) {
|
||||
}
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_2(mod_TrezorUi_Display_backlight_obj, mod_TrezorUi_Display_backlight);
|
||||
|
||||
/// def trezor.ui.display.raw(self, reg: int, data: bytes) -> None
|
||||
/// def trezor.ui.display.raw(reg: int, data: bytes) -> None
|
||||
///
|
||||
/// Performs a raw command on the display. Read the datasheet to learn more.
|
||||
///
|
||||
|
@ -27,7 +27,7 @@ STATIC mp_obj_t mod_TrezorUtils_Utils_make_new(const mp_obj_type_t *type, size_t
|
||||
return MP_OBJ_FROM_PTR(o);
|
||||
}
|
||||
|
||||
/// def trezor.utils.memaccess(self, address: int, length: int) -> bytes
|
||||
/// def trezor.utils.memaccess(address: int, length: int) -> bytes
|
||||
///
|
||||
/// Creates a bytes object that can be used to access certain memory location.
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user