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 mbed-rtos ShiftReg2 TextLCD
Post.cpp
00001 #include "Post.hpp" 00002 int POST_Sum = 0; 00003 bool Power_Post = 0; 00004 bool Interface_Post = 0; 00005 bool Schedules_Post = 0; 00006 bool Feedback_Post = 0; 00007 bool Serial_PC_Post = 0; 00008 bool Serial_BOARD_Post = 0; 00009 00010 00011 INTERFACE INTERFACE_1(PC_13,PC_14,PC_15,PB_9,PB_8,PB_5,PB_4,PA_15,PA_12,PA_11,PA_10);//Rotary encoderA, Rotary Encoder B, Rotary encoder button, button 1, button 2, button 3, MOSFET safety, shift sclk, shift latch, shift enable, shift in 00012 SCHEDULES SCHEDULES_1; 00013 FEEDBACK FEEDBACK_1(PA_0,PA_1,PA_2,PA_3,PB_0,PB_1,PA_7,PA_6,PA_5,PA_4);//This is where all of the feedback pins are defined 00014 SERIAL_PC SERIAL_PC_1; 00015 SERIAL_BOARD SERIAL_BOARD_1; 00016 void POST() 00017 { 00018 POST_Sum = 0; 00019 Interface_Post = INTERFACE_1.Post(); 00020 Schedules_Post = SCHEDULES_1.Post(); 00021 Feedback_Post = FEEDBACK_1.Post(); 00022 Serial_PC_Post = SERIAL_PC_1.Post(); 00023 Serial_BOARD_Post = SERIAL_BOARD_1.Post(); 00024 00025 if(Interface_Post == 1)//Success 00026 { 00027 PC.printf("Interface Post pass\n"); 00028 POST_Sum = POST_Sum + 1; 00029 } 00030 else if(Interface_Post != 1)//Fail 00031 { 00032 PC.printf("Interface Post fail\n"); 00033 } 00034 if(Schedules_Post == 1)//Success 00035 { 00036 PC.printf("Schedules Post Pass\n"); 00037 POST_Sum = POST_Sum + 1; 00038 } 00039 else if (Schedules_Post != 1)//Fail 00040 { 00041 PC.printf("Schedules Post fail\n"); 00042 } 00043 if(Feedback_Post == 1)//Success 00044 { 00045 PC.printf("Feedback Post Pass\n"); 00046 POST_Sum = POST_Sum + 1; 00047 } 00048 else if(Feedback_Post != 1)//Fail 00049 { 00050 PC.printf("Feedback Post Fail\n"); 00051 } 00052 if(Serial_PC_Post == 1)//Success 00053 { 00054 PC.printf("Serial PC Post Pass\n"); 00055 POST_Sum = POST_Sum + 1; 00056 } 00057 else if(Serial_PC_Post != 1)//Fail 00058 { 00059 PC.printf("Serial PC Post Fail\n"); 00060 } 00061 if(Serial_BOARD_Post == 1)//Pass 00062 { 00063 PC.printf("Serial Board Pass\n"); 00064 POST_Sum = POST_Sum + 1; 00065 } 00066 else if (Serial_BOARD_Post != 1)//Fail 00067 { 00068 PC.printf("Serial Board Fail\n"); 00069 } 00070 if(POST_Sum == 5) 00071 { 00072 PC.printf("Post Nominal\n"); 00073 } 00074 }
Generated on Sun Jul 17 2022 08:28:43 by
1.7.2