-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[Ameba] Update Ameba platform #39982
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request updates the Ameba platform with several enhancements, including adding a DeviceInfoProvider implementation and improving version string retrieval. The changes look good overall, with a couple of suggestions to improve security.
* Added Ameba Device Info Provider implementation to support Fixed Label, User Label, Locales, and Calendar. * Moved HandleEventTrigger from header file to .cpp to allow platform implementation to override the Test Event Trigger. * Added AmebaDeviceManager to receive post-attribute change callbacks in platform applications layer. * Fixed incorrect default value retrieval for hardware version. * Added GetSoftwareVersionString to correctly retrieve the software version string. * Tidy up chipinterface.cpp
21123e7
to
e38aa0f
Compare
PR #39982: Size comparison from ad2e3f5 to e38aa0f Full report (59 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
switch (mIndex) | ||
{ | ||
case 0: | ||
labelPtr = "room"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we check in such a hard-coded list?
@@ -0,0 +1,107 @@ | |||
/* | |||
* | |||
* Copyright (c) 2022 Project CHIP Authors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
year is suspicious: was this copied&pasted from somewhere else? Are we able to re-use instead?
PR #39982: Size comparison from 1283920 to 7591506 Full report (59 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
Summary
Testing
Adding of Ameba Device Info Provider
verified with chip-tool command to retrieve the correct supporting list of label-list and supported-calendar-types. Also checked with set and get for userlabel:
./chip-tool timeformatlocalization read supported-calendar-types 1 0
./chip-tool fixedlabel read label-list 1 0
./chip-tool userlabel write label-list '[{"label":"roomName", "value":"master bedroom 1"}, {"label":"orientation", "value":"east"}, {"label":"floor", "value":"2"}, {"label":"roomType", "value":"bedroom"}]' 1 0
./chip-tool userlabel read label-list 1 0
Changes for Hardware Version and Software Version String
verified with chip-tool command to obtain the default Hardware version if factory data is disabled, and default Software version string declared using predefined macros.
./chip-tool basicinformation read hardware-version 1 0
./chip-tool basicinformation read software-version-string 10
Changes for HandleEventTrigger, AmebaDeviceManager and chipinterface.cpp
verified on Ameba platform build, will also be check with CI.
purpose: Flexible handling of event on vendor application layer, similar to AmebaDeviceManager, where post attribute callback can be posted to vendor application layer to perform action required.