Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2000] Good C code

2006-05-05 by vineet jain

Hi,
 To put simply:

Say for example:

unsigned int *ram_ptr  =  ( unsigned int * ) 0x000000F0;
So, to store something at this address you would write something like:

*ram_ptr  = 36;

The above statement means that ram_ptr is pointing to memory location 0x000000F0.

Now when you write 

BSP_UNDEF_INSTRUCTION_VECTOR_ADDR   (*(INT32U *)0x00000004L)

it means BSP_UNDEF_INSTRUCTION_VECTOR_ADDR is the content of the memory address 0x00000004L.
Here to store a value at the 0x00000004L address you would write 

BSP_UNDEF_INSTRUCTION_VECTOR_ADDR = 36;


Vineet.


jk jlkj <njad2002@...> wrote:    Hi Friends,
    
   Did anyone came accross such a code.
    
   INT32U is unsigned int.
    
   #define  BSP_UNDEF_INSTRUCTION_VECTOR_ADDR   (*(INT32U *)0x00000004L)
    
   I really think this is a neat code. This is in the code given by ucos-ii. 
   Isnt this similar to declaring a pointer variable.
    
   I am unable to understand the meaning of the type cast (*(INT32U *))
    
   Can some one please tell me what does this type cast imply.
    
   Regards,
   Jerome
    
    
 
                         
 ---------------------------------
  Yahoo! India Answers: Share what you know. Learn something new. Click here
 
 [Non-text portions of this message have been removed]
 
            

        SPONSORED LINKS   
                                                    Microcontrollers                                       Microprocessor                                       Intel microprocessors                                                                 
      
---------------------------------
   YAHOO! GROUPS LINKS 
 
    
    Visit your group "lpc2000" on the web.
    
    To unsubscribe from this group, send an email to:
 lpc2000-unsubscribe@yahoogroups.com
    
    Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 
 
    
---------------------------------
 
 
     

			
---------------------------------
Yahoo! Mail goes everywhere you do.  Get it on your phone.

[Non-text portions of this message have been removed]

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.