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.
Helper.cpp
00001 #include "Objects.h" 00002 #include "Helper.h" 00003 00004 00005 int JigData=0x0; 00006 00007 00008 #ifdef I2CIO 00009 00010 00011 void DutVinPowerUp (void) { 00012 JigData |= 0x01; 00013 JigIO.write(JigData); 00014 } 00015 00016 void DutVinPowerDown (void) { 00017 JigData &= 0xFE; 00018 JigIO.write(JigData); 00019 } 00020 00021 00022 void DutUsbPowerUp (void) { 00023 JigData |= 0x02; 00024 JigIO.write(JigData); 00025 } 00026 00027 void DutUsbPowerDown (void) { 00028 JigData &= 0xFD; 00029 JigIO.write(JigData); 00030 } 00031 00032 void DutUsbConnect (void) { 00033 JigData |= 0x04; 00034 JigIO.write(JigData); 00035 } 00036 00037 void DutUsbDisconnect (void) { 00038 JigData |= 0xFB; 00039 JigIO.write(JigData); 00040 } 00041 00042 00043 void DutISPConnect (void) { 00044 JigData |= 0x08; 00045 JigIO.write(JigData); 00046 } 00047 00048 void DutISPDisconnect (void) { 00049 JigData |= 0xF7; 00050 JigIO.write(JigData); 00051 } 00052 00053 00054 #else 00055 00056 void DutUsbPowerUp (void) {VBUSrelay=1;} 00057 void DutUsbPowerDown (void) {VBUSrelay=0;} 00058 void DutUsbConnect (void) {USBrelay=1;} 00059 void DutUsbDisconnect (void) {USBrelay=0;} 00060 void DutVinPowerUp (void) {VINrelay=1;} 00061 void DutVinPowerDown (void) {VINrelay=0;} 00062 00063 #endif 00064 00065 00066 00067 00068 void DutReset (int value) {DUT_NR = value;} 00069 void DutVB (int value) {DUT_VB=value;} 00070 00071 00072 00073 00074 00075 void Beep (int Hz, float time) { 00076 piezo.period(1.0/float(Hz)); 00077 piezo=0.5; 00078 wait(time); 00079 piezo=0.0; 00080 } 00081 00082 00083 00084 00085 00086 00087 void DutBufferFlush(void) { 00088 while(Dut.readable()) {char tmp=Dut.getc();} 00089 }
Generated on Mon Jul 18 2022 16:16:11 by
1.7.2