Skip to content

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

Closed
carterw opened this issue Dec 15, 2018 · 13 comments
Closed

no interrupts? #19

carterw opened this issue Dec 15, 2018 · 13 comments

Comments

@carterw
Copy link

carterw commented Dec 15, 2018

Not seeing methods that support interrupts on low or high light levels. That was available in your previous driver.

@deshipu
Copy link

deshipu commented Dec 15, 2018

CircuitPython doesn't have any support for interrupts.

@carterw
Copy link
Author

carterw commented Dec 15, 2018

Well in that case it needs get some, because otherwise an awful lot of useful functionality for the parts is missing.

@deshipu
Copy link

deshipu commented Dec 15, 2018

Glad to see you volunteering to implement it.

@carterw
Copy link
Author

carterw commented Dec 16, 2018

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

@siddacious
Copy link

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.

@carterw
Copy link
Author

carterw commented Dec 16, 2018

If you have a link to the issue you are referring in the main repo I would like to read it.

@siddacious
Copy link

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.

@ladyada
Copy link
Member

ladyada commented Dec 16, 2018

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

@dhalbert
Copy link
Contributor

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.

@carterw
Copy link
Author

carterw commented Dec 16, 2018

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.

@carterw carterw closed this as completed Dec 16, 2018
@caternuson
Copy link
Collaborator

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.

@carterw
Copy link
Author

carterw commented Dec 16, 2018

Much appreciated.

@ladyada
Copy link
Member

ladyada commented Dec 16, 2018

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

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

No branches or pull requests

6 participants