Fix build

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2026-05-01 12:59:36 +02:00
parent ee13b6904a
commit b4813e9db2
4 changed files with 10 additions and 5 deletions

View File

@@ -35,7 +35,7 @@ file_t *ef_phy = &sef_phy;
#endif #endif
//puts FCI in the RAPDU //puts FCI in the RAPDU
void process_fci(const file_t *pe, int fmd) { void file_process_fci(const file_t *pe, int fmd) {
res_APDU_size = 0; res_APDU_size = 0;
if (fmd) { if (fmd) {
res_APDU[res_APDU_size++] = 0x6f; res_APDU[res_APDU_size++] = 0x6f;
@@ -124,7 +124,7 @@ file_t *get_parent(file_t *f) {
return &file_entries[f->parent]; return &file_entries[f->parent];
} }
file_t *search_by_name(uint8_t *name, uint16_t namelen) { file_t *file_search_by_name(uint8_t *name, uint16_t namelen) {
for (file_t *p = file_entries; p != file_last; p++) { for (file_t *p = file_entries; p != file_last; p++) {
if (p->name && *p->name == apdu.nc && memcmp(p->name + 1, name, namelen) == 0) { if (p->name && *p->name == apdu.nc && memcmp(p->name + 1, name, namelen) == 0) {
return p; return p;
@@ -192,7 +192,7 @@ static uint8_t make_path(const file_t *pe, const file_t *top, uint8_t *path) {
return depth; return depth;
} }
file_t *search_by_path(const uint8_t *pe_path, uint8_t pathlen, const file_t *parent) { file_t *file_search_by_path(const uint8_t *pe_path, uint8_t pathlen, const file_t *parent) {
uint8_t path[MAX_DEPTH * 2]; uint8_t path[MAX_DEPTH * 2];
if (pathlen > sizeof(path)) { if (pathlen > sizeof(path)) {
return NULL; return NULL;
@@ -211,7 +211,7 @@ file_t *currentDF = NULL;
const file_t *selected_applet = NULL; const file_t *selected_applet = NULL;
bool isUserAuthenticated = false; bool isUserAuthenticated = false;
bool authenticate_action(const file_t *ef, uint8_t op) { bool file_authenticate_action(const file_t *ef, uint8_t op) {
uint8_t acl = ef->acl[op]; uint8_t acl = ef->acl[op];
if (acl == 0x0) { if (acl == 0x0) {
return true; return true;

View File

@@ -98,7 +98,10 @@ bool flash_available = false;
//this function has to be called from the core 0 //this function has to be called from the core 0
void low_flash_task(void) { void low_flash_task(void);
void low_flash_commit(void);
void low_flash_task(void){
if (mutex_try_enter(&mtx_flash, NULL) == true) { if (mutex_try_enter(&mtx_flash, NULL) == true) {
if (locked_out == true && flash_available == true && ready_pages > 0) { if (locked_out == true && flash_available == true && ready_pages > 0) {
//printf(" DO_FLASH AVAILABLE\n"); //printf(" DO_FLASH AVAILABLE\n");

View File

@@ -102,6 +102,7 @@ WEAK int picokey_init(void) {
return 0; return 0;
} }
void execute_tasks(void);
void execute_tasks(void) { void execute_tasks(void) {
#if !defined(ENABLE_EMULATION) && !defined(ESP_PLATFORM) #if !defined(ENABLE_EMULATION) && !defined(ESP_PLATFORM)
tud_task(); // tinyusb device task tud_task(); // tinyusb device task

View File

@@ -21,6 +21,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h> #include <stdint.h>
#include <stdbool.h>
typedef struct { typedef struct {
uint32_t index; uint32_t index;