Closed Bug 1026422 Opened 10 years ago Closed 10 years ago

[NFC] Select NFC RF from RE protocol in emulator

Categories

(Firefox OS Graveyard :: NFC, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
2.0 S5 (4july)

People

(Reporter: tzimmermann, Assigned: dimi)

Details

Attachments

(1 file, 2 obsolete files)

As discussed on IRC, we need a better way to map RE's to RF's in the emulator. The current code is not clean and doesn't handle all cases of protocols, modes and interfaces. Each RF shall have an interface (NCI_RF_INTERFACE_*) and a mode (NCI_RF_NFC_*_MODE). Each RE shall have a protocol (NCI_RF_PROTOCOL_*). When the user activates an RE, the emulator shall select a compatible RF from the list of RFs without dynamic configuration if possible.
Assignee: nobody → dlee
Attached patch Bug 1026422 patch v1 (obsolete) (deleted) — Splinter Review
Attachment #8442008 - Flags: review?(tzimmermann)
Attachment #8442008 - Attachment description: 0001-Bug-1026422-NFC-Select-NFC-RF-from-RE-protocol-in-em.patch → Bug 1026422 patch v1
Attached patch Bug 1026422 patch v2 (obsolete) (deleted) — Splinter Review
Attachment #8442008 - Attachment is obsolete: true
Attachment #8442008 - Flags: review?(tzimmermann)
Attachment #8442010 - Flags: review?(tzimmermann)
Comment on attachment 8442010 [details] [diff] [review] Bug 1026422 patch v2 Review of attachment 8442010 [details] [diff] [review]: ----------------------------------------------------------------- Hi Dimi, r+ with the comments fixed. Thanks for cleaning up this code. ::: hw/nfc-rf.c @@ +15,4 @@ > #include "nfc-rf.h" > > void > +nfc_rf_init(struct nfc_rf* rf) This function should init exactly one instance. @@ +19,3 @@ > { > + rf[0].iface = NCI_RF_INTERFACE_NFC_DEP; rf[0].mode = NCI_RF_NFC_A_PASSIVE_POLL_MODE; > + rf[1].iface = NCI_RF_INTERFACE_NFC_DEP; rf[1].mode = NCI_RF_NFC_B_PASSIVE_POLL_MODE; According to [NCI], Sec 8.4.3, there is no NFC_B for NFC_DEP. ::: hw/nfc.c @@ +23,4 @@ > > nfc->state = NFC_FSM_STATE_IDLE; > nfc->rf_state = NFC_RFST_IDLE; > + nfc_rf_init(nfc->rf); Please add a call for each element in rf and supply the values as parameters.
Attachment #8442010 - Flags: review?(tzimmermann) → review+
Attachment #8442581 - Flags: review+
Attachment #8442010 - Attachment is obsolete: true
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 10 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 2.0 S5 (4july)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: