![](/media/cache/profiles/4b0986230d9d7aded7f0c24033d221d4.jpg.50x50_q85.jpg)
Programme de contrôle de l'octopode 4DOF, Theraphosa-Salconi.
CtrlBridge
- fonction quelquonque pour communiquer avec les module
- fonction quelquonque pour faire des recherche dans les module dispo
- autre fonction pour jouer avec MemRegistre
Version 1.2.0
- Ajout d'un mode de simulation pour tester le code avec seulement un contrôleur stm32
_old_doc/SystemeNeuronale/CommunicationNeuronale.h@41:0b5c14dda54a, 2017-01-31 (annotated)
- Committer:
- salco
- Date:
- Tue Jan 31 13:15:42 2017 +0000
- Revision:
- 41:0b5c14dda54a
- Parent:
- 1:25ea21da4542
Tentative de modifier les commit inutile sur debug.h
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
salco | 1:25ea21da4542 | 1 | /* |
salco | 1:25ea21da4542 | 2 | * CommunicationNeuronale.h |
salco | 1:25ea21da4542 | 3 | * |
salco | 1:25ea21da4542 | 4 | * Created on: Mar 10, 2015 |
salco | 1:25ea21da4542 | 5 | * Author: salco |
salco | 1:25ea21da4542 | 6 | */ |
salco | 1:25ea21da4542 | 7 | |
salco | 1:25ea21da4542 | 8 | #ifndef COMMUNICATIONNEURONALE_H_ |
salco | 1:25ea21da4542 | 9 | #define COMMUNICATIONNEURONALE_H_ |
salco | 1:25ea21da4542 | 10 | |
salco | 1:25ea21da4542 | 11 | #include "mbed.h" |
salco | 1:25ea21da4542 | 12 | //#include <SPI.h> |
salco | 1:25ea21da4542 | 13 | |
salco | 1:25ea21da4542 | 14 | |
salco | 1:25ea21da4542 | 15 | |
salco | 1:25ea21da4542 | 16 | class ComModulesSPI : public SPI |
salco | 1:25ea21da4542 | 17 | { |
salco | 1:25ea21da4542 | 18 | int m_regPortUse; // set in the init |
salco | 1:25ea21da4542 | 19 | int m_regPortLost;// flag 1 si lost |
salco | 1:25ea21da4542 | 20 | char m_demuxPos; |
salco | 1:25ea21da4542 | 21 | |
salco | 1:25ea21da4542 | 22 | public: |
salco | 1:25ea21da4542 | 23 | ComModulesSPI(PinName mosi, PinName miso, PinName sclk, PinName _unused=NC); |
salco | 1:25ea21da4542 | 24 | virtual ~ComModulesSPI(); |
salco | 1:25ea21da4542 | 25 | |
salco | 1:25ea21da4542 | 26 | bool initCom(void); |
salco | 1:25ea21da4542 | 27 | |
salco | 1:25ea21da4542 | 28 | bool next_demux(void); |
salco | 1:25ea21da4542 | 29 | bool back_demux(void); |
salco | 1:25ea21da4542 | 30 | |
salco | 1:25ea21da4542 | 31 | |
salco | 1:25ea21da4542 | 32 | bool isValide(char portID); |
salco | 1:25ea21da4542 | 33 | bool tryComPort(char portID);//just faire le sync et crc pour voire si lautre est la |
salco | 1:25ea21da4542 | 34 | |
salco | 1:25ea21da4542 | 35 | virtual int write(int value); |
salco | 1:25ea21da4542 | 36 | bool send(char portID, char type,char *flag,char *data); |
salco | 1:25ea21da4542 | 37 | bool send(char portID, char type,int *flag,char *data); |
salco | 1:25ea21da4542 | 38 | bool send(char portID, char type,char *flag,int *data); |
salco | 1:25ea21da4542 | 39 | bool send(char portID, char type,int *flag,int *data); |
salco | 1:25ea21da4542 | 40 | }; |
salco | 1:25ea21da4542 | 41 | |
salco | 1:25ea21da4542 | 42 | #endif /* COMMUNICATIONNEURONALE_H_ */ |