Skip to content

Instantly share code, notes, and snippets.

@ssnover
Created February 24, 2018 04:34
Show Gist options
  • Save ssnover/b94058a0edb987f5e65c4ad2d100ad33 to your computer and use it in GitHub Desktop.
Save ssnover/b94058a0edb987f5e65c4ad2d100ad33 to your computer and use it in GitHub Desktop.
Example whereby a fault occurs due to construction of mbed::CAN
/*
* file: main.cpp
* purpose: Entry point for the test of the CAN adapter.
*/
#include "mbed.h"
DigitalOut green_led(LED2);
CAN my_can_driver(PB_8, PB_9, 5000);
int main()
{
printf("CAN Test\r\n");
green_led = 0;
while (true)
{
printf("Begin mainloop\r\n");
green_led = !green_led;
wait_ms(500);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment