device: add documentation for device_get_binding

Moved comments from code to header.

Jira: ZEP-160
Change-Id: Ifd0f3c930289256e682b5941d77433aca3d3f941
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2016-05-07 23:47:44 -04:00 committed by Anas Nashif
commit 7e5692d914
2 changed files with 13 additions and 12 deletions

View file

@ -293,6 +293,19 @@ struct device {
};
void _sys_device_do_config_level(int level);
/**
* @brief Retrieve the device structure for a driver by name
*
* @details Device objects are created via the DEVICE_INIT() macro and
* placed in memory by the linker. If a driver needs to bind to another driver
* it can use this function to retrieve the device structure of the lower level
* driver by the name the driver exposes to the system.
*
* @param name device name to search for.
*
* @return pointer to device structure; NULL if not found or cannot be used.
*/
struct device* device_get_binding(char *name);
/**

View file

@ -66,18 +66,6 @@ void _sys_device_do_config_level(int level)
}
}
/**
* @brief Retrieve the device structure for a driver by name
*
* @details Device objects are created via the DEVICE_INIT() macro and
* placed in memory by the linker. If a driver needs to bind to another driver
* it can use this function to retrieve the device structure of the lower level
* driver by the name the driver exposes to the system.
*
* @param name device name to search for.
*
* @return pointer to device structure; NULL if not found or cannot be used.
*/
struct device *device_get_binding(char *name)
{
struct device *info;