Commit Graph

102 Commits

Author SHA1 Message Date
Sosthène Guédon d7ee62753b CommandView: precise lifetime of data 2023-11-23 17:27:43 +01:00
Robin Krahl a2ee8a2a3f Release v0.1.2 0.1.2 2023-11-22 14:48:39 +01:00
Sosthène Guédon 57afb5355d Fix clippy warnings 2023-10-29 10:59:04 +01:00
Sosthène Guédon b06e5d9ec3 Fix semver breaks 2023-10-29 10:59:04 +01:00
Robin Krahl 33f0401216 Refactor CommandView::to_owned
This patch replaces Vec::from_slice with Vec::extend_from_slice in
CommandView::to_owned.  This reduces the stack usage on lpc55 to one
third (!), from ca. 23 kB to ca. 8 kB with S = 7609.
2023-10-25 15:17:41 +02:00
Sosthène Guédon 8b0d071cc6 Fix datasource is_empty calculation 2023-10-25 15:17:07 +02:00
Sosthène Guédon 58152e8737 Fix clippy warnings 2023-09-22 11:31:28 +02:00
Sosthène Guédon 4a31b8a881 Update changelog 2023-09-22 11:31:28 +02:00
Sosthène Guédon c22065b39d Add to_u16 method 2023-09-22 11:31:28 +02:00
Sosthène Guédon 507f8fa596 Document status values 2023-09-22 11:31:28 +02:00
Sosthène Guédon 4dff08c9a3 Rename UPPER to MAX 2023-09-22 11:31:28 +02:00
Sosthène Guédon 2ec3f87ce6 Make the Unkonwn status variant visibly not meant to be used 2023-09-22 11:31:28 +02:00
Sosthène Guédon 76b013aa74 Document #[doc(hidden)] strategy 2023-09-22 11:31:28 +02:00
Sosthène Guédon 3fc9f826e6 Make consts public 2023-09-22 11:31:28 +02:00
Sosthène Guédon d7f6402ec9 Fix naming 2023-09-22 11:31:28 +02:00
Sosthène Guédon 9415634d8c Support all status bytes
This adds all status bytes defined in ISO7816-4
It also adds an `Unknown` variant that is `#[doc(hidden)]` to prevent creation of statuses that exists as a variant.

It also has a `const` conversion function to allow matching against unsupported status bytes without being a semver hazard.
2023-09-22 11:31:28 +02:00
Sosthène Guédon 24443bbada Fix review comments 2023-09-22 11:27:49 +02:00
Sosthène Guédon d5da0525dc Fix clippy warnings 2023-09-22 11:27:49 +02:00
Sosthène Guédon 01964d3343 Rename do to data_object 2023-09-22 11:27:49 +02:00
Sosthène Guédon e8035a38e9 Fix test compilation 2023-09-22 11:27:49 +02:00
Sosthène Guédon fab1796b7d Fix write_all behaviour 2023-09-22 11:27:49 +02:00
Sosthène Guédon 10c894b033 Implement BitOr and BitAnd for Instruction 2023-09-22 11:27:49 +02:00
Sosthène Guédon 16aba0dc67 Add support for 0x010000 expected length
This would encode to `[00, 00]` and is not in range for u16
2023-09-22 11:27:49 +02:00
Sosthène Guédon 80cb97c8e1 Add option to force use of extended length
Some application refuse to return more than 255 bytes of data if the request
does not use extended length APDUs
2023-09-22 11:27:49 +02:00
Sosthène Guédon 2115457b06 Fix TLV serialization 2023-09-22 11:27:49 +02:00