SDKZSPF LSI, SDKZSPF Datasheet - Page 78

no-image

SDKZSPF

Manufacturer Part Number
SDKZSPF
Description
Manufacturer
LSI
Datasheet

Specifications of SDKZSPF

Lead Free Status / Rohs Status
Supplier Unconfirmed
3.8 Accessing Control Registers
3-24
There are special macros defined within cbuf.h to access the elements
in a circular buffer. These macros are the same for all compilers.
load_int_cbuf(dst,pt,inc)
store_int_cbuf(src,pt,inc)
load_long_cbuf(dst,pt,inc)
store_long_cbuf(src,pt,inc)
The inc parameter determines the number of elements to increment the
pointer pt. The inc parameter must be a constant rather than a variable.
For load_int_cbuf and store_int_cbuf, inc must be in the range
1–50. For load_long_cbuf and store_long_cbuf, inc must be in the
range 1–25.
It is legal to access a value pointed to by pt using *pt, so an increment
value of 0 is not needed.
The dst and src parameters are variables used for the destination and
source values, respectively. Note that these parameters are not pointers
to a location where the destination/source is stored/accessed, but to the
variables that are actually stored/accessed.
Because the registers supporting circular-buffer functionality are not
saved and restored by function calls/returns, circular buffers should not
be used with code containing function calls.
Macros have been defined in the header file <creg.h> to simplify
accessing control registers.
read_creg(creg,var) - Puts the value of a control register into
var.
C Cross Compiler
Copyright © 1999-2003 by LSI Logic Corporation. All rights reserved.
Note:
You must disable circular-buffer arithmetic immediately
after the final use of pt, because the compiler may reuse
the register containing pt for other purposes. The code
generated in this case does not expect the register to have
circular arithmetic.