can_adapter

CAN to UART adapter library

Author William Welch Copyright © 2010, all rights reserved.
Adapted-by
Compiler 2.4m

Description

bridge/gateway between RS232 and CAN bus. Uses ASCII encapsulation, 
         compatible with the Socket-CAN SLCAN API, and adapters such as
         LAWICEL and VScom USB-CAN.


Sources

Socket-CAN, in particular the SLCAN API. http://developer.berlios.de/projects/socketcan/ 
         also, the LAWICEL CAN-USB and Easylink adapter manuals.


Dependencies

No dependency found



Summary

Global variables/contants

Procedures

Private

Functions


API details

Global variables/contants

Procedures

  • can_check_uart_rx(volatile byte out device, byte in ch)

    this routine is used to process incoming characters from the UART.
    the data stream is line-oriented ASCII, with a CR(13) terminator.
    sometimes the data is a command, which may need a reply back out
    the UART.  But most of the time, the data is encapsulated CAN messages
    which need to be sent out the CANbus.
    device: uart data device, e.g. serial_hw_data
    ch:  received ASCII char from UART
    

Private

Functions


Related samples

Here are the list of samples which use this library:

18f258518f2585_can_serial_adapter.jal
18f258518f2585_canid4_serial_adapter.jal