#include "canopen_dictionary.h" /** * @brief Intialize the configuration and check that no error is in the OD. * */ void test_demo_init() { CANopenDictionary_enum_errors error = CANOPEN_DICTIONARY_LIB_ERROR_NONE; size_t length = sizeof(dictionary_storage)/sizeof(dictionary_storage[0]); error = canopen_dictionary_init(&col_conf,dictionary_storage,length); if(error != CANOPEN_DICTIONARY_LIB_ERROR_NONE) { // error handling TEST_FAIL_MESSAGE("library could not be initialized!"); } error = canopen_dictionary_registerCallbackFind(&col_conf,CANOPEN_IDX_LOW_NUMBER_001,CANOPEN_SUBIDX_LOW_NUMBER_001,&write_callback); TEST_ASSERT_MESSAGE(error==CANOPEN_DICTIONARY_LIB_ERROR_NONE,"the callback could not be registered"); }