Skip to content

Commit

Permalink
fix *get_supported_modulation and *get_supported_baud_rate protos in …
Browse files Browse the repository at this point in the history
…nfc_driver and public ones.
  • Loading branch information
neomilium committed Mar 1, 2012
1 parent f98437c commit e7f8581
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 32 deletions.
4 changes: 2 additions & 2 deletions include/nfc/nfc.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ extern "C" {
NFC_EXPORT int nfc_abort_command (nfc_device *pnd);
NFC_EXPORT size_t nfc_list_devices (nfc_context *context, nfc_connstring connstrings[], size_t connstrings_len);
NFC_EXPORT int nfc_idle (nfc_device *pnd);
NFC_EXPORT int nfc_device_get_supported_modulation (nfc_device *pnd, const nfc_mode mode, nfc_modulation_type **supported_mt);
NFC_EXPORT int nfc_device_get_supported_baud_rate (nfc_device *pnd, const nfc_modulation_type nmt, nfc_baud_rate **supported_br);

/* NFC initiator: act as "reader" */
NFC_EXPORT int nfc_initiator_init (nfc_device *pnd);
Expand Down Expand Up @@ -105,6 +103,8 @@ extern "C" {
/* Special data accessors */
NFC_EXPORT const char *nfc_device_get_name (nfc_device *pnd);
NFC_EXPORT const char *nfc_device_get_connstring (nfc_device *pnd);
NFC_EXPORT int nfc_device_get_supported_modulation (nfc_device *pnd, const nfc_mode mode, const nfc_modulation_type **const supported_mt);
NFC_EXPORT int nfc_device_get_supported_baud_rate (nfc_device *pnd, const nfc_modulation_type nmt, const nfc_baud_rate **const supported_br);

/* Properties accessors */
NFC_EXPORT int nfc_device_set_property_int (nfc_device *pnd, const nfc_property property, const int value);
Expand Down
4 changes: 2 additions & 2 deletions libnfc/nfc-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ struct nfc_driver {

int (*device_set_property_bool) (struct nfc_device *pnd, const nfc_property property, const bool bEnable);
int (*device_set_property_int) (struct nfc_device *pnd, const nfc_property property, const int value);
int (*get_supported_modulation) (struct nfc_device *pnd, const nfc_mode mode, nfc_modulation_type **supported_mt);
int (*get_supported_baud_rate) (struct nfc_device *pnd, const nfc_modulation_type nmt, nfc_baud_rate **supported_br);
int (*get_supported_modulation) (struct nfc_device *pnd, const nfc_mode mode, const nfc_modulation_type **const supported_mt);
int (*get_supported_baud_rate) (struct nfc_device *pnd, const nfc_modulation_type nmt, const nfc_baud_rate **const supported_br);

int (*abort_command) (struct nfc_device *pnd);
int (*idle) (struct nfc_device *pnd);
Expand Down
56 changes: 28 additions & 28 deletions libnfc/nfc.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,34 +270,6 @@ nfc_list_devices (nfc_context *context, nfc_connstring connstrings[] , size_t sz
return szDeviceFound;
}

/** @ingroup dev
* @brief Get supported modulations.
* @return Returns 0 on success, otherwise returns libnfc's error code (negative value)
* @param pnd \a nfc_device struct pointer that represent currently used device
* @param mode \a nfc_mode.
* @param supported_mt pointer of \a nfc_modulation_type array.
*
*/
int
nfc_device_get_supported_modulation (nfc_device *pnd, const nfc_mode mode, nfc_modulation_type **supported_mt)
{
HAL (get_supported_modulation, pnd, mode, supported_mt);
}

/** @ingroup dev
* @brief Get supported baud rates.
* @return Returns 0 on success, otherwise returns libnfc's error code (negative value)
* @param pnd \a nfc_device struct pointer that represent currently used device
* @param nmt \a nfc_modulation_type.
* @param supported_br pointer of \a nfc_baud_rate array.
*
*/
int
nfc_device_get_supported_baud_rate (nfc_device *pnd, const nfc_modulation_type nmt, nfc_baud_rate **supported_br)
{
HAL (get_supported_baud_rate, pnd, nmt, supported_br);
}

/** @ingroup properties
* @brief Set a device's integer-property value
* @return Returns 0 on success, otherwise returns libnfc's error code (negative value)
Expand Down Expand Up @@ -1017,6 +989,34 @@ nfc_device_get_connstring (nfc_device *pnd)
return pnd->connstring;
}

/** @ingroup data
* @brief Get supported modulations.
* @return Returns 0 on success, otherwise returns libnfc's error code (negative value)
* @param pnd \a nfc_device struct pointer that represent currently used device
* @param mode \a nfc_mode.
* @param supported_mt pointer of \a nfc_modulation_type array.
*
*/
int
nfc_device_get_supported_modulation (nfc_device *pnd, const nfc_mode mode, const nfc_modulation_type **const supported_mt)
{
HAL (get_supported_modulation, pnd, mode, supported_mt);
}

/** @ingroup data
* @brief Get supported baud rates.
* @return Returns 0 on success, otherwise returns libnfc's error code (negative value)
* @param pnd \a nfc_device struct pointer that represent currently used device
* @param nmt \a nfc_modulation_type.
* @param supported_br pointer of \a nfc_baud_rate array.
*
*/
int
nfc_device_get_supported_baud_rate (nfc_device *pnd, const nfc_modulation_type nmt, const nfc_baud_rate **const supported_br)
{
HAL (get_supported_baud_rate, pnd, nmt, supported_br);
}

/* Misc. functions */

/** @ingroup misc
Expand Down

0 comments on commit e7f8581

Please sign in to comment.