From e3c7dc319ff582f9eb4a593950ac7bedb1d38b77 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 6 Feb 2010 16:17:30 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1571 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/src/mac.c | 89 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 45 insertions(+), 44 deletions(-) (limited to 'os/hal/src/mac.c') diff --git a/os/hal/src/mac.c b/os/hal/src/mac.c index 6d31c7b9e..74e08bdf4 100644 --- a/os/hal/src/mac.c +++ b/os/hal/src/mac.c @@ -18,8 +18,9 @@ */ /** - * @file mac.c - * @brief MAC Driver code. + * @file mac.c + * @brief MAC Driver code. + * * @addtogroup MAC * @{ */ @@ -50,7 +51,7 @@ /*===========================================================================*/ /** - * @brief MAC Driver initialization. + * @brief MAC Driver initialization. */ void macInit(void) { @@ -58,9 +59,9 @@ void macInit(void) { } /** - * @brief Initialize the standard part of a @p MACDriver structure. + * @brief Initialize the standard part of a @p MACDriver structure. * - * @param[in] macp pointer to the @p MACDriver object + * @param[in] macp pointer to the @p MACDriver object */ void macObjectInit(MACDriver *macp) { @@ -72,15 +73,15 @@ void macObjectInit(MACDriver *macp) { } /** - * @brief MAC address setup. + * @brief MAC address setup. + * @note This function must be invoked only with the driver in the stopped + * state. If invoked on an active interface then it is ignored. * - * @param[in] macp pointer to the @p MACDriver object - * @param[in] p pointer to a six bytes buffer containing the MAC address. If - * this parameter is set to @p NULL then a system default MAC is - * used. + * @param[in] macp pointer to the @p MACDriver object + * @param[in] p pointer to a six bytes buffer containing the MAC + * address. If this parameter is set to @p NULL then MAC + * a system default is used. * - * @note This function must be invoked only with the driver in the stopped - * state. If invoked on an active interface then it is ignored. */ void macSetAddress(MACDriver *macp, const uint8_t *p) { @@ -88,21 +89,21 @@ void macSetAddress(MACDriver *macp, const uint8_t *p) { } /** - * @brief Allocates a transmission descriptor. + * @brief Allocates a transmission descriptor. * @details One of the available transmission descriptors is locked and * returned. If a descriptor is not currently available then the * invoking thread is queued until one is freed. * - * @param[in] macp pointer to the @p MACDriver object - * @param[out] tdp pointer to a @p MACTransmitDescriptor structure - * @param[in] time the number of ticks before the operation timeouts, - * the following special values are allowed: - * - @a TIME_IMMEDIATE immediate timeout. - * - @a TIME_INFINITE no timeout. - * . - * @return The operation status. - * @retval RDY_OK the descriptor was obtained. - * @retval RDY_TIMEOUT the operation timed out, descriptor not initialized. + * @param[in] macp pointer to the @p MACDriver object + * @param[out] tdp pointer to a @p MACTransmitDescriptor structure + * @param[in] time the number of ticks before the operation timeouts, + * the following special values are allowed: + * - @a TIME_IMMEDIATE immediate timeout. + * - @a TIME_INFINITE no timeout. + * . + * @return The operation status. + * @retval RDY_OK the descriptor was obtained. + * @retval RDY_TIMEOUT the operation timed out, descriptor not initialized. */ msg_t macWaitTransmitDescriptor(MACDriver *macp, MACTransmitDescriptor *tdp, @@ -123,10 +124,10 @@ msg_t macWaitTransmitDescriptor(MACDriver *macp, } /** - * @brief Releases a transmit descriptor and starts the transmission of the - * enqueued data as a single frame. + * @brief Releases a transmit descriptor and starts the transmission of the + * enqueued data as a single frame. * - * @param[in] tdp the pointer to the @p MACTransmitDescriptor structure + * @param[in] tdp the pointer to the @p MACTransmitDescriptor structure */ void macReleaseTransmitDescriptor(MACTransmitDescriptor *tdp) { @@ -134,21 +135,21 @@ void macReleaseTransmitDescriptor(MACTransmitDescriptor *tdp) { } /** - * @brief Waits for a received frame. + * @brief Waits for a received frame. * @details Stops until a frame is received and buffered. If a frame is * not immediately available then the invoking thread is queued * until one is received. * - * @param[in] macp pointer to the @p MACDriver object - * @param[out] rdp pointer to a @p MACReceiveDescriptor structure - * @param[in] time the number of ticks before the operation timeouts, - * the following special values are allowed: - * - @a TIME_IMMEDIATE immediate timeout. - * - @a TIME_INFINITE no timeout. - * . - * @return The operation status. - * @retval RDY_OK the descriptor was obtained. - * @retval RDY_TIMEOUT the operation timed out, descriptor not initialized. + * @param[in] macp pointer to the @p MACDriver object + * @param[out] rdp pointer to a @p MACReceiveDescriptor structure + * @param[in] time the number of ticks before the operation timeouts, + * the following special values are allowed: + * - @a TIME_IMMEDIATE immediate timeout. + * - @a TIME_INFINITE no timeout. + * . + * @return The operation status. + * @retval RDY_OK the descriptor was obtained. + * @retval RDY_TIMEOUT the operation timed out, descriptor not initialized. */ msg_t macWaitReceiveDescriptor(MACDriver *macp, MACReceiveDescriptor *rdp, @@ -169,11 +170,11 @@ msg_t macWaitReceiveDescriptor(MACDriver *macp, } /** - * @brief Releases a receive descriptor. + * @brief Releases a receive descriptor. * @details The descriptor and its buffer are made available for more incoming * frames. * - * @param[in] rdp the pointer to the @p MACReceiveDescriptor structure + * @param[in] rdp the pointer to the @p MACReceiveDescriptor structure */ void macReleaseReceiveDescriptor(MACReceiveDescriptor *rdp) { @@ -181,12 +182,12 @@ void macReleaseReceiveDescriptor(MACReceiveDescriptor *rdp) { } /** - * @brief Updates and returns the link status. + * @brief Updates and returns the link status. * - * @param[in] macp pointer to the @p MACDriver object - * @return The link status. - * @retval TRUE if the link is active. - * @retval FALSE if the link is down. + * @param[in] macp pointer to the @p MACDriver object + * @return The link status. + * @retval TRUE if the link is active. + * @retval FALSE if the link is down. */ bool_t macPollLinkStatus(MACDriver *macp) { -- cgit v1.2.3