Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
hci.h File Reference
#include <net/nfc/hci.h>

Go to the source code of this file.

Data Structures

struct  gate_pipe_map
 
struct  hcp_message
 
struct  hcp_packet
 
struct  hcp_exec_waiter
 
struct  hci_msg
 
struct  hci_create_pipe_params
 
struct  hci_create_pipe_resp
 

Macros

#define NFC_HCI_FRAGMENT   0x7f
 
#define HCP_HEADER(type, instr)   ((((type) & 0x03) << 6) | ((instr) & 0x3f))
 
#define HCP_MSG_GET_TYPE(header)   ((header & 0xc0) >> 6)
 
#define HCP_MSG_GET_CMD(header)   (header & 0x3f)
 
#define NFC_HCI_HCP_PACKET_HEADER_LEN   1
 
#define NFC_HCI_HCP_MESSAGE_HEADER_LEN   1
 
#define NFC_HCI_HCP_HEADER_LEN   2
 
#define NFC_HCI_HCP_COMMAND   0x00
 
#define NFC_HCI_HCP_EVENT   0x01
 
#define NFC_HCI_HCP_RESPONSE   0x02
 
#define NFC_HCI_ANY_SET_PARAMETER   0x01
 
#define NFC_HCI_ANY_GET_PARAMETER   0x02
 
#define NFC_HCI_ANY_OPEN_PIPE   0x03
 
#define NFC_HCI_ANY_CLOSE_PIPE   0x04
 
#define NFC_HCI_WR_XCHG_DATA   0x10
 
#define NFC_HCI_ADM_CREATE_PIPE   0x10
 
#define NFC_HCI_ADM_DELETE_PIPE   0x11
 
#define NFC_HCI_ADM_NOTIFY_PIPE_CREATED   0x12
 
#define NFC_HCI_ADM_NOTIFY_PIPE_DELETED   0x13
 
#define NFC_HCI_ADM_CLEAR_ALL_PIPE   0x14
 
#define NFC_HCI_ADM_NOTIFY_ALL_PIPE_CLEARED   0x15
 
#define NFC_HCI_ANY_OK   0x00
 
#define NFC_HCI_ANY_E_NOT_CONNECTED   0x01
 
#define NFC_HCI_ANY_E_CMD_PAR_UNKNOWN   0x02
 
#define NFC_HCI_ANY_E_NOK   0x03
 
#define NFC_HCI_ANY_E_PIPES_FULL   0x04
 
#define NFC_HCI_ANY_E_REG_PAR_UNKNOWN   0x05
 
#define NFC_HCI_ANY_E_PIPE_NOT_OPENED   0x06
 
#define NFC_HCI_ANY_E_CMD_NOT_SUPPORTED   0x07
 
#define NFC_HCI_ANY_E_INHIBITED   0x08
 
#define NFC_HCI_ANY_E_TIMEOUT   0x09
 
#define NFC_HCI_ANY_E_REG_ACCESS_DENIED   0x0a
 
#define NFC_HCI_ANY_E_PIPE_ACCESS_DENIED   0x0b
 

Functions

int nfc_hci_hcp_message_tx (struct nfc_hci_dev *hdev, u8 pipe, u8 type, u8 instruction, const u8 *payload, size_t payload_len, data_exchange_cb_t cb, void *cb_context, unsigned long completion_delay)
 
u8 nfc_hci_pipe2gate (struct nfc_hci_dev *hdev, u8 pipe)
 
void nfc_hci_hcp_message_rx (struct nfc_hci_dev *hdev, u8 pipe, u8 type, u8 instruction, struct sk_buff *skb)
 

Variables

struct hcp_message __packed
 

Macro Definition Documentation

#define HCP_HEADER (   type,
  instr 
)    ((((type) & 0x03) << 6) | ((instr) & 0x3f))

Definition at line 72 of file hci.h.

#define HCP_MSG_GET_CMD (   header)    (header & 0x3f)

Definition at line 74 of file hci.h.

#define HCP_MSG_GET_TYPE (   header)    ((header & 0xc0) >> 6)

Definition at line 73 of file hci.h.

#define NFC_HCI_ADM_CLEAR_ALL_PIPE   0x14

