#include “Ass-02.h”
int
InputOutput_Main (void)
{
// Welcome
// printf(” 14″);
printf (“n”);
printf (“%sn”, ASS_STRING);
printf (“%sn”, VER_STRING);
#ifdef STM32F407xx
printf (“Running on STM32 platformn”);
#else
printf (“Running on WINNT platformn”);
#endif
#ifdef DO_QUESTION_1
// Do simple input/output
printf(“-> Question 1n”);
#ifdef STM32F407xx
{
GPIO_PinState JoyState;
while (1)
{
// Read JOY_C and output to LD6
JoyState = HAL_GPIO_ReadPin (JOY_C_GPIO_Port, JOY_C_Pin);
HAL_GPIO_WritePin (LD6_GPIO_Port, LD6_Pin, JoyState);
// Toggle LD3 as a heart beat
HAL_GPIO_TogglePin (LD3_GPIO_Port, LD3_Pin);
HAL_Delay (TOGGLE_DELAY);
}
}
#else
printf (“-> No code implemented for WINNT at themoment.n”);
#endif
#endif
#ifdef DO_QUESTION_2_AND_3
// Call the state machine
printf(“-> Question 2 and 3n”);
#ifdef STM32F407xx
StateMachine ();
#else
printf (“-> No code implemented for WINNT at themoment.n”);
#endif
#endif
// Does not get to here
printf (“nDone.n”);
return 0;
}
Please Answer Following Questions Code can be found Above


1.4
PayPal Gateway not configured
PayPal Gateway not configured