Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to release a wiringPiI2CSetup() file descriptor #43

Closed
nkolban opened this issue Jul 23, 2016 · 2 comments
Closed

How to release a wiringPiI2CSetup() file descriptor #43

nkolban opened this issue Jul 23, 2016 · 2 comments

Comments

@nkolban
Copy link

nkolban commented Jul 23, 2016

If I call wiringPiI2CSetup() I am returned an open file descriptor. What is the correct way to dispose of this if I no longer need the resource?

@nekuz0r
Copy link
Collaborator

nekuz0r commented Sep 21, 2016

Good catch sir !
There is indeed a missing close function, the native wiring pi library does not provide any close function because it expects you to call close since it's open with open.
Will add a dispose function for I2C and any other resources opening a file descriptor

@NoHomey
Copy link
Collaborator

NoHomey commented Sep 29, 2016

@nekuz0r I've created #50 with which I'm adding individual closing functions for SPI and I2C interfaces. Could you review it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants