1
mirror of https://github.com/DarkFlippers/unleashed-firmware.git synced 2025-12-12 04:34:43 +04:00

Merge remote-tracking branch 'OFW/hedger/more-constness' into dev [ci skip]

This commit is contained in:
MX
2025-02-24 20:58:37 +03:00
68 changed files with 595 additions and 531 deletions

View File

@@ -19,7 +19,7 @@ typedef struct {
uint8_t cmd_start_byte;
size_t cmd_len_bits;
size_t command_num;
MfClassicListenerCommandHandler* handler;
const MfClassicListenerCommandHandler* handler;
} MfClassicListenerCmd;
static void mf_classic_listener_prepare_emulation(MfClassicListener* instance) {
@@ -441,42 +441,42 @@ static MfClassicListenerCommand
return command;
}
static MfClassicListenerCommandHandler mf_classic_listener_halt_handlers[] = {
static const MfClassicListenerCommandHandler mf_classic_listener_halt_handlers[] = {
mf_classic_listener_halt_handler,
};
static MfClassicListenerCommandHandler mf_classic_listener_auth_key_a_handlers[] = {
static const MfClassicListenerCommandHandler mf_classic_listener_auth_key_a_handlers[] = {
mf_classic_listener_auth_key_a_handler,
mf_classic_listener_auth_second_part_handler,
};
static MfClassicListenerCommandHandler mf_classic_listener_auth_key_b_handlers[] = {
static const MfClassicListenerCommandHandler mf_classic_listener_auth_key_b_handlers[] = {
mf_classic_listener_auth_key_b_handler,
mf_classic_listener_auth_second_part_handler,
};
static MfClassicListenerCommandHandler mf_classic_listener_read_block_handlers[] = {
static const MfClassicListenerCommandHandler mf_classic_listener_read_block_handlers[] = {
mf_classic_listener_read_block_handler,
};
static MfClassicListenerCommandHandler mf_classic_listener_write_block_handlers[] = {
static const MfClassicListenerCommandHandler mf_classic_listener_write_block_handlers[] = {
mf_classic_listener_write_block_first_part_handler,
mf_classic_listener_write_block_second_part_handler,
};
static MfClassicListenerCommandHandler mf_classic_listener_value_dec_handlers[] = {
static const MfClassicListenerCommandHandler mf_classic_listener_value_dec_handlers[] = {
mf_classic_listener_value_dec_handler,
mf_classic_listener_value_data_receive_handler,
mf_classic_listener_value_transfer_handler,
};
static MfClassicListenerCommandHandler mf_classic_listener_value_inc_handlers[] = {
static const MfClassicListenerCommandHandler mf_classic_listener_value_inc_handlers[] = {
mf_classic_listener_value_inc_handler,
mf_classic_listener_value_data_receive_handler,
mf_classic_listener_value_transfer_handler,
};
static MfClassicListenerCommandHandler mf_classic_listener_value_restore_handlers[] = {
static const MfClassicListenerCommandHandler mf_classic_listener_value_restore_handlers[] = {
mf_classic_listener_value_restore_handler,
mf_classic_listener_value_data_receive_handler,
mf_classic_listener_value_transfer_handler,

View File

@@ -32,7 +32,7 @@
* When implementing a new protocol, add its implementation
* here under its own index defined in nfc_protocol.h.
*/
const NfcDeviceBase* nfc_devices[NfcProtocolNum] = {
const NfcDeviceBase* const nfc_devices[NfcProtocolNum] = {
[NfcProtocolIso14443_3a] = &nfc_device_iso14443_3a,
[NfcProtocolIso14443_3b] = &nfc_device_iso14443_3b,
[NfcProtocolIso14443_4a] = &nfc_device_iso14443_4a,

View File

@@ -6,7 +6,7 @@
extern "C" {
#endif
extern const NfcDeviceBase* nfc_devices[];
extern const NfcDeviceBase* const nfc_devices[];
#ifdef __cplusplus
}

View File

@@ -8,7 +8,7 @@
#include <nfc/protocols/slix/slix_listener_defs.h>
#include <nfc/protocols/felica/felica_listener_defs.h>
const NfcListenerBase* nfc_listeners_api[NfcProtocolNum] = {
const NfcListenerBase* const nfc_listeners_api[NfcProtocolNum] = {
[NfcProtocolIso14443_3a] = &nfc_listener_iso14443_3a,
[NfcProtocolIso14443_3b] = NULL,
[NfcProtocolIso14443_4a] = &nfc_listener_iso14443_4a,

View File

@@ -7,7 +7,7 @@
extern "C" {
#endif
extern const NfcListenerBase* nfc_listeners_api[NfcProtocolNum];
extern const NfcListenerBase* const nfc_listeners_api[NfcProtocolNum];
#ifdef __cplusplus
}

View File

@@ -14,7 +14,7 @@
#include <nfc/protocols/slix/slix_poller_defs.h>
#include <nfc/protocols/st25tb/st25tb_poller_defs.h>
const NfcPollerBase* nfc_pollers_api[NfcProtocolNum] = {
const NfcPollerBase* const nfc_pollers_api[NfcProtocolNum] = {
[NfcProtocolIso14443_3a] = &nfc_poller_iso14443_3a,
[NfcProtocolIso14443_3b] = &nfc_poller_iso14443_3b,
[NfcProtocolIso14443_4a] = &nfc_poller_iso14443_4a,

View File

@@ -7,7 +7,7 @@
extern "C" {
#endif
extern const NfcPollerBase* nfc_pollers_api[NfcProtocolNum];
extern const NfcPollerBase* const nfc_pollers_api[NfcProtocolNum];
#ifdef __cplusplus
}