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.
Dependents: NBoard_IHM_V2 ex20_fonction ex21_PWM1 ex26 ... more
Fork of IHM_V2 by
Revision 5:255e1428f05f, committed 2018-05-22
- Comitter:
- slowness
- Date:
- Tue May 22 15:02:42 2018 +0000
- Parent:
- 4:a9e51ac904e2
- Child:
- 6:ad91067e3f6d
- Commit message:
- Version 2 de Mai 2018 modification du can.attach deprecated et retour des CANMessage request non fonctionnel avec la version mbed 2017
Changed in this revision
| IHM.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/IHM.cpp Tue Nov 08 07:22:34 2016 +0000
+++ b/IHM.cpp Tue May 22 15:02:42 2018 +0000
@@ -8,7 +8,8 @@
IHM::IHM(PinName CANRx, PinName CANTx): can(CANRx,CANTx)
{
can.frequency(1000000); /*Baud rate : kbits/s */
- can.attach(this,&IHM::can_ISR_Reader); /* Fonction d'interruption CAN*/
+ can.attach(callback(this,&IHM::can_ISR_Reader)); /* Fonction d'interruption CAN*/
+// can.attach(&IHM,&can_ISR_Reader); /* Fonction d'interruption CAN*/ Modif BL Mai 2018
}
void IHM::LCD_printf(const char* format, ...)
{
@@ -53,6 +54,7 @@
// myled[0] = !myled[0];
// ledC= !ledC;
}
+ can.write(CANMessage(2));
}
void IHM::CAN_automate_reception(void)
{
@@ -178,9 +180,7 @@
UINT8 IHM::JOG_read(void)
{
- trame_Tx.id=JOG_REQ;
- trame_Tx.type=CAN_REMOTE;
- while(!can.write(trame_Tx));
+ while(!can.write(CANMessage(JOG_REQ,CANStandard)));
while(mise_a_jour_JOG==0)
CAN_automate_reception();
@@ -203,11 +203,7 @@
UINT8 IHM::COD_read(void)
{
- trame_Tx.id=COD_REQ;
- trame_Tx.type=CAN_REMOTE;
- while(!can.write(trame_Tx));
-
-// while(!can.write(CANMessage(COD_REQ,CANStandard)));
+ while(!can.write(CANMessage(COD_REQ,CANStandard)));
while(mise_a_jour_COD==0)
CAN_automate_reception();
mise_a_jour_COD=0;
