Gpio q2686


I have just started to use the Q2686.

I got the SMS stuff workin right away and it was quit easy.
Now I want to use the GPIO’s but that i not so easy.

I have connected a green LED (and resistor :slight_smile:) to GPIO 19 and to GND. I just want to turn it on but now i have used all day and i got nowhere :frowning:

My code looks like this:

#include "adl_global.h"

const u16 wm_apmCustomStackSize = 1024*3;
s32 myGPIOhandle;
adl_ioDefs_t gpioConfig =  {ADL_IO_GPO | 19 | ADL_IO_DIR_OUT | ADL_IO_LEV_LOW};

void adl_main ( adl_InitType_e  InitType )
	myGPIOhandle = adl_ioSubscribe ( 1, gpioConfig, 0, 0, 0);
	adl_ioWriteSingle(myGPIOhandle, &gpioConfig, TRUE);

Can anybody tell me what i am doing wrong?

Best regards Bo Jensen, DHI Denmark

it appears that you are setting GPIO19 to low…

adl_ioDefs_t gpioConfig =  {ADL_IO_GPO | 19 | ADL_IO_DIR_OUT | ADL_IO_LEV_HIGH};

Change your declaration into this one , that should be enough

Hi Eraser

Thank you very much for you reply!

I will try it first thing tomorrow morning.

Do you have a very simple example that illustrates how to use the GPIO’s.

More simple than the one in the ADL User Guide, the guide did not help me much :slight_smile:

Best Regard Bo

You haven’t stated which Open-AT version you are using!

Note that the API for GPIOs has changed very significantly over Open-AT releases - you need to read the appropriate version of the ADL User Guide to ensure that you are using the correct API formats…

See: viewtopic.php?f=46&t=3654&p=14112&hilit=changed+significantly#p14112

Hi Awneil

I actually got it working now, but i am not completly sure why :slight_smile:
I am using the 6.30 OS.

My development board turns on a green LED when I send an SMS where the text is “1”, and it turns off the LED if i send an SMS where the text “0”. :smiley:

Do you know any good links to additional information on how to develop app’s for the Q2686?

I still need to figure out the data types. I am very fammiliar with int, char, bool etc. but i have never seen u8, s32 etc. before. :astonished:

thank you very much for your reply.

Best regards Bo

u8 , s32, u16 etc are wavecom’s take on abbreviations for unsigned char, signed 32bit, unsigned 16bit respectively.
there is some logic to it.

Since Open-AT is entirely proprietary to Wavecom - this is it!

You need to be thoroughly familiar with the ADL User Guide, and should spend time studying the examples provided in the SDK…
And, of course, talk to your Distributor

It’s mentioned in the ADL User Guide:

This is pretty standard ‘C’ programming practice - because the sizes of char, int, etc are not defined in the standard and do, therefore, vary between different compilers.

The logic is that they give you types of known size & signed-ness - which char, int, etc don’t…


Thank you very much for the info.

I think that I am starting to figure it out.

My distributor is very difficult to contact :frowning:

I am suspecting him only to reply on questions, to customers that order +1000 items at a time :exclamation:

Again thank you!

Best regards Bo

you should know that most of the documents can be downloaded from the wavecom website…