Giter Site home page Giter Site logo

mcp2515async's Introduction

mcp2515async

async SPI for MCP2515 to be build alongside the linux kernel i

(instead of a patch, easier for raspberry pi)

Some small mods as #defines to remove function attribute typing that doesn't work on the latest tree.

This is a fork.

Orignal code:

http://clientes.netvisao.pt/anbadeol/mcp2515.html

This doesn't build or include the can userspace tools which are at:

https://gitorious.org/linux-can/can-utils/source/110af11db13d7ab62684da5c0fd03fbb497645c9:

But there is nothing special required to build working versions of them on the pi.

Included is a build script to add CAN support to the raspian kernel.

To build the can modules, you need to find the github verson hash for the current kernel and get the /proc/config.gz file, and run the canpi.sh on a laptop or desktop, preferably a fast one. It will fetch all the pieces and rebuild the kernel and the added modules for CAN support.

Note that if you do certain kinds of other modifications to the kernel, this will not apply. If the modules won't load because the symbols don't match you will also have to install the new kernel in addition to the new modules.

The process for finding the hash is given toward the end of raspberrypi/linux#486

The script will create a compressed tar that is to be copied to the pi. It can (normally) be unpacked at /, but it is safer to unpack in a different directory (you will need sudo or to be root), move the old 3.xx.yy+ directory to 3.xx.yy.bak, and move the new 3.xx.yy+ into /lib/modules/.

The script is set for the raspian kernel as of 2/1/2014. If the kernel is updated, the process needs to be rerun with the new config and the new hash (and the internal patch might not apply cleanly). I plan on keeping it updated.

There is a second script to be run on the pi, startcan.sh, which will load the modules and start dumping CAN at 250000.

isotp.c is also added, creating isotp.ko, orginally from https://gitorious.org/linux-can/can-modules

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.