Crossware

Table of Contents        Previous topic       Next topic       

C COMPILER LIBRARY FUNCTIONS->Detailed Descriptions->_getvect()

Summary


#include <os.h>

void *_getvect(unsigned int n)    Get the interrupt handler


Parameter

n    Address of interrupt vector




Description

This routine reads the contents of the interrupt vector located at address n and returns it as a pointer. This void pointer therefore represents a pointer to the interrupt handler function. Typically this function would be called prior to a call to _setvect() to save the address of the interrupt handler before it is overwritten by _setvect().  

Header file os.h contains prototypes for _getvect() and _setvect().  Header os.h also contains the vector numbers for the ColdFire core and these can be used in conjunction with the _X_VO predefined macro to calculate the value of n at compile time.

See Runtime Modification of Interrupt Vectors for an example of using _setvect() and _getvect().


Return Value

Address of the interrupt handler cast to a void pointer.