Question: Write three assembly language functions which will do the following: 1. PortSetup void Portsetup(int bitNum, int direction) This function will set up a bit on

 Write three assembly language functions which will do the following: 1.

Write three assembly language functions which will do the following: 1. PortSetup void Portsetup(int bitNum, int direction) This function will set up a bit on GPIOA to be input or output depending on the direction. bitNum - the number of the bit from 0 to 15 directions - this is 0 for input and I for output The bit is set up for the proper direction. If it is output it is also set to highspeed. 2. PortOut void PortOut(int bitNum int bitValue) This function outputs bitValue to binNum in GPIOA bitNum is the bit number from 0 to 15 o the port bitValue is 0 or 1. 3. PortIn int Port In (int bitNum) This function inputs a bit from GPIOA at bitNum. bitNum is the the bit number on GPIOA from 0 to 15 This function returns the value (0 or 1) Add a main program in C which exercises these three functions. Add a switch and an LED to the port. NUCLEO-F446RE CNT CNG PC10 PC12 VOD BOOTO NC NC PA13 PA14 PA15 GND PB7 PC13 PC14 PC15 PHO PHI VBAT PCZ PCB PC11 POR ES GND NC NC LOREF HOREF RESET RISET 313 +33 5V GND GND GND GND VIN VIN NC PAD NO PAI A1 PA A2 PBO PC1 A4 PGO A5 POS CNS CN 10 015 014 AVDD AVDO GND GND D13 PAS 012 PAS D10 PES DO PC7 DB PAS 07 PAS DE P810 - DS 84 D4 DS D2 PA10 D1 PAR 00 PA CNO POS POS PCS USV NC PA12 PA11 PB12 NC GND PB2 PB1 PB15 PB14 PB 13 AGND PCA NC NG PH PS! CNE Arduino Morphe Write three assembly language functions which will do the following: 1. PortSetup void Portsetup(int bitNum, int direction) This function will set up a bit on GPIOA to be input or output depending on the direction. bitNum - the number of the bit from 0 to 15 directions - this is 0 for input and I for output The bit is set up for the proper direction. If it is output it is also set to highspeed. 2. PortOut void PortOut(int bitNum int bitValue) This function outputs bitValue to binNum in GPIOA bitNum is the bit number from 0 to 15 o the port bitValue is 0 or 1. 3. PortIn int Port In (int bitNum) This function inputs a bit from GPIOA at bitNum. bitNum is the the bit number on GPIOA from 0 to 15 This function returns the value (0 or 1) Add a main program in C which exercises these three functions. Add a switch and an LED to the port. NUCLEO-F446RE CNT CNG PC10 PC12 VOD BOOTO NC NC PA13 PA14 PA15 GND PB7 PC13 PC14 PC15 PHO PHI VBAT PCZ PCB PC11 POR ES GND NC NC LOREF HOREF RESET RISET 313 +33 5V GND GND GND GND VIN VIN NC PAD NO PAI A1 PA A2 PBO PC1 A4 PGO A5 POS CNS CN 10 015 014 AVDD AVDO GND GND D13 PAS 012 PAS D10 PES DO PC7 DB PAS 07 PAS DE P810 - DS 84 D4 DS D2 PA10 D1 PAR 00 PA CNO POS POS PCS USV NC PA12 PA11 PB12 NC GND PB2 PB1 PB15 PB14 PB 13 AGND PCA NC NG PH PS! CNE Arduino Morphe

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!