FLASH_read_str

Description

Read and unpack 7 bit packed character from 14 bit instruction words held in code memory into RAM

Characters can be packed two to a code memory word if they are limited to 7 bits each. This function reads characters from a packed array of 7 bit characters held in the code memory into a character array held in RAM.

The address of the start of the code array is given by addr and is specified in words. The address of the RAM array is given by str and is specified in characters.

The address of an array is very simple to obtain and no special computation is required to account for the mixed use of instruction words and characters.

e.g.

	const char data = "hello world"

	char	ram_buff[12]

	FLASH_read_str(&data, &ram_buff)

Definition

FLASH_read_str(uint addr, char *str)

Library

LIB/flash_lib.bas

Usage

On entry:
addr is the base address of the source character array held in the code memory of the PIC
str is the address of the destination character array in RAM
The source string is terminated by a binary ZERO character. The terminating character is also copied to the RAM buffer

see FLASH description for a more detailed description

On exit:
There is not return value