Author Topic: error: Struct has no member!  (Read 3887 times)

Offline RoboMike

  • Single posting newcomer
  • *
  • Posts: 8
error: Struct has no member!
« on: July 03, 2009, 05:45:22 pm »
Hi,

C::B is telling me that my struct doesn't have a member.

struct code:

Code
ypedef struct TWI_Master {
TWI_t *interface;                  /*!< Pointer to what interface to use */
register8_t address;                            /*!< Slave address */
register8_t writeData[TWIM_WRITE_BUFFER_SIZE];  /*!< Data to write */
register8_t readData[TWIM_READ_BUFFER_SIZE];    /*!< Read data */
register8_t bytesToWrite;                       /*!< Number of bytes to write */
register8_t bytesToRead;                        /*!< Number of bytes to read */
register8_t bytesWritten;                       /*!< Number of bytes written */
register8_t bytesRead;                          /*!< Number of bytes read */
register8_t status;                             /*!< Status of transaction */
register8_t result;                             /*!< Result of transaction */
}TWI_Master_t;

code where I am having the problem:

Code
 heading = twiMaster.readData[0];


Error I get on Compile

main.c|222|error: 'TWI_MASTER_t' has no member named 'readData'|

Compiler WinAVR GCC.

Any ideas why this is happening?

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: error: Struct has no member!
« Reply #1 on: July 03, 2009, 05:57:33 pm »
Topic unrelated to Code::Blocks and therefore violating our forum rules.

Topic locked !