File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
55and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
66
7+ ## [ Unreleased]
8+ ### Fixed
9+ - Fixed timeouts after calling ` SubGhz::set_sleep ` .
10+
711## [ 0.2.0] - 2021-11-11
812### Added
913- Added two board support crates
Original file line number Diff line number Diff line change @@ -788,7 +788,14 @@ where
788788 /// # Ok::<(), stm32wlxx_hal::subghz::Error>(())
789789 /// ```
790790 pub unsafe fn set_sleep ( & mut self , cfg : SleepCfg ) -> Result < ( ) , Error > {
791- self . write ( & [ OpCode :: SetSleep as u8 , u8:: from ( cfg) ] )
791+ // poll for busy before, but not after
792+ // radio idles with busy high while in sleep mode
793+ self . poll_not_busy ( ) ;
794+ {
795+ let _nss: Nss = Nss :: new ( ) ;
796+ self . spi . write ( & [ OpCode :: SetSleep as u8 , u8:: from ( cfg) ] ) ?;
797+ }
798+ Ok ( ( ) )
792799 }
793800
794801 /// Put the radio into standby mode.
You can’t perform that action at this time.
0 commit comments