Definition at line 111 of file hci.h.

#define NFC_HCI_ADM_CREATE_PIPE   0x10

Definition at line 107 of file hci.h.

#define NFC_HCI_ADM_DELETE_PIPE   0x11

Definition at line 108 of file hci.h.

#define NFC_HCI_ADM_NOTIFY_ALL_PIPE_CLEARED   0x15

Definition at line 112 of file hci.h.

#define NFC_HCI_ADM_NOTIFY_PIPE_CREATED   0x12

Definition at line 109 of file hci.h.

#define NFC_HCI_ADM_NOTIFY_PIPE_DELETED   0x13

Definition at line 110 of file hci.h.

#define NFC_HCI_ANY_CLOSE_PIPE   0x04

Definition at line 101 of file hci.h.

#define NFC_HCI_ANY_E_CMD_NOT_SUPPORTED   0x07

Definition at line 122 of file hci.h.

#define NFC_HCI_ANY_E_CMD_PAR_UNKNOWN   0x02

Definition at line 117 of file hci.h.

#define NFC_HCI_ANY_E_INHIBITED   0x08

Definition at line 123 of file hci.h.

#define NFC_HCI_ANY_E_NOK   0x03

Definition at line 118 of file hci.h.

#define NFC_HCI_ANY_E_NOT_CONNECTED   0x01

Definition at line 116 of file hci.h.

#define NFC_HCI_ANY_E_PIPE_ACCESS_DENIED   0x0b

Definition at line 126 of file hci.h.

#define NFC_HCI_ANY_E_PIPE_NOT_OPENED   0x06

Definition at line 121 of file hci.h.

#define NFC_HCI_ANY_E_PIPES_FULL   0x04

Definition at line 119 of file hci.h.

#define NFC_HCI_ANY_E_REG_ACCESS_DENIED   0x0a

Definition at line 125 of file hci.h.

#define NFC_HCI_ANY_E_REG_PAR_UNKNOWN   0x05

Definition at line 120 of file hci.h.

#define NFC_HCI_ANY_E_TIMEOUT   0x09

Definition at line 124 of file hci.h.

#define NFC_HCI_ANY_GET_PARAMETER   0x02

Definition at line 99 of file hci.h.

#define NFC_HCI_ANY_OK   0x00

Definition at line 115 of file hci.h.

#define NFC_HCI_ANY_OPEN_PIPE   0x03

Definition at line 100 of file hci.h.

#define NFC_HCI_ANY_SET_PARAMETER   0x01

Definition at line 98 of file hci.h.

#define NFC_HCI_FRAGMENT   0x7f

Definition at line 70 of file hci.h.

#define NFC_HCI_HCP_COMMAND   0x00

Definition at line 93 of file hci.h.

#define NFC_HCI_HCP_EVENT   0x01

Definition at line 94 of file hci.h.

#define NFC_HCI_HCP_HEADER_LEN   2

Definition at line 90 of file hci.h.

#define NFC_HCI_HCP_MESSAGE_HEADER_LEN   1

Definition at line 89 of file hci.h.

#define NFC_HCI_HCP_PACKET_HEADER_LEN   1

Definition at line 88 of file hci.h.

#define NFC_HCI_HCP_RESPONSE   0x02

Definition at line 95 of file hci.h.

#define NFC_HCI_WR_XCHG_DATA   0x10

Definition at line 104 of file hci.h.

Function Documentation

void nfc_hci_hcp_message_rx ( struct nfc_hci_dev hdev,
u8  pipe,
u8  type,
u8  instruction,
struct sk_buff skb 
)

Definition at line 137 of file hcp.c.

int nfc_hci_hcp_message_tx ( struct nfc_hci_dev hdev,
u8  pipe,
u8  type,
u8  instruction,
const u8 payload,
size_t  payload_len,
data_exchange_cb_t  cb,
void cb_context,
unsigned long  completion_delay 
)

Definition at line 35 of file hcp.c.

u8 nfc_hci_pipe2gate ( struct nfc_hci_dev hdev,
u8  pipe 
)

Definition at line 122 of file hcp.c.

Variable Documentation