Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.cpp
- Revision:
- 5:e7fa92a21eff
- Parent:
- 2:654aafc318bf
- Child:
- 6:2c713a0187dd
--- a/main.cpp Tue May 23 07:20:59 2017 +0000 +++ b/main.cpp Sat Jun 03 14:37:34 2017 +0000 @@ -1,8 +1,9 @@ #include "mbed.h" #include "rtos.h" - +#include <vector> #define SIG_RX_CAN 0x01 +using namespace std; DigitalOut led1(LED1); DigitalOut led2(LED2); @@ -10,6 +11,8 @@ Thread threadA; Thread threadB; + char * BDD[8]; + CAN CanPort(p30, p29); CANMessage MessageRx; @@ -21,6 +24,16 @@ unsigned int Id; +bool rechercheID(char * ID) // recherche d'un ID dans la base de données +{ + bool retour = false; + for( int i= 0; i< sizeof(BDD); i++) + { + if (BDD[i]==ID) retour= true ; + } + return retour; +} + void canReader(void) { @@ -63,7 +76,7 @@ int main() { - + char c[8] ={0x00,0x00,0x00,0x00,0x3E,0xC1,0xF5,0x8A}; CanPort.frequency(20000);