fx2lib.h

The fx2lib.h header contains library routines that use the Cypress FX2 series architectural extensions. When using this header, the fx2 library must be linked in.

Reference

Defines

ARRAYSIZE(x)

A macro that returns the statically known size of the array.

Functions

void *xmemcpy(void *dest, void *src, uint16_t length)

A fast memory copy routine that uses the FX2-specific architecture extensions. This routine clobbers the value of all autopointer registers. Both pointers should be in the __xdata address space. Returns destination, like memcpy.

void *xmemclr(void *dest, uint16_t length)

A fast memory clear routine that uses the FX2-specific architecture extensions. This routine clobbers the value of all autopointer registers. The pointer should be in the __xdata. Returns destination, like memclr.

uint16_t bswap16(uint16_t value)

An endianness swap routine for 16-bit integers.

uint32_t bswap32(uint32_t value)

An endianness swap routine for 32-bit integers.

Variables

uint8_t scratch[512]

0.5KB of general purpose scratch RAM.