diff --git a/Sources/Driver/KvaserCAN_Devices.c b/Sources/Driver/KvaserCAN_Devices.c index b9e045e..56663e8 100644 --- a/Sources/Driver/KvaserCAN_Devices.c +++ b/Sources/Driver/KvaserCAN_Devices.c @@ -52,7 +52,7 @@ const CANDEV_Device_t CANDEV_Devices[] = { #if (OPTION_USB_LEAF_DEVEL_DEVICE != 0) - #error Device not supported! + {KVASER_VENDOR_ID, USB_LEAF_DEVEL_DRV_FAMILY, USB_LEAF_DEVEL_NUM_CHANNELS}, #endif #if (OPTION_USB_LEAF_LITE_DEVICE != 0) #error Device not supported! @@ -219,7 +219,11 @@ static const struct kavser_can_device_t_ { bool capErrorFrame; } Kvaser_Devices[] = { #if (OPTION_USB_LEAF_DEVEL_DEVICE != 0) - #error Device not supported! + {USB_LEAF_DEVEL_PRODUCT_ID, USB_LEAF_DEVEL_DRV_FAMILY, + USB_LEAF_DEVEL_NUM_CHANNELS, USB_LEAF_DEVEL_CAN_CLOCK, + USB_LEAF_DEVEL_TIMER_FREQ, USB_LEAF_DEVEL_CAP_CANFD, + USB_LEAF_DEVEL_CAP_NONISO, USB_LEAF_DEVEL_CAP_SILENT_MODE, + USB_LEAF_DEVEL_CAP_ERROR_FRAME}, #endif #if (OPTION_USB_LEAF_LITE_DEVICE != 0) #error Device not supported! diff --git a/Sources/Driver/KvaserCAN_Devices.h b/Sources/Driver/KvaserCAN_Devices.h index cbd0a41..2824656 100644 --- a/Sources/Driver/KvaserCAN_Devices.h +++ b/Sources/Driver/KvaserCAN_Devices.h @@ -54,7 +54,7 @@ /** @name Supported Kvaser Leaf Interfaces * @brief Options to activate single devices from USB-to-CAN Leaf device family. * @{ */ -#define OPTION_USB_LEAF_DEVEL_DEVICE 0 ///< Kvaser Leaf prototype (P010v2 and v3) +#define OPTION_USB_LEAF_DEVEL_DEVICE 1 ///< Kvaser Leaf prototype (P010v2 and v3) #define OPTION_USB_LEAF_LITE_DEVICE 0 ///< Kvaser Leaf Light (P010v3) #define OPTION_USB_LEAF_PRO_DEVICE 0 ///< Kvaser Leaf Professional HS #define OPTION_USB_LEAF_SPRO_DEVICE 0 ///< Kvaser Leaf SemiPro HS @@ -126,9 +126,15 @@ typedef enum kavser_device_family_t_ { * @brief Tbd. * @{ */ #if (OPTION_USB_LEAF_DEVEL_DEVICE != 0) - #define USB_LEAF_DEVEL_PRODUCT_ID 10U - #define USB_LEAF_DEVEL_DRV_FAMILY KVASER_USB_LEAF_DEVICE_FAMILY - #error Device properties not defined! + #define USB_LEAF_DEVEL_PRODUCT_ID 279U + #define USB_LEAF_DEVEL_DRV_FAMILY KVASER_USB_MHYDRA_DEVICE_FAMILY + #define USB_LEAF_DEVEL_NUM_CHANNELS 1U + #define USB_LEAF_DEVEL_CAN_CLOCK 80U // likely correct + #define USB_LEAF_DEVEL_TIMER_FREQ 20U // likely correct + #define USB_LEAF_DEVEL_CAP_CANFD true + #define USB_LEAF_DEVEL_CAP_NONISO false + #define USB_LEAF_DEVEL_CAP_SILENT_MODE true + #define USB_LEAF_DEVEL_CAP_ERROR_FRAME false #endif /** @} */