/* ** ################################################################### ** ** Filename : Events.C ** ** Project : TimerInt ** ** Processor : 68HC908AZ60 ** ** Componenttype : Events ** ** Version : Driver 01.00 ** ** Compiler : Metrowerks HC08 C Compiler V-5.0.13 ** ** Date/Time : 15.01.2002, 19:03 ** ** Abstract : ** ** This is user's event module. ** Put your event handler code here. ** ** Settings : ** ** ** Contents : ** ** TI1_OnInterrupt - void TI1_OnInterrupt(void); ** ** ** Copyright: 1997 - 2009 Freescale Semiconductor, Inc. All Rights Reserved. ** ** ** ** http : www.freescale.com ** mail : support@freescale.com ** ** ################################################################### */ /* MODULE Events */ #pragma MESSAGE DISABLE C1420 /* WARNING C1420: Result of function-call is ignored */ /*Including used modules for compilling procedure*/ #include "Cpu.h" #include "Events.h" #include "ASl1.h" /*Include shared modules, which are used for whole project*/ #include "PE_Types.h" #include "PE_Error.h" #include "PE_Const.h" #include "IO_Map.h" byte Data[12]; word length; byte i; /* ** =================================================================== ** Event : ASl1_OnFullRxBuf (module Events) ** ** From Component : ASl1 [AsynchroSlave] ** Description : ** This event is called when the input buffer is full. ** Parameters : None ** Returns : Nothing ** =================================================================== */ void ASl1_OnFullRxBuf(void) { for (i=0; i<10; i++) ASl1_RecvBlock(Data, 12, &length); // read out buffer ASl1_ClearRxBuf(); ASl1_SendBlock(Data,12,&length); } /* ** =================================================================== ** Event : ASl1_OnUnselect (module Events) ** ** From Component : ASl1 [AsynchroSlave] ** Description : ** This event is called when the slave stops communicating ** with the master - the master has selected another slave ** to communicate. ** Parameters : None ** Returns : Nothing ** =================================================================== */ void ASl1_OnUnselect(void) { ASl1_Disable(); // disable communication } /* ** =================================================================== ** Event : ASl1_OnFreeTxBuf (module Events) ** ** From Component : ASl1 [AsynchroSlave] ** Description : ** This event is called after the last character in output ** buffer is transmitted. ** Parameters : None ** Returns : Nothing ** =================================================================== */ void ASl1_OnFreeTxBuf(void) { ASl1_ClearTxBuf(); } /* ** =================================================================== ** Event : Cpu_OnSwINT (module Events) ** ** From Component : Cpu [MC9S08GB60] ** Description : ** This software event is called after software reset. ** Parameters : None ** Returns : Nothing ** =================================================================== */ void Cpu_OnSwINT(void) { /* Write your code here ... */ } /* ** =================================================================== ** Event : ASl1_OnSelect (module Events) ** ** From Component : ASl1 [AsynchroSlave] ** Description : ** This event is called when the slave is selected by master ** to communicate. ** Parameters : None ** Returns : Nothing ** =================================================================== */ void ASl1_OnSelect(void) { /* Write your code here ... */ } /* END Events */ /* ** ################################################################### ** ** This file was created by Processor Expert 02.86 for ** the Freescale HC08 series of microcontrollers. ** ** ################################################################### */