Author Topic: Device Id Lookup API function  (Read 3725 times)

Ivan001

  • Jr. Member
  • **
  • Posts: 2
    • View Profile
    • Email
Device Id Lookup API function
« on: July 24, 2011, 02:24:20 pm »
In the APIs you have a function called ReadSignature. This returns a string representation of the devices numeric Id.
It would be good if this could be converted to your device Id enumeration such that it could be passed in to the connect function.

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2124
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: Device Id Lookup API function
« Reply #1 on: July 25, 2011, 01:08:20 am »
In some cases passing the wrong device to the connect function could cause serious problems, therefore it would be dangerous to automatically pass the result of reading the signature.

In the vast majority of cases we would expect custom software to only support a very small subset of devices in a particular device family, which would make constructing a signature lookup table trivial. This approach inherently provides sanity checking of what devices are expected.

Andy
Embedded Systems Academy, Inc.
support at esacademy dot com