1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
#[macro_export] macro_rules! orange { ($($port:ident)?, $($cs:ident)?) => { $( $port.pc8.into_push_pull_output($cs) )? } } #[macro_export] macro_rules! green { ($($port:ident)?, $($cs:ident)?) => { $( $port.pc9.into_push_pull_output($cs) )? } } #[macro_export] macro_rules! red { ($($port:ident)?, $($cs:ident)?) => { $( $port.pc6.into_push_pull_output($cs) )? } } #[macro_export] macro_rules! blue { ($($port:ident)?, $($cs:ident)?) => { $( $port.pc7.into_push_pull_output($cs) )? } }