/** Copyright (c) 2008 Freescale Semiconductor Freescale Confidential Proprietary \file Phy.h \brief Physical Layer RF \author Freescale Semiconductor \author Ioseph Martinez, b06623 \author Guadalajara Applications Laboratory RTAC Americas \version 0.8 \date 29/Jan/2008 \warning * History: */ /*****************************************************************************/ #include "FslTypes.h" #include "derivative.h" /* include peripheral declarations */ #define PHY_TIMEBASE 100 /* Interrupt Timing in microseconds */ #define PHY_BAUDRATE 2400 /* Baudrate in bauds per second */ #define PHY_PINOUTPUT PTAD_PTAD0 #define PHY_PINOUTPUT_IDLE 0 #define PHY_STATE_JOB_IDLE 0x00 #define PHY_STATE_JOB_BITS 0x01 #define PHY_STATE_JOB_BYTES 0x02 #define PHY_STATE_JOB_AGC 0x03 #define PHY_STATE_JOB_DELAY 0x04 UINT8 u8fnPhyGetState(void); void vfnPhyTimerCall(void); void vfnPhySendBits(UINT8 Data, UINT8 Length); void vfnPhySendBytes(UINT8 *Data, UINT8 Length); void vfnPhySendPID(void); void vfnPhySendMsg(UINT8 *Data, UINT8 Length); #define macroActivateOutput() PTADD_PTADD0 = 0x01;\ PTADS_PTADS0 = 1;\ PTAD_PTAD0 = 0x00 #define macroCancelOutput() PTADD_PTADD0 = 0x01;\ PTADS_PTADS0 = 0;\ PTAD_PTAD0 = 0x00