-
Notifications
You must be signed in to change notification settings - Fork 6
no interrupts? #19
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
Comments
CircuitPython doesn't have any support for interrupts. |
Well in that case it needs get some, because otherwise an awful lot of useful functionality for the parts is missing. |
Glad to see you volunteering to implement it. |
Snarky remark not appreciated. It wouldn't exactly be rocket science. Interrupts are supported in the previous adafruit library for this device, so there's no mystery. https://github.com/adafruit/micropython-adafruit-tsl2561 |
All right everyone, simmer down. I think this thread has gone a bit off the rails with more than a little lack of grace and misunderstanding on both sides. In a sense you are both right but not completely. As far as I can tell the previous driver was a micropython library and micropython does support interrupts whereas CircuitPython being primarily targeted to people learning to program does not. Adding interrupt support or some other model of concurrency has been a long standing conversation among the development team and interested parties such as yourself however it's still not been settled how to do it in a manner that meets the goals of Circuit Python as well as the wants of a very broad user base. Your input is welcome if you want to find the issue in the main CircuitPython repo where it is being discussed. |
If you have a link to the issue you are referring in the main repo I would like to read it. |
I'm away from my computer right now but there is an issue on the main Circuit Python repo that either you can find or I can post a link to when I get home later tonight. |
hiya folks - i think you're talking about 2 things - circuitpython does not have core interrupt support but the TSL can toggle a GPIO when some threshhold is hit - an IRQ. that doesn't depend on core int support, and wasn't ported over from the micropython version of this driver (which is now archived). @carterw if you're interested in adding that to this library, that would be great - we don't have any immediate plans to add those functions over |
Here's the issue that I think @siddacious was referring to: adafruit/circuitpython#1380. It's one idea about how to provide some asynchronous event support without interrupts. In general we have been implementing functionality that needs interrupts in C, and then providing some kind of non-raw-interrupt interface that helps with the upper-level use case that needs interrupts. |
Thanks for the explanations. I came here as a result of this issue I posted against the previous driver. I was surprised to see that the entire repository was archived shortly thereafter. I'm really just looking for assistance on that issue. Ideally from someone who actually uses the device and might know more about it than I do. If you guys don't want to port the valuable interrupt code over to here from that driver its okay with me. |
I created an issue to add this missing functionality to the driver. Please comment there #20 . The issue in the micropython repo may or may not apply again here. We can check that once this driver has the functionality. |
Much appreciated. |
carterw, FYI we haven't supported micropython code for over a year, we're doing some cleanup and archiving drivers. so, we won't be updating any micropython libraries, if you want to fix any bugs please fork the repo to make desired changes |
Not seeing methods that support interrupts on low or high light levels. That was available in your previous driver.
The text was updated successfully, but these errors were encountered: