EtherCAT slave that reads 3 Xsens IMU's connected to a Xbus Master

Dependencies:   MODSERIAL mbed KL25Z_ClockControl

Fork of EtherCAT by First Last

Committer:
vsluiter
Date:
Thu Mar 05 22:22:47 2015 +0000
Revision:
17:c5946a0fde83
Parent:
13:5e4dcbd44786
Child:
18:6629e8c5d59e
BusMaster working. Added code to copy sensor data, not tested yet.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
vsluiter 0:a8daa9348a67 1 /*
vsluiter 0:a8daa9348a67 2 * SOES Simple Open EtherCAT Slave
vsluiter 0:a8daa9348a67 3 *
vsluiter 0:a8daa9348a67 4 * File : cpuinit.h
vsluiter 0:a8daa9348a67 5 * Version : 0.9.2
vsluiter 0:a8daa9348a67 6 * Date : 22-02-2010
vsluiter 0:a8daa9348a67 7 * Copyright (C) 2007-2010 Arthur Ketels
vsluiter 0:a8daa9348a67 8 *
vsluiter 0:a8daa9348a67 9 * SOES is free software; you can redistribute it and/or modify it under
vsluiter 0:a8daa9348a67 10 * the terms of the GNU General Public License version 2 as published by the Free
vsluiter 0:a8daa9348a67 11 * Software Foundation.
vsluiter 0:a8daa9348a67 12 *
vsluiter 0:a8daa9348a67 13 * SOES is distributed in the hope that it will be useful, but WITHOUT ANY
vsluiter 0:a8daa9348a67 14 * WARRANTY; without even the implied warranty of MERCHANTABILITY or
vsluiter 0:a8daa9348a67 15 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
vsluiter 0:a8daa9348a67 16 * for more details.
vsluiter 0:a8daa9348a67 17 *
vsluiter 0:a8daa9348a67 18 * As a special exception, if other files instantiate templates or use macros
vsluiter 0:a8daa9348a67 19 * or inline functions from this file, or you compile this file and link it
vsluiter 0:a8daa9348a67 20 * with other works to produce a work based on this file, this file does not
vsluiter 0:a8daa9348a67 21 * by itself cause the resulting work to be covered by the GNU General Public
vsluiter 0:a8daa9348a67 22 * License. However the source code for this file must still be made available
vsluiter 0:a8daa9348a67 23 * in accordance with section (3) of the GNU General Public License.
vsluiter 0:a8daa9348a67 24 *
vsluiter 0:a8daa9348a67 25 * This exception does not invalidate any other reasons why a work based on
vsluiter 0:a8daa9348a67 26 * this file might be covered by the GNU General Public License.
vsluiter 0:a8daa9348a67 27 *
vsluiter 0:a8daa9348a67 28 * The EtherCAT Technology, the trade name and logo "EtherCAT" are the intellectual
vsluiter 0:a8daa9348a67 29 * property of, and protected by Beckhoff Automation GmbH.
vsluiter 0:a8daa9348a67 30 */
vsluiter 1:5e22bf1a3817 31 #ifndef __CPUINIT_H__
vsluiter 1:5e22bf1a3817 32 #define __CPUINIT_H__
vsluiter 1:5e22bf1a3817 33 #include "mbed.h"
vsluiter 12:cac4e7c2bd0f 34 #include "MODSERIAL.h"
vsluiter 13:5e4dcbd44786 35 #include "xbus.h"
vsluiter 1:5e22bf1a3817 36
vsluiter 0:a8daa9348a67 37 extern void cpuinit(void);
vsluiter 17:c5946a0fde83 38 extern struct xbus_struct xbus_master;
vsluiter 0:a8daa9348a67 39
vsluiter 2:3dd1240eb938 40 #define ET1100_MOSI PTD2
vsluiter 2:3dd1240eb938 41 #define ET1100_MISO PTD3
vsluiter 2:3dd1240eb938 42 #define ET1100_SCK PTD1
vsluiter 2:3dd1240eb938 43 #define ET1100_SS PTD0
vsluiter 8:09dcef3ed467 44 #define LED_PIN PTB18
vsluiter 17:c5946a0fde83 45
vsluiter 5:6d75f432a41f 46
vsluiter 1:5e22bf1a3817 47 extern DigitalOut led;
vsluiter 1:5e22bf1a3817 48 extern DigitalOut et1100_ss;
vsluiter 1:5e22bf1a3817 49 extern DigitalIn et1100_miso;
vsluiter 1:5e22bf1a3817 50 extern SPI et1100_spi;
vsluiter 12:cac4e7c2bd0f 51 extern MODSERIAL xbus;
vsluiter 1:5e22bf1a3817 52 #endif