lgo_GetHardwareId()
Retrieve the hardware identifier of a given driver.
#include "laygo.h" LResult lgo_GetHardwareId ( LDriverId driver );
driver | id of driver to query |
lgo_GetHardwareId() retrieves the hardware identifier of a given driver. This enables an application to determine if a driver controls an intelligent board which requires downloading a driver module. This function should be called with a LDriverId parameter in the range 0 to N-1 where N is the number of drivers for which the stack is configured.
If successful, lgo_GetHardwareId() returns a non-negative value indicating the type of hardware controlled by the driver. Otherwise, it returns a negative value indicating the reason it failed. Possible unsuccessful return values are:
None
LHardwareId hwId; if ((hwId = lgo_GetHardwareId(0)) < 0) { return (FAILURE); }