Technical information

CSI to SPI Peripheral Communication in V850ES Microcontrollers
#define CSIA_AUTORAMSIZE 32 /* CSIA automatic transfer RAM size
*/
#define IIC_RECEIVEBUFSIZE 32
void CSI00_Init( void );
MD_STATUS CSI00_SendData( UCHAR* txbuf, USHORT txnum );
MD_STATUS CSI00_ReceiveData( UCHAR* rxbuf, USHORT rxnum );
void CALL_CSI00_Receive( void );
void CALL_CSI00_Send( void );
enum TransferMode { Send, Receive };
/* flag set by CALL_CSI00_Send() to signal end of transmission */
extern volatile MD_STATUS CSI00_SendDone;
/* flag set by CALL_CSI00_Receive to signal reception done */
extern volatile MD_STATUS CSI00_ReceiveDone;
/* functions to set CSI00 in Type 3 or Type 4 mode */
void CSI00_SetType3(void);
void CSI00_SetType4(void);
#endif /* _MDSERIAL_ */
4.1.9 Serial.c
/*
*****************************************************************************
**
** This device driver was created by Applilet for the V850ES/KX1+
** 32-Bit Single-Chip Microcontrollers
**
** Copyright(C) NEC Electronics Corporation 2002-2004
** All rights reserved by NEC Electronics Corporation
**
** This program should be used on your own responsibility.
** NEC Electronics Corporation assumes no responsibility for any losses
incurred
** by customers or third parties arising from the use of this file.
**
** Filename : serial.c
** Abstract : This file implements a device driver for the SERIAL module
** APIlib: V850ESKX1H.lib V1.33 [24 Sep 2004]
**
Device: uPD70F3318Y
**
** Compiler: NEC/CA850
**
*****************************************************************************
*/
#include "macrodriver.h"
#include "serial.h"
#pragma interrupt INTCSI00 MD_INTCSI00
62