File tree 2 files changed +5
-4
lines changed
crates/rf24-rs/src/radio/rf24
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ mod radio;
4
4
#[ cfg( target_os = "linux" ) ]
5
5
fn bind_radio_impl ( m : & Bound < ' _ , PyModule > ) -> PyResult < ( ) > {
6
6
m. add_class :: < radio:: interface:: RF24 > ( ) ?;
7
- m . add_class :: < radio :: config :: RadioConfig > ( )
7
+ Ok ( ( ) )
8
8
}
9
9
10
10
#[ cfg( not( target_os = "linux" ) ) ]
@@ -21,5 +21,6 @@ fn rf24_py(m: &Bound<'_, PyModule>) -> PyResult<()> {
21
21
m. add_class :: < radio:: types:: FifoState > ( ) ?;
22
22
m. add_class :: < radio:: types:: PaLevel > ( ) ?;
23
23
m. add_class :: < radio:: types:: StatusFlags > ( ) ?;
24
+ m. add_class :: < radio:: config:: RadioConfig > ( ) ?;
24
25
Ok ( ( ) )
25
26
}
Original file line number Diff line number Diff line change 60
60
// write() also clears the status flags and asserts the CE pin
61
61
return Ok ( false ) ;
62
62
}
63
- self . _delay_impl . delay_ns ( 10000 ) ;
63
+ self . _delay_impl . delay_us ( 10 ) ;
64
64
// now block until we get a tx_ds or tx_df event
65
- while self . _status . into_bits ( ) & 0x30 == 0 {
65
+ while self . _status . into_bits ( ) & ( mnemonics :: MASK_MAX_RT | mnemonics :: MASK_TX_DS ) == 0 {
66
66
self . spi_read ( 0 , commands:: NOP ) ?;
67
67
}
68
68
Ok ( self . _status . tx_ds ( ) )
@@ -161,7 +161,7 @@ where
161
161
return Ok ( false ) ;
162
162
}
163
163
self . rewrite ( ) ?;
164
- self . _delay_impl . delay_ns ( 10000 ) ;
164
+ self . _delay_impl . delay_us ( 10 ) ;
165
165
// now block until a tx_ds or tx_df event occurs
166
166
while self . _status . into_bits ( ) & 0x30 == 0 {
167
167
self . spi_read ( 0 , commands:: NOP ) ?;
You can’t perform that action at this time.
0 commit comments