Skip to content

Commit

Permalink
Mise en place software Serial semi-duplex
Browse files Browse the repository at this point in the history
mise en place de la librairie semi-duplex trouvé sur github (stm32duino/Arduino_Core_STM32#1771) et ajout de la spécificité pour les bits de parité et les 2 bits stop

=> succès
  • Loading branch information
julien33510 committed Oct 2, 2023
1 parent 91c7d91 commit f82d2b5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions essai_1/essai_1.ino
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <SoftwareSerial_hm.h>
#include <SoftwareSerial_hm2.h>


#include <Arduino.h>

Expand All @@ -24,7 +25,7 @@ bool isntCardPresente = digitalRead(PRES); //Variable de détection de la prése


// création d'un objet Software Serial
SoftwareSerial_hm serialCard (RX, TX, false);
SoftwareSerial_hm2 serialCard (RX, RX, false);


void analyse_atr(String ATR) {
Expand Down Expand Up @@ -130,7 +131,7 @@ void transmitAPDU_T0(char* apdu, uint8_t ln) {
serialCard.stopListening();
for(int i = 0; i < ln; i ++){

serialCard.write_8E2(apdu[i]);
serialCard.write(apdu[i]);

}
pinMode(TX, INPUT);
Expand Down

0 comments on commit f82d2b5

Please sign in to comment.