| 78 | */ |
| 79 | |
| 80 | int pcf8591Setup (const int pinBase, const int i2cAddress) |
| 81 | { |
| 82 | int fd ; |
| 83 | struct wiringPiNodeStruct *node ; |
| 84 | |
| 85 | if ((fd = wiringPiI2CSetup (i2cAddress)) < 0) |
| 86 | return false ; |
| 87 | |
| 88 | node = wiringPiNewNode (pinBase, 4) ; |
| 89 | |
| 90 | node->fd = fd ; |
| 91 | node->analogRead = myAnalogRead ; |
| 92 | node->analogWrite = myAnalogWrite ; |
| 93 | |
| 94 | return true ; |
| 95 | } |
no test coverage detected