code pour recevoir des trames et mettre les char sur le port usb

Dependencies:   mbed

Fork of APP4 by S5info_H14

Committer:
RufflesAllD
Date:
Tue Apr 29 16:27:28 2014 +0000
Revision:
8:ecc7c75a37ee
Parent:
7:a6f58e5d1188
commentaires

Who changed what in which revision?

UserRevisionLine numberNew contents of line
joGenie 2:7515831bb5f5 1 #ifndef TRAME_HPP
joGenie 2:7515831bb5f5 2 #define TRAME_HPP
joGenie 2:7515831bb5f5 3
joGenie 2:7515831bb5f5 4 #include "mbed.h"
joGenie 2:7515831bb5f5 5
joGenie 2:7515831bb5f5 6 using namespace std;
joGenie 2:7515831bb5f5 7
RufflesAllD 5:daf08fff7abb 8 /* Description de la classe Trame
RufflesAllD 5:daf08fff7abb 9 *
RufflesAllD 5:daf08fff7abb 10 * La classe trame construit et envoie les trames
RufflesAllD 5:daf08fff7abb 11 *
RufflesAllD 5:daf08fff7abb 12 */
joGenie 2:7515831bb5f5 13 class Trame
joGenie 2:7515831bb5f5 14 {
joGenie 2:7515831bb5f5 15 public:
joGenie 2:7515831bb5f5 16 // Constructeur
joGenie 2:7515831bb5f5 17 Trame(PinName _tx, PinName _rx);
joGenie 2:7515831bb5f5 18
joGenie 3:350f07072089 19 // Envoie une trame pour une commande AT
joGenie 3:350f07072089 20 void sendATCommand(const char* command, const char* data, int length);
joGenie 2:7515831bb5f5 21
RufflesAllD 5:daf08fff7abb 22 // Effectue le checksum d'un AT command
joGenie 3:350f07072089 23 unsigned char crc8(const char* data, int length);
joGenie 3:350f07072089 24
RufflesAllD 5:daf08fff7abb 25 // Fonction de débuggage (affiche les informations des trames reçues par le coordinateur dans un terminal)
RufflesAllD 5:daf08fff7abb 26 void checkTrame(char *data, char check, int length);
RufflesAllD 5:daf08fff7abb 27
joGenie 2:7515831bb5f5 28 private:
joGenie 2:7515831bb5f5 29 PinName tx, rx;
joGenie 2:7515831bb5f5 30 };
joGenie 2:7515831bb5f5 31
joGenie 2:7515831bb5f5 32 #endif