Skip to content

Add support for iAP2 over seph protocol#1421

Open
yrichard-ledger wants to merge 1 commit intomasterfrom
iap2
Open

Add support for iAP2 over seph protocol#1421
yrichard-ledger wants to merge 1 commit intomasterfrom
iap2

Conversation

@yrichard-ledger
Copy link
Contributor

Description

Add support for apdus over USB iap2

Changes include

  • Bugfix (non-breaking change that solves an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)
  • Tests
  • Documentation
  • Other (for changes that might not fit in any category)

Breaking changes

Please complete this section if any breaking changes have been made, otherwise delete it.

Additional comments

Please post additional comments in this section if you have them, otherwise delete it.

Auto cherry-pick in API_LEVEL

If requested to port the commits from this PR on a dedicated API_LEVEL branch,
select the targeted one(s), or add new references if not listed:

[ ] TARGET_API_LEVEL: API_LEVEL_25

This will only create the PR with cherry-picks, ready to be reviewed and merged.

Remember:

  • The merge will ALWAYS be a manual operation.
  • It is possible the cherry-picks don't apply correctly, mainly if previous commits have been forgotten.
  • In case of failure, there is no other solution than redo the operation manually...

@codecov-commenter
Copy link

codecov-commenter commented Feb 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.82%. Comparing base (043d932) to head (207b10a).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1421   +/-   ##
=======================================
  Coverage   91.82%   91.82%           
=======================================
  Files          37       37           
  Lines        4244     4244           
  Branches      521      521           
=======================================
  Hits         3897     3897           
  Misses        257      257           
  Partials       90       90           
Flag Coverage Δ
unittests 91.82% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.


void USB_LEDGER_IAP_init(void);

int USB_LEDGER_iap_rx_seph_evt(uint8_t *seph_buffer,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: harmonize function naming

USB_LEDGER_iap_rx_seph_evt -> USB_LEDGER_IAP_rx_seph_evt


int USB_LEDGER_IAP_send_apdu(const uint8_t *apdu_buf, uint16_t apdu_buf_length)
{
uint32_t status = -1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be an int. Even better if the function could return int32_t instead !

if (apdu_type == APDU_TYPE_NFC) {
return IO_APDU_MEDIA_NFC;
}
if (apdu_type == APDU_TYPE_IAP) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be under ifdef ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants