@@ -64,7 +64,7 @@ pub struct Delay;
6464impl embedded_hal:: blocking:: delay:: DelayUs < u8 > for Delay {
6565 type Error = Infallible ;
6666
67- fn try_delay_us ( & mut self , n : u8 ) -> Result < ( ) , Self :: Error > {
67+ fn delay_us ( & mut self , n : u8 ) -> Result < ( ) , Self :: Error > {
6868 thread:: sleep ( Duration :: new ( 0 , u32 ( n) * 1000 ) ) ;
6969 Ok ( ( ) )
7070 }
@@ -73,7 +73,7 @@ impl embedded_hal::blocking::delay::DelayUs<u8> for Delay {
7373impl embedded_hal:: blocking:: delay:: DelayUs < u16 > for Delay {
7474 type Error = Infallible ;
7575
76- fn try_delay_us ( & mut self , n : u16 ) -> Result < ( ) , Self :: Error > {
76+ fn delay_us ( & mut self , n : u16 ) -> Result < ( ) , Self :: Error > {
7777 thread:: sleep ( Duration :: new ( 0 , u32 ( n) * 1000 ) ) ;
7878 Ok ( ( ) )
7979 }
@@ -82,7 +82,7 @@ impl embedded_hal::blocking::delay::DelayUs<u16> for Delay {
8282impl embedded_hal:: blocking:: delay:: DelayUs < u32 > for Delay {
8383 type Error = Infallible ;
8484
85- fn try_delay_us ( & mut self , n : u32 ) -> Result < ( ) , Self :: Error > {
85+ fn delay_us ( & mut self , n : u32 ) -> Result < ( ) , Self :: Error > {
8686 let secs = n / 1_000_000 ;
8787 let nsecs = ( n % 1_000_000 ) * 1_000 ;
8888
@@ -94,7 +94,7 @@ impl embedded_hal::blocking::delay::DelayUs<u32> for Delay {
9494impl embedded_hal:: blocking:: delay:: DelayUs < u64 > for Delay {
9595 type Error = Infallible ;
9696
97- fn try_delay_us ( & mut self , n : u64 ) -> Result < ( ) , Self :: Error > {
97+ fn delay_us ( & mut self , n : u64 ) -> Result < ( ) , Self :: Error > {
9898 let secs = n / 1_000_000 ;
9999 let nsecs = ( ( n % 1_000_000 ) * 1_000 ) as u32 ;
100100
@@ -106,7 +106,7 @@ impl embedded_hal::blocking::delay::DelayUs<u64> for Delay {
106106impl embedded_hal:: blocking:: delay:: DelayMs < u8 > for Delay {
107107 type Error = Infallible ;
108108
109- fn try_delay_ms ( & mut self , n : u8 ) -> Result < ( ) , Self :: Error > {
109+ fn delay_ms ( & mut self , n : u8 ) -> Result < ( ) , Self :: Error > {
110110 thread:: sleep ( Duration :: from_millis ( u64 ( n) ) ) ;
111111 Ok ( ( ) )
112112 }
@@ -115,7 +115,7 @@ impl embedded_hal::blocking::delay::DelayMs<u8> for Delay {
115115impl embedded_hal:: blocking:: delay:: DelayMs < u16 > for Delay {
116116 type Error = Infallible ;
117117
118- fn try_delay_ms ( & mut self , n : u16 ) -> Result < ( ) , Self :: Error > {
118+ fn delay_ms ( & mut self , n : u16 ) -> Result < ( ) , Self :: Error > {
119119 thread:: sleep ( Duration :: from_millis ( u64 ( n) ) ) ;
120120 Ok ( ( ) )
121121 }
@@ -124,7 +124,7 @@ impl embedded_hal::blocking::delay::DelayMs<u16> for Delay {
124124impl embedded_hal:: blocking:: delay:: DelayMs < u32 > for Delay {
125125 type Error = Infallible ;
126126
127- fn try_delay_ms ( & mut self , n : u32 ) -> Result < ( ) , Self :: Error > {
127+ fn delay_ms ( & mut self , n : u32 ) -> Result < ( ) , Self :: Error > {
128128 thread:: sleep ( Duration :: from_millis ( u64 ( n) ) ) ;
129129 Ok ( ( ) )
130130 }
@@ -133,7 +133,7 @@ impl embedded_hal::blocking::delay::DelayMs<u32> for Delay {
133133impl embedded_hal:: blocking:: delay:: DelayMs < u64 > for Delay {
134134 type Error = Infallible ;
135135
136- fn try_delay_ms ( & mut self , n : u64 ) -> Result < ( ) , Self :: Error > {
136+ fn delay_ms ( & mut self , n : u64 ) -> Result < ( ) , Self :: Error > {
137137 thread:: sleep ( Duration :: from_millis ( n) ) ;
138138 Ok ( ( ) )
139139 }
@@ -176,7 +176,7 @@ impl I2cdev {
176176impl embedded_hal:: blocking:: i2c:: Read for I2cdev {
177177 type Error = i2cdev:: linux:: LinuxI2CError ;
178178
179- fn try_read ( & mut self , address : u8 , buffer : & mut [ u8 ] ) -> Result < ( ) , Self :: Error > {
179+ fn read ( & mut self , address : u8 , buffer : & mut [ u8 ] ) -> Result < ( ) , Self :: Error > {
180180 self . set_address ( address) ?;
181181 self . inner . read ( buffer)
182182 }
@@ -185,7 +185,7 @@ impl embedded_hal::blocking::i2c::Read for I2cdev {
185185impl embedded_hal:: blocking:: i2c:: Write for I2cdev {
186186 type Error = i2cdev:: linux:: LinuxI2CError ;
187187
188- fn try_write ( & mut self , address : u8 , bytes : & [ u8 ] ) -> Result < ( ) , Self :: Error > {
188+ fn write ( & mut self , address : u8 , bytes : & [ u8 ] ) -> Result < ( ) , Self :: Error > {
189189 self . set_address ( address) ?;
190190 self . inner . write ( bytes)
191191 }
@@ -194,7 +194,7 @@ impl embedded_hal::blocking::i2c::Write for I2cdev {
194194impl embedded_hal:: blocking:: i2c:: WriteRead for I2cdev {
195195 type Error = i2cdev:: linux:: LinuxI2CError ;
196196
197- fn try_write_read (
197+ fn write_read (
198198 & mut self ,
199199 address : u8 ,
200200 bytes : & [ u8 ] ,
@@ -209,11 +209,7 @@ impl embedded_hal::blocking::i2c::WriteRead for I2cdev {
209209impl embedded_hal:: blocking:: i2c:: Transactional for I2cdev {
210210 type Error = i2cdev:: linux:: LinuxI2CError ;
211211
212- fn try_exec (
213- & mut self ,
214- address : u8 ,
215- operations : & mut [ I2cOperation ] ,
216- ) -> Result < ( ) , Self :: Error > {
212+ fn exec ( & mut self , address : u8 , operations : & mut [ I2cOperation ] ) -> Result < ( ) , Self :: Error > {
217213 // Map operations from generic to linux objects
218214 let mut messages: Vec < _ > = operations
219215 . as_mut ( )
@@ -263,7 +259,7 @@ impl Spidev {
263259impl embedded_hal:: blocking:: spi:: Transfer < u8 > for Spidev {
264260 type Error = io:: Error ;
265261
266- fn try_transfer < ' b > ( & mut self , buffer : & ' b mut [ u8 ] ) -> io:: Result < & ' b [ u8 ] > {
262+ fn transfer < ' b > ( & mut self , buffer : & ' b mut [ u8 ] ) -> io:: Result < & ' b [ u8 ] > {
267263 let tx = buffer. to_owned ( ) ;
268264 self . 0
269265 . transfer ( & mut SpidevTransfer :: read_write ( & tx, buffer) ) ?;
@@ -274,7 +270,7 @@ impl embedded_hal::blocking::spi::Transfer<u8> for Spidev {
274270impl embedded_hal:: blocking:: spi:: Write < u8 > for Spidev {
275271 type Error = io:: Error ;
276272
277- fn try_write ( & mut self , buffer : & [ u8 ] ) -> io:: Result < ( ) > {
273+ fn write ( & mut self , buffer : & [ u8 ] ) -> io:: Result < ( ) > {
278274 self . 0 . write_all ( buffer)
279275 }
280276}
@@ -285,7 +281,7 @@ pub use embedded_hal::blocking::spi::Operation as SpiOperation;
285281impl embedded_hal:: blocking:: spi:: Transactional < u8 > for Spidev {
286282 type Error = io:: Error ;
287283
288- fn try_exec < ' a > ( & mut self , operations : & mut [ SpiOperation < ' a , u8 > ] ) -> Result < ( ) , Self :: Error > {
284+ fn exec < ' a > ( & mut self , operations : & mut [ SpiOperation < ' a , u8 > ] ) -> Result < ( ) , Self :: Error > {
289285 // Map types from generic to linux objects
290286 let mut messages: Vec < _ > = operations
291287 . iter_mut ( )
0 commit comments