beautypg.com

Isigetconnection(), Isigetconnectiontablesize() – Echelon ISI User Manual

Page 146

background image

ISI Programmer’s Guide

144

IsiGetConnection()

const IsiConnection* IsiGetConnection(unsigned

Index

);

Returns a pointer to an entry in the connection table. The default
implementation returns a pointer to a built-in connection table with 8 entries,

stored in on-chip EEPROM memory. You can override this function to provide an
application-specific means of accessing the connection table, or to provide an

application table of a different size.

The ISI engine requests only one connection table entry at a time, and makes no

assumption on the pointer value. Applications using storage outside the Neuron
address space may use a single buffer to transfer all connection table entries, as

shown in

Customizing the ISI Connection Table

earlier in this document.

This function is frequently called and should return as soon as possible.

There is no forwarder for this function.

You must override the IsiSetConnection() and IsiGetConnectionTableSize()
functions if you override the IsiGetConnection() function.

E

XAMPLE

The following example creates a connection table with 16 entries stored in on-
chip EEPROM:

#define CTABSIZE 16u
static eeprom fastaccess IsiConnection
MyConnectionTable[CTABSIZE];
unsigned IsiGetConnectionTableSize(void) {
return CTABSIZE;
}

const IsiConnection* IsiGetConnection(unsigned Index) {
return MyConnectionTable + Index;
}
void IsiSetConnection(IsiConnection* pConnection, unsigned Index){
MyConnectionTable[Index] = *pConnection;
}

IsiGetConnectionTableSize()

unsigned IsiGetConnectionTableSize(void);

Returns the number of entries in the connection table. The default

implementation returns the number of entries in the built-in connection table (8).
You can override this function to support an application-specific implementation

of the ISI connection table. You can use this function to provide a larger
connection table or to store the connection table outside of the Neuron address

space.

The ISI library supports connection tables with 0 to 254 entries. The connection

table size is considered constant following a call to IsiStart(); you must first stop,
then re-start, the ISI engine if the connection table size changes dynamically.

There is no forwarder for this function.