0
Revision 0:705405c562e3, committed 2014-06-29
- Comitter:
- koiamk
- Date:
- Sun Jun 29 21:35:01 2014 +0000
- Commit message:
- 0
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/EALib.lib Sun Jun 29 21:35:01 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/teams/test/code/EALib/#64f3dd338612
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sun Jun 29 21:35:01 2014 +0000 @@ -0,0 +1,45 @@ +#include "mbed.h" + +DigitalOut led1(LED1); +DigitalOut led2(LED2); + +int main() +{ + char buf[8] = {0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF, 0x55, 0x11}; + CANMessage msg(0x7E0,buf,8); + DigitalOut can_en(p8); + CAN can1(p9, p10); + int can_filter_handle; + + msg.len = 8; + msg.type = CANRemote; + msg.format = CANStandard; + + //led1 = 0; + //led2 = 1; + can1.reset(); + /*can_filter_handle = can1.filter(0x7E0,0x7FF,CANStandard); + if (can_filter_handle) { + //led1 = 1; //off + } else { + //led2 = 0; //on + } + */ + led1 = 1; //off + led2 = 1; //off + if (can1.frequency(500000)) { + led1 = 0; //on + } + //LPC_CAN1->BTR = 0x52001C; + can_en = 0; + while(1) { + //if (can1.write(msg)) { + // led1 = !led1; + //} + //can1.reset(); + /*led2 = !led2; + wait(1); + led2 = !led2; + wait(1);*/ + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed-src.lib Sun Jun 29 21:35:01 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/teams/test/code/mbed-src/#06c344ebdfe8