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
src/all_io.cpp@1:bc3509459a27, 2022-12-06 (annotated)
- Committer:
- Slord2142
- Date:
- Tue Dec 06 18:47:01 2022 +0000
- Revision:
- 1:bc3509459a27
- Parent:
- 0:b3410a1e9843
Helix commit 1
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| Slord2142 | 0:b3410a1e9843 | 1 | //------------------------------------------------------------------------------- |
| Slord2142 | 0:b3410a1e9843 | 2 | // |
| Slord2142 | 0:b3410a1e9843 | 3 | // Treehouse Designs Inc. |
| Slord2142 | 0:b3410a1e9843 | 4 | // Colorado Springs, Colorado |
| Slord2142 | 0:b3410a1e9843 | 5 | // |
| Slord2142 | 0:b3410a1e9843 | 6 | // Copyright (c) 2018 by Treehouse Designs Inc. |
| Slord2142 | 0:b3410a1e9843 | 7 | // Copyright (c) 2018 by Agility Power Systems Inc. |
| Slord2142 | 0:b3410a1e9843 | 8 | // |
| Slord2142 | 0:b3410a1e9843 | 9 | // This code is the property of Treehouse Designs, Inc. (Treehouse) and |
| Slord2142 | 0:b3410a1e9843 | 10 | // Agility Power Systems Inc. (Agility) and may not be redistributed |
| Slord2142 | 0:b3410a1e9843 | 11 | // in any form without prior written permission from |
| Slord2142 | 0:b3410a1e9843 | 12 | // both copyright holders, Treehouse and Agility. |
| Slord2142 | 0:b3410a1e9843 | 13 | // |
| Slord2142 | 0:b3410a1e9843 | 14 | // The above copyright notice and this permission notice shall be included in |
| Slord2142 | 0:b3410a1e9843 | 15 | // all copies or substantial portions of the Software. |
| Slord2142 | 0:b3410a1e9843 | 16 | // |
| Slord2142 | 0:b3410a1e9843 | 17 | // |
| Slord2142 | 0:b3410a1e9843 | 18 | //------------------------------------------------------------------------------- |
| Slord2142 | 0:b3410a1e9843 | 19 | // |
| Slord2142 | 0:b3410a1e9843 | 20 | // REVISION HISTORY: |
| Slord2142 | 0:b3410a1e9843 | 21 | // |
| Slord2142 | 0:b3410a1e9843 | 22 | // $Author: $ |
| Slord2142 | 0:b3410a1e9843 | 23 | // $Rev: $ |
| Slord2142 | 0:b3410a1e9843 | 24 | // $Date: $ |
| Slord2142 | 0:b3410a1e9843 | 25 | // $URL: $ |
| Slord2142 | 0:b3410a1e9843 | 26 | // |
| Slord2142 | 0:b3410a1e9843 | 27 | //------------------------------------------------------------------------------- |
| Slord2142 | 0:b3410a1e9843 | 28 | |
| Slord2142 | 0:b3410a1e9843 | 29 | #include "mbed.h" |
| Slord2142 | 0:b3410a1e9843 | 30 | #include "all_io.h" |
| Slord2142 | 0:b3410a1e9843 | 31 | #include "PortOut.h" |
| Slord2142 | 0:b3410a1e9843 | 32 | |
| Slord2142 | 0:b3410a1e9843 | 33 | // Digital IO |
| Slord2142 | 0:b3410a1e9843 | 34 | |
| Slord2142 | 0:b3410a1e9843 | 35 | DigitalInOut SWDIO(PA_13); |
| Slord2142 | 0:b3410a1e9843 | 36 | PwmOut fan_pwm(PB_3); |
| Slord2142 | 0:b3410a1e9843 | 37 | DigitalOut fan_on(PA_15); |
| Slord2142 | 0:b3410a1e9843 | 38 | AnalogOut vdac(PA_4); |
| Slord2142 | 0:b3410a1e9843 | 39 | |
| Slord2142 | 0:b3410a1e9843 | 40 | // Use extchlat to latch new wr_out signals to the external slots via ribbon cable. |
| Slord2142 | 0:b3410a1e9843 | 41 | //DigitalOut extchlat(PA_1); |
| Slord2142 | 0:b3410a1e9843 | 42 | /*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 | 0:b3410a1e9843 | 43 | (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 | 0:b3410a1e9843 | 44 | (PH_0), (PH_1)};*/ |
| Slord2142 | 0:b3410a1e9843 | 45 | /*DigitalOut en1(PC_7); |
| Slord2142 | 0:b3410a1e9843 | 46 | DigitalOut en2(PC_6); |
| Slord2142 | 0:b3410a1e9843 | 47 | DigitalOut en4(PB_15); |
| Slord2142 | 0:b3410a1e9843 | 48 | DigitalOut en8(PB_14); |
| Slord2142 | 0:b3410a1e9843 | 49 | DigitalOut en16(PB_13); |
| Slord2142 | 0:b3410a1e9843 | 50 | DigitalOut en32(PB_12);*/ |
| Slord2142 | 0:b3410a1e9843 | 51 | DigitalOut en[] = {(PC_7), (PC_6), (PB_15), (PB_14), (PB_13), (PB_12)}; |
| Slord2142 | 0:b3410a1e9843 | 52 | DigitalOut ALLON(PA_10); |
| Slord2142 | 0:b3410a1e9843 | 53 | DigitalOut WR(PA_9); |
| Slord2142 | 0:b3410a1e9843 | 54 | |
| Slord2142 | 0:b3410a1e9843 | 55 | // all_on indicates that the load demanded a high amount of current and all DC-DC converters are enabled. |
| Slord2142 | 0:b3410a1e9843 | 56 | //DigitalIn all_on(PA_0); |
| Slord2142 | 0:b3410a1e9843 | 57 | InterruptIn ILR_enable(PA_0); |
| Slord2142 | 0:b3410a1e9843 | 58 | DigitalIn SWDCLK(PA_14); |
| Slord2142 | 0:b3410a1e9843 | 59 | DigitalIn MS(PA_1); |
| Slord2142 | 0:b3410a1e9843 | 60 | //DigitalIn UART_TX(PA_2); |
| Slord2142 | 0:b3410a1e9843 | 61 | //DigitalIn UART_RX(PA_3); |
| Slord2142 | 0:b3410a1e9843 | 62 | //Serial chip2221(PA_2, PA_3); |
| Slord2142 | 0:b3410a1e9843 | 63 | //DigitalIn I2C_SCL(PB_6); |
| Slord2142 | 0:b3410a1e9843 | 64 | //DigitalIn I2C_SDA(PB_7); |
| Slord2142 | 0:b3410a1e9843 | 65 | |
| Slord2142 | 0:b3410a1e9843 | 66 | // Analog IO |
| Slord2142 | 0:b3410a1e9843 | 67 | // |
| Slord2142 | 0:b3410a1e9843 | 68 | AnalogIn adc_temp(ADC_TEMP); |
| Slord2142 | 0:b3410a1e9843 | 69 | AnalogIn adc_vref(ADC_VREF); |
| Slord2142 | 0:b3410a1e9843 | 70 | #if defined(TARGET_DISCO_F051R8) || defined(TARGET_NUCLEO_F030R8) || defined(TARGET_NUCLEO_F031K6) || defined(TARGET_NUCLEO_F042K6) || defined(TARGET_NUCLEO_F070RB) || defined(TARGET_NUCLEO_F072RB) || defined(TARGET_NUCLEO_F091RC) || defined(TARGET_NUCLEO_F207ZG) || defined(TARGET_NUCLEO_F302R8) || defined(TARGET_NUCLEO_F303K8) || defined(TARGET_DISCO_F303VC) || defined(TARGET_NUCLEO_F303RE) || defined(TARGET_NUCLEO_F303ZE) || defined(TARGET_DISCO_F334C8) || defined(TARGET_NUCLEO_F334R8) || defined(TARGET_MTS_DRAGONFLY_F411RE) || defined(TARGET_MTS_MDOT_F405RG) || defined(TARGET_MTS_MDOT_F411RE) || defined(TARGET_DISCO_F401VC) || defined(TARGET_NUCLEO_F401RE) || defined(TARGET_ARCH_MAX) || defined(TARGET_DISCO_F407VG) || defined(TARGET_NUCLEO_F410RB) || defined(TARGET_ELMO_F411RE) || defined(TARGET_NUCLEO_F411RE) || defined(TARGET_NUCLEO_F412ZG) || defined(TARGET_DISCO_F413ZH) || defined(TARGET_DISCO_F429ZI) || defined(TARGET_NUCLEO_F429ZI) || defined(TARGET_NUCLEO_F439ZI) || defined(TARGET_B96B_F446VE) || defined(TARGET_NUCLEO_F446RE) || defined(TARGET_NUCLEO_F446ZE) || defined(TARGET_DISCO_F469NI) || defined(TARGET_DISCO_F746NG) || defined(TARGET_NUCLEO_F746ZG) || defined(TARGET_NUCLEO_F756ZG) || defined(TARGET_NUCLEO_F767ZI) || defined(TARGET_DISCO_F769NI) || defined(TARGET_DISCO_L072CZ_LRWAN1) || defined(TARGET_NUCLEO_L432KC) || defined(TARGET_DISCO_L476VG) || defined(TARGET_NUCLEO_L476RG) || defined(TARGET_NUCLEO_L486RG) |
| Slord2142 | 0:b3410a1e9843 | 71 | AnalogIn adc_vbat(ADC_VBAT); // Warning: Not available on all devices |
| Slord2142 | 0:b3410a1e9843 | 72 | #endif |
| Slord2142 | 0:b3410a1e9843 | 73 | AnalogIn TESTERPIN(PC_2); |
| Slord2142 | 0:b3410a1e9843 | 74 | AnalogIn VIN48(PA_7); |
| Slord2142 | 0:b3410a1e9843 | 75 | AnalogIn VIN12(PA_6); |
| Slord2142 | 0:b3410a1e9843 | 76 | AnalogIn IIN12(PA_5); |