Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api: added lib/nfc/protocols/nfc_util.h #2674

Merged
merged 1 commit into from
May 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion firmware/targets/f18/api_symbols.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
entry,status,name,type,params
Version,+,26.2,,
Version,+,26.3,,
Header,+,applications/services/bt/bt_service/bt.h,,
Header,+,applications/services/cli/cli.h,,
Header,+,applications/services/cli/cli_vcp.h,,
Expand Down
10 changes: 8 additions & 2 deletions firmware/targets/f7/api_symbols.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
entry,status,name,type,params
Version,+,26.2,,
Version,+,26.3,,
Header,+,applications/services/bt/bt_service/bt.h,,
Header,+,applications/services/cli/cli.h,,
Header,+,applications/services/cli/cli_vcp.h,,
Expand Down Expand Up @@ -144,10 +144,12 @@ Header,+,lib/mlib/m-rbtree.h,,
Header,+,lib/mlib/m-tuple.h,,
Header,+,lib/mlib/m-variant.h,,
Header,+,lib/nfc/nfc_device.h,,
Header,+,lib/nfc/protocols/nfc_util.h,,
Header,+,lib/one_wire/maxim_crc.h,,
Header,+,lib/one_wire/one_wire_host.h,,
Header,+,lib/one_wire/one_wire_slave.h,,
Header,+,lib/print/wrappers.h,,
Header,+,lib/pulse_reader/pulse_reader.h,,
Header,+,lib/stm32wb_hal/Inc/stm32wbxx_ll_adc.h,,
Header,+,lib/stm32wb_hal/Inc/stm32wbxx_ll_bus.h,,
Header,+,lib/stm32wb_hal/Inc/stm32wbxx_ll_comp.h,,
Expand Down Expand Up @@ -175,7 +177,6 @@ Header,+,lib/stm32wb_hal/Inc/stm32wbxx_ll_tim.h,,
Header,+,lib/stm32wb_hal/Inc/stm32wbxx_ll_usart.h,,
Header,+,lib/stm32wb_hal/Inc/stm32wbxx_ll_utils.h,,
Header,+,lib/stm32wb_hal/Inc/stm32wbxx_ll_wwdg.h,,
Header,+,lib/pulse_reader/pulse_reader.h,,
Header,+,lib/subghz/blocks/const.h,,
Header,+,lib/subghz/blocks/decoder.h,,
Header,+,lib/subghz/blocks/encoder.h,,
Expand Down Expand Up @@ -2064,6 +2065,11 @@ Function,+,nfc_device_save_shadow,_Bool,"NfcDevice*, const char*"
Function,+,nfc_device_set_loading_callback,void,"NfcDevice*, NfcLoadingCallback, void*"
Function,+,nfc_device_set_name,void,"NfcDevice*, const char*"
Function,+,nfc_file_select,_Bool,NfcDevice*
Function,+,nfc_util_bytes2num,uint64_t,"const uint8_t*, uint8_t"
Function,+,nfc_util_even_parity32,uint8_t,uint32_t
Function,+,nfc_util_num2bytes,void,"uint64_t, uint8_t, uint8_t*"
Function,+,nfc_util_odd_parity,void,"const uint8_t*, uint8_t*, uint8_t"
Function,+,nfc_util_odd_parity8,uint8_t,uint8_t
Function,-,nfca_append_crc16,void,"uint8_t*, uint16_t"
Function,-,nfca_emulation_handler,_Bool,"uint8_t*, uint16_t, uint8_t*, uint16_t*"
Function,-,nfca_get_crc16,uint16_t,"uint8_t*, uint16_t"
Expand Down
1 change: 1 addition & 0 deletions lib/nfc/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ env.Append(
],
SDK_HEADERS=[
File("nfc_device.h"),
File("protocols/nfc_util.h"),
],
)

Expand Down
8 changes: 8 additions & 0 deletions lib/nfc/protocols/nfc_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif

void nfc_util_num2bytes(uint64_t src, uint8_t len, uint8_t* dest);

uint64_t nfc_util_bytes2num(const uint8_t* src, uint8_t len);
Expand All @@ -11,3 +15,7 @@ uint8_t nfc_util_even_parity32(uint32_t data);
uint8_t nfc_util_odd_parity8(uint8_t data);

void nfc_util_odd_parity(const uint8_t* src, uint8_t* dst, uint8_t len);

#ifdef __cplusplus
}
#endif