Porting Guide/Appendix

From Tizen Wiki
Jump to: navigation, search

NFC OAL API

Function Description Parameter
net_nfc_oem_controller_init init; Initializes the NFC chip. net_nfc_error_e: Returns an error code on failure.
net_nfc_oem_controller_deinit deinit; Deinitializes the NFC chip. None
net_nfc_oem_controller_register_listener register_listener; Registers a callback function for a tag event, SE event, and llcp event. target_detection_listener_cb target_detection_listener: The tag event callback function

se_transaction_listener_cb se_transaction_listener: The SE event callback function

llcp_event_listener_cb llcp_event_listener: The llcp event callback function

net_nfc_error_e: Returns an error code on failure.

net_nfc_oem_controller_unregister_listener unregister_listener; Releases a callback function for a tag event, SE event, and llcp event. None
net_nfc_oem_controller_check_firmware_version check_firmware_version; Checks the firmware version of the NFC chip. net_nfc_error_e: Returns an error code on failure.
net_nfc_oem_controller_update_firmware update_firmware; Updates the NFC chip firmware. net_nfc_error_e: Returns an error code on failure.
net_nfc_oem_controller_get_stack_information get_stack_information; Gets the list of supported tags and the current firmware version. net_nfc_stack_information_s: Pointer value to get the information of support tags and the current firmware version

net_nfc_error_e: Returns an error code on failure.

net_nfc_oem_controller_configure_discovery configure_discovery; Delivers the config information on discovery. net_nfc_discovery_mode_e: The start/stop mode

net_nfc_event_filter_e config: The information for tag filtering

net_nfc_error_e: Returns an error code on failure.

net_nfc_oem_controller_get_secure_element_list get_secure_element_list; Gets the information of the current secure element. net_nfc_secure_element_info_s: The pointer value to get secure element information

int: The pointer value to get the count of the secure element

net_nfc_error_e: Returns an error code on failure.

net_nfc_oem_controller_set_secure_element_mode set_secure_element_mode; Sets the secure element to use. net_nfc_secure_element_type_e: Secure element information

net_nfc_secure_element_mode_e: The mode information to set

net_nfc_error_e: Returns an error code on failure.

net_nfc_oem_controller_connect connect; Connects to the detected tag/target. net_nfc_target_handle_s: The tag/target handle for connecting

net_nfc_error_e: Returns an error code on failure.

net_nfc_oem_controller_connect disconnect; Disconnects the connected tag/target. net_nfc_target_handle_s: The tag/target handle for disconnecting

net_nfc_error_e: Returns an error code on failure.

net_nfc_oem_controller_check_ndef check_ndef; Checks the tag to for ndef support. net_nfc_target_handle_s: The tag handle to check ndef

int: The max size supported in the tag

int: The real data size saved in the tag

net_nfc_error_e: Returns an error code on failure.

net_nfc_oem_controller_check_target_presence check_presence; Checks if a tag exist in the RF range. net_nfc_target_handle_s: The tag handle to check presence

net_nfc_error_e: Returns an error code on failure.

net_nfc_oem_controller_read_ndef read_ndef; Reads ndef data in a tag. net_nfc_target_handle_s: The tag handle to read

data_s: The pointer value to save the ndef data

net_nfc_error_e: Returns an error code on failure.

net_nfc_oem_controller_write_ndef write_ndef; Writes the data to the tag. net_nfc_target_handle_s: The handle to write

data_s: The data to write

net_nfc_error_e: Returns an error code on failure.

net_nfc_oem_controller_make_read_only_ndef make_read_only_ndef; Makes the tag to a read only tag. net_nfc_target_handle_s: The target tag handle

net_nfc_error_e: Returns an error code on failure.

net_nfc_oem_controller_transceive transceive; Sends and receives the low command to the tag or target. net_nfc_target_handle_s: The tag or target handle to transceive

net_nfc_transceive_info_s: The pointer value included command or data to send and data to receive

data_s: The pointer value to send the information of context

net_nfc_error_e: Returns an error code on failure.

net_nfc_oem_controller_format_ndef format_ndef; Formats the tag. net_nfc_target_handle_s: The tag handle to format

data_s: The key value to send the tag for formatting

net_nfc_error_e: Returns an error code on failure.

net_nfc_oem_controller_exception_handler exception_handler; When the nfc-manager faces an unwanted exception, it tries to deinitialize and initialize the stack before unregistering and registering the callback function. None
net_nfc_oem_controller_is_ready is_ready; Checks the status of the NFC stack. net_nfc_error_e: Returns an error code on failure.
net_nfc_oem_controller_llcp_config config_llcp; Sets the llcp configuration (miu, lto, wks, option). net_nfc_target_handle_s: The target handle to set llcp

net_nfc_error_e: Returns an error code on failure.

net_nfc_oem_controller_llcp_check_llcp check_llcp_status; Checks the llcp configuration (miu, lto, wks, option). net_nfc_target_handle_s: The target handle to check llcp

net_nfc_error_e: Returns an error code on failure.

net_nfc_oem_controller_llcp_activate_llcp activate_llcp; Activates the llcp functionality. net_nfc_target_handle_s: The target handle to activate

net_nfc_error_e: Returns an error code on failure.

net_nfc_oem_controller_llcp_create_socket create_llcp_socket; Creates the llcp socket net_nfc_llcp_socket_t: The pointer value to receive the socket information

