how to set GPIO for ME9210-C

Hi,

I’m working on a ConnectME9210-C application with NetOS 7.5.

How do I set GPIO(IO 1-5)?

I do check the example - nagpioapi, but it is for connectcore platform.
How to use the routines:
NAconfigureGPIOpin()
NAsetGPIOpin()
NAgetGPIOpin()
on GPIO of ConnectME9210-C ?

Thanks

Jiaxin

ME9210 is using the same APIs as connectcore
for example take a look at:
C:\Netos75\src\bsp\platforms\connectme9210\

another example:
//This is needed to turn off the leds for wifi
NAconfigureGPIOpin(10, NA_GPIO_OUTPUT_STATE, 1);
NAconfigureGPIOpin(11, NA_GPIO_OUTPUT_STATE, 1);

//This is needed to enable serial port 2
NAconfigureGPIOpin(12, NA_GPIO_OUTPUT_STATE, 1);    //set GPIO 12 high
NAconfigureGPIOpin(8, NA_GPIO_OUTPUT_STATE, 0);     //set GPIO 8 low

tx_thread_sleep(10);
NAconfigureGPIOpin(8, NA_GPIO_OUTPUT_STATE, 1);     //set GPIO 8 high

Hi LeonidM

I still do not know the IO 1-5 in ME9210 are which GPIO.

Thanks your help.

Jiaxin

IO-1 does not refer to GPIO[1] of NS9210, it’s just a label for ME9210 development board
The indexing in the schematics is referring to ME9210 module pin numbers and not NS9210 microprocessor pins. This should explain the relation:
However IO-3/GPIO_3 are not the same as GPIO[3]. GPIO_3 is a dev board convention not NS9210 GPIO number. They actually are driven by GPIO[2] of ns9210. This is somewhat clear from the table of ME9210 Hardware reference guide:
IO-1 Pin 13 of the ME9210 modules connector(P10)GPIO_1 on dev board is GPIO[0] on NS9210
IO-2 Pin 11 of the connectorGPIO_2 on dev board is GPIO[1] on NS9210
IO-3 Pin 12 of the connectorGPIO_3 on dev board is GPIO[2] on NS9210
IO-4 Pin 9 of the connectorGPIO_4 on dev board is GPIO[5] on NS9210
IO-5 Pin 10 of the connectorGPIO_5 on dev board is GPIO[6] on NS9210
Netos always uses NS9210 microprocessors pin numbers.

That is what I want to know.

Thank a lot.

Jiaxin

please select the answer above if your question was answered