/* * CI - Laborator 3 -Program test functionare DAVE si activare * iesiri digitale pentru XMC4500 Relax Kit. * In program se utilizeaza LED-ul conectat * la P1.1 */ #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 (&led1); // aprind led for(i = 0;i<0x3fffff;i++); // temporizare aprox. 1 sec. DIGITAL_IO_SetOutputLow (&led1); // sting led for(i = 0;i<0x3fffff;i++); // temporizare aprox. 1/15 sec. // DIGITAL_IO_ToggleOutput(&led1); // se poate si asa } return (1); }