Question: 1. (5 points) We are interested in knowing if the joystick's up button in our discovery kit was pressed. This button is connected to pin

1. (5 points) We are interested in knowing if the joystick's up button in our discovery kit was pressed. This button is connected to pin 3 of GPIO port A Every time we need to read some input, we will need to use a bitwise operation to check the corresponding bit, inside an if-statement. Complete the code below in order to verify if bit 3 in GPIOA->IDR is equal to 1. In other words, if the statement below is true, the up button was pressed Hint: You only need to write an hexadecimal mask inside the parentheses. Remember, bits and pins start counting froin 0. -) != 0x00 ) ; 2. (5 points) Complete the code below to configure pin 10 of GPIO port B as push-pull Hint: You only need to write an hexadecimal mask inside the parentheses GP108-DTYPER &= -( - 3. (5 points) Write a single line of C code that would enable the clocks of GPIOs port A. B and E. Hint: You should set the correct bits from the correct register
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
