sleep mode for CC1101 at subghz app exit (#310)

This commit is contained in:
coreglitch 2021-01-20 23:06:31 +03:00 committed by GitHub
parent 24ab7384a0
commit 312d3fbd9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -429,6 +429,12 @@ extern "C" void cc1101_workaround(void* p) {
if(event.type == EventTypeKey) {
if(event.value.input.state && event.value.input.input == InputBack) {
printf("[cc1101] bye!\n");
cli_print("[cc1101] bye!\n");
cc1101.SpiStrobe(CC1101_SIDLE);
cc1101.SpiStrobe(CC1101_SPWD);
cli_print("[cc1101] go to power down\n");
// TODO remove all widgets create by app
widget_enabled_set(widget, false);
furiac_exit(NULL);