Skip to content

Commit

Permalink
Add the pull up/down register error
Browse files Browse the repository at this point in the history
Signed-off-by: Tony Zhang <[email protected]>
  • Loading branch information
Tony-HIT committed Jan 22, 2015
1 parent 337aa22 commit 5237b1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/c_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ void set_pullupdn(int gpio, int pud)//void sunxi_pullUpDnControl (int pin, int p
int index = gpio - (bank << 5);
int sub = index >> 4;
int sub_index = index - 16*sub;
uint32_t phyaddr = SUNXI_GPIO_BASE + (bank * 36) + 0x1c + sub; // +0x10 -> pullUpDn reg
uint32_t phyaddr = SUNXI_GPIO_BASE + (bank * 36) + 0x1c + sub * 4; // +0x10 -> pullUpDn reg

if (lemakerDebug)
printf("func:%s pin:%d,bank:%d index:%d sub:%d phyaddr:0x%x\n",__func__, gpio,bank,index,sub,phyaddr);
Expand Down

0 comments on commit 5237b1a

Please sign in to comment.