4.1 JNMMCANConfig

This function configures the CAN controller with baud rate.

int JNMMCANConfig(int can_fd, CANCONFIG config);

Name

Description

Can_fd

Handle to Diamond JNMM CAN driver as received from JNMMCANOpen().

Structure with following member variables,

Can_ch - CAN port number 0-3.

BaudRate - constant indicating the baud rate

[0 - B1000 一 1000kbit/s,

1 - B800 一 800kbit/s,

2 - B500 一 500kbit/s,

3 - B250 一 250kbit/s,

4 - B125 一 125kbits/s,

5 - B100 一 100kbit/s,

6 - B50 一 50kbit/s,

7 - B20 一 20kbit/s, 8 - B10 一 10kbit/s ]

Return Value

Error code or 0.

Usage Example

To configure baudrate.

canconfig.BaudRate = 1; //B800kbit/s
success = JNMMCANConfig(device_handle, canconfig);

Last updated