EtherCAT slave that reads 3 Xsens IMU's connected to a Xbus Master
Dependencies: MODSERIAL mbed KL25Z_ClockControl
Fork of EtherCAT by
EtherCAT/cpuinit.cpp@4:bb72df6dce33, 2014-12-11 (annotated)
- Committer:
- vsluiter
- Date:
- Thu Dec 11 22:31:10 2014 +0000
- Revision:
- 4:bb72df6dce33
- Parent:
- 1:5e22bf1a3817
- Child:
- 5:6d75f432a41f
All unused analog inputs are now outputs
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
vsluiter | 1:5e22bf1a3817 | 1 | /* |
vsluiter | 1:5e22bf1a3817 | 2 | * SOES Simple Open EtherCAT Slave |
vsluiter | 1:5e22bf1a3817 | 3 | * |
vsluiter | 1:5e22bf1a3817 | 4 | * File : cpuinit.c |
vsluiter | 1:5e22bf1a3817 | 5 | * Version : 0.9.2 |
vsluiter | 1:5e22bf1a3817 | 6 | * Date : 22-02-2010 |
vsluiter | 1:5e22bf1a3817 | 7 | * Copyright (C) 2007-2010 Arthur Ketels |
vsluiter | 1:5e22bf1a3817 | 8 | * |
vsluiter | 1:5e22bf1a3817 | 9 | * SOES is free software; you can redistribute it and/or modify it under |
vsluiter | 1:5e22bf1a3817 | 10 | * the terms of the GNU General Public License version 2 as published by the Free |
vsluiter | 1:5e22bf1a3817 | 11 | * Software Foundation. |
vsluiter | 1:5e22bf1a3817 | 12 | * |
vsluiter | 1:5e22bf1a3817 | 13 | * SOES is distributed in the hope that it will be useful, but WITHOUT ANY |
vsluiter | 1:5e22bf1a3817 | 14 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or |
vsluiter | 1:5e22bf1a3817 | 15 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
vsluiter | 1:5e22bf1a3817 | 16 | * for more details. |
vsluiter | 1:5e22bf1a3817 | 17 | * |
vsluiter | 1:5e22bf1a3817 | 18 | * As a special exception, if other files instantiate templates or use macros |
vsluiter | 1:5e22bf1a3817 | 19 | * or inline functions from this file, or you compile this file and link it |
vsluiter | 1:5e22bf1a3817 | 20 | * with other works to produce a work based on this file, this file does not |
vsluiter | 1:5e22bf1a3817 | 21 | * by itself cause the resulting work to be covered by the GNU General Public |
vsluiter | 1:5e22bf1a3817 | 22 | * License. However the source code for this file must still be made available |
vsluiter | 1:5e22bf1a3817 | 23 | * in accordance with section (3) of the GNU General Public License. |
vsluiter | 1:5e22bf1a3817 | 24 | * |
vsluiter | 1:5e22bf1a3817 | 25 | * This exception does not invalidate any other reasons why a work based on |
vsluiter | 1:5e22bf1a3817 | 26 | * this file might be covered by the GNU General Public License. |
vsluiter | 1:5e22bf1a3817 | 27 | * |
vsluiter | 1:5e22bf1a3817 | 28 | * The EtherCAT Technology, the trade name and logo "EtherCAT" are the intellectual |
vsluiter | 1:5e22bf1a3817 | 29 | * property of, and protected by Beckhoff Automation GmbH. |
vsluiter | 1:5e22bf1a3817 | 30 | */ |
vsluiter | 1:5e22bf1a3817 | 31 | //#include <avr/io.h> |
vsluiter | 1:5e22bf1a3817 | 32 | #include "cpuinit.h" |
vsluiter | 1:5e22bf1a3817 | 33 | #include "mbed.h" |
vsluiter | 1:5e22bf1a3817 | 34 | |
vsluiter | 1:5e22bf1a3817 | 35 | void cpuinit(void) |
vsluiter | 1:5e22bf1a3817 | 36 | { |
vsluiter | 1:5e22bf1a3817 | 37 | //shoe_serial.baud(921600); |
vsluiter | 1:5e22bf1a3817 | 38 | //et1100_spi.format(8,3); |
vsluiter | 1:5e22bf1a3817 | 39 | //et1100_spi.frequency(1000000); |
vsluiter | 4:bb72df6dce33 | 40 | //inintialize all dummy inputs |
vsluiter | 4:bb72df6dce33 | 41 | DigitalOut dummy1(PTC2);//do not leave ADC input floating |
vsluiter | 4:bb72df6dce33 | 42 | DigitalOut dummy2(PTC0); |
vsluiter | 4:bb72df6dce33 | 43 | DigitalOut dummy3(PTC1); |
vsluiter | 4:bb72df6dce33 | 44 | DigitalOut dummy4(PTD1); |
vsluiter | 4:bb72df6dce33 | 45 | DigitalOut dummy5(PTD5); |
vsluiter | 4:bb72df6dce33 | 46 | DigitalOut dummy6(PTD6); |
vsluiter | 4:bb72df6dce33 | 47 | DigitalOut dummy7(PTE20); |
vsluiter | 4:bb72df6dce33 | 48 | DigitalOut dummy8(PTE21); |
vsluiter | 4:bb72df6dce33 | 49 | DigitalOut dummy9(PTE22); |
vsluiter | 4:bb72df6dce33 | 50 | DigitalOut dummy10(PTE23); |
vsluiter | 4:bb72df6dce33 | 51 | DigitalOut dummy11(PTE29); |
vsluiter | 4:bb72df6dce33 | 52 | DigitalOut dummy12(PTE30); |
vsluiter | 4:bb72df6dce33 | 53 | dummy1 = dummy2 = dummy3 = dummy4 = dummy5 = dummy6 = 0; |
vsluiter | 4:bb72df6dce33 | 54 | dummy7 = dummy8 = dummy9 = dummy10 = dummy11 = dummy12 = 0; |
vsluiter | 1:5e22bf1a3817 | 55 | |
vsluiter | 1:5e22bf1a3817 | 56 | } |
vsluiter | 1:5e22bf1a3817 | 57 |