Question: 5. (12) For this problem, we will create some utility functions for the JTAG UART in C. Define a pointer to the UART (the specific

 5. (12) For this problem, we will create some "utility functions

5. (12) For this problem, we will create some "utility functions for the JTAG UART in C. Define a pointer to the UART (the specific address is unimportant). Then write three functions: alt_u16 CharsAvailToRead() reads the RAVAIL field of the data register and returns the value. alt_u16 CharsAvailToWrite() reads the WSPACE field of the control register and returns the value. bool CharsAvail reads the RVALID field of the data register and returns true if the RVALID=1 and false otherwise. These functions can be written in pure C (no EIA is required). Each of the functions should accept the base address of the JTAG UART as the first parameter. (Don't just assume that the function knows this pointer value or that it has a global scope.) Recall the problem we discussed in question 4 and write your functions with this in mind. 5. (12) For this problem, we will create some "utility functions for the JTAG UART in C. Define a pointer to the UART (the specific address is unimportant). Then write three functions: alt_u16 CharsAvailToRead() reads the RAVAIL field of the data register and returns the value. alt_u16 CharsAvailToWrite() reads the WSPACE field of the control register and returns the value. bool CharsAvail reads the RVALID field of the data register and returns true if the RVALID=1 and false otherwise. These functions can be written in pure C (no EIA is required). Each of the functions should accept the base address of the JTAG UART as the first parameter. (Don't just assume that the function knows this pointer value or that it has a global scope.) Recall the problem we discussed in question 4 and write your functions with this in mind

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!