File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -1001,7 +1001,18 @@ pub(crate) mod utils {
10011001
10021002 fn configure_gpio ( gpio : u8 , field : Field , bits : u8 ) {
10031003 unsafe {
1004- let ptr = crate :: gpio:: io_mux_reg ( gpio) ;
1004+ // pins 6-11 should not be exposed to the user, so we access them directly to
1005+ // configure the gpios for PSRAM
1006+ let ptr = match gpio {
1007+ 6 => crate :: peripherals:: IO_MUX :: regs ( ) . gpio6 ( ) ,
1008+ 7 => crate :: peripherals:: IO_MUX :: regs ( ) . gpio7 ( ) ,
1009+ 8 => crate :: peripherals:: IO_MUX :: regs ( ) . gpio8 ( ) ,
1010+ 9 => crate :: peripherals:: IO_MUX :: regs ( ) . gpio9 ( ) ,
1011+ 10 => crate :: peripherals:: IO_MUX :: regs ( ) . gpio10 ( ) ,
1012+ 11 => crate :: peripherals:: IO_MUX :: regs ( ) . gpio11 ( ) ,
1013+ _ => crate :: gpio:: io_mux_reg ( gpio) ,
1014+ } ;
1015+
10051016 ptr. modify ( |_, w| apply_to_field ! ( w, field, bits) ) ;
10061017 }
10071018 }
You can’t perform that action at this time.
0 commit comments