diff -r 399ef727bf62 -r e206f4485f60 master/pdo_list.c --- a/master/pdo_list.c Mon Dec 29 14:10:27 2008 +0000 +++ b/master/pdo_list.c Mon Dec 29 15:19:16 2008 +0000 @@ -26,7 +26,7 @@ /** \file - EtherCAT Pdo list methods. + EtherCAT PDO list methods. */ /*****************************************************************************/ @@ -42,10 +42,10 @@ /*****************************************************************************/ -/** Pdo list constructor. +/** PDO list constructor. */ void ec_pdo_list_init( - ec_pdo_list_t *pl /**< Pdo list. */ + ec_pdo_list_t *pl /**< PDO list. */ ) { INIT_LIST_HEAD(&pl->list); @@ -53,18 +53,18 @@ /*****************************************************************************/ -/** Pdo list destructor. - */ -void ec_pdo_list_clear(ec_pdo_list_t *pl /**< Pdo list. */) +/** PDO list destructor. + */ +void ec_pdo_list_clear(ec_pdo_list_t *pl /**< PDO list. */) { ec_pdo_list_clear_pdos(pl); } /*****************************************************************************/ -/** Clears the list of mapped Pdos. - */ -void ec_pdo_list_clear_pdos(ec_pdo_list_t *pl /**< Pdo list. */) +/** Clears the list of mapped PDOs. + */ +void ec_pdo_list_clear_pdos(ec_pdo_list_t *pl /**< PDO list. */) { ec_pdo_t *pdo, *next; @@ -77,12 +77,12 @@ /*****************************************************************************/ -/** Calculates the total size of the mapped Pdo entries. +/** Calculates the total size of the mapped PDO entries. * * \retval Data size in byte. */ uint16_t ec_pdo_list_total_size( - const ec_pdo_list_t *pl /**< Pdo list. */ + const ec_pdo_list_t *pl /**< PDO list. */ ) { unsigned int bit_size; @@ -107,20 +107,20 @@ /*****************************************************************************/ -/** Add a new Pdo to the list. - * - * \retval >0 Pointer to new Pdo. +/** Add a new PDO to the list. + * + * \retval >0 Pointer to new PDO. * \retval NULL No memory. */ ec_pdo_t *ec_pdo_list_add_pdo( - ec_pdo_list_t *pl, /**< Pdo list. */ - uint16_t index /**< Pdo index. */ + ec_pdo_list_t *pl, /**< PDO list. */ + uint16_t index /**< PDO index. */ ) { ec_pdo_t *pdo; if (!(pdo = (ec_pdo_t *) kmalloc(sizeof(ec_pdo_t), GFP_KERNEL))) { - EC_ERR("Failed to allocate memory for Pdo.\n"); + EC_ERR("Failed to allocate memory for PDO.\n"); return NULL; } @@ -132,26 +132,26 @@ /*****************************************************************************/ -/** Add the copy of an existing Pdo to the list. +/** Add the copy of an existing PDO to the list. * * \return 0 on success, else < 0 */ int ec_pdo_list_add_pdo_copy( - ec_pdo_list_t *pl, /**< Pdo list. */ - const ec_pdo_t *pdo /**< Pdo to add. */ + ec_pdo_list_t *pl, /**< PDO list. */ + const ec_pdo_t *pdo /**< PDO to add. */ ) { ec_pdo_t *mapped_pdo; - // Pdo already mapped? + // PDO already mapped? list_for_each_entry(mapped_pdo, &pl->list, list) { if (mapped_pdo->index != pdo->index) continue; - EC_ERR("Pdo 0x%04X is already mapped!\n", pdo->index); + EC_ERR("PDO 0x%04X is already mapped!\n", pdo->index); return -1; } if (!(mapped_pdo = kmalloc(sizeof(ec_pdo_t), GFP_KERNEL))) { - EC_ERR("Failed to allocate Pdo memory.\n"); + EC_ERR("Failed to allocate PDO memory.\n"); return -1; } @@ -166,20 +166,20 @@ /*****************************************************************************/ -/** Makes a deep copy of another Pdo list. +/** Makes a deep copy of another PDO list. * * \return 0 on success, else < 0 */ int ec_pdo_list_copy( - ec_pdo_list_t *pl, /**< Pdo list. */ - const ec_pdo_list_t *other /**< Pdo list to copy from. */ + ec_pdo_list_t *pl, /**< PDO list. */ + const ec_pdo_list_t *other /**< PDO list to copy from. */ ) { ec_pdo_t *other_pdo; ec_pdo_list_clear_pdos(pl); - // Pdo already mapped? + // PDO already mapped? list_for_each_entry(other_pdo, &other->list, list) { if (ec_pdo_list_add_pdo_copy(pl, other_pdo)) return -1; @@ -190,13 +190,13 @@ /*****************************************************************************/ -/** Compares two Pdo lists. - * - * Only the list is compared, not the Pdo entries (i. e. the Pdo +/** Compares two PDO lists. + * + * Only the list is compared, not the PDO entries (i. e. the PDO * mapping). * - * \retval 1 The given Pdo lists are equal. - * \retval 0 The given Pdo lists differ. + * \retval 1 The given PDO lists are equal. + * \retval 0 The given PDO lists differ. */ int ec_pdo_list_equal( const ec_pdo_list_t *pl1, /**< First list. */ @@ -230,11 +230,11 @@ /*****************************************************************************/ -/** Finds a Pdo with the given index. +/** Finds a PDO with the given index. */ ec_pdo_t *ec_pdo_list_find_pdo( - const ec_pdo_list_t *pl, /**< Pdo list. */ - uint16_t index /**< Pdo index. */ + const ec_pdo_list_t *pl, /**< PDO list. */ + uint16_t index /**< PDO index. */ ) { ec_pdo_t *pdo; @@ -250,11 +250,11 @@ /*****************************************************************************/ -/** Finds a Pdo with the given index and returns a const pointer. +/** Finds a PDO with the given index and returns a const pointer. */ const ec_pdo_t *ec_pdo_list_find_pdo_const( - const ec_pdo_list_t *pl, /**< Pdo list. */ - uint16_t index /**< Pdo index. */ + const ec_pdo_list_t *pl, /**< PDO list. */ + uint16_t index /**< PDO index. */ ) { const ec_pdo_t *pdo; @@ -270,12 +270,12 @@ /*****************************************************************************/ -/** Finds a Pdo via its position in the list. +/** Finds a PDO via its position in the list. * * Const version. */ const ec_pdo_t *ec_pdo_list_find_pdo_by_pos_const( - const ec_pdo_list_t *pl, /**< Pdo list. */ + const ec_pdo_list_t *pl, /**< PDO list. */ unsigned int pos /**< Position in the list. */ ) { @@ -292,12 +292,12 @@ /*****************************************************************************/ -/** Get the number of Pdos in the list. - * - * \return Number of Pdos. +/** Get the number of PDOs in the list. + * + * \return Number of PDOs. */ unsigned int ec_pdo_list_count( - const ec_pdo_list_t *pl /**< Pdo list. */ + const ec_pdo_list_t *pl /**< PDO list. */ ) { const ec_pdo_t *pdo; @@ -312,10 +312,10 @@ /*****************************************************************************/ -/** Outputs the Pdos in the list. +/** Outputs the PDOs in the list. */ void ec_pdo_list_print( - const ec_pdo_list_t *pl /**< Pdo list. */ + const ec_pdo_list_t *pl /**< PDO list. */ ) { const ec_pdo_t *pdo;