Mercurial > mplayer.hg
diff vidix/drivers/pm3_regs.h @ 8957:36a5cdca733b
bunkus: Encapsulated arguments to #define in ( ... ) so that the #defines can be safely used like functions: mydef(flag ? val1 : val2)
author | mosu |
---|---|
date | Wed, 15 Jan 2003 11:16:33 +0000 |
parents | 034b12194350 |
children |
line wrap: on
line diff
--- a/vidix/drivers/pm3_regs.h Wed Jan 15 09:50:44 2003 +0000 +++ b/vidix/drivers/pm3_regs.h Wed Jan 15 11:16:33 2003 +0000 @@ -1060,10 +1060,10 @@ extern void *pm3_reg_base; #define WRITE_REG(offset,val) \ - *(volatile unsigned long *)(((unsigned char *)(pm3_reg_base)) + offset) = (val) + *(volatile unsigned long *)(((unsigned char *)(pm3_reg_base)) + (offset)) = (val) #define READ_REG(offset) \ - *(volatile unsigned long *)(((unsigned char *)(pm3_reg_base)) + offset) + *(volatile unsigned long *)(((unsigned char *)(pm3_reg_base)) + (offset)) #define UPDATE_SET_REG(offset,val) \ { \ @@ -1094,8 +1094,8 @@ #define RAMDAC_SET_INDEX(index) \ { \ - SLOW_WRITE_REG (PM3RD_IndexHigh,(index>>8)&0xff); \ - SLOW_WRITE_REG (PM3RD_IndexLow,index&0xff); \ + SLOW_WRITE_REG (PM3RD_IndexHigh,((index)>>8)&0xff); \ + SLOW_WRITE_REG (PM3RD_IndexLow,(index)&0xff); \ } #define RAMDAC_SET_REG(index, data) \