
2 Jul
2008
2 Jul
'08
9:49 a.m.
On Wed, Jul 2, 2008 at 12:07 AM, Ben Warren bwarren@qstreams.com wrote: <snip>
+#define WRITE_TXBUF(data) \
- do { \
- *(volatile unsigned short *)(AX88180_BASE + TXBUFFER_START) \
- = data; \
- } while (0)
In this case, the do{...}while(0) is unnecessary. Just make the assignment.
Sorry, I was wrong in this case - do{...}while(0) is correct. Please consider replacing all of these macros with static inline functions though. Much easier for everybody that way.
regards, Ben