fix pn53x_get_supported_modulation() and pn53x_get_supported_baud_rate() functions

This commit is contained in:
Romuald Conty 2012-03-01 13:43:04 +00:00
parent 05789e5a68
commit f98437c377
2 changed files with 6 additions and 6 deletions

View file

@ -98,7 +98,7 @@ pn53x_init(struct nfc_device *pnd)
} }
if (!CHIP_DATA(pnd)->supported_modulation_as_target) { 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 // CRC handling should be enabled by default as declared in nfc_device_new
@ -2792,7 +2792,7 @@ pn53x_nm_to_ptt(const nfc_modulation nm)
} }
int 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) { switch (mode) {
case N_TARGET: case N_TARGET:
@ -2808,7 +2808,7 @@ pn53x_get_supported_modulation(nfc_device *pnd, const nfc_mode mode, nfc_modulat
} }
int 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) { switch (nmt) {
case NMT_FELICA: case NMT_FELICA:
@ -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; *supported_br = (nfc_baud_rate*)pn53x_dep_supported_baud_rates;
break; break;
default: default:
return NFC_EINVARG; return NFC_EINVARG;
} }
return NFC_SUCCESS; return NFC_SUCCESS;
} }

View file

@ -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_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_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_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_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, nfc_baud_rate **supported_br); 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_new (struct nfc_device *pnd, const struct pn53x_io *io);
void pn53x_data_free (struct nfc_device *pnd); void pn53x_data_free (struct nfc_device *pnd);