Treehouse Mbed Team / Mbed 2 deprecated APS_1U5x

Dependencies:   mbed

Committer:
mfwic
Date:
Sat Nov 24 18:22:31 2018 +0000
Revision:
0:44a3005d4f20
Child:
1:9f8583ba2431
1st commit after starting minor edits from base code. Major sections will be deleted in this version.

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 0:44a3005d4f20 6 // Copyright (c) 2016 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 0:44a3005d4f20 34 //
mfwic 0:44a3005d4f20 35 // Slots 12 to 0 are activated with the wr_out signals
mfwic 0:44a3005d4f20 36 // wr_out[13] = slots[12:0]
mfwic 0:44a3005d4f20 37 DigitalOut wr_out[13] = {PC_12, PC_11, PC_10, PC_9, PC_8, PC_7, PC_6, PC_5, PC_4, PC_3, PC_2, PC_1, PC_0};
mfwic 0:44a3005d4f20 38 // en_out are binary weighted signals that activate groups of DC-DC converters on the slot cards.
mfwic 0:44a3005d4f20 39 // en_out[6] = {en32, en16, en8, en4, en2, en1}
mfwic 0:44a3005d4f20 40 DigitalOut en_out[6] = {PA_9, PA_8, PA_7, PA_6, PA_5, PA_4};
mfwic 0:44a3005d4f20 41 // Expansion port signals
mfwic 0:44a3005d4f20 42 // eport[16] = eport[18:3]
mfwic 0:44a3005d4f20 43 DigitalIn eport[16] = {PB_15, PB_14, PB_13, PB_12, PB_11, PB_10, PB_9, PB_8, PB_7, PB_6, PB_5, PB_4, PB_3, PB_2, PB_1, PB_0};
mfwic 0:44a3005d4f20 44 // Use extchlat to latch new wr_out signals to the slots.
mfwic 0:44a3005d4f20 45 DigitalOut extchlat = PA_1;
mfwic 0:44a3005d4f20 46 // all_on indicates that the load demanded a high amount of current and all DC-DC converters are enabled.
mfwic 0:44a3005d4f20 47 DigitalIn all_on = PA_0;
mfwic 0:44a3005d4f20 48
mfwic 0:44a3005d4f20 49 // Analog IO
mfwic 0:44a3005d4f20 50 //
mfwic 0:44a3005d4f20 51 AnalogIn V48(PA_13);
mfwic 0:44a3005d4f20 52 AnalogIn V24(PA_15);
mfwic 0:44a3005d4f20 53 AnalogIn V12(PA_14);
mfwic 0:44a3005d4f20 54
mfwic 0:44a3005d4f20 55 AnalogIn I48(PA_12);
mfwic 0:44a3005d4f20 56 AnalogIn I24(PA_10);
mfwic 0:44a3005d4f20 57 AnalogIn I12(PA_11);