EMS CPC-PP User Manual page 6

Can-pc interface
Table of Contents

Advertisement

User Manual
struct CPC_INIT_PARAMS
Declaration:
struct CPC_INIT_PARAMS {
struct CPC_CAN_PARAMS
std_can_params;
unsigned char secure_transmit;
void interrupt (far * inthandler)();
};
Description:
The global variable CPC_Init_Params, which
has this type, holds initialization parameters.
2.5.2 Synchronous Functions
CPC_CAN_Init
Syntax:
#include "cpc.h"
int CPC_CAN_Init(void);
Description:
CPC_CAN_Init() initialises the parameters of
the CAN-Controller within CPC-PP. The
CAN-controller is set up with parameters supp-
lied in the global structure CPC_Init_Params
(declaration in cpc.h). These parameters can
be changed before the call to
CPC_CAN_Init(). CPC_CAN_Init is to be cal-
led before data transmission across the
CAN-bus.
Return value: -
EMS Dr. Thomas Wünsche
CPC-PP
7
CPC-PP
CPC_Control
Syntax:
#include "cpc.h"
int CPC_Control(int);
Description:
CPC_Control() serves for set up of the com-
munication object types to be transmitted from
CPC-PP to the PC. The upper 6 bits select the
type of communication object, the lower 2 bits
determine the transmission. The properties
that can be influenced are described in cpc.h.
Return value: -
CPC_Exit
Syntax:
#include "cpc.h"
void CPC_Exit(void);
Description:
CPC_Exit() is to be called before leaving the
application program. CPC_Exit() is in any case
to be used paired with CPC_Init().
Return value: -
CPC_Get_Busload
Syntax:
#include "cpc.h"
int CPC_Get_Busload(void);
Description:
CPC_Get_Busload() measures the actual
bus-load and returns it as percentage of the
maximum bus-load.
Return value:
Actual bus-load: 0 corresponds to 0%, 255
corresponds to 100% bus-load.
8
EMS Dr. Thomas Wünsche
User Manual

Advertisement

Table of Contents
loading

Table of Contents