Question: Write in C for a STM32F446RE microcontroller on the Nucleo-64 dev board Include proper headers and do NOT use HAL Write a source library that

Write in C for a STM32F446RE microcontroller on the Nucleo-64 dev board

Include proper headers and do NOT use 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.

The 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*/ } }

Problem 1: Write a library that works with the following pin assignments

R0 -> PC0

R1 -> PC2

R2-> PC4

R3 -> PC6

C0-> PC8

C1->PC10

C2->PC12

Problem 2: Write a library that works with the following pin assignments

R0 -> PC1

R1 -> PC3

R2-> PC5

R3 -> PC7

C0-> PC9

C1->PC11

C2->PC13

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!