bpr
November 25, 2009, 3:44pm
1
Hi
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 ) to GPIO 19 and to GND. I just want to turn it on but now i have used all day and i got nowhere
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
Eraser
November 25, 2009, 4:43pm
2
it appears that you are setting GPIO19 to low…
Eraser
November 25, 2009, 5:09pm
3
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
bpr
November 25, 2009, 5:42pm
4
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
Best Regard Bo
awneil
November 26, 2009, 9:52am
5
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
bpr
November 26, 2009, 12:46pm
6
Hi Awneil
I actually got it working now, but i am not completly sure why
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”.
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.
thank you very much for your reply.
Best regards Bo
Madouc
November 26, 2009, 1:47pm
7
bpr:
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.
u8 , s32, u16 etc are wavecom’s take on abbreviations for unsigned char, signed 32bit, unsigned 16bit respectively.
there is some logic to it.
awneil
November 26, 2009, 2:16pm
8
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.
awneil
November 26, 2009, 2:18pm
9
The logic is that they give you types of known size & signed-ness - which char, int, etc don’t…
bpr
November 26, 2009, 6:37pm
10
Hi
Thank you very much for the info.
I think that I am starting to figure it out.
My distributor is very difficult to contact
I am suspecting him only to reply on questions, to customers that order +1000 items at a time
Again thank you!
Best regards Bo
Eraser
November 26, 2009, 7:47pm
11
you should know that most of the documents can be downloaded from the wavecom website…