beautypg.com

Figure7.5 data structure and type definition – Avago Technologies LSI53C1010 User Manual

Page 171

background image

Initializing the SCRIPTS Processor

7-5

7.1.2.3 Defining the Table Structure

The code in

Figure 7.5

defines a data structure with two fields, a count

and an address, which correspond to one element in the DSA table. A
type is then defined and a pointer to a variable of this type is also
defined. This pointer and the enumerated offsets defined above are used
to access specific elements of the table. This example defines the table
structure, but no space has been allocated in memory.

Figure 7.5

Data Structure and Type Definition

7.1.2.4 Declaring a Pointer to the Table

The code example below defines declaring a pointer to the table.

extern table

*buffer_table;

7.1.2.5 Allocating Memory for the Table

The code in

Figure 7.6

defines allocating memory for the table.

struct_table {

uquad

count;

uquad

address;

};
typedef struct_table table:

This manual is related to the following products: