/******************************************************************************
*                                                                             *
*              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: 	RC_AST.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,1998   * Version 2.0, tested Version                  *   de Zeeuw  *
*                *                                              *             *
*******************************************************************************/

//#include "portab.h"
//#include "reg51.h"
#include "htrc110.h"



#pragma regparms



void Ast_Adjust (UBYTE t_offset)
/******************************************************************************
*                                                                             *
* Description:                                                                *
* Implementation of the AST method which is commonly used in the HTRC110,     *
* see also the application note AN97070                                       *
*                                                                             *
* Parameters:                                                                 *
* t_offset: offset compensation time constant used in the AST method          *
*                                                                             *
* Return: none                                                                *
*                                                                             *
******************************************************************************/
{
	UBYTE t_antenna;

	t_antenna = READ_PHASE();
	t_antenna <<= 1;
	t_antenna += t_offset;
	t_antenna &= 0x3F;
	SET_SAMPLING_TIME(t_antenna);
}
