Course Solutions Uncategorized (Solved) : Include Ass 02h Int Inputoutputmain Void Welcome Printf 014 Printf N Printf S N Assstring Q37803425 . . . .

(Solved) : Include Ass 02h Int Inputoutputmain Void Welcome Printf 014 Printf N Printf S N Assstring Q37803425 . . . .

 

#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 Input Function Find the code for HAL_GPIO_ReadPin) and understand the operation of the function. Multiple Choice Question

1.5 Output Functions Find the code for HAL GPIO WritePin ) and HAL GPIO TogglePin ) and understand the operation of these fun

1.4

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post