Skip to content

Commit

Permalink
Adjust assignment of frequency testing pin
Browse files Browse the repository at this point in the history
  • Loading branch information
shengwen-tw committed May 26, 2024
1 parent fd5030b commit 8a9cc8a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/boards/dynamics_wizard.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ int gpio_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
/* Pin selection */
switch (cmd) {
case GPIO_PIN0:
gpio_group = GPIOB;
gpio_pin = GPIO_Pin_14;
gpio_group = GPIOC;
gpio_pin = GPIO_Pin_5;
break;
default:
return -EINVAL;
Expand Down Expand Up @@ -140,17 +140,17 @@ static void gpio_init(void)
/* Register GPIO to the file system */
register_chrdev("freq_tester", &gpio_file_ops);

RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOB, ENABLE);
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOC, ENABLE);

GPIO_InitTypeDef GPIO_InitStruct = {
.GPIO_Pin = GPIO_Pin_14,
.GPIO_Pin = GPIO_Pin_5,
.GPIO_Mode = GPIO_Mode_OUT,
.GPIO_Speed = GPIO_Speed_50MHz,
.GPIO_OType = GPIO_OType_PP,
.GPIO_PuPd = GPIO_PuPd_DOWN,
};

GPIO_Init(GPIOB, &GPIO_InitStruct);
GPIO_Init(GPIOC, &GPIO_InitStruct);

printk("freq_tester: gpio");
}
Expand Down

0 comments on commit 8a9cc8a

Please sign in to comment.