Question: 4. Open your MPLAB and write a C function fl (its type is unsigned word) that returns how many elements of an array that satisfies

4. Open your MPLAB and write a C function fl (its type is unsigned word) that returns how many elements of an array that satisfies the following property: the most significant 4 bits are the same as the middle 4 bits in var. Show that your function is working. (hint: use watches and breakpoints in MPLAB. The function input parameters are: list: the input array, each element is unsigned byte (uint8) var: the variable x which is unsigned byte (uint8) length: number of elements in the list , unsigned byte (uint8) Example: If the input array is {0x80, 0xE0, OxEC, Ox7B, OxFF), and var=0x38 then the function returns the value 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
