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.
4
4
The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
5
5
and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
6
6
7
+ ## [ Unreleased]
8
+ ### Fixed
9
+ - Fixed timeouts after calling ` SubGhz::set_sleep ` .
10
+
7
11
## [ 0.2.0] - 2021-11-11
8
12
### Added
9
13
- Added two board support crates
Original file line number Diff line number Diff line change @@ -788,7 +788,14 @@ where
788
788
/// # Ok::<(), stm32wlxx_hal::subghz::Error>(())
789
789
/// ```
790
790
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 ( ( ) )
792
799
}
793
800
794
801
/// Put the radio into standby mode.
You can’t perform that action at this time.
0 commit comments