mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 17:38:35 +02:00
CAN and CAN FD transmit implemented
This commit is contained in:
@@ -56,6 +56,10 @@ extern bool DLLExport icsneo_settingsApplyDefaultsTemporary(const neodevice_t* d
|
||||
|
||||
extern bool DLLExport icsneo_setBaudrate(const neodevice_t* device, uint16_t netid, uint32_t newBaudrate);
|
||||
|
||||
extern bool DLLExport icsneo_transmit(const neodevice_t* device, const neomessage_t* message);
|
||||
|
||||
extern bool DLLExport icsneo_transmitMessages(const neodevice_t* device, const neomessage_t* messages, size_t count);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
@@ -128,6 +132,12 @@ fn_icsneo_settingsApplyDefaultsTemporary icsneo_settingsApplyDefaultsTemporary;
|
||||
typedef bool(*fn_icsneo_setBaudrate)(const neodevice_t* device, uint16_t netid, uint32_t newBaudrate);
|
||||
fn_icsneo_setBaudrate icsneo_setBaudrate;
|
||||
|
||||
typedef bool(*fn_icsneo_transmit)(const neodevice_t* device, const neomessage_t* message);
|
||||
fn_icsneo_transmit icsneo_transmit;
|
||||
|
||||
typedef bool(*fn_icsneo_transmitMessages)(const neodevice_t* device, const neomessage_t* messages, size_t count);
|
||||
fn_icsneo_transmitMessages icsneo_transmitMessages;
|
||||
|
||||
#define ICSNEO_IMPORT(func) func = (fn_##func)icsneo_dynamicLibraryGetFunction(icsneo_libraryHandle, #func)
|
||||
#define ICSNEO_IMPORTASSERT(func) if((ICSNEO_IMPORT(func)) == NULL) return 3
|
||||
void* icsneo_libraryHandle = NULL;
|
||||
@@ -164,6 +174,8 @@ int icsneo_init() {
|
||||
ICSNEO_IMPORTASSERT(icsneo_settingsApplyDefaults);
|
||||
ICSNEO_IMPORTASSERT(icsneo_settingsApplyDefaultsTemporary);
|
||||
ICSNEO_IMPORTASSERT(icsneo_setBaudrate);
|
||||
ICSNEO_IMPORTASSERT(icsneo_transmit);
|
||||
ICSNEO_IMPORTASSERT(icsneo_transmitMessages);
|
||||
|
||||
icsneo_initialized = true;
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user