CP2130 Configurator (cp2130-conf) is an application that can be used to configure CP2130 devices, including VID, PID, as well as other descriptors. Most importantly, the application allows you to configure pin functions and states.
GNU General Public License v3.0
1
stars
1
forks
source link
Style: Use of magic number in "configuratorwindow.cpp", line 659 #13
Inside the file "configuratorwindow.cpp", line 659, there is a magic number in use:
if (err != 2) { // Retry only if the device was not found yet (as it may take some time to enumerate)
However, this number already has a meaning. For clarity, line 659 should be rewritten as:
if (err != CP2130::ERROR_NOT_FOUND) { // Retry only if the device was not found yet (as it may take some time to enumerate)