Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed CANBuffer Watchdog MODSERIAL mbed-rtos xbeeRelay IAP
Fork of SystemManagement by
IOobjects.cpp
00001 #include "IOobjects.h" 00002 00003 Watchdog wdt; // Watchdog timer (TIMEOUT (sec)) 00004 DigitalIn sw[]={ // Shutdown switch sense lines 00005 DigitalIn(P1_0, PullDown), // Sense0 - fuse power 00006 DigitalIn(P1_1, PullDown), // Sense1 - AMS latch 00007 DigitalIn(P1_4, PullDown), // Sense2 - IMD latch 00008 DigitalIn(P1_8, PullDown), // Sense3 - PCM relay 00009 DigitalIn(P1_9, PullDown), // Sense4 - Brake plausibility relay 00010 DigitalIn(P1_10, PullDown), // Sense5 - Left e-stop 00011 DigitalIn(P1_14, PullDown), // Sense6 - Brake over-travel 00012 DigitalIn(P1_15, PullDown), // Sense7 - Inertia switch 00013 DigitalIn(P1_16, PullDown), // Sense8 - Cockpit e-stop 00014 DigitalIn(P1_17, PullDown), // Sense9 - Right e-stop 00015 DigitalIn(P1_27, PullDown), // Sense10 - HVD/Charger 00016 DigitalIn(P1_28, PullDown), // Sense11 - TSMS/tractive enable 00017 }; 00018 PollSwitch switches(sw, sizeof(sw)/sizeof(sw[0])); // Shutdown switch sense pins (SWITCH PIN ARRAY, NUM PINS) 00019 CANBuffer can(CAN2, MEDIUM, P4_28, 1, 1); // Buffered CAN interface (PORT, SPEED, SILENT PIN) 00020 CoulombCounter glvBat(p19, FAST_LOOP*1000, 1); // Coulomb counter battery monitor for GLV Battery (CURRENT SENSE PIN, INTEGRATION TIME) 00021 IMD imd(P1_26); // IMD PWM sense channel to read status and resistance (IMD PWM PIN) 00022 LatchMonitor AMSlatch(P0_18, P0_22); // Supervisor for AMS hardware latch/reset circuit (OK PIN, FAULT PIN, STARTUP DELAY (ms)) 00023 LatchMonitor IMDlatch(P0_17, P0_21); // Supervisor for IMD hardware latch/reset circuit (OK PIN, FAULT PIN, STARTUP DELAY (ms)) 00024 DC_DC dcdc(p18, p20, p26, p25, p24, p23, 0.01, 5, 1);// DC-DC converter & high-current load control (CONTROL PIN, CURRENT SENSE PIN, FAN1 PIN, FAN2 PIN, PUMP1 PIN, PUMP2 PIN, PWM PERIOD (sec), FULL-SCALE SLEW (sec)) 00025 Temperature internalTmp(&NXFT15XH103_TABLE, p15); // Temperature conversion look-up table for internal temperature on the GLV bat charger FET (TABLE PTR, PIN) 00026 //XbeeManager xbeeRelay(p9, p10, p13, p14, XBEE_BAUD, 1, 1); 00027 MODSERIAL pc(USBTX, USBRX, 1, RX_SIZE); // Software buffered serial 00028 XbeeRelay xbee; 00029 DigitalOut extras[] = {(p16), (p17)}; // Unused analog pins driven low
Generated on Fri Jul 15 2022 06:07:18 by
1.7.2
