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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started