How to use the macro of the puart?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hello, this is Taka, I have a question.

I want to use the puart interrupt and reading some documents.

I hit a discussion of using puart interrupt

here

Re: Long Data from UART

and there are some macro in the code.

When I wrote this code as the above discussion,

P_UART_WATER_MARK_RX_LEVEL (1);

I got an error as following.

'Symbol 'dc_ptu_uart2_rfl_adr' could not be resolved'

I checked "WICED Smart™ v2.1.1 - API Reference Guide" and following is in the guid.

#define P_UART_WATER_MARK_RX_LEVEL(x)  UART_REG(P_UART_WATER_MARK_RX_ADDR) = x

But there is no description of UART_REG(xxx)  , I have no idea to fix them...

How sould I do? Do I have to do someting to use the macros?

I just put

#include "puart.h"

at the top of my code.

0 Likes
1 Solution

Ignore the error, this is shown on IDE, since Eclipse cannot link to the source files and locate. You would not see this error during building your application.

thnx

vik86

View solution in original post

0 Likes
4 Replies
BoonT_56
Employee
Employee
500 likes received 250 likes received 100 likes received

Perhaps this thread may give some insights.. UART Routines

0 Likes
Anonymous
Not applicable

Thank you for your reply, but my problem is different.

My problem is that I can not use the "Macro" at all.

When I use a macro like this,

P_UART_WATER_MARK_RX_LEVEL (1);


an error is showed like this.


'Symbol 'dc_ptu_uart2_rfl_adr' could not be resolved'


This is the screen shot.

error.png


I included puart.h.

There is a define as following in the puart.h .

#define P_UART_FLOW_CONTROL_WATER_MARK_ADDR             dc_ptu_uart2_rfc_adr


There is a difinition of "dc_ptu_uart2_rfc_adr" in "20732mapa1.h". So I tryed to include this mapa file, but I couldn't.




0 Likes

Ignore the error, this is shown on IDE, since Eclipse cannot link to the source files and locate. You would not see this error during building your application.

thnx

vik86

0 Likes
Anonymous
Not applicable

I could compile it even there are some error on the IDE...orz

Thank you for your infomation.

I spent all night for this but all I have to do was that just clicking the MakeTarget.

Good night!

Taka,

0 Likes