<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>CodeWarrior Development Toolsのトピックtypedef struct in events file</title>
    <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/typedef-struct-in-events-file/m-p/1800713#M9080</link>
    <description>&lt;P&gt;in the file main.c, i define&lt;/P&gt;&lt;P&gt;typedef struct&lt;BR /&gt;{&lt;BR /&gt;unsigned char A;&lt;BR /&gt;unsigned char B;&lt;BR /&gt;unsigned char C;&lt;BR /&gt;}TDATA_EXAMPLE;&lt;BR /&gt;TDATA_EXAMPLE Data_examples;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the file events.c i want to modify a parameter of struct but i don't know how declare (extern ... ?)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data_examples.A = 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 02 Feb 2024 08:54:04 GMT</pubDate>
    <dc:creator>Albert_mtb</dc:creator>
    <dc:date>2024-02-02T08:54:04Z</dc:date>
    <item>
      <title>typedef struct in events file</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/typedef-struct-in-events-file/m-p/1800713#M9080</link>
      <description>&lt;P&gt;in the file main.c, i define&lt;/P&gt;&lt;P&gt;typedef struct&lt;BR /&gt;{&lt;BR /&gt;unsigned char A;&lt;BR /&gt;unsigned char B;&lt;BR /&gt;unsigned char C;&lt;BR /&gt;}TDATA_EXAMPLE;&lt;BR /&gt;TDATA_EXAMPLE Data_examples;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the file events.c i want to modify a parameter of struct but i don't know how declare (extern ... ?)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data_examples.A = 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2024 08:54:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/typedef-struct-in-events-file/m-p/1800713#M9080</guid>
      <dc:creator>Albert_mtb</dc:creator>
      <dc:date>2024-02-02T08:54:04Z</dc:date>
    </item>
    <item>
      <title>Re: typedef struct in events file</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/typedef-struct-in-events-file/m-p/1801290#M9081</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/177778"&gt;@Albert_mtb&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can add the following code in event.c for external declaration:&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;typedef struct {
    unsigned char A;
    unsigned char B;
    unsigned char C;
} TDATA_EXAMPLE;
 
extern TDATA_EXAMPLE Data_examples;&lt;/LI-CODE&gt;
&lt;P&gt;You can also create a new header.h file to contain the TDATA_EXAMPLE struct definition by adding the following code to event.c:&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;#include "header.h"
 
extern TDATA_EXAMPLE Data_examples;&lt;/LI-CODE&gt;
&lt;P&gt;header.h is as follows:&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;#ifndef __HEADER_H
#define __HEADER_H
 
typedef struct {
    unsigned char A;
    unsigned char B;
    unsigned char C;
} TDATA_EXAMPLE;
 
#endif&lt;/LI-CODE&gt;
&lt;P&gt;I recommend using header file definitions for large projects.&lt;/P&gt;
&lt;P&gt;Best regards, Alex&lt;/P&gt;</description>
      <pubDate>Sun, 04 Feb 2024 03:39:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/typedef-struct-in-events-file/m-p/1801290#M9081</guid>
      <dc:creator>Alex_Wang</dc:creator>
      <dc:date>2024-02-04T03:39:29Z</dc:date>
    </item>
    <item>
      <title>Re: typedef struct in events file</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/typedef-struct-in-events-file/m-p/1801691#M9082</link>
      <description>&lt;P&gt;Thank you so much Alex&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;</description>
      <pubDate>Mon, 05 Feb 2024 07:38:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/typedef-struct-in-events-file/m-p/1801691#M9082</guid>
      <dc:creator>Albert_mtb</dc:creator>
      <dc:date>2024-02-05T07:38:48Z</dc:date>
    </item>
  </channel>
</rss>

