Skip to content

Commit

Permalink
fix pn53x_get_supported_modulation() and pn53x_get_supported_baud_rat…
Browse files Browse the repository at this point in the history
…e() functions
  • Loading branch information
neomilium committed Mar 1, 2012
1 parent 05789e5 commit f98437c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions libnfc/chips/pn53x.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ pn53x_init(struct nfc_device *pnd)
}

if (!CHIP_DATA(pnd)->supported_modulation_as_target) {
CHIP_DATA(pnd)->supported_modulation_as_target = pn53x_supported_modulation_as_target;
CHIP_DATA(pnd)->supported_modulation_as_target = (nfc_modulation_type*) pn53x_supported_modulation_as_target;
}

// CRC handling should be enabled by default as declared in nfc_device_new
Expand Down Expand Up @@ -2792,7 +2792,7 @@ pn53x_nm_to_ptt(const nfc_modulation nm)
}

int
pn53x_get_supported_modulation(nfc_device *pnd, const nfc_mode mode, nfc_modulation_type **supported_mt)
pn53x_get_supported_modulation(nfc_device *pnd, const nfc_mode mode, const nfc_modulation_type * *const supported_mt)
{
switch (mode) {
case N_TARGET:
Expand All @@ -2808,7 +2808,7 @@ pn53x_get_supported_modulation(nfc_device *pnd, const nfc_mode mode, nfc_modulat
}

int
pn53x_get_supported_baud_rate (nfc_device *pnd, const nfc_modulation_type nmt, nfc_baud_rate **supported_br)
pn53x_get_supported_baud_rate (nfc_device *pnd, const nfc_modulation_type nmt, const nfc_baud_rate * *const supported_br)
{
switch (nmt) {
case NMT_FELICA:
Expand All @@ -2832,7 +2832,7 @@ pn53x_get_supported_baud_rate (nfc_device *pnd, const nfc_modulation_type nmt, n
*supported_br = (nfc_baud_rate*)pn53x_dep_supported_baud_rates;
break;
default:
return NFC_EINVARG;
return NFC_EINVARG;
}
return NFC_SUCCESS;
}
Expand Down
4 changes: 2 additions & 2 deletions libnfc/chips/pn53x.h
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,8 @@ int pn53x_RFConfiguration__MaxRetries (struct nfc_device *pnd, const uint8_t
int pn53x_check_ack_frame (struct nfc_device *pnd, const uint8_t *pbtRxFrame, const size_t szRxFrameLen);
int pn53x_check_error_frame (struct nfc_device *pnd, const uint8_t *pbtRxFrame, const size_t szRxFrameLen);
int pn53x_build_frame (uint8_t *pbtFrame, size_t *pszFrame, const uint8_t *pbtData, const size_t szData);
int pn53x_get_supported_modulation(nfc_device *pnd, const nfc_mode mode, nfc_modulation_type **supported_mt);
int pn53x_get_supported_baud_rate(nfc_device *pnd, const nfc_modulation_type nmt, nfc_baud_rate **supported_br);
int pn53x_get_supported_modulation (nfc_device *pnd, const nfc_mode mode, const nfc_modulation_type **const supported_mt);
int pn53x_get_supported_baud_rate (nfc_device *pnd, const nfc_modulation_type nmt, const nfc_baud_rate **const supported_br);

void pn53x_data_new (struct nfc_device *pnd, const struct pn53x_io *io);
void pn53x_data_free (struct nfc_device *pnd);
Expand Down

0 comments on commit f98437c

Please sign in to comment.