feat(set-protocol): добавь порт F407 для DevBoard_V1
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
/** STM32F407 bxCAN port for SETGUI through CAN485 DevBoard_V1. */
|
||||
#ifndef SET_DEVBOARD_V1_STM32F407_H
|
||||
#define SET_DEVBOARD_V1_STM32F407_H
|
||||
|
||||
#include "stm32f4xx_hal.h"
|
||||
#include "pcan_modbus_server.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef void (*set_devboard_v1_unhandled_fn)(void *user,
|
||||
const CAN_RxHeaderTypeDef *header,
|
||||
const uint8_t data[8]);
|
||||
|
||||
typedef struct {
|
||||
CAN_HandleTypeDef *can;
|
||||
pcan_modbus_server_t server;
|
||||
set_devboard_v1_unhandled_fn unhandled;
|
||||
void *unhandled_user;
|
||||
uint32_t rx_frames;
|
||||
uint32_t tx_frames;
|
||||
uint32_t tx_errors;
|
||||
} set_devboard_v1_stm32f407_t;
|
||||
|
||||
bool set_devboard_v1_stm32f407_init(
|
||||
set_devboard_v1_stm32f407_t *port, CAN_HandleTypeDef *can,
|
||||
uint8_t device_type, uint8_t device_id,
|
||||
pcan_modbus_read_fn read, pcan_modbus_write_fn write, void *register_user,
|
||||
set_devboard_v1_unhandled_fn unhandled, void *unhandled_user);
|
||||
|
||||
size_t set_devboard_v1_stm32f407_poll(set_devboard_v1_stm32f407_t *port);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user