<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>how to unpack MACRO</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/96408/how-to-unpack-macro</link><description>Hello, 
 Could you help me to unpack this MACRO? It&amp;#39;s hard to understand how it works, and it is impossible to debug! 
 here they are: SH_SENS_CHANNEL_CONFIG_DEF(...); SH_SENS_PROFILE_CONFIG_DEF(...); SH_SENS_CHANNEL_CONFIG (...); SH_SENS_PROFILE_CONFIG</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 07 Feb 2023 14:06:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/96408/how-to-unpack-macro" /><item><title>RE: how to unpack MACRO</title><link>https://devzone.nordicsemi.com/thread/408592?ContentTypeID=1</link><pubDate>Tue, 07 Feb 2023 14:06:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f0e6c701-fa81-4a68-9b9a-1f76c5b5c61e</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I will not be doing this manually, but if you use the macro and check in a debugger you will see the result, and then you will know how it looks and can change it on your end. If for instance you want to look at the&amp;nbsp;ant_channel_config_t that is made by&amp;nbsp;HRM_SENS_CHANNEL_CONFIG_DEF, check this in the debugger and you will see everything (of course you also have this type definition from the header file to start with, and nest form there). That is my advice. You are of course also free to work your way from the macro definitions. I understand that this is a bit tedious work, but unfortunately it is up to you.&lt;/p&gt;
&lt;p&gt;Edit: you can also observe the preprocessor output if that is easier. For instance,&amp;nbsp;if using GCC you can add use the&amp;nbsp;&lt;code&gt;-save-temps&lt;/code&gt; option.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to unpack MACRO</title><link>https://devzone.nordicsemi.com/thread/408565?ContentTypeID=1</link><pubDate>Tue, 07 Feb 2023 13:24:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:402e4c29-ba52-4178-919a-982b990a62d9</guid><dc:creator>StefXinet</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I need to unpack the macro because I need to assing values&amp;nbsp;from some function returns and&amp;nbsp;other value are modified by passing them as pointer, so I need to remove the MACRO.&lt;/p&gt;
&lt;p&gt;Please can you help me?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to unpack MACRO</title><link>https://devzone.nordicsemi.com/thread/408552?ContentTypeID=1</link><pubDate>Tue, 07 Feb 2023 12:51:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:593bf09c-571a-4336-a453-f523e8a7ab81</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t think it makes sense to try to unpack it by hand / in your head. I suggest you build and flash and check the resulting type with a debugger.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>