/*_____ I N C L U D E S ____________________________________________________*/ #include "config.h" /* lib configuration header */ #include "include/timer_drv.h" /* timer driver definition */ /*_____ M A C R O S ________________________________________________________*/ /*_____ D E F I N I T I O N ________________________________________________*/ /*_____ D E C L A R A T I O N ______________________________________________*/ /*F*************************************************************************** * NAME: t0_set_prio *----------------------------------------------------------------------------- * PARAMS: * * return: *---------------------------------------------------------------------------- * PURPOSE: * Set the Timer 0 priority interrupt *---------------------------------------------------------------------------- * EXAMPLE: *---------------------------------------------------------------------------- * NOTE: *---------------------------------------------------------------------------- * REQUIREMENTS: ******************************************************************************/ void t0_set_prio (Byte priority) { if ((priority == 1) || (priority == 3)) /* set LSB priority bit */ { IPL0 |= MSK_ET0; } if ((priority == 2) || (priority == 3)) /* set MSB priority bit */ { IPH0 |= MSK_ET0; } } /*F*************************************************************************** * NAME: t1_set_prio *----------------------------------------------------------------------------- * PARAMS: * * return: *---------------------------------------------------------------------------- * PURPOSE: * Set the Timer 1 priority interrupt *---------------------------------------------------------------------------- * EXAMPLE: *---------------------------------------------------------------------------- * NOTE: *---------------------------------------------------------------------------- * REQUIREMENTS: ******************************************************************************/ void t1_set_prio (Byte priority) { if ((priority == 1) || (priority == 3)) /* set LSB priority bit */ { IPL0 |= MSK_ET1; } if ((priority == 2) || (priority == 3)) /* set MSB priority bit */ { IPH0 |= MSK_ET1; } }