Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
external_libnfc-nci
Commits
68f7145d
Commit
68f7145d
authored
9 years ago
by
Martijn Coenen
Committed by
Gerrit Code Review
9 years ago
Browse files
Options
Download
Plain Diff
Merge "Set RC=1 when only polling for T3T."
parents
25fcb258
4c888f85
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
0 deletions
+40
-0
src/hal/include/nci_defs.h
src/hal/include/nci_defs.h
+3
-0
src/nfa/dm/nfa_dm_discover.c
src/nfa/dm/nfa_dm_discover.c
+27
-0
src/nfa/dm/nfa_dm_main.c
src/nfa/dm/nfa_dm_main.c
+7
-0
src/nfa/int/nfa_dm_int.h
src/nfa/int/nfa_dm_int.h
+2
-0
src/nfc/include/nfc_api.h
src/nfc/include/nfc_api.h
+1
-0
No files found.
src/hal/include/nci_defs.h
View file @
68f7145d
...
...
@@ -438,6 +438,7 @@ typedef UINT8 tNCI_DISCOVERY_TYPE;
#define NCI_PARAM_ID_PB_BAILOUT 0x11
#define NCI_PARAM_ID_PB_ATTRIB_PARAM1 0x12
#define NCI_PARAM_ID_PF_BIT_RATE 0x18
#define NCI_PARAM_ID_PF_RC 0x19
#define NCI_PARAM_ID_PB_H_INFO 0x20
#define NCI_PARAM_ID_PI_BIT_RATE 0x21
...
...
@@ -512,6 +513,8 @@ typedef UINT8 tNCI_DISCOVERY_TYPE;
#define NCI_PARAM_LEN_PA_FSDI 1
#define NCI_PARAM_LEN_PF_RC 1
#define NCI_PARAM_LEN_LA_BIT_FRAME_SDD 1
#define NCI_PARAM_LEN_LA_PLATFORM_CONFIG 1
#define NCI_PARAM_LEN_LA_SEL_INFO 1
...
...
This diff is collapsed.
Click to expand it.
src/nfa/dm/nfa_dm_discover.c
View file @
68f7145d
...
...
@@ -970,6 +970,7 @@ void nfa_dm_start_rf_discover (void)
{
tNFC_DISCOVER_PARAMS
disc_params
[
NFA_DM_MAX_DISC_PARAMS
];
tNFA_DM_DISC_TECH_PROTO_MASK
dm_disc_mask
=
0
,
poll_mask
,
listen_mask
;
UINT8
config_params
[
10
],
*
p
;
UINT8
num_params
,
xx
;
NFA_TRACE_DEBUG0
(
"nfa_dm_start_rf_discover ()"
);
...
...
@@ -1088,7 +1089,33 @@ void nfa_dm_start_rf_discover (void)
/* Let P2P set GEN bytes for LLCP to NFCC */
if
(
dm_disc_mask
&
NFA_DM_DISC_MASK_NFC_DEP
)
{
nfa_p2p_set_config
(
dm_disc_mask
);
}
if
(
dm_disc_mask
&
(
NFA_DM_DISC_MASK_PF_NFC_DEP
|
NFA_DM_DISC_MASK_PF_T3T
))
{
/* According to the NFC Forum Activity spec, controllers must:
* 1) Poll with RC=0 and SC=FFFF to find NFC-DEP targets
* 2) Poll with RC=1 and SC=FFFF to find T3T targets
* Many controllers don't do this yet, and seem to be activating
* NFC-DEP by default.
*
* We can at least fix the scenario where we're not interested
* in NFC-DEP, by setting RC=1 in that case. Otherwise, keep
* the default of RC=0. */
p
=
config_params
;
UINT8_TO_STREAM
(
p
,
NFC_PMID_PF_RC
);
UINT8_TO_STREAM
(
p
,
NCI_PARAM_LEN_PF_RC
);
if
((
dm_disc_mask
&
NFA_DM_DISC_MASK_PF_NFC_DEP
)
&&
!
nfa_dm_is_p2p_paused
())
{
UINT8_TO_STREAM
(
p
,
0x00
);
// RC=0
}
else
{
UINT8_TO_STREAM
(
p
,
0x01
);
// RC=1
}
nfa_dm_check_set_config
(
p
-
config_params
,
config_params
,
FALSE
);
}
}
...
...
This diff is collapsed.
Click to expand it.
src/nfa/dm/nfa_dm_main.c
View file @
68f7145d
...
...
@@ -250,6 +250,13 @@ tNFA_STATUS nfa_dm_check_set_config (UINT8 tlv_list_len, UINT8 *p_tlv_list, BOOL
switch
(
type
)
{
/*
** Poll F Configuration
*/
case
NFC_PMID_PF_RC
:
p_stored
=
nfa_dm_cb
.
params
.
pf_rc
;
max_len
=
NCI_PARAM_LEN_PF_RC
;
break
;
case
NFC_PMID_TOTAL_DURATION
:
p_stored
=
nfa_dm_cb
.
params
.
total_duration
;
max_len
=
NCI_PARAM_LEN_TOTAL_DURATION
;
...
...
This diff is collapsed.
Click to expand it.
src/nfa/int/nfa_dm_int.h
View file @
68f7145d
...
...
@@ -463,6 +463,8 @@ typedef struct
UINT8
atr_req_gen_bytes_len
;
UINT8
atr_res_gen_bytes
[
NCI_MAX_GEN_BYTES_LEN
];
UINT8
atr_res_gen_bytes_len
;
UINT8
pf_rc
[
NCI_PARAM_LEN_PF_RC
];
}
tNFA_DM_PARAMS
;
/*
...
...
This diff is collapsed.
Click to expand it.
src/nfc/include/nfc_api.h
View file @
68f7145d
...
...
@@ -87,6 +87,7 @@ typedef UINT8 tNFC_STATUS;
#define NFC_PMID_PB_BAILOUT NCI_PARAM_ID_PB_BAILOUT
#define NFC_PMID_PB_ATTRIB_PARAM1 NCI_PARAM_ID_PB_ATTRIB_PARAM1
#define NFC_PMID_PF_BIT_RATE NCI_PARAM_ID_PF_BIT_RATE
#define NFC_PMID_PF_RC NCI_PARAM_ID_PF_RC
#define NFC_PMID_PB_H_INFO NCI_PARAM_ID_PB_H_INFO
#define NFC_PMID_BITR_NFC_DEP NCI_PARAM_ID_BITR_NFC_DEP
#define NFC_PMID_ATR_REQ_GEN_BYTES NCI_PARAM_ID_ATR_REQ_GEN_BYTES
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment