Question: Write in C for STM32F446RE microcontroller on the Nucleo-64 dev board (WITHOUT using HAL) Write a source library that contains the with the following public

Write in C for STM32F446RE microcontroller on the Nucleo-64 dev board (WITHOUT using HAL)

Write a source library that contains the with the following public functions:

void keypadInit(void); /Initiallized the GPIO to read the keypad. uint16_t readKeypad(void); //Returns the state of all of the keypad buttons in the return value at the moment the function is called.

void decodeKeypad(uint16_t, char *); //Takes the state of the keypad and returns (by reference) an array of the key's pressed. T

he library should work with the following main:

int main (void)

{

uint16_t key; char carray[17]; keypadInit(); while(1) { while(!(key = readKeypad())); /*Get which keys pressed*/

decodeKeypad(key, carray); /*What are those keys*/ printf("%s ",carray); /*Print those keys to screen*/

while(readKeypad() == key); /*Wait for the keypad to change*/ }

}

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!