Code source pour le BE-CHTI de l'année 2020-2021
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

principal.c 752B

1234567891011121314151617181920212223242526272829303132333435
  1. #include "DriverJeuLaser.h"
  2. extern void Delay_100ms(void);
  3. int x;
  4. int main(void)
  5. {
  6. // ===========================================================================
  7. // ============= INIT PERIPH (faites qu'une seule fois) =====================
  8. // ===========================================================================
  9. // Après exécution : le coeur CPU est clocké à 72MHz ainsi que tous les timers
  10. CLOCK_Configure();
  11. // configuration de PortB.1 (PB1) en sortie push-pull
  12. GPIO_Configure(GPIOB, 1, OUTPUT, OUTPUT_PPULL);
  13. //============================================================================
  14. while (1)
  15. {
  16. Delay_100ms();
  17. x=1;
  18. GPIOB_Set(1);
  19. Delay_100ms();
  20. GPIOB_Clear(1);
  21. x=0;
  22. }
  23. }