/**
* \file CHM1516X.C
*
* \author Axel Wolf, SCI Cupertino
* \author Dr. Jens Barrenscheen, HL MC PD, Munich
* \author Hubert Piontek, University of Ulm
*
* Routine for checking for new data in the last message object.
*
* Most of this is based von the Infineon/Siemens Application Note AP2922.
* Some additions made at University of Ulm, February 2003.
*
* This CAN driver is mainly meant to be used by the publisher/subscriber
* library developed at the University of Ulm, 1999-2003.
*/
/*********************************************************************
* Program name: "CHM1516X.C" *
* Compiler used: BSO/Tasking C166 *
* Task: Source File for function check_mo15_16x *
* belonging to Siemens ApNote AP2922 *
* "'C' CAN Driver Routines for the C166 family" *
* *
* Last modifications: April 28nd 1997 *
* Version: 1.0 *
* Authors: Axel Wolf, SCI Cupertino *
* Dr. Jens Barrenscheen, HL MC PD, Munich *
*********************************************************************/
/// pointer to message control registers
extern unsigned int *msgctrl_ptr_16x[16];
/**
* Checks if the last message object (15) has new data. If
* you want to check the other message objects, please use check_mo_16x().
*
* \return indication of new data
* \retval 0 No new data received.
* \retval 1 New data received.
*/
unsigned char check_mo15_16x(void)
{
unsigned char new_event_var=0;
/* if NEWDAT or RMTPND is set, return 1 */
if (*msgctrl_ptr_16x[15] & 0x8200)
new_event_var=1;
return new_event_var;
}