@@ -12,10 +12,10 @@ use mctp::{Error, Result};
1212use crc:: Crc ;
1313use heapless:: Vec ;
1414
15- #[ cfg( feature = "embassy " ) ]
15+ #[ cfg( feature = "async " ) ]
1616use embedded_io_async:: { Read , Write } ;
1717
18- #[ cfg( not( feature = "embassy " ) ) ]
18+ #[ cfg( not( feature = "async " ) ) ]
1919use embedded_io:: { Read , Write } ;
2020
2121const MCTP_SERIAL_REVISION : u8 = 0x01 ;
@@ -72,7 +72,7 @@ impl MctpSerialHandler {
7272 /// Read a frame.
7373 ///
7474 /// This is async cancel-safe.
75- #[ cfg( feature = "embassy " ) ]
75+ #[ cfg( feature = "async " ) ]
7676 pub async fn recv_async ( & mut self , input : & mut impl Read ) -> Result < & [ u8 ] > {
7777 // TODO: This reads one byte a time, might need a buffering wrapper
7878 // for performance. Will require more thought about cancel-safety
@@ -103,7 +103,7 @@ impl MctpSerialHandler {
103103
104104 /// Read a frame synchronously.
105105 /// This function blocks until at least one byte is available
106- #[ cfg( not( feature = "embassy " ) ) ]
106+ #[ cfg( not( feature = "async " ) ) ]
107107 pub fn recv ( & mut self , input : & mut impl Read ) -> Result < & [ u8 ] > {
108108 // TODO: This reads one byte a time, might need a buffering wrapper
109109 // for performance. Will require more thought about cancel-safety
@@ -220,7 +220,7 @@ impl MctpSerialHandler {
220220 }
221221
222222 /// Asynchronously send a MCTP packet over serial provided by `output`.
223- #[ cfg( feature = "embassy " ) ]
223+ #[ cfg( feature = "async " ) ]
224224 pub async fn send_async (
225225 & mut self ,
226226 pkt : & [ u8 ] ,
@@ -232,7 +232,7 @@ impl MctpSerialHandler {
232232 }
233233
234234 /// Synchronously send a MCTP packet over serial provided by `output`.
235- #[ cfg( not( feature = "embassy " ) ) ]
235+ #[ cfg( not( feature = "async " ) ) ]
236236 pub fn send_sync (
237237 & mut self ,
238238 pkt : & [ u8 ] ,
@@ -242,7 +242,7 @@ impl MctpSerialHandler {
242242 }
243243
244244 /// Frame a MCTP packet into a serial frame, writing to `output`.
245- #[ cfg( feature = "embassy " ) ]
245+ #[ cfg( feature = "async " ) ]
246246 async fn frame_to_serial < W > (
247247 p : & [ u8 ] ,
248248 output : & mut W ,
@@ -267,7 +267,7 @@ impl MctpSerialHandler {
267267 }
268268
269269 /// Frame a MCTP packet into a serial frame, writing to `output`.
270- #[ cfg( not( feature = "embassy " ) ) ]
270+ #[ cfg( not( feature = "async " ) ) ]
271271 fn frame_to_serial < W > (
272272 p : & [ u8 ] ,
273273 output : & mut W ,
@@ -292,7 +292,7 @@ impl MctpSerialHandler {
292292 }
293293
294294 /// Asynchronously write a byte slice to `output`, escaping 0x7e and 0x7d bytes.
295- #[ cfg( feature = "embassy " ) ]
295+ #[ cfg( feature = "async " ) ]
296296 async fn write_escaped < W > (
297297 p : & [ u8 ] ,
298298 output : & mut W ,
@@ -320,7 +320,7 @@ impl MctpSerialHandler {
320320 }
321321
322322 /// Synchronously write a byte slice to `output`, escaping 0x7e and 0x7d bytes.
323- #[ cfg( not( feature = "embassy " ) ) ]
323+ #[ cfg( not( feature = "async " ) ) ]
324324 fn write_escaped < W > (
325325 p : & [ u8 ] ,
326326 output : & mut W ,
@@ -360,7 +360,7 @@ mod tests {
360360 use crate :: * ;
361361 use proptest:: prelude:: * ;
362362
363- #[ cfg( feature = "embassy " ) ]
363+ #[ cfg( feature = "async " ) ]
364364 use embedded_io_adapters:: futures_03:: FromFutures ;
365365
366366 static TEST_DATA_ROUNTRIP : [ & [ u8 ] ; 1 ] =
@@ -373,7 +373,7 @@ mod tests {
373373 . try_init ( ) ;
374374 }
375375
376- #[ cfg( feature = "embassy " ) ]
376+ #[ cfg( feature = "async " ) ]
377377 async fn do_roundtrip_async ( payload : & [ u8 ] ) {
378378 let mut esc = vec ! [ ] ;
379379 let mut s = FromFutures :: new ( & mut esc) ;
@@ -391,7 +391,7 @@ mod tests {
391391 debug_assert_eq ! ( payload, packet) ;
392392 }
393393
394- #[ cfg( not( feature = "embassy " ) ) ]
394+ #[ cfg( not( feature = "async " ) ) ]
395395 fn do_roundtrip_sync ( payload : & [ u8 ] ) {
396396 start_log ( ) ;
397397 let mut esc = vec ! [ ] ;
@@ -406,7 +406,7 @@ mod tests {
406406 debug_assert_eq ! ( payload, packet) ;
407407 }
408408
409- #[ cfg( feature = "embassy " ) ]
409+ #[ cfg( feature = "async " ) ]
410410 #[ test]
411411 fn roundtrip_cases_async ( ) {
412412 // Fixed testcases
@@ -418,7 +418,7 @@ mod tests {
418418 } )
419419 }
420420
421- #[ cfg( not( feature = "embassy " ) ) ]
421+ #[ cfg( not( feature = "async " ) ) ]
422422 #[ test]
423423 fn roundtrip_cases_sync ( ) {
424424 start_log ( ) ;
@@ -428,14 +428,14 @@ mod tests {
428428 }
429429
430430 proptest ! {
431- #[ cfg( feature = "embassy " ) ]
431+ #[ cfg( feature = "async " ) ]
432432 #[ test]
433433 fn roundtrip_escape_async( payload in proptest:: collection:: vec( 0 ..255u8 , 5 ..20 ) ) {
434434 start_log( ) ;
435435 smol:: block_on( do_roundtrip_async( & payload) )
436436 }
437437
438- #[ cfg( not( feature = "embassy " ) ) ]
438+ #[ cfg( not( feature = "async " ) ) ]
439439 #[ test]
440440 fn roundtrip_escape_sync( payload in proptest:: collection:: vec( 0 ..255u8 , 5 ..20 ) ) {
441441 start_log( ) ;
0 commit comments