First commit

This commit is contained in:
2026-04-08 20:11:20 +02:00
parent 10fe469c10
commit 79f15536a1
861 changed files with 135610 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
#include "derivative.h"
#include "defines.h"
#include "tempo.h"
void interrupt 7 depassement_compteur(void)
{
if (SW1) {
if (PTBD == 0xFF && retard_cycle_droite == 0) {
retard_cycle_droite = 1;
} else if (retard_cycle_droite == 1 || PTBD == 0) {
retard_cycle_droite = 0;
PTBD = 1;
} else {
PTBD |= (PTBD << 1); // Allumage
}
} else if (SW2) {
if (PTBD == 0xFF && retard_cycle_gauche == 0) {
retard_cycle_gauche = 1;
} else if (retard_cycle_gauche == 1 || PTBD == 0) {
retard_cycle_gauche = 0;
PTBD = 0x80;
} else {
PTBD |= (PTBD >> 1); // Allumage
}
}
TPMSC = TPMSC & 0b01111111;
}