/******************************************************************************
*                                                                             *
*              Copyright (C),  Philips Semiconductors SLH                     *
*                                                                             *
*  All rights are reserved. Reproduction in whole or in part is prohibited    *
*           without the written consent of the copyright owner.               *
*                                                                             *
*  Philips reserves the right to make changes without notice at any time.     *
* Philips makes no warranty, expressed, implied or statutory, including but   *
* not limited to any implied warranty of merchantibility or fitness for any   *
* particular purpose, or that the use will not infringe any third party       *
* patent, copyright or trademark. Philips must not be liable for any loss or  *
*                      damage arising from its use.                           *
*                                                                             *
*******************************************************************************
*                                                                             *
*       Project: 336355/105 - Control SW Library for HTRC110/HTRC120/HITAG2   *
*                                                                             *
*       File: CALLBACK.C                                                      *
*       Author: St. de Zeeuw                                                  *
*                                                                             *
*******************************************************************************
*      DATE      *          CHANGES DONE                           *   BY     *
*******************************************************************************
*                *                                                 *          *
*  Dec 04,1997   * Start implementation                            * de Zeeuw *
*  Dec 10,1997   * Version 1.0, tested Version                     * de Zeeuw *
*  Apr 27,1997   * Version 2.0, tested Version                     * de Zeeuw *
*                *                                                 *          *
*******************************************************************************/

#include "portab.h"
#include "reg51.h"
#include "hitag2.h"



void Set_Protocol_Callback( void (code * callback)(void) )
/******************************************************************************
*                                                                             *
* Description:                                                                *
* Sets the vector to an external function. This function will be called       *
* from the decoder/ protocol after to re-assign the memory start address.     *
*                                                                             *
* Parameters:                                                                 *
* callback  Pointer to callback function, or 0 (NULL) if no function call     *
*           is desired. The function which the pointer points at must be in   *
*           code space, and should be of type "void callback(void)".          *
*                                                                             *
* Result: none                                                                *
*                                                                             *
******************************************************************************/
{
  F0=EA;
  EA=0;          /* global interrupt disable */
  Protocol_Callback=callback;
  EA=F0;
}