Using Standard/Alternate Event Vector Table

<< Click to Display Table of Contents >>

Navigation:  ETEC 'C' Compiler Information >

Using Standard/Alternate Event Vector Table

Previous pageReturn to chapter overviewNext page

Example Download

For many applications the alternate 'Event Vector Table' is superior to the standard 'Event Vector Table' because it has finer resolution for assigning events to threads, and as a result, code will generally executes faster. The "alternate" keyword (see below in red) is used to select this table.

#pragma ETPU_function MeasurePulse, alternate;

 

void MeasurePulse ( int24 PulseWidth ) 

    int24 RisingEdge, FallingEdge; 

    // This thread us used to respond to a Host Service Request (HSR.) 

    // This is a request from the host processor to initialize this function. 

    if ( IsHostServiceRequestEvent( 7 ) ) 

    {

        ...