Skip to content

this code adds support for structured ADIs#14

Open
BerndWernerGuenther wants to merge 2 commits intohms-networks:mainfrom
BerndWernerGuenther:main
Open

this code adds support for structured ADIs#14
BerndWernerGuenther wants to merge 2 commits intohms-networks:mainfrom
BerndWernerGuenther:main

Conversation

@BerndWernerGuenther
Copy link

I added code for selecting structured ADIs instead of the speed-refspeed-example of the starterkit code;
the structured ADIs had already been defined in the header file abcc_interface_data_interface.h of abcc_driver\inc.

I added

_**//added to support structured ADIs; start
#ifndef ABCC_CFG_DRV_STRUCTURED_ADIS
#define ABCC_CFG_DRV_STRUCTURED_ADIS 1
#endif

#ifdef ABCC_CFG_DRV_STRUCTURED_ADIS
#ifndef ABCC_CFG_STRUCT_DATA_TYPE_ENABLED
#define ABCC_CFG_STRUCT_DATA_TYPE_ENABLED 1
#endif
#endif
//added to support structured ADIs; end**_

inside the file abcc_driver_config.h.

These 2 compiler switches will be used inside the code to switch between the structured ADI version and the Speed / Refspeed version.

Copy link
Contributor

@alkhms101 alkhms101 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have commented on some formalities in the first review run. I haven't tested the code yet.

#include "abcc_api.h"


//added to support structured ADIs; start
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please avoid one line comments

/* Index: 2 */ { "Element03", ABP_PAD7, 1, ADI_DESCR_ALL_ACCESS, 1, { { NULL, NULL } } }, /* 7 bits padding is needed starting at position 1 in struct2.bBitData[ 1 ] */
/* Index: 3 */ { "Element04", ABP_UINT16, 1, AD_ADI_DESC____SG, 0, { { &struct2.iData, NULL } } } /* 16 bit type must at least be on a 8 bit aligned position */
};
//added to support structured ADIs; end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please avoid one line comments

**------------------------------------------------------------------------------
*/
const AD_AdiEntryType ABCC_API_asAdiEntryList[] =
//const AD_AdiEntryType AD_asADIEntryList[] =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please avoid one line comments

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deleted the comment

**------------------------------------------------------------------------------
*/
const AD_MapType ABCC_API_asAdObjDefaultMap[] =
//AD_MapType sDefaultMap[] =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please delete, references to older versions unnecessary

**------------------------------------------------------------------------------
*/
/*
** The content of struct1 is described by ABCC_API_AdiStruct1 below
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid pointing out the obvious...

} struct1;

/*
** The content of struct2 is described by ABCC_API_AdiStruct2 below
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid pointing out the obvious...

#include "abcc_types.h"
#include "abp.h"

//added to support structured ADIs; start
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please avoid one line comments

#define ABCC_CFG_STRUCT_DATA_TYPE_ENABLED 1
#endif
#endif
//added to support structured ADIs; end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please avoid one line comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants