androidthings / contrib-drivers

Open source peripheral drivers
Apache License 2.0
558 stars 174 forks source link

Some driver samples support register() some do not #46

Closed salamanders closed 7 years ago

salamanders commented 7 years ago

It would be nice to have guidance on if drivers should all support register() or if it is optional, and if so, when it should/should not be supported.

mangini commented 7 years ago

Hi, @salamanders All drivers that can register with the Android framework, using the UserDriver library, should have a UserDriver class and the correspondent register() method(s). For some drivers, there's no possible framework integration. For example, there's no UserDriver API for integrating the apa102 driver with the Android framework. In those cases, we only provide a driver that abstracts the low level interface. If you see a driver that could have an equivalent UserDriver integration but does not, please open a specific bug and we will take a look.