net_nfc_socket_type_e socketType: The type of socket to create

uint16_t miu: The miu value

uint8_t rw: The rw value

net_nfc_error_e: Returns an error code on failure.

void: The value to control the context (can be set to NULL)

net_nfc_oem_controller_llcp_bind bind_llcp_socket; Binds the socket. net_nfc_llcp_socket_t socket: The information about the socket to bind

uint8_t service_access_point: The information of access point to bind

net_nfc_error_e: Returns an error code on failure.

net_nfc_oem_controller_llcp_listen listen_llcp_socket; Sets the socket to listen. net_nfc_target_handle_s: The target handle

uint8_t: The service name to listen

net_nfc_llcp_socket_t socket: Socket information

net_nfc_error_e: Returns an error code on failure.

void: The value to control the context (can be set to NULL)

net_nfc_oem_controller_llcp_accept accept_llcp_socket; Accepts the connect request in listening status. net_nfc_llcp_socket_t socket: Socket information to accept

net_nfc_error_e: Returns an error code on failure.

net_nfc_oem_controller_llcp_connect_by_url connect_llcp_by_url; Connects the server with the service name. net_nfc_target_handle_s: The handle of the target to connect

net_nfc_llcp_socket_t socket: Socket information

uint8_t: Service name to connect

net_nfc_error_e: Returns an error code on failure.

void: The value to control the context (can be set to NULL)

net_nfc_oem_controller_llcp_connect connect_llcp; Connects to the server with access point (port number). net_nfc_target_handle_s: The target handle

net_nfc_llcp_socket_t socket: Socket information

uint8_t service_access_point: Access point number

net_nfc_error_e: Returns an error code on failure.

void: The value to control the context (can be set to NULL)

net_nfc_oem_controller_llcp_disconnect disconnect_llcp; Disconnects the llcp link. net_nfc_target_handle_s: Socket information to disconnect

net_nfc_llcp_socket_t socket: The information of the socket to disconnect

net_nfc_error_e: Returns an error code on failure.

void: The value to control the context (can be set to NULL)

net_nfc_oem_controller_llcp_socket_close close_llcp_socket; Closes the llcp socket. net_nfc_llcp_socket_t socket: Socket information to close

net_nfc_error_e: Returns an error code on failure.

net_nfc_oem_controller_llcp_recv recv_llcp; Receives the data using the llcp link. net_nfc_target_handle_s: The target handle to receive

net_nfc_llcp_socket_t socket: Socket information to receive

data_s: The pointer value to receive the data

net_nfc_error_e: Returns an error code on failure.

void: The value to control the context (can be set to NULL)

net_nfc_oem_controller_llcp_send send_llcp; Sends the data using llcp link. net_nfc_target_handle_s: The target handle to send

net_nfc_llcp_socket_t socket: Socket information to send

data_s: The data to send

net_nfc_error_e: Returns an error code on failure.

void: The value to control the context (can be set to NULL)

net_nfc_oem_controller_llcp_recv_from recv_from_llcp; Rejects the connect request from the client socket. net_nfc_target_handle_s: The target handle to reject

net_nfc_llcp_socket_t socket: The socket information to reject

net_nfc_error_e: Returns an error code on failure.

net_nfc_oem_controller_llcp_send_to send_to_llcp; Sends the data using the service access point. net_nfc_target_handle_s: The peer target handle

net_nfc_llcp_socket_t socket: The socket information

data_s: The data to send

uint8_t service_access_point: The service access point to send

net_nfc_error_e: Returns an error code on failure.

void: The value to control the context (can be set to NULL)

net_nfc_oem_controller_llcp_reject reject_llcp; Rejects the connect request from the client socket. net_nfc_target_handle_s: The target handle to reject

net_nfc_llcp_socket_t socket: The socket information to reject

net_nfc_error_e: Returns an error code on failure.

net_nfc_oem_controller_llcp_get_remote_config get_remote_config; Gets te llcp socket config information of the peer device. net_nfc_target_handle_s: The peer target handle

net_nfc_llcp_config_info_s: The pointer value to get config information of peer device's llcp socket

net_nfc_error_e: Returns an error code on failure.

net_nfc_oem_controller_llcp_get_remote_socket_info get_remote_socket_info; Gets the llcp socket information of the peer device. net_nfc_target_handle_s: The peer target handle

net_nfc_llcp_socket_t socket: The llcp socket information

net_nfc_llcp_socket_option_s: The pointer value to save the information of remote socket

net_nfc_error_e: Returns an error code on failure.

net_nfc_oem_controller_sim_test sim_test; Tests the SWP link with SIM and NFC chipset. net_nfc_error_e: Returns an error code on failure.
net_nfc_oem_controller_test_mode_on test_mode_on; Changes the NFC chip to test mode. (Test mode exists only in the NXP case. If there are none, it does not need to implemented.) net_nfc_error_e: Returns an error code on failure.
net_nfc_oem_controller_test_mode_off test_mode_off; Changes the status of the NFC chip from test mode to normal mode. (Test mode exists only in the NXP case. If there are none, it does not need to implemented.) net_nfc_error_e: Returns an error code on failure.
net_nfc_oem_controller_support_nfc support_nfc Checks each the device file of each chip. If the device file is not found, the function returns NET_NFC_NOT_SUPPORTED.