add light-controller application#3
Conversation
Signed-off-by: Mayank Sirotiya <Mayank.Sirotiya@imgtec.com>
Signed-off-by: Mayank Sirotiya <Mayank.Sirotiya@imgtec.com>
|
I don't like the way resources are defined. There is an array containing object definition but I don't see a point having it since there is only one object and one resource. The for loops unnecessary complicate the code which should be simple. But I can understand we want to have generic code so user can add more objects. But it won't work since there are hardcoded values in resource definition like callback, operation (rw), mandatory/optional. In short I would either generalize more Resource struct by adding pointer to callback function, operation that can be performed and so on. So new objects can be easily defined by extending the array. Or I would resign from array and for loops in code. @abhijit-mahajani-imgtec @mayank-sirotiya-imgtec What do You guys think? I believe the same applies to led-controller. |
|
Hello Mark, |
|
Yes i agree with Mayank. Its a trade off. We have designed that such a way that it would be easy for extending to various kit projects. just the resources etc will change as per the project specs but general implementation can be re-used as it is. |
|
Approved and Verified. |
@CreatorKit/creators
Signed-off-by: Mayank Sirotiya Mayank.Sirotiya@imgtec.com