Skip to content
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

[Infineon] Implement button wake up handler #26178

Merged
merged 1 commit into from
Apr 26, 2023

Conversation

AlvinHsiao
Copy link
Contributor

Problem

The pending event are not handled if wake up from button.

Change overview

Add an API to handle the pending event if wake up from button.

Testing

Tested manually with chip-tool.

@github-actions
Copy link

PR #26178: Size comparison from b187c3e to 46d0ae0

Full report (1 build for cc32xx)
platform target config section b187c3e 46d0ae0 change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 643249 643249 0 0.0
(read/write) 203848 203848 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197248 197248 0 0.0
.comment 194 194 0 0.0
.data 1480 1480 0 0.0
.debug_abbrev 933224 933224 0 0.0
.debug_aranges 87792 87792 0 0.0
.debug_frame 302140 302140 0 0.0
.debug_info 20330828 20330828 0 0.0
.debug_line 2687904 2687904 0 0.0
.debug_loc 2838960 2838960 0 0.0
.debug_ranges 288072 288072 0 0.0
.debug_str 3042335 3042335 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 104401 104401 0 0.0
.shstrtab 232 232 0 0.0
.stab 204 204 0 0.0
.stabstr 441 441 0 0.0
.stack 2048 2048 0 0.0
.strtab 377963 377963 0 0.0
.symtab 256976 256976 0 0.0
.text 536728 536728 0 0.0

@AlvinHsiao AlvinHsiao force-pushed the alvin_Implement_button branch from 46d0ae0 to 7257311 Compare April 21, 2023 06:17
@github-actions
Copy link

PR #26178: Size comparison from f3f7ecd to 7257311

Increases (1 build for nrfconnect)
platform target config section f3f7ecd 7257311 change % change
nrfconnect all-clusters-minimal-app nrf52840dk_nrf52840 text 774224 774228 4 0.0
Decreases (1 build for cc32xx)
platform target config section f3f7ecd 7257311 change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_info 20330830 20330829 -1 -0.0
Full report (7 builds for cc32xx, mbed, nrfconnect, qpg)
platform target config section f3f7ecd 7257311 change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 643249 643249 0 0.0
(read/write) 203848 203848 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197248 197248 0 0.0
.comment 194 194 0 0.0
.data 1480 1480 0 0.0
.debug_abbrev 933224 933224 0 0.0
.debug_aranges 87792 87792 0 0.0
.debug_frame 302140 302140 0 0.0
.debug_info 20330830 20330829 -1 -0.0
.debug_line 2687904 2687904 0 0.0
.debug_loc 2838960 2838960 0 0.0
.debug_ranges 288072 288072 0 0.0
.debug_str 3042335 3042335 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 104401 104401 0 0.0
.shstrtab 232 232 0 0.0
.stab 204 204 0 0.0
.stabstr 441 441 0 0.0
.stack 2048 2048 0 0.0
.strtab 377963 377963 0 0.0
.symtab 256976 256976 0 0.0
.text 536728 536728 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2466336 2466336 0 0.0
.bss 215960 215960 0 0.0
.data 5888 5888 0 0.0
.text 1428980 1428980 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read only) 4 4 0 0.0
(read/write) 1173892 1173892 0 0.0
bss 155557 155557 0 0.0
rodata 132740 132740 0 0.0
text 804836 804836 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read only) 4 4 0 0.0
(read/write) 1119140 1119140 0 0.0
bss 154713 154713 0 0.0
rodata 109556 109556 0 0.0
text 774224 774228 4 0.0
all-clusters-app nrf7002dk_nrf5340_cpuapp (read only) 4 4 0 0.0
(read/write) 1433952 1433952 0 0.0
bss 135297 135297 0 0.0
rodata 228784 228784 0 0.0
text 775788 775788 0 0.0
qpg lighting-app qpg6105+debug (read/write) 1166568 1166568 0 0.0
.bss 99308 99308 0 0.0
.data 856 856 0 0.0
.text 613668 613668 0 0.0
lock-app qpg6105+debug (read/write) 1136688 1136688 0 0.0
.bss 94452 94452 0 0.0
.data 860 860 0 0.0
.text 583784 583784 0 0.0

* Add API to re-send the pending event if wake up from button.
@AlvinHsiao AlvinHsiao force-pushed the alvin_Implement_button branch from 7257311 to 759ae73 Compare April 26, 2023 01:53
@github-actions
Copy link

PR #26178: Size comparison from c2a28c8 to 759ae73

Full report (7 builds for cc32xx, mbed, nrfconnect, qpg)
platform target config section c2a28c8 759ae73 change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 601114 601114 0 0.0
(read/write) 204132 204132 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197544 197544 0 0.0
.comment 206 206 0 0.0
.data 1468 1468 0 0.0
.debug_abbrev 956756 956756 0 0.0
.debug_aranges 103416 103416 0 0.0
.debug_frame 349704 349704 0 0.0
.debug_info 19489250 19489250 0 0.0
.debug_line 2678035 2678035 0 0.0
.debug_line_str 513 513 0 0.0
.debug_loc 33340 33340 0 0.0
.debug_loclists 1501882 1501882 0 0.0
.debug_ranges 4984 4984 0 0.0
.debug_rnglists 96008 96008 0 0.0
.debug_str 3024877 3024877 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 104170 104170 0 0.0
.shstrtab 265 265 0 0.0
.stack 2048 2048 0 0.0
.strtab 477531 477531 0 0.0
.symtab 285936 285936 0 0.0
.text 494824 494824 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2492536 2492536 0 0.0
.bss 216272 216272 0 0.0
.data 5144 5144 0 0.0
.text 1455220 1455220 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read only) 4 4 0 0.0
(read/write) 1174052 1174052 0 0.0
bss 155569 155569 0 0.0
rodata 132804 132804 0 0.0
text 804928 804928 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read only) 4 4 0 0.0
(read/write) 1119300 1119300 0 0.0
bss 154725 154725 0 0.0
rodata 109620 109620 0 0.0
text 774324 774324 0 0.0
all-clusters-app nrf7002dk_nrf5340_cpuapp (read only) 4 4 0 0.0
(read/write) 1434112 1434112 0 0.0
bss 135309 135309 0 0.0
rodata 228848 228848 0 0.0
text 775884 775884 0 0.0
qpg lighting-app qpg6105+debug (read/write) 1163968 1163968 0 0.0
.bss 99616 99616 0 0.0
.data 856 856 0 0.0
.text 611068 611068 0 0.0
lock-app qpg6105+debug (read/write) 1133328 1133328 0 0.0
.bss 94768 94768 0 0.0
.data 852 852 0 0.0
.text 580424 580424 0 0.0

/**
* Checks if there is pending event and then re-send the event.
*
* @return void : no return value is expected.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: doccommenting returing void is a waste of vertical space.
Also this is copied and pasted from the header, so any updates would have to be done twice. It is up to infineon conding standards, so I will merge, however this is the opinion for an external reviewer.

void wiced_button_manager_pending_event_handle(void)
{
uint32_t a;
if (wiced_sleep_get_boot_mode() == WICED_SLEEP_FAST_BOOT)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: you often want to decrease indent, so if you would do if (wiced_sleep_get_boot_mode() != WICED_SLEEP_FAST_BOOT) return; you would decrease one level an make the function a bit flatter which helps in following code.

@andy31415 andy31415 merged commit 23a8e5a into project-chip:master Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants