nfc_get_channel_status()
Retrieve the current status of an NFC service channel of the specified type.
Synopsis:
#include <nfc/nfc.h>
NFC_API nfc_result_t nfc_get_channel_status(nfc_channel_type_t type, uint64_t *bitmask)
Arguments:
- type
-
The channel type, which must be one of type nfc_channel_type_t.
- bitmask
-
Contains all the information about the current status of the specific channel of the NFC service. The list of supported statuses includes:
- NFC_CHANNEL_STATUS_HARDWARE_PRESENT: indicates an NFC hardware support type. The bit is set when the device hardware supports NFC.
- NFC_CHANNEL_STATUS_CARRIER_SUPPORTED: indicates a carrier support type. The bit is set when the carrier configuration allows NFC.
- NFC_CHANNEL_STATUS_IT_POLICY_ALLOWED: indicates an IT policy support type. The bit is set when IT policy allows NFC.
Library:
libnfcDescription:
This function retrieves the current status of the specific channel of the NFC service, including Hardware Support, IT Policy, etc. Refer to nfc_channel_status_mask_t for a list of supported states.
Returns:
NFC_RESULT_SUCCESS, or one of the following:
- NFC_RESULT_SERVICE_CONNECTION_ERROR: The application is not able to communicate with the NFC system using the provided channel.
- NFC_RESULT_INVALID_PARAMETER: Either the bitmask or the channel type specified is invalid.