[gta02] a few questions

Ed Kapitein ed at kapitein.org
Sat Nov 16 12:00:06 CET 2013

On 11/14/2013 12:17 AM, matteo sanvito wrote:
> Hi ed,
> I don't know about your first question, while about the second one, 
> try to change "&" to "&&" after "...STAT1)"
> I'm glad to see that there is someone other that still uses gta02 :')
> Best regards,
> matte

Hi Matteo,

Thanks for your reply!

Could you explain a bit more why to change & for && ?

Wouldn't changing:
if(!readw(host->base + GLAMO_REG_MMC_RB_STAT1) & GLAMO_STAT1_MMC_IDLE)

if(!readw(host->base + GLAMO_REG_MMC_RB_STAT1) && GLAMO_STAT1_MMC_IDLE)

Change the logic of the program?

In the first case the "if" statement would be true if either
readw(host->base + GLAMO_REG_MMC_RB_STAT1) is false, or

in the second case the "if" statement would be true if
eadw(host->base + GLAMO_REG_MMC_RB_STAT1) is false and

I can't tell from the source code what the intention of the program was.

Thanks for your time!

Kind regards.

Yes, the GTA02 is still my one and only mobile phone ;-)

More information about the community mailing list