Treehouse Mbed Team / Mbed 2 deprecated APS_DCM1SL2

Dependencies:   mbed

Committer:
Slord2142
Date:
Tue Mar 12 22:16:03 2019 +0000
Revision:
49:65c714a5def2
Parent:
47:d10bf65cb7dc
Child:
52:2b3b194144da
ILR properly interrupts, I2C set up to interrupt (currently unused), and pins now reference the numFast table for when they turn on.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mfwic 0:44a3005d4f20 1 //-------------------------------------------------------------------------------
mfwic 0:44a3005d4f20 2 //
mfwic 0:44a3005d4f20 3 // Treehouse Designs Inc.
mfwic 0:44a3005d4f20 4 // Colorado Springs, Colorado
mfwic 0:44a3005d4f20 5 //
mfwic 8:d3d7dca419b3 6 // Copyright (c) 2018 by Treehouse Designs Inc.
mfwic 0:44a3005d4f20 7 // Copyright (c) 2018 by Agility Power Systems Inc.
mfwic 0:44a3005d4f20 8 //
mfwic 0:44a3005d4f20 9 // This code is the property of Treehouse Designs, Inc. (Treehouse) and
mfwic 0:44a3005d4f20 10 // Agility Power Systems Inc. (Agility) and may not be redistributed
mfwic 0:44a3005d4f20 11 // in any form without prior written permission from
mfwic 0:44a3005d4f20 12 // both copyright holders, Treehouse and Agility.
mfwic 0:44a3005d4f20 13 //
mfwic 0:44a3005d4f20 14 // The above copyright notice and this permission notice shall be included in
mfwic 0:44a3005d4f20 15 // all copies or substantial portions of the Software.
mfwic 0:44a3005d4f20 16 //
mfwic 0:44a3005d4f20 17 //
mfwic 0:44a3005d4f20 18 //-------------------------------------------------------------------------------
mfwic 0:44a3005d4f20 19 //
mfwic 0:44a3005d4f20 20 // REVISION HISTORY:
mfwic 0:44a3005d4f20 21 //
mfwic 0:44a3005d4f20 22 // $Author: $
mfwic 0:44a3005d4f20 23 // $Rev: $
mfwic 0:44a3005d4f20 24 // $Date: $
mfwic 0:44a3005d4f20 25 // $URL: $
mfwic 0:44a3005d4f20 26 //
mfwic 0:44a3005d4f20 27 //-------------------------------------------------------------------------------
mfwic 0:44a3005d4f20 28
mfwic 0:44a3005d4f20 29 #include "mbed.h"
mfwic 0:44a3005d4f20 30 #include "all_io.h"
mfwic 0:44a3005d4f20 31 #include "PortOut.h"
mfwic 0:44a3005d4f20 32
mfwic 0:44a3005d4f20 33 // Digital IO
mfwic 3:d8948c5b2951 34
Slord2142 41:bd54c88e3334 35 DigitalInOut SWDIO(PA_13);
Slord2142 49:65c714a5def2 36 PwmOut fan_on(PA_15);
Slord2142 41:bd54c88e3334 37 AnalogOut vdac(PA_4);
mfwic 3:d8948c5b2951 38
mfwic 1:9f8583ba2431 39 // Use extchlat to latch new wr_out signals to the external slots via ribbon cable.
Slord2142 39:bdd06cbaf9c3 40 //DigitalOut extchlat(PA_1);
Slord2142 47:d10bf65cb7dc 41 /*DigitalOut ec2(PC_0);
Slord2142 41:bd54c88e3334 42 DigitalOut ec15(PC_1);
Slord2142 41:bd54c88e3334 43 DigitalOut ec28(PC_2);
Slord2142 41:bd54c88e3334 44 DigitalOut ec6(PC_3);
Slord2142 41:bd54c88e3334 45 DigitalOut ec12(PC_4);
Slord2142 41:bd54c88e3334 46 DigitalOut ec25(PC_5);
Slord2142 41:bd54c88e3334 47 DigitalOut ec36(PC_6);
Slord2142 41:bd54c88e3334 48 DigitalOut ec31(PC_7);
Slord2142 41:bd54c88e3334 49 DigitalOut ec9(PC_8);
Slord2142 41:bd54c88e3334 50 DigitalOut ec5(PC_9);
Slord2142 41:bd54c88e3334 51 DigitalOut ec24(PC_10);
Slord2142 41:bd54c88e3334 52 DigitalOut ec11(PC_11);
Slord2142 41:bd54c88e3334 53 DigitalOut ec1(PC_12);
Slord2142 41:bd54c88e3334 54 DigitalOut ec10(PC_13);
Slord2142 41:bd54c88e3334 55 DigitalOut ec23(PC_14);
Slord2142 41:bd54c88e3334 56 DigitalOut ec7(PC_15);
Slord2142 41:bd54c88e3334 57 DigitalOut ec18(PA_8);
Slord2142 41:bd54c88e3334 58 DigitalOut ec14(PA_9);
Slord2142 41:bd54c88e3334 59 DigitalOut ec27(PA_10);
Slord2142 41:bd54c88e3334 60 DigitalOut ec19(PA_11);
Slord2142 41:bd54c88e3334 61 DigitalOut ec32(PA_12);
Slord2142 41:bd54c88e3334 62 DigitalOut ec35(PB_0);
Slord2142 41:bd54c88e3334 63 DigitalOut ec21(PB_1);
Slord2142 41:bd54c88e3334 64 DigitalOut ec30(PB_2);
Slord2142 41:bd54c88e3334 65 DigitalOut ec33(PB_4);
Slord2142 41:bd54c88e3334 66 DigitalOut ec20(PB_5);
Slord2142 41:bd54c88e3334 67 DigitalOut ec34(PB_8);
Slord2142 41:bd54c88e3334 68 DigitalOut ec29(PB_9);
Slord2142 41:bd54c88e3334 69 DigitalOut ec8(PB_10);
Slord2142 41:bd54c88e3334 70 DigitalOut ec4(PB_11);
Slord2142 41:bd54c88e3334 71 DigitalOut ec17(PB_12);
Slord2142 41:bd54c88e3334 72 DigitalOut ec13(PB_13);
Slord2142 41:bd54c88e3334 73 DigitalOut ec26(PB_14);
Slord2142 47:d10bf65cb7dc 74 DigitalOut ec22(PB_15);*/
Slord2142 47:d10bf65cb7dc 75 DigitalOut ec[] = {(PC_0), (PC_1), (PC_2), (PC_3), (PC_4), (PC_5), (PC_6), (PC_7), (PC_8), (PC_9), (PC_10), (PC_11), (PC_12), (PC_13), (PC_14), (PC_15),
Slord2142 49:65c714a5def2 76 (PA_8), (PA_9), (PA_10), (PA_11), (PA_12), (PB_0), (PB_1), (PB_2), (PB_4), (PB_5), (PB_8), (PB_9), (PB_10), (PB_11), (PB_12), (PB_13), (PB_14), (PB_15),
Slord2142 49:65c714a5def2 77 (PH_0), (PH_1)};
mfwic 3:d8948c5b2951 78
mfwic 0:44a3005d4f20 79 // all_on indicates that the load demanded a high amount of current and all DC-DC converters are enabled.
Slord2142 39:bdd06cbaf9c3 80 //DigitalIn all_on(PA_0);
Slord2142 49:65c714a5def2 81 InterruptIn ILR_enable(PA_0);
Slord2142 41:bd54c88e3334 82 DigitalIn SWDCLK(PA_14);
Slord2142 41:bd54c88e3334 83 DigitalIn fan_pwn(PB_3);
Slord2142 41:bd54c88e3334 84 DigitalIn MS(PA_1);
mfwic 0:44a3005d4f20 85
mfwic 0:44a3005d4f20 86 // Analog IO
mfwic 0:44a3005d4f20 87 //
mfwic 42:3ae73b61f657 88 AnalogIn VIN48(PA_7);
mfwic 42:3ae73b61f657 89 AnalogIn VIN12(PA_6);
mfwic 42:3ae73b61f657 90 AnalogIn IIN12(PA_5);