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.
Dependencies: mbed use_can_stm
main.cpp
- Committer:
- nanami773
- Date:
- 2022-03-21
- Revision:
- 0:2d1674c40691
File content as of revision 0:2d1674c40691:
#include "mbed.h"
//#include "use_can_stm.h"
//#include "use_can_stm.cpp"
CAN can(p30,p29);
TIcker controlCycle;
float a;
int main()
{
can.frequency(500000);
controlCycle.attach(&mainLoop,0.01f);
while(1) {
motordriverTransmitMessage(&can,MD_0_MCU,md_can_flame::SEND_CONTROL_DUTY,0.8f);
Ticker controlCycle;
}
void mainLoop() {
motordriverTransmitMessage(&can,MD_0_MCU,md_can_flame::SEND_CONTROL_DUTY,0.8f);
}
}