/**
 * \file SNDMO16X.C
 * 
 * \author Axel Wolf, SCI Cupertino
 * \author Dr. Jens Barrenscheen, HL MC PD, Munich
 * \author Hubert Piontek, University of Ulm
 *
 * Routine for sending a 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:	"SNDMO16X.C"                                     *
 * Compiler used:	BSO/Tasking C166                                 *
 * Task:		Source File for procedure send_mo_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                  *
 *********************************************************************/

#include <REG167.H>         /* register definitions C167             */
#include <CANR_16X.H>       /* CAN control register definitions      */

extern unsigned int *msgctrl_ptr_16x[16];	///< pointer to message control registers

/**
 * This function transmits the specified message object. Before that, it must be configured
 * as a transmit object and it should also contain valid and meaningful data.
 * 
 * \param nr Number of the message object to transmit (1..14).
 */
void send_mo_16x(unsigned char nr)
{
	if ((nr<15) && (nr)) 
		*msgctrl_ptr_16x[nr]=0xefff;  /* set TXRQ */
}