ts-7000
[Top] [All Lists]

[ts-7000] Maintaining memory permission

To:
Subject: [ts-7000] Maintaining memory permission
From: "bdon003" <>
Date: Tue, 25 Nov 2008 23:39:24 -0000
Hi,
  I am working with the TS-7300 and doing some work with it for a
school project.  I am using the GPIO to read from a keypad and I have
a little question.  I am able to successfully read from the keypad but
I am trying to make my code a little bit cleaner by having the
functions I use in a separate file.  I use two functions, port_B_Init
and port_F_Init, to initialize the ports and get the pointers to the
registers.  If I create a new file that holds these functions and put
an include line in the main file I get a segmentation fault when
trying to set these pointers.  What is the proper way to do this?  If
I only need one pointer( like only the data reg) then I just return
the pointer and everything is fine.  But what if I need a pointer to
both the data and direction register?  I have tried creating the
pointers in the main program and passing them as arguments to the
functions and have the function modify the address they point to but
thats where I get the segmentation fault.  It's not a big deal if the
functions are in the same file, I would just like to know how you guys
would handle this.  

Thanks,
Brandon


------------------------------------

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