// TP Entrées-sorties, base pour le clignotant // Ce programme doit être complété ! // // Microinformatique pour GM, EPFL, 2021, Pierre-Yves Rochat, pyr@pyr.ch #include #include // Vous avez maintenant besoin de comprendre tout le programme ! #define Pous1On ... #define LedRougeOn ... #define LedRougeOff ... void delay(uint32_t duree) { // attente en milliseconde volatile uint16_t i; while(duree-- >0) { for (i=113; i>0; i--){ // attente active } } } // Programme principal : //====================== int main(void) { WDTCTL = WDTPW | WDTHOLD; // stop watchdog timer P1DIR ... // LED rouge en sortie // Boucle principale : while(1) { ... delay(500); ... delay(500); } }