Problem with marco

hi, i am a beginer in IT and the first step is in wavecom.now, what i am familiar with is the standard C.so ,i beg an explanations in detail about ADL_GET_PARAM ( ); ADL_AT_PORT_TYPE ( ):
i have learned alittle about ADL_AT_PORT_TYPE () in the guide,but in PingGPRS sample ,it is used as ADL_AT_PORT_TYPE ( paras->Port, ADL_AT_RSP ) different from the guide ADL_AT_PORT_TYPE ( paras->Port, false/true).moreover,in Ping_GPRS ADL_GET_PARAM ( )is used as
ADL_GET_PARAM ( paras, 1) the same as in the guide by prototype.but i dont know the return value of the function.
regards

Well you’re doing quite well, as the ADL Uesr Guide does not actually provide any proper documentation for this macro! :frowning:

It mentions it a few times by way of example, but gives no proper definition of it! :angry:

Well the Guide shows it used as:
ADL_AT_PORT_TYPE( ADL_AT_UART2, ADL_AT_RSP ) on p18,19
ADL_AT_PORT_TYPE( ADL_AT_UART1, TRUE ) on p24
ADL_AT_PORT_TYPE( ADL_AT_UART2, FALSE ) on p24

I agree that the Guide is not at all clear on how this relates to the parameter under consideration… :angry:

I’m afraid that doesn’t help you much, but at least you know you’re not alone in finding the dopcumentation unhelpful! :unamused:

hi,thank you !i have the same feeling with you !but could you give me some suggestion about GPRS packets conversion?
regards!

See your other thread on that particular subject.

I found the definition of ADL_AT_PORT_TYPE:

So it’s putting the 1st parameter of the macro into the high byte if a U16, and the second parameter into the low byte.

Thus it looks like the ADL User Guide is actually lying when it says, eg, that the 2nd parameter of adl_atCmdCreate is a bool! :angry:

It looks like this parameter is not simply a bool, but a bool and a port-id packed into a U16.

Whoever wrote this section of the manual should be shot! :angry: :angry:

hi,i cant agree with you any more.now, i am testing sample Ping_GPRS.no matter what i do , the value i get is ME UNregist.
haha,thank you .but i cant understand ( port << 8 | type ) in the definition ADL_AT_PORT_TYPE(port,type) ( u16 ) ( port << 8 | type ) ;
thank you again.
regards

That bit is just plain, standard ‘C’ - check out any ‘C’ textbook!

As I said:

Textbook stuff!

Hi awneil,

Why are you so mad about the poor guy writing the documentation? We all don’t like to write documentation, right? :smiley:

This is probably just a copy and paste error from an earlier version where there was no ADL_AT_PORT_TYPE macro. OK, it’s wrong now - but maybe the guy writing the documentation wasn’t even informed about that change. (I am not affiliated with Wavecom and I sure didn’t write the document :wink:)

I am rather concerned that Wavecom does not give you more detailed release notes. I have the impression that just the obvious things they really can’t hide make it into the release notes. I seem to always find some behavior changes of the core firmware that are not mentioned in the release notes… That worries me a lot more than an inaccurate interface documentation where you can find out by yourself easily what’s wrong.

Best Regards,
Jan

In this case, it looks like “RTFM” means “Read The Flawed Manual”!! :unamused: