Rev 31 | Rev 35 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 31 | Rev 32 | ||
---|---|---|---|
Line 691... | Line 691... | ||
691 | GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; |
691 | GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; |
692 | GPIO_InitStruct.Pull = GPIO_NOPULL; |
692 | GPIO_InitStruct.Pull = GPIO_NOPULL; |
693 | GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; |
693 | GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; |
694 | HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); |
694 | HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); |
695 | 695 | ||
696 | /*Configure GPIO pin : SW1_PUSH_Pin */ |
- | |
697 | GPIO_InitStruct.Pin = SW1_PUSH_Pin; |
- | |
698 | GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING; |
- | |
699 | GPIO_InitStruct.Pull = GPIO_NOPULL; |
- | |
700 | HAL_GPIO_Init(SW1_PUSH_GPIO_Port, &GPIO_InitStruct); |
- | |
701 | - | ||
702 | /*Configure GPIO pins : SW1_I_Pin SW1_Q_Pin SW2_PUSH_Pin */ |
696 | /*Configure GPIO pins : SW1_PUSH_Pin SW1_I_Pin SW1_Q_Pin SW2_PUSH_Pin */ |
703 | GPIO_InitStruct.Pin = SW1_I_Pin|SW1_Q_Pin|SW2_PUSH_Pin; |
697 | GPIO_InitStruct.Pin = SW1_PUSH_Pin|SW1_I_Pin|SW1_Q_Pin|SW2_PUSH_Pin; |
704 | GPIO_InitStruct.Mode = GPIO_MODE_INPUT; |
698 | GPIO_InitStruct.Mode = GPIO_MODE_INPUT; |
705 | GPIO_InitStruct.Pull = GPIO_NOPULL; |
699 | GPIO_InitStruct.Pull = GPIO_PULLUP; |
706 | HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); |
700 | HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); |
707 | 701 | ||
708 | /*Configure GPIO pins : SW2_I_Pin SW2_Q_Pin IGNITION_Pin */ |
702 | /*Configure GPIO pins : SW2_I_Pin SW2_Q_Pin */ |
709 | GPIO_InitStruct.Pin = SW2_I_Pin|SW2_Q_Pin|IGNITION_Pin; |
703 | GPIO_InitStruct.Pin = SW2_I_Pin|SW2_Q_Pin; |
710 | GPIO_InitStruct.Mode = GPIO_MODE_INPUT; |
704 | GPIO_InitStruct.Mode = GPIO_MODE_INPUT; |
711 | GPIO_InitStruct.Pull = GPIO_NOPULL; |
705 | GPIO_InitStruct.Pull = GPIO_PULLUP; |
712 | HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); |
706 | HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); |
713 | 707 | ||
- | 708 | /*Configure GPIO pin : IGNITION_Pin */ |
|
- | 709 | GPIO_InitStruct.Pin = IGNITION_Pin; |
|
- | 710 | GPIO_InitStruct.Mode = GPIO_MODE_INPUT; |
|
- | 711 | GPIO_InitStruct.Pull = GPIO_NOPULL; |
|
- | 712 | HAL_GPIO_Init(IGNITION_GPIO_Port, &GPIO_InitStruct); |
|
- | 713 | ||
714 | } |
714 | } |
715 | 715 | ||
716 | /* USER CODE BEGIN 4 */ |
716 | /* USER CODE BEGIN 4 */ |
717 | 717 | ||
718 | /* USER CODE END 4 */ |
718 | /* USER CODE END 4 */ |