Skip to content

Commit

Permalink
Merge pull request #520 from LedgerHQ/abo_implem_api_level_22
Browse files Browse the repository at this point in the history
Support API_LEVEL_22
  • Loading branch information
abonnaudet-ledger authored Oct 30, 2024
2 parents aaad463 + 6d7405e commit 563e5e4
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 4 deletions.
Binary file added speculos/cxlib/flex-api-level-cx-22.elf
Binary file not shown.
Binary file added speculos/cxlib/nanosp-api-level-cx-22.elf
Binary file not shown.
Binary file added speculos/cxlib/nanox-api-level-cx-22.elf
Binary file not shown.
Binary file added speculos/cxlib/stax-api-level-cx-22.elf
Binary file not shown.
1 change: 1 addition & 0 deletions speculos/fonts/flex-fonts-22.bin
Binary file added speculos/fonts/nanosp-fonts-22.bin
Binary file not shown.
Binary file added speculos/fonts/nanox-fonts-22.bin
Binary file not shown.
1 change: 1 addition & 0 deletions speculos/fonts/stax-fonts-22.bin
1 change: 1 addition & 0 deletions src/bolos/fonts_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ void parse_fonts(void *code, unsigned long text_load_addr,
case SDK_API_LEVEL_19:
case SDK_API_LEVEL_20:
case SDK_API_LEVEL_21:
case SDK_API_LEVEL_22:
break;
default:
// Unsupported API_LEVEL, will not parse fonts!
Expand Down
11 changes: 7 additions & 4 deletions src/launcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ int main(int argc, char *argv[])
if (sdk_version != SDK_NANO_X_1_2 && sdk_version != SDK_NANO_X_2_0 &&
sdk_version != SDK_NANO_X_2_0_2 && sdk_version != SDK_API_LEVEL_1 &&
sdk_version != SDK_API_LEVEL_5 && sdk_version != SDK_API_LEVEL_12 &&
sdk_version != SDK_API_LEVEL_18) {
sdk_version != SDK_API_LEVEL_18 && sdk_version != SDK_API_LEVEL_22) {
errx(1, "invalid SDK version for the Ledger Nano X");
}
break;
Expand All @@ -807,7 +807,8 @@ int main(int argc, char *argv[])
case MODEL_NANO_SP:
if (sdk_version != SDK_NANO_SP_1_0 && sdk_version != SDK_NANO_SP_1_0_3 &&
sdk_version != SDK_API_LEVEL_1 && sdk_version != SDK_API_LEVEL_5 &&
sdk_version != SDK_API_LEVEL_12 && sdk_version != SDK_API_LEVEL_18) {
sdk_version != SDK_API_LEVEL_12 && sdk_version != SDK_API_LEVEL_18 &&
sdk_version != SDK_API_LEVEL_22) {
errx(1, "invalid SDK version for the Ledger NanoSP");
}
break;
Expand All @@ -818,13 +819,15 @@ int main(int argc, char *argv[])
sdk_version != SDK_API_LEVEL_10 && sdk_version != SDK_API_LEVEL_11 &&
sdk_version != SDK_API_LEVEL_12 && sdk_version != SDK_API_LEVEL_13 &&
sdk_version != SDK_API_LEVEL_14 && sdk_version != SDK_API_LEVEL_15 &&
sdk_version != SDK_API_LEVEL_20 && sdk_version != SDK_API_LEVEL_21) {
sdk_version != SDK_API_LEVEL_20 && sdk_version != SDK_API_LEVEL_21 &&
sdk_version != SDK_API_LEVEL_22) {
errx(1, "invalid SDK version for the Ledger Stax");
}
break;
case MODEL_FLEX:
if (sdk_version != SDK_API_LEVEL_18 && sdk_version != SDK_API_LEVEL_19 &&
sdk_version != SDK_API_LEVEL_20 && sdk_version != SDK_API_LEVEL_21) {
sdk_version != SDK_API_LEVEL_20 && sdk_version != SDK_API_LEVEL_21 &&
sdk_version != SDK_API_LEVEL_22) {
errx(1, "invalid SDK version for the Ledger Flex");
}
break;
Expand Down
1 change: 1 addition & 0 deletions src/sdk.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ typedef enum {
SDK_API_LEVEL_19,
SDK_API_LEVEL_20,
SDK_API_LEVEL_21,
SDK_API_LEVEL_22,
SDK_COUNT
} sdk_version_t;

Expand Down

0 comments on commit 563e5e4

Please sign in to comment.