| 338 | */ |
| 339 | |
| 340 | int drcSetupNet (const int pinBase, const int numPins, const char *ipAddress, const char *port, const char *password) |
| 341 | { |
| 342 | int fd, len ; |
| 343 | struct wiringPiNodeStruct *node ; |
| 344 | |
| 345 | if ((fd = _drcSetupNet (ipAddress, port, password)) < 0) |
| 346 | return false ; |
| 347 | |
| 348 | len = sizeof (struct drcNetComStruct) ; |
| 349 | |
| 350 | if (setsockopt (fd, SOL_SOCKET, SO_RCVLOWAT, (void *)&len, sizeof (len)) < 0) |
| 351 | return false ; |
| 352 | |
| 353 | node = wiringPiNewNode (pinBase, numPins) ; |
| 354 | |
| 355 | node->fd = fd ; |
| 356 | node->pinMode = myPinMode ; |
| 357 | node->pullUpDnControl = myPullUpDnControl ; |
| 358 | node->analogRead = myAnalogRead ; |
| 359 | node->analogRead = myAnalogRead ; |
| 360 | node->analogWrite = myAnalogWrite ; |
| 361 | node->digitalRead = myDigitalRead ; |
| 362 | node->digitalWrite = myDigitalWrite ; |
| 363 | node->pwmWrite = myPwmWrite ; |
| 364 | |
| 365 | return true ; |
| 366 | } |
no test coverage detected