![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Skeleton code. LCD, Serial, Feedback, MOSFETS
Dependencies: mbed mbed-rtos ShiftReg2 TextLCD
POST/Post.cpp
- Committer:
- thomasmorris
- Date:
- 2019-05-07
- Revision:
- 4:020f93d35f6e
File content as of revision 4:020f93d35f6e:
#include "Post.hpp" int POST_Sum = 0; bool Power_Post = 0; bool Interface_Post = 0; bool Schedules_Post = 0; bool Feedback_Post = 0; bool Serial_PC_Post = 0; bool Serial_BOARD_Post = 0; 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 SCHEDULES SCHEDULES_1; 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 SERIAL_PC SERIAL_PC_1; SERIAL_BOARD SERIAL_BOARD_1; void POST() { POST_Sum = 0; Interface_Post = INTERFACE_1.Post(); Schedules_Post = SCHEDULES_1.Post(); Feedback_Post = FEEDBACK_1.Post(); Serial_PC_Post = SERIAL_PC_1.Post(); Serial_BOARD_Post = SERIAL_BOARD_1.Post(); if(Interface_Post == 1)//Success { PC.printf("Interface Post pass\n"); POST_Sum = POST_Sum + 1; } else if(Interface_Post != 1)//Fail { PC.printf("Interface Post fail\n"); } if(Schedules_Post == 1)//Success { PC.printf("Schedules Post Pass\n"); POST_Sum = POST_Sum + 1; } else if (Schedules_Post != 1)//Fail { PC.printf("Schedules Post fail\n"); } if(Feedback_Post == 1)//Success { PC.printf("Feedback Post Pass\n"); POST_Sum = POST_Sum + 1; } else if(Feedback_Post != 1)//Fail { PC.printf("Feedback Post Fail\n"); } if(Serial_PC_Post == 1)//Success { PC.printf("Serial PC Post Pass\n"); POST_Sum = POST_Sum + 1; } else if(Serial_PC_Post != 1)//Fail { PC.printf("Serial PC Post Fail\n"); } if(Serial_BOARD_Post == 1)//Pass { PC.printf("Serial Board Pass\n"); POST_Sum = POST_Sum + 1; } else if (Serial_BOARD_Post != 1)//Fail { PC.printf("Serial Board Fail\n"); } if(POST_Sum == 5) { PC.printf("Post Nominal\n"); } }