_PROTECTED_WRITE (little interposed question)

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What is the difference? :

 

_PROTECTED_WRITE(PPP_RRR, XXXXX);
_PROTECTED_WRITE(PPP.RRR, XXXXX);

 

 

The truth is more important than the facts.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

First uses the "assembler friendly name", the other uses the struct access

:: Morten

 

(yes, I work for Microchip, yes, I do this in my spare time, now stop sending PMs)

 

The postings on this site are my own and do not represent Microchip’s positions, strategies, or opinions.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just to point out that this has nothing in particular to do with PROTECTED_WRITE. As Morten says you have a choice when accessing SFRs. The possible advantage of the C/C++ struts is that because registers are grouped you can often pass around just the base address of a register block.