文档介绍:1. // 2. //------------------------------------------------------------------------------ 3. // 4. // 5. // DEVICE: C8051F040 6. // 7. // AUTHOR: LS 8. // 9. // TOOLS: Keil piler and Silicon Labs IDE 10. // 11. // 12. // and are a simple example of configuring a work to 13. // transmit and receive data on a work, and how to move information to 14. // and from CAN RAM message objects. Each C8051F040-TB CAN node is configured 15. // to send a message when it's button is depressed/released, with a 0x11 16. // to indicate the button is pushed, and 0x00 when released. Each node also has 17. // a message object configured to receive messages. The C8051 tests the 18. // received data and will turn on/off the target board's LED. When one target 19. // is loaded with and the other is loaded with , one target 20. // board's push-button will control the other target board's LED, establishing 21. // a simple control link via the CAN bus and can be observed directly on the 22. // target boards. 23. //////////////////////////////////////////////////////////////////////////////// 24. 25. //////////////////////////////////////////////////////////////////////////////// 26. // Includes 27. //////////////////////////////////////////////////////////////////////////////// 28. 29. #include <> // SFR declarations 30. 31. // CAN Protocol Register