cancel
Showing results for 
Search instead for 
Did you mean: 

Typedef struct error

Maaz1
Associate II

Hi all

 

 
/*
 * usb_device.h
 *
 *  Created on: Aug 5, 2025
 *      Author: mmadha
 */


#ifndef USB_DEVICE_H_
#define USB_DEVICE_H_

#include "usb_standards.h"



struct UsbDevice
{
	/// \brief The current USB device state.
	UsbDeviceState device_state;
	/// \brief The current control transfer stage (for endpoint0).
	UsbControlTransferStage control_transfer_stage;
	/// \brief The selected USB configuration.
	uint8_t configuration_value;

	/** \defgroup UsbDeviceOutInBufferPointers
	 *@{*/
	void const *ptr_out_buffer;
	uint32_t out_data_size;
	void const *ptr_in_buffer;
	uint32_t in_data_size;
	/**@}*/
};

#endif /* USB_DEVICE_H_ */

 

 For some reason, I am getting the error Description Resource Path Location Type
expected ';', identifier or '(' before 'struct' usb_device.h /clk_test/Core/Inc line 16 C/C++ Problem

which I don't understand. Any suggestions on what could be causing this error would be greatly appreciated.

 

Kind regards

1 REPLY 1
TDK
Super User

You missing a ; at the end of the usb_standards.h file.

If you feel a post has answered your question, please click "Accept as Solution".