libnx  v4.2.0
Data Structures | Enumerations | Functions
nfc.h File Reference

Nintendo Figurine (amiibo) Platform (nfp:user) service IPC wrapper. More...

#include "../types.h"
#include "../sf/service.h"
#include "../services/mii.h"

Go to the source code of this file.

Data Structures

struct  NfpTagInfo
 
struct  NfpCommonInfo
 
struct  NfpModelInfo
 
struct  NfpRegisterInfo
 
struct  NfcRequiredMcuVersionData
 
struct  NfcDeviceHandle
 Nfc/Nfp DeviceHandle. More...
 

Enumerations

enum  NfpServiceType {
  NfpServiceType_User = 0,
  NfpServiceType_Debug = 1,
  NfpServiceType_System = 2
}
 NfpServiceType. More...
 
enum  NfcServiceType {
  NfcServiceType_User = 0,
  NfcServiceType_System = 1
}
 NfcServiceType. More...
 
enum  NfpState {
  NfpState_NonInitialized = 0,
  NfpState_Initialized = 1
}
 
enum  NfpDeviceState {
  NfpDeviceState_Initialized = 0,
  NfpDeviceState_SearchingForTag = 1,
  NfpDeviceState_TagFound = 2,
  NfpDeviceState_TagRemoved = 3,
  NfpDeviceState_TagMounted = 4,
  NfpDeviceState_Unavailable = 5,
  NfpDeviceState_Finalized = 6
}
 
enum  NfpDeviceType { NfpDeviceType_Amiibo = 0 }
 
enum  NfpMountTarget {
  NfpMountTarget_Rom = 1,
  NfpMountTarget_Ram = 2,
  NfpMountTarget_All = 3
}
 

Functions

Result nfpInitialize (NfpServiceType service_type)
 Initialize nfp:*.
 
void nfpExit (void)
 Exit nfp:*.
 
Result nfcInitialize (NfcServiceType service_type)
 Initialize nfc:*.
 
void nfcExit (void)
 Exit nfc:*.
 
ServicenfpGetServiceSession (void)
 Gets the Service object for the actual nfp:* service session.
 
ServicenfpGetServiceSession_Interface (void)
 Gets the Service object for the interface from nfp:*.
 
ServicenfcGetServiceSession (void)
 Gets the Service object for the actual nfc:* service session.
 
ServicenfcGetServiceSession_Interface (void)
 Gets the Service object for the interface from nfc:*.
 
Result nfpListDevices (s32 *total_out, NfcDeviceHandle *out, s32 count)
 
Result nfpStartDetection (const NfcDeviceHandle *handle)
 
Result nfpStopDetection (const NfcDeviceHandle *handle)
 
Result nfpMount (const NfcDeviceHandle *handle, NfpDeviceType device_type, NfpMountTarget mount_target)
 
Result nfpUnmount (const NfcDeviceHandle *handle)
 
Result nfpOpenApplicationArea (const NfcDeviceHandle *handle, u32 app_id)
 Not available with NfpServiceType_System.
 
Result nfpGetApplicationArea (const NfcDeviceHandle *handle, void *buf, size_t buf_size)
 Not available with NfpServiceType_System.
 
Result nfpSetApplicationArea (const NfcDeviceHandle *handle, const void *buf, size_t buf_size)
 Not available with NfpServiceType_System.
 
Result nfpFlush (const NfcDeviceHandle *handle)
 
Result nfpRestore (const NfcDeviceHandle *handle)
 
Result nfpCreateApplicationArea (const NfcDeviceHandle *handle, u32 app_id, const void *buf, size_t buf_size)
 Not available with NfpServiceType_System.
 
Result nfpGetTagInfo (const NfcDeviceHandle *handle, NfpTagInfo *out)
 
Result nfpGetRegisterInfo (const NfcDeviceHandle *handle, NfpRegisterInfo *out)
 
Result nfpGetCommonInfo (const NfcDeviceHandle *handle, NfpCommonInfo *out)
 
Result nfpGetModelInfo (const NfcDeviceHandle *handle, NfpModelInfo *out)
 
Result nfpAttachActivateEvent (const NfcDeviceHandle *handle, Event *out_event)
 Returned event will have autoclear off.
 
Result nfpAttachDeactivateEvent (const NfcDeviceHandle *handle, Event *out_event)
 Returned event will have autoclear off.
 
Result nfpGetState (NfpState *out)
 
Result nfpGetDeviceState (const NfcDeviceHandle *handle, NfpDeviceState *out)
 
Result nfpGetNpadId (const NfcDeviceHandle *handle, u32 *out)
 
Result nfpAttachAvailabilityChangeEvent (Event *out_event)
 Returned event will have autoclear on. More...
 
Result nfcIsNfcEnabled (bool *out)
 This uses nfc:*.
 

Detailed Description

Nintendo Figurine (amiibo) Platform (nfp:user) service IPC wrapper.

Author
averne

Enumeration Type Documentation

◆ NfcServiceType

NfcServiceType.

Enumerator
NfcServiceType_User 

Initializes nfc:user.

NfcServiceType_System 

Initializes nfc:sys.

◆ NfpServiceType

NfpServiceType.

Enumerator
NfpServiceType_User 

Initializes nfp:user.

NfpServiceType_Debug 

Initializes nfp:dbg.

NfpServiceType_System 

Initializes nfp:sys.

Function Documentation

◆ nfpAttachAvailabilityChangeEvent()

Result nfpAttachAvailabilityChangeEvent ( Event out_event)

Returned event will have autoclear on.

Only available with [3.0.0+].