Implement Multi-Bus CAN Interfaces

This commit is contained in:
AlexanderHD27
2024-11-23 01:25:29 +01:00
parent f26cc07558
commit c1dc89eb58
39 changed files with 5746 additions and 109 deletions

View File

@@ -3,4 +3,5 @@
#include "mcp2521_toplevel.hpp"
#include "mcp2521_command.hpp"
#include "mcp2521_hardware_esp.hpp"
#include "mcp2521_hardware_esp_bus_factory.hpp"
#include "mcp2521_addresses.hpp"

View File

@@ -40,9 +40,9 @@ struct rx_info {
uint8_t length;
};
class MCP2521_Command_Interface {
class MCP2521_CommandInterface {
private:
MCP2521_Hardware_Handle * hardware_handle;
I_MCP2521_HardwareHandle * hardware_handle;
intHandlerFunction_t rx0_handler;
intHandlerFunction_t rx1_handler;
@@ -63,8 +63,8 @@ private:
void * message_error_handler_arg;
public:
MCP2521_Command_Interface(
MCP2521_Hardware_Handle * hardware_handle
MCP2521_CommandInterface(
I_MCP2521_HardwareHandle * hardware_handle
);
void handleInterrupt();

View File

@@ -5,7 +5,7 @@
#include "mcp2521_command.hpp"
#include "mcp2521_addresses.hpp"
class MCP2521 : public MCP2521_Command_Interface {
class MCP2521 : public MCP2521_CommandInterface {
private:
public:
void set_tx_id(MCP2521_TX_BUFFER buffer, uint16_t id, bool extended);