diff --git a/Logiciel/Firmware_testeur/.cproject b/Logiciel/Firmware_testeur/.cproject index aca616cf023ef2311c2a859223ddcd8846a7672a..b3e5455ba0ee3b63116ae141eb6a5d0a1b6ed280 100644 --- a/Logiciel/Firmware_testeur/.cproject +++ b/Logiciel/Firmware_testeur/.cproject @@ -38,17 +38,12 @@ <listOptionValue builtIn="false" value="DEBUG"/> </option> <option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths.170695699" name="Include paths (-I)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths" useByScannerDiscovery="false" valueType="includePath"> - <listOptionValue builtIn="false" value="Drivers/STM32F0xx_HAL_Driver/Inc"/> <listOptionValue builtIn="false" value="../Inc"/> <listOptionValue builtIn="false" value="../Drivers/STM32F0xx_HAL_Driver/Inc"/> <listOptionValue builtIn="false" value="../Drivers/CMSIS/Include"/> - <listOptionValue builtIn="false" value="Drivers/CMSIS/Include"/> <listOptionValue builtIn="false" value="../Drivers/STM32F0xx_HAL_Driver/Inc/Legacy"/> <listOptionValue builtIn="false" value="../Drivers"/> <listOptionValue builtIn="false" value="../Drivers/CMSIS/Device/ST/STM32F0xx/Include"/> - <listOptionValue builtIn="false" value="Drivers/CMSIS/Device/ST/STM32F0xx/Include"/> - <listOptionValue builtIn="false" value="Drivers/STM32F0xx_HAL_Driver/Inc/Legacy"/> - <listOptionValue builtIn="false" value="Inc"/> </option> <inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.2008519693" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c"/> </tool> diff --git a/Logiciel/Firmware_testeur/Drivers/sept_segments.c b/Logiciel/Firmware_testeur/Drivers/sept_segments.c index bb30b2ed7a0ab048c12784eb23a2f59678ce55b1..dbb202460fa293d5ee165576f7bf86ef408f07ff 100644 --- a/Logiciel/Firmware_testeur/Drivers/sept_segments.c +++ b/Logiciel/Firmware_testeur/Drivers/sept_segments.c @@ -6,3 +6,166 @@ */ #include "sept_segments.h" + +void SeptSegment_init (SeptSegment* ecran, SeptSegment_allumerSegment_ptr allumerSegments) { + for (int i=0 ; i<N_SEGMENTS ; i++) { + ecran->allumerSegment_[i] = allumerSegments[i]; + } +} + +// Affichage de caractères + +void SeptSegment_afficher0 (SeptSegment* ecran) { + SeptSegment_allumerA(ecran, SEGMENT_ALLUME); + SeptSegment_allumerB(ecran, SEGMENT_ALLUME); + SeptSegment_allumerC(ecran, SEGMENT_ALLUME); + SeptSegment_allumerD(ecran, SEGMENT_ALLUME); + SeptSegment_allumerE(ecran, SEGMENT_ALLUME); + SeptSegment_allumerF(ecran, SEGMENT_ALLUME); + SeptSegment_allumerG(ecran, SEGMENT_ETEINT); +} + +void SeptSegment_afficher1 (SeptSegment* ecran) { + SeptSegment_allumerA(ecran, SEGMENT_ETEINT); + SeptSegment_allumerB(ecran, SEGMENT_ALLUME); + SeptSegment_allumerC(ecran, SEGMENT_ALLUME); + SeptSegment_allumerD(ecran, SEGMENT_ETEINT); + SeptSegment_allumerE(ecran, SEGMENT_ETEINT); + SeptSegment_allumerF(ecran, SEGMENT_ETEINT); + SeptSegment_allumerG(ecran, SEGMENT_ETEINT); +} + +void SeptSegment_afficher2 (SeptSegment* ecran) { + SeptSegment_allumerA(ecran, SEGMENT_ALLUME); + SeptSegment_allumerB(ecran, SEGMENT_ALLUME); + SeptSegment_allumerC(ecran, SEGMENT_ETEINT); + SeptSegment_allumerD(ecran, SEGMENT_ALLUME); + SeptSegment_allumerE(ecran, SEGMENT_ALLUME); + SeptSegment_allumerF(ecran, SEGMENT_ETEINT); + SeptSegment_allumerG(ecran, SEGMENT_ALLUME); + +} + +void SeptSegment_afficher3 (SeptSegment* ecran) { + SeptSegment_allumerA(ecran, SEGMENT_ALLUME); + SeptSegment_allumerB(ecran, SEGMENT_ALLUME); + SeptSegment_allumerC(ecran, SEGMENT_ALLUME); + SeptSegment_allumerD(ecran, SEGMENT_ALLUME); + SeptSegment_allumerE(ecran, SEGMENT_ETEINT); + SeptSegment_allumerF(ecran, SEGMENT_ETEINT); + SeptSegment_allumerG(ecran, SEGMENT_ALLUME); + +} + +void SeptSegment_afficher4 (SeptSegment* ecran) { + SeptSegment_allumerA(ecran, SEGMENT_ETEINT); + SeptSegment_allumerB(ecran, SEGMENT_ALLUME); + SeptSegment_allumerC(ecran, SEGMENT_ALLUME); + SeptSegment_allumerD(ecran, SEGMENT_ETEINT); + SeptSegment_allumerE(ecran, SEGMENT_ETEINT); + SeptSegment_allumerF(ecran, SEGMENT_ALLUME); + SeptSegment_allumerG(ecran, SEGMENT_ALLUME); + +} + +void SeptSegment_afficher5 (SeptSegment* ecran) { + SeptSegment_allumerA(ecran, SEGMENT_ALLUME); + SeptSegment_allumerB(ecran, SEGMENT_ETEINT); + SeptSegment_allumerC(ecran, SEGMENT_ALLUME); + SeptSegment_allumerD(ecran, SEGMENT_ALLUME); + SeptSegment_allumerE(ecran, SEGMENT_ETEINT); + SeptSegment_allumerF(ecran, SEGMENT_ALLUME); + SeptSegment_allumerG(ecran, SEGMENT_ALLUME); +} + + +void SeptSegment_afficher6 (SeptSegment* ecran) { + SeptSegment_allumerA(ecran, SEGMENT_ALLUME); + SeptSegment_allumerB(ecran, SEGMENT_ETEINT); + SeptSegment_allumerC(ecran, SEGMENT_ALLUME); + SeptSegment_allumerD(ecran, SEGMENT_ALLUME); + SeptSegment_allumerE(ecran, SEGMENT_ALLUME); + SeptSegment_allumerF(ecran, SEGMENT_ALLUME); + SeptSegment_allumerG(ecran, SEGMENT_ALLUME); +} + +void SeptSegment_afficher7 (SeptSegment* ecran) { + SeptSegment_allumerA(ecran, SEGMENT_ALLUME); + SeptSegment_allumerB(ecran, SEGMENT_ALLUME); + SeptSegment_allumerC(ecran, SEGMENT_ALLUME); + SeptSegment_allumerD(ecran, SEGMENT_ETEINT); + SeptSegment_allumerE(ecran, SEGMENT_ETEINT); + SeptSegment_allumerF(ecran, SEGMENT_ALLUME); + SeptSegment_allumerG(ecran, SEGMENT_ETEINT); +} + +void SeptSegment_afficher8 (SeptSegment* ecran) { + SeptSegment_allumerA(ecran, SEGMENT_ALLUME); + SeptSegment_allumerB(ecran, SEGMENT_ALLUME); + SeptSegment_allumerC(ecran, SEGMENT_ALLUME); + SeptSegment_allumerD(ecran, SEGMENT_ALLUME); + SeptSegment_allumerE(ecran, SEGMENT_ALLUME); + SeptSegment_allumerF(ecran, SEGMENT_ALLUME); + SeptSegment_allumerG(ecran, SEGMENT_ALLUME); +} + +void SeptSegment_afficher9 (SeptSegment* ecran) { + SeptSegment_allumerA(ecran, SEGMENT_ALLUME); + SeptSegment_allumerB(ecran, SEGMENT_ALLUME); + SeptSegment_allumerC(ecran, SEGMENT_ALLUME); + SeptSegment_allumerD(ecran, SEGMENT_ALLUME); + SeptSegment_allumerE(ecran, SEGMENT_ETEINT); + SeptSegment_allumerF(ecran, SEGMENT_ALLUME); + SeptSegment_allumerG(ecran, SEGMENT_ALLUME); +} + +void SeptSegment_afficherTiret (SeptSegment* ecran) { + SeptSegment_allumerA(ecran, SEGMENT_ETEINT); + SeptSegment_allumerB(ecran, SEGMENT_ETEINT); + SeptSegment_allumerC(ecran, SEGMENT_ETEINT); + SeptSegment_allumerD(ecran, SEGMENT_ETEINT); + SeptSegment_allumerE(ecran, SEGMENT_ETEINT); + SeptSegment_allumerF(ecran, SEGMENT_ETEINT); + SeptSegment_allumerG(ecran, SEGMENT_ALLUME); +} + +void SeptSegment_eteindre(SeptSegment* ecran) { + SeptSegment_allumerA(ecran, SEGMENT_ETEINT); + SeptSegment_allumerB(ecran, SEGMENT_ETEINT); + SeptSegment_allumerC(ecran, SEGMENT_ETEINT); + SeptSegment_allumerD(ecran, SEGMENT_ETEINT); + SeptSegment_allumerE(ecran, SEGMENT_ETEINT); + SeptSegment_allumerF(ecran, SEGMENT_ETEINT); + SeptSegment_allumerG(ecran, SEGMENT_ETEINT); +} + + +// Contrôle des segments individuels + +void SeptSegment_allumerA (SeptSegment* ecran, SeptSegment_Etat etat) { + ecran->allumerSegment_[SEG_A](ecran, etat); +} + +void SeptSegment_allumerB (SeptSegment* ecran, SeptSegment_Etat etat) { + ecran->allumerSegment_[SEG_B](ecran, etat); +} + +void SeptSegment_allumerC (SeptSegment* ecran, SeptSegment_Etat etat) { + ecran->allumerSegment_[SEG_C](ecran, etat); +} + +void SeptSegment_allumerD (SeptSegment* ecran, SeptSegment_Etat etat) { + ecran->allumerSegment_[SEG_D](ecran, etat); +} + +void SeptSegment_allumerE (SeptSegment* ecran, SeptSegment_Etat etat) { + ecran->allumerSegment_[SEG_E](ecran, etat); +} + +void SeptSegment_allumerF (SeptSegment* ecran, SeptSegment_Etat etat) { + ecran->allumerSegment_[SEG_F](ecran, etat); +} + +void SeptSegment_allumerG (SeptSegment* ecran, SeptSegment_Etat etat) { + ecran->allumerSegment_[SEG_G](ecran, etat); +} diff --git a/Logiciel/Firmware_testeur/Drivers/sept_segments.h b/Logiciel/Firmware_testeur/Drivers/sept_segments.h index b66cd6847bd655d8efa493b57898f1ab0d1b9824..a2574954a65f6357c8b5c87d4c70ad06270d6ee8 100644 --- a/Logiciel/Firmware_testeur/Drivers/sept_segments.h +++ b/Logiciel/Firmware_testeur/Drivers/sept_segments.h @@ -8,6 +8,52 @@ #ifndef SEPT_SEGMENTS_H_ #define SEPT_SEGMENTS_H_ +// Index des segments +#define N_SEGMENTS 7 +#define SEG_A 0 +#define SEG_B 1 +#define SEG_C 2 +#define SEG_D 3 +#define SEG_E 4 +#define SEG_F 5 +#define SEG_G 6 +typedef enum { + SEGMENT_ETEINT = 0, + SEGMENT_ALLUME = 1 +} SeptSegment_Etat; + +typedef void (*SeptSegment_allumerSegment_ptr[N_SEGMENTS]) (void* ecran, SeptSegment_Etat etat); + +typedef struct { + SeptSegment_allumerSegment_ptr allumerSegment_; +} SeptSegment; + +void SeptSegment_init (SeptSegment* ecran, SeptSegment_allumerSegment_ptr allumerSegments); + +// Affichage de caractères + +void SeptSegment_afficher0 (SeptSegment* ecran); +void SeptSegment_afficher1 (SeptSegment* ecran); +void SeptSegment_afficher2 (SeptSegment* ecran); +void SeptSegment_afficher3 (SeptSegment* ecran); +void SeptSegment_afficher4 (SeptSegment* ecran); +void SeptSegment_afficher5 (SeptSegment* ecran); +void SeptSegment_afficher6 (SeptSegment* ecran); +void SeptSegment_afficher7 (SeptSegment* ecran); +void SeptSegment_afficher8 (SeptSegment* ecran); +void SeptSegment_afficher9 (SeptSegment* ecran); +void SeptSegment_afficherTiret (SeptSegment* ecran); +void SeptSegment_eteindre (SeptSegment* ecran); + +// Contrôle des segments individuels + +void SeptSegment_allumerA (SeptSegment* ecran, SeptSegment_Etat etat); +void SeptSegment_allumerB (SeptSegment* ecran, SeptSegment_Etat etat); +void SeptSegment_allumerC (SeptSegment* ecran, SeptSegment_Etat etat); +void SeptSegment_allumerD (SeptSegment* ecran, SeptSegment_Etat etat); +void SeptSegment_allumerE (SeptSegment* ecran, SeptSegment_Etat etat); +void SeptSegment_allumerF (SeptSegment* ecran, SeptSegment_Etat etat); +void SeptSegment_allumerG (SeptSegment* ecran, SeptSegment_Etat etat); #endif /* SEPT_SEGMENTS_H_ */ diff --git a/Logiciel/Firmware_testeur/Drivers/sept_segments_port_stm32f071v8.c b/Logiciel/Firmware_testeur/Drivers/sept_segments_port_stm32f071v8.c index be84f7a0d6da12046b8eb57bee9e3e40f24bb10a..ab551a78cc72f3e83e3a63748d24877ed6ac7a6f 100644 --- a/Logiciel/Firmware_testeur/Drivers/sept_segments_port_stm32f071v8.c +++ b/Logiciel/Firmware_testeur/Drivers/sept_segments_port_stm32f071v8.c @@ -6,3 +6,64 @@ */ #include "sept_segments_port_stm32f071v8.h" +#include "main.h" +#include <string.h> + +// Fonctions privées +GPIO_PinState convertirEtat(SeptSegment_Etat etat) { + switch (etat) { + case SEGMENT_ALLUME: + return GPIO_PIN_SET; + case SEGMENT_ETEINT: + return GPIO_PIN_RESET; + default: + return GPIO_PIN_RESET; + } +} + +// Fonctions publiques +void SeptSegment_Port_init (SeptSegment_Port* ecran, + GPIO_TypeDef** ports, uint16_t* broches) { + SeptSegment base; + SeptSegment_allumerSegment_ptr allumerPort = { + (void*) SeptSegment_Port_allumerA, + (void*) SeptSegment_Port_allumerB, + (void*) SeptSegment_Port_allumerC, + (void*) SeptSegment_Port_allumerD, + (void*) SeptSegment_Port_allumerE, + (void*) SeptSegment_Port_allumerF, + (void*) SeptSegment_Port_allumerG + }; + SeptSegment_init(&base, allumerPort); + ecran->base_ = base; + memcpy(ecran->ports_, ports, N_SEGMENTS*sizeof(*ports)); + memcpy(ecran->broches_, ports, N_SEGMENTS*sizeof(*broches)); +} + +void SeptSegment_Port_allumerA (SeptSegment_Port* ecran, SeptSegment_Etat etat) { + HAL_GPIO_WritePin(ecran->ports_[SEG_A], ecran->broches_[SEG_A], convertirEtat(etat)); +} + +void SeptSegment_Port_allumerB (SeptSegment_Port* ecran, SeptSegment_Etat etat) { + HAL_GPIO_WritePin(ecran->ports_[SEG_B], ecran->broches_[SEG_B], convertirEtat(etat)); +} + +void SeptSegment_Port_allumerC (SeptSegment_Port* ecran, SeptSegment_Etat etat) { + HAL_GPIO_WritePin(ecran->ports_[SEG_C], ecran->broches_[SEG_C], convertirEtat(etat)); +} + +void SeptSegment_Port_allumerD (SeptSegment_Port* ecran, SeptSegment_Etat etat) { + HAL_GPIO_WritePin(ecran->ports_[SEG_D], ecran->broches_[SEG_D], convertirEtat(etat)); +} + +void SeptSegment_Port_allumerE (SeptSegment_Port* ecran, SeptSegment_Etat etat) { + HAL_GPIO_WritePin(ecran->ports_[SEG_E], ecran->broches_[SEG_E], convertirEtat(etat)); +} + +void SeptSegment_Port_allumerF (SeptSegment_Port* ecran, SeptSegment_Etat etat) { + HAL_GPIO_WritePin(ecran->ports_[SEG_F], ecran->broches_[SEG_F], convertirEtat(etat)); +} + +void SeptSegment_Port_allumerG (SeptSegment_Port* ecran, SeptSegment_Etat etat) { + HAL_GPIO_WritePin(ecran->ports_[SEG_G], ecran->broches_[SEG_G], convertirEtat(etat)); +} diff --git a/Logiciel/Firmware_testeur/Drivers/sept_segments_port_stm32f071v8.h b/Logiciel/Firmware_testeur/Drivers/sept_segments_port_stm32f071v8.h index 28aad3970cae5057fba11ecab2c9aacb0c2e8762..4ceb0403b807ede40a48cf3d51872a59bfad1d94 100644 --- a/Logiciel/Firmware_testeur/Drivers/sept_segments_port_stm32f071v8.h +++ b/Logiciel/Firmware_testeur/Drivers/sept_segments_port_stm32f071v8.h @@ -8,6 +8,22 @@ #ifndef SEPT_SEGMENTS_PORT_STM32F071V8_H_ #define SEPT_SEGMENTS_PORT_STM32F071V8_H_ +#include "sept_segments.h" +#include "stm32f071xb.h" +typedef struct { + SeptSegment base_; + GPIO_TypeDef* ports_[N_SEGMENTS]; + uint16_t broches_[N_SEGMENTS]; +} SeptSegment_Port; + +void SeptSegment_Port_init (SeptSegment_Port* ecran, GPIO_TypeDef** ports, uint16_t* broches); +void SeptSegment_Port_allumerA (SeptSegment_Port* ecran, SeptSegment_Etat etat); +void SeptSegment_Port_allumerB (SeptSegment_Port* ecran, SeptSegment_Etat etat); +void SeptSegment_Port_allumerC (SeptSegment_Port* ecran, SeptSegment_Etat etat); +void SeptSegment_Port_allumerD (SeptSegment_Port* ecran, SeptSegment_Etat etat); +void SeptSegment_Port_allumerE (SeptSegment_Port* ecran, SeptSegment_Etat etat); +void SeptSegment_Port_allumerF (SeptSegment_Port* ecran, SeptSegment_Etat etat); +void SeptSegment_Port_allumerG (SeptSegment_Port* ecran, SeptSegment_Etat etat); #endif /* SEPT_SEGMENTS_PORT_STM32F071V8_H_ */ diff --git a/Logiciel/Firmware_testeur/Drivers/testeur.c b/Logiciel/Firmware_testeur/Drivers/testeur.c index eb47aa15501cf0b1629d522c9032035d319a9016..51e7705287d0851e25b1103a18797b2f70afd04c 100644 --- a/Logiciel/Firmware_testeur/Drivers/testeur.c +++ b/Logiciel/Firmware_testeur/Drivers/testeur.c @@ -6,6 +6,8 @@ */ #include "testeur.h" +#include "main.h" +#include <string.h> // Fonctions privées void testerBroche(RJ45_Sortie_Port connecteur) { @@ -29,8 +31,92 @@ void Testeur_init (Testeur* testeur) { testeur->ethernetA_ = &connecteurA; testeur->ethernetB_ = &connecteurB; + + SeptSegment_Port* ecrans[N_ECRANS]; + + // Liste des ports GPIO utilisés par l'ensemble des écrans + GPIO_TypeDef* ports_segments[N_ECRANS][N_SEGMENTS] = { + { + DS1_1_GPIO_Port, DS1_2_GPIO_Port, DS1_3_GPIO_Port, + DS1_4_GPIO_Port, DS1_5_GPIO_Port, DS1_6_GPIO_Port, + DS1_7_GPIO_Port + }, { + DS2_1_GPIO_Port, DS2_2_GPIO_Port, DS2_3_GPIO_Port, + DS2_4_GPIO_Port, DS2_5_GPIO_Port, DS2_6_GPIO_Port, + DS2_7_GPIO_Port + }, { + DS3_1_GPIO_Port, DS3_2_GPIO_Port, DS3_3_GPIO_Port, + DS3_4_GPIO_Port, DS3_5_GPIO_Port, DS3_6_GPIO_Port, + DS3_7_GPIO_Port + }, { + DS4_1_GPIO_Port, DS4_2_GPIO_Port, DS4_3_GPIO_Port, + DS4_4_GPIO_Port, DS4_5_GPIO_Port, DS4_6_GPIO_Port, + DS4_7_GPIO_Port + }, { + DS4_1_GPIO_Port, DS5_2_GPIO_Port, DS5_3_GPIO_Port, + DS5_4_GPIO_Port, DS5_5_GPIO_Port, DS5_6_GPIO_Port, + DS5_7_GPIO_Port + }, { + DS6_1_GPIO_Port, DS6_2_GPIO_Port, DS6_3_GPIO_Port, + DS6_4_GPIO_Port, DS6_5_GPIO_Port, DS6_6_GPIO_Port, + DS6_7_GPIO_Port + }, { + DS7_1_GPIO_Port, DS7_2_GPIO_Port, DS7_3_GPIO_Port, + DS7_4_GPIO_Port, DS7_5_GPIO_Port, DS7_6_GPIO_Port, + DS7_7_GPIO_Port + }, { + DS8_1_GPIO_Port, DS8_2_GPIO_Port, DS8_3_GPIO_Port, + DS8_4_GPIO_Port, DS8_5_GPIO_Port, DS8_6_GPIO_Port, + DS8_7_GPIO_Port + } + }; + + // Liste des broches GPIO utilisées par l'ensemble des écrans + uint16_t broches_segments[N_ECRANS][N_SEGMENTS] = { + { + DS1_1_Pin, DS1_2_Pin, DS1_3_Pin, + DS1_4_Pin, DS1_5_Pin, DS1_6_Pin, + DS1_7_Pin + }, { + DS2_1_Pin, DS2_2_Pin, DS2_3_Pin, + DS2_4_Pin, DS2_5_Pin, DS2_6_Pin, + DS2_7_Pin + }, { + DS3_1_Pin, DS3_2_Pin, DS3_3_Pin, + DS3_4_Pin, DS3_5_Pin, DS3_6_Pin, + DS3_7_Pin + }, { + DS4_1_Pin, DS4_2_Pin, DS4_3_Pin, + DS4_4_Pin, DS4_5_Pin, DS4_6_Pin, + DS4_7_Pin + }, { + DS4_1_Pin, DS5_2_Pin, DS5_3_Pin, + DS5_4_Pin, DS5_5_Pin, DS5_6_Pin, + DS5_7_Pin + }, { + DS6_1_Pin, DS6_2_Pin, DS6_3_Pin, + DS6_4_Pin, DS6_5_Pin, DS6_6_Pin, + DS6_7_Pin + }, { + DS7_1_Pin, DS7_2_Pin, DS7_3_Pin, + DS7_4_Pin, DS7_5_Pin, DS7_6_Pin, + DS7_7_Pin + }, { + DS8_1_Pin, DS8_2_Pin, DS8_3_Pin, + DS8_4_Pin, DS8_5_Pin, DS8_6_Pin, + DS8_7_Pin + } + }; + + for (int i=0; i<N_ECRANS; i++) { + SeptSegment_Port_init(ecrans[i], ports_segments[i], broches_segments[i]); + } + + memcpy(testeur->ecrans_, ecrans, N_ECRANS*sizeof(SeptSegment_Port)); } void Testeur_testerCable (Testeur* testeur) { - ; + for (int i=0; i<N_ECRANS; i++) { + SeptSegment_afficher0(testeur->ecrans_[i]); + } } diff --git a/Logiciel/Firmware_testeur/Drivers/testeur.h b/Logiciel/Firmware_testeur/Drivers/testeur.h index 6d8f88a6af98fa04f223877d5e98defa2cd31a0f..d0247a1e91bd7e21fd6019dd493ce2c8095deb85 100644 --- a/Logiciel/Firmware_testeur/Drivers/testeur.h +++ b/Logiciel/Firmware_testeur/Drivers/testeur.h @@ -12,13 +12,15 @@ #include "sept_segments_port_stm32f071v8.h" #include "alim2v_port_stm32f071v8.h" +#define N_ECRANS 8 // Nombres d'écrans 7-segments programmables sur le testeur + // Structure typedef struct { RJ45_Sortie_Port* ethernetA_; RJ45_Entree_Port* ethernetB_; // TODO: Implémenter les classes SeptSegments et Alim2V -// SeptSegments ecrans_[8]; + SeptSegment ecrans_[N_ECRANS]; // Alim2V alimentation2V_; } Testeur;