/* * PM - Laborator 1 -Program test functionare DAVE si activare * iesiri digitale. In program se utilizeaza LED-ul conectat * la P1.5 */ #include //Declarations from DAVE Code Generation (includes SFR declaration) int main(void) { DAVE_STATUS_t status; uint32_t i; // pt.delay status = DAVE_Init(); /* Initialization of DAVE APPs */ if(status == DAVE_STATUS_FAILURE) { /* Placeholder for error handler code. The while loop below can be replaced with an user error handler. */ XMC_DEBUG("DAVE APPs initialization failed\n"); while(1U) { } } /* Placeholder for user application code. The while loop below can be replaced with user application code. */ while(1U) { DIGITAL_IO_SetOutputHigh (&led); // sting led for(i = 0;i<0xfffff;i++); // temporizare aprox. 1 sec. DIGITAL_IO_SetOutputLow (&led); // aprind led for(i = 0;i<0x0ffff;i++); // temporizare aprox. 1/15 sec. // DIGITAL_IO_ToggleOutput(&led); } return (1); }