Software installation and programming guide, Introduction, Can bus – Acrosser AIV-HM76V1FL User Manual

Page 47: Overview, Can message format

Advertising
background image

AIV-HM76V1FL Series User Manual

47

www.acrosser.com

5. Software Installation and

Programming Guide

5.1. Introduction

5.1.1. CAN Bus

5.1.1.1. Overview

The CAN bus APIs provide interfaces to CAN bus subsystem. By invoking these

APIs, programmers can implement the applications which have the functions listed

below:
1. Set the BAUD rate.
2. Send the CAN packages over the CAN bus.
3. Receive the CAN packages via the CAN bus hardware interface.
4. Set the CAN package filter to selectively receive CAN packages with specific ID.
5. Set the mask bits to selectively make some filter bits take effect.
In the folder ‘HM76V1FL\Utility’ on the CD, we provide:
1. API header file.
2. API library in static library format and shared library format.
3. Test utility.

5.1.1.2. CAN Message Format

// TYPE DEFINITION

typedef char

i8;

typedef unsigned char

u8;

typedef short

i16;

typedef unsigned short

u16;

typedef unsigned long

u32;

typedef int

i32;

struct CanMsg {

u32 id;

u8 id_type;

u8 length;

u8 data[8];

}

Advertising