cancel
Showing results for 
Search instead for 
Did you mean: 

stm8s_uart1.c bad struct/union operand

Dileep P D
Associate II
Posted on September 27, 2017 at 13:19

Hello.

I want to using uart1 with STM8S003,

  

after add

stm8s_uart1.c and stm8s_uart1.h and build project, the compiler(Cosmic) tell error

'stm8s_uart1.c bad struct/union operand' 

it's look like somethings not define to project.

Help please.

2 REPLIES 2
Posted on September 27, 2017 at 14:24

>>it's look like somethings not define to project.

Ok, so look at what it is complaining about, and define that. Normally .H files are #included, not added to the project explicitly.

Show what you're doing and what fails, so that people can see what going on without trying to replicate the situation with next to no detail to work from.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on September 28, 2017 at 08:48

Thanks for your quick response,

Actually i included wrong stm8s.h file. Now it is fixed.