Convert old GPIO config to new Config style

Hello,

I am having hard time mapping old gpio commands to the new one. In the earlier versions, I used to configure my pins in following way.

set gpio.22.ctrl=1
set gpio.22.obe=1
set gpio.22.dse=1
set gpio.22.state=1

set gpio.66.ctrl=1
set gpio.66.obe=1
set gpio.66.dse=1
set gpio.66.state=1 

save gpio

But with the new config style, I can’t find on the website direct mapping for ctrl, obe, dse, and state commands.

From documentation,

Enable Configuration = ctrl
Output Enable = obe
Drive Strength = dse
GPIO PIN State = state

In new settings, I could find

Drive Strength = strength (which is 150 ohm by default)

But not sure about other settings

 1. Is dir (new) =obe (old), or is outmode (new) = obe (old)?
 2. Is lvl (new) = state (old)?

Will my final config be like below

set gpio.bootconf ="[gpio_22] dir=out lvl=1 strength=1 [gpio_66] dir=out lvl=1 strengh=1"
save gpio

Do I use altFn at all?

Sorry lot of questions, and thank you in advance.

I ended up using below config. I am still not sure what the mappings are, and why do we use altfn.

set gpio.bootconf ="[gpio_22] altfn=-1 dir=out lvl=1 [gpio_66] altfn=-1 dir=out lvl=1"
save gpio

Dear @NIraj,

Good to know you found the answer to your questions. The altfn is used to set which alternate functionality to be set for the pin e.g. GPIO or SPI or I2c, altFn=-1 tells set to GPIO. Please refer Toradex_CE_Libraries.chm documentation for more information, it will be available in https://developer.toradex.com/software/windows-embedded-compact/toradex-ce-libraries-and-code-samples#Toradex_CE_Libraries.