[SOLVED] uart problem in stm32

Status
Not open for further replies.

Mr.eyni

Newbie level 5
Joined
Jan 12, 2014
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,333
Hi everyone
I encounter an error in the iar compiler when entering the following code.
Code:
#define Enter    HAL_UART_Transmit(&huart1,(unsigned char*)E,1,10);
#define CR       HAL_UART_Transmit(&huart1,(unsigned char*)C,1,10);
#define GIM      HAL_UART_Transmit(&huart1,(unsigned char*)G,1,10);
#define SUB      HAL_UART_Transmit(&huart1,(unsigned char*)S,1,10);

The error is written in the following line:
Code:
 Error[Pe136]: struct "<unnamed>#35" (declared Hat line 326 of "H:\IAR Codes\3- Sim800\sim800\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f401xc.h"h) has no field "HAL_UART_Transmit" H:\IAR Codes\3- Sim800\sim800\Core\Src\main.c 207

Please tell me why this error occurred and how to solve it. thank you.
 

Solution
the problem solved :
at line 2 : CR was defined in main and stm32f401xc.h And because of this, the compiler gave an error. I changed CR to CR1 in the main and the problem was solved.
Hi,

what is [E], [C], [G], ?

if you want it to be a char, then use ['E'], ['C'], ...

Klaus
 

the problem solved :
at line 2 : CR was defined in main and stm32f401xc.h And because of this, the compiler gave an error. I changed CR to CR1 in the main and the problem was solved.
 

Solution
Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…