✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.
The following are defined:
#define PD1 1U
#define BIT( x ) (1U<<(x))
The following is a program fragment for the GPIOD handler:
int triggered = 0;
void GPIOD_Handler(void)
{
uint32_t status = GPIOD->MIS;
// add your C statement to check if PD1 triggered an interrpt }
Write a C statement to check if PD1 is the source of the interrupt. If it is, set 'triggered' to be a 1.
Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!