ts-7000
[Top] [All Lists]

[ts-7000] TS-7200 4x4 keypad qeustion

To:
Subject: [ts-7000] TS-7200 4x4 keypad qeustion
From: "ticrus00" <>
Date: Sat, 30 Jun 2007 22:39:49 -0000
Forgive me I am new at this.  I am trying to understand whats going on
in the keypad.c sample code provided with the ts-7200 board.  
Specifically:

unsigned int get_keys(void) {
        unsigned int pos, on = 0;

        for(pos = 0; pos < 4; pos++) {
                *dat = ~(1 << pos); <- I DON'T UNDERSTAND THIS
                on |= (~(*dat >> 4) & 0xf) << (4 * pos);
        }
        return on;
}

The above arrow is the line I am not following because to me its is
setting *dat equal to  ~(1 << pos).  But when *dat is used in the line
below it is a different value.  I don't know anything about the keypad
and maybe thats my problem.  Is it some sort of msg to the keypad?  Is
there any documentation out there besides the keypad.c and the
hardware guide that came with the board?  





 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU