Explain the code and the discuss what other library functions may be needed and what set up, for example clocks, would b
Posted: Fri May 20, 2022 6:35 pm
Explain the code and the discuss what other library functions
may be needed and what set up, for example clocks, would be
required in STM standard library. static int yellowledval = 0;
uint8_t but2_state = 0; …........... but2_state =
GPIO_ReadInputDataBit(GPIOA, GPIO_Pin_0); if ( but2_state == 1 ) {
GPIO_WriteBit(GPIOC , GPIO_Pin_7 , (yellowledval) ? Bit_SET :
Bit_RESET); yellowledval = 1 - yellowledval; but2_state = 0;
}
may be needed and what set up, for example clocks, would be
required in STM standard library. static int yellowledval = 0;
uint8_t but2_state = 0; …........... but2_state =
GPIO_ReadInputDataBit(GPIOA, GPIO_Pin_0); if ( but2_state == 1 ) {
GPIO_WriteBit(GPIOC , GPIO_Pin_7 , (yellowledval) ? Bit_SET :
Bit_RESET); yellowledval = 1 - yellowledval; but2_state = 0;
}