it actually works now
This commit is contained in:
@@ -11,13 +11,13 @@
|
||||
void
|
||||
breadboard(int DELAY_MS)
|
||||
{
|
||||
bool Purple = (HAL_GPIO_ReadPin(GPIOD, BTN_PRPL_Pin) == GPIO_PIN_SET); // PD5
|
||||
bool Grey = (HAL_GPIO_ReadPin(GPIOD, BTN_GREY_Pin) == GPIO_PIN_SET); // PD7
|
||||
bool Purple = (HAL_GPIO_ReadPin(BTN_PRPL_GPIO_Port, BTN_PRPL_Pin) == GPIO_PIN_SET); // PD5
|
||||
bool Grey = (HAL_GPIO_ReadPin(BTN_GREY_GPIO_Port, BTN_GREY_Pin) == GPIO_PIN_SET); // PD7
|
||||
|
||||
if (!Purple && !Grey) { // inverted for ease of debug, assignment calls for (Purple && Grey)
|
||||
HAL_GPIO_WritePin(GPIOB, LED_EXT_Pin, GPIO_PIN_SET); // PB4
|
||||
if (Purple && Grey) {
|
||||
HAL_GPIO_WritePin(LED_EXT_GPIO_Port, LED_EXT_Pin, GPIO_PIN_SET); // PB4
|
||||
} else {
|
||||
HAL_GPIO_WritePin(GPIOB, LED_EXT_Pin, GPIO_PIN_RESET); // PB4
|
||||
HAL_GPIO_WritePin(LED_EXT_GPIO_Port, LED_EXT_Pin, GPIO_PIN_RESET); // PB4
|
||||
}
|
||||
|
||||
HAL_Delay(DELAY_MS); // milliseconds of delay after execution
|
||||
|
||||
Reference in New Issue
Block a user