Is it possible to declare a port as buffered during run-time Topic is solved

If you have a simple question and just want an answer.
Post Reply
User avatar
sethu_jangala
XCore Expert
Posts: 589
Joined: Wed Feb 29, 2012 10:03 am

Is it possible to declare a port as buffered during run-time

Post by sethu_jangala »



View Solution
User avatar
sethu_jangala
XCore Expert
Posts: 589
Joined: Wed Feb 29, 2012 10:03 am

Post by sethu_jangala »

The port configuration can be changed by using the SETC instruction in the executing program. For example:

#define SETPORTBUFFERED(p, bits) \
asm("\
setc res[%0], 0x200f \n \
settw res[%0], %1 \n \
" : : "r"(p), "r"(bits) );
#define SETPORTUNBUFFERED(p) asm("setc res[%r], 0x2007" ::"r"(p));


Post Reply