admin mode switch
This commit is contained in:
@ -66,6 +66,8 @@ void Error_Handler(void);
|
||||
#define LED_Red_GPIO_Port GPIOC
|
||||
#define LED_Green_Pin GPIO_PIN_14
|
||||
#define LED_Green_GPIO_Port GPIOC
|
||||
#define LED_Blue_Pin GPIO_PIN_15
|
||||
#define LED_Blue_GPIO_Port GPIOC
|
||||
#define EEPROM_CS_Pin GPIO_PIN_4
|
||||
#define EEPROM_CS_GPIO_Port GPIOA
|
||||
#define EEPROM_SCK_Pin GPIO_PIN_5
|
||||
@ -74,6 +76,8 @@ void Error_Handler(void);
|
||||
#define EEPROM_MISO_GPIO_Port GPIOA
|
||||
#define EEPROM_MOSI_Pin GPIO_PIN_7
|
||||
#define EEPROM_MOSI_GPIO_Port GPIOA
|
||||
#define ADMIN_MODE_Pin GPIO_PIN_10
|
||||
#define ADMIN_MODE_GPIO_Port GPIOB
|
||||
#define ETHER_RES_Pin GPIO_PIN_11
|
||||
#define ETHER_RES_GPIO_Port GPIOB
|
||||
#define ETHER_CS_Pin GPIO_PIN_12
|
||||
|
@ -49,7 +49,7 @@ void MX_GPIO_Init(void)
|
||||
__HAL_RCC_GPIOB_CLK_ENABLE();
|
||||
|
||||
/*Configure GPIO pin Output Level */
|
||||
HAL_GPIO_WritePin(GPIOC, LED_Red_Pin|LED_Green_Pin, GPIO_PIN_RESET);
|
||||
HAL_GPIO_WritePin(GPIOC, LED_Red_Pin|LED_Green_Pin|LED_Blue_Pin, GPIO_PIN_RESET);
|
||||
|
||||
/*Configure GPIO pin Output Level */
|
||||
HAL_GPIO_WritePin(EEPROM_CS_GPIO_Port, EEPROM_CS_Pin, GPIO_PIN_RESET);
|
||||
@ -57,8 +57,8 @@ void MX_GPIO_Init(void)
|
||||
/*Configure GPIO pin Output Level */
|
||||
HAL_GPIO_WritePin(GPIOB, ETHER_RES_Pin|ETHER_CS_Pin|Debug_Signal_2_Pin|Debug_Signal_1_Pin, GPIO_PIN_RESET);
|
||||
|
||||
/*Configure GPIO pins : PCPin PCPin */
|
||||
GPIO_InitStruct.Pin = LED_Red_Pin|LED_Green_Pin;
|
||||
/*Configure GPIO pins : PCPin PCPin PCPin */
|
||||
GPIO_InitStruct.Pin = LED_Red_Pin|LED_Green_Pin|LED_Blue_Pin;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||
@ -71,6 +71,12 @@ void MX_GPIO_Init(void)
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||
HAL_GPIO_Init(EEPROM_CS_GPIO_Port, &GPIO_InitStruct);
|
||||
|
||||
/*Configure GPIO pin : PtPin */
|
||||
GPIO_InitStruct.Pin = ADMIN_MODE_Pin;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
|
||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||
HAL_GPIO_Init(ADMIN_MODE_GPIO_Port, &GPIO_InitStruct);
|
||||
|
||||
/*Configure GPIO pins : PBPin PBPin PBPin PBPin */
|
||||
GPIO_InitStruct.Pin = ETHER_RES_Pin|ETHER_CS_Pin|Debug_Signal_2_Pin|Debug_Signal_1_Pin;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||
|
Reference in New Issue
Block a user