PreviousNext
setFSR0
Help > Macros > RAM > setFSR0

Macro

 

Set control register FSR0 to access the beginning of specified OS buffer via indirect addressing

Purpose

 

 

Syntax

 

uns8 setFSR0(buffer)

Parameters

 

buffer_FSR_NINFO    Set FSR to networkInfo

               _FSR_INFO     Set FSR to bufferINFO

               _FSR_COM      Set FSR to bufferCOM

               _FSR_AUX      Set FSR to bufferAUX

               _FSR_RF       Set FSR to bufferRF

               _FSR_ntwADDR  Set FSR to ntwADDR

Return value

 

 64       Constant value to optimize possible subsequent work with buffers

Output values

 

     FSR0 addresses byte[0] of specified OS buffer

     WREG = 64

Preconditions

 

 –

Remarks

 

See IQRF OS User’s guide, chapter Data memory (RAM).

Side effects

 

 –

See also

 

setFSR1, setFSR01

Example

 

setFSR0(_FSR_COM);  // FSR0 addresses bufferCOM[0]

X = INDF0;          // X = bufferCOM[0]