Skip to content

Commit 40f4961

Browse files
pennamgiulcioffi
authored andcommitted
SE05X: add function to delete all objects
1 parent 8a1174f commit 40f4961

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

libraries/SE05X/src/SE05X.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,17 @@ int SE05XClass::deleteBinaryObject(int objectId)
384384
return 1;
385385
}
386386

387+
int SE05XClass::deleteAllObjects(void)
388+
{
389+
sss_se05x_session_t *pSession = (sss_se05x_session_t *)&_boot_ctx.session;
390+
391+
if(SW_OK != Se05x_API_DeleteAll_Iterative(&pSession->s_ctx)) {
392+
return 0;
393+
}
394+
395+
return 1;
396+
}
397+
387398
int SE05XClass::getObjectHandle(int objectId, sss_object_t * object)
388399
{
389400
sss_status_t status;

libraries/SE05X/src/SE05X.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "ex_sss_boot.h"
2525
#include "fsl_sss_api.h"
2626
#include "se05x_apis.h"
27+
#include "se05x_APDU.h"
2728

2829
#if defined SE05X_PRINT_ERROR
2930
#define LOG_E Serial.println
@@ -62,6 +63,7 @@ class SE05XClass
6263
int writeBinaryObject(int ObjectId, const byte data[], size_t length);
6364
int existsBinaryObject(int objectId);
6465
int deleteBinaryObject(int objectId);
66+
int deleteAllObjects();
6567

6668
int getObjectHandle(int objectId, sss_object_t * object);
6769

0 commit comments

Comments
 (0)