Alexandre Salconi-Denis / Mbed 2 deprecated ProjetOctopode

Dependencies:   debug mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers CommunicationNeuronale.h Source File

CommunicationNeuronale.h

00001 /*
00002  * CommunicationNeuronale.h
00003  *
00004  *  Created on: Mar 10, 2015
00005  *      Author: salco
00006  */
00007 
00008 #ifndef COMMUNICATIONNEURONALE_H_
00009 #define COMMUNICATIONNEURONALE_H_
00010 
00011 #include "mbed.h"
00012 //#include <SPI.h>
00013 
00014 
00015 
00016 class ComModulesSPI : public SPI
00017 {
00018     int m_regPortUse; // set in the init
00019     int m_regPortLost;// flag 1 si lost
00020     char m_demuxPos;
00021     
00022 public:
00023     ComModulesSPI(PinName mosi, PinName miso, PinName sclk, PinName _unused=NC);
00024     virtual ~ComModulesSPI();
00025     
00026     bool initCom(void);
00027 
00028     bool next_demux(void);
00029     bool back_demux(void);
00030 
00031 
00032     bool isValide(char portID);
00033     bool tryComPort(char portID);//just faire le sync et crc pour voire si lautre est la
00034     
00035     virtual int write(int value);
00036     bool send(char portID, char type,char *flag,char *data);
00037     bool send(char portID, char type,int *flag,char *data);
00038     bool send(char portID, char type,char *flag,int *data);
00039     bool send(char portID, char type,int *flag,int *data);
00040 };
00041 
00042 #endif /* COMMUNICATIONNEURONALE_H_ */