добавила значение НЕПИН

This commit is contained in:
KLASSENTS 2025-03-12 15:47:34 +07:00
parent d3b93e55bd
commit 348d9b2f69
2 changed files with 2 additions and 1 deletions

View File

@ -36,6 +36,7 @@ extern "C" {
*/ */
typedef enum __HAL_PinsTypeDef typedef enum __HAL_PinsTypeDef
{ {
NOT_A_PIN = (0 << 0), /**< Не выбран пин. */
GPIO_PIN_0 = (1 << 0), /**< Выбран пин 0. */ GPIO_PIN_0 = (1 << 0), /**< Выбран пин 0. */
GPIO_PIN_1 = (1 << 1), /**< Выбран пин 1. */ GPIO_PIN_1 = (1 << 1), /**< Выбран пин 1. */
GPIO_PIN_2 = (1 << 2), /**< Выбран пин 2. */ GPIO_PIN_2 = (1 << 2), /**< Выбран пин 2. */

View File

@ -65,7 +65,7 @@ static void __attribute__((noinline, section(".ram_text"))) mik32Show(GPIO_TypeD
// not support 400khz // not support 400khz
if (!is800KHz) return; if (!is800KHz) return;
if ((m_port != NULL) && (m_pin != NC)) if ((m_port != NULL) && (m_pin != NOT_A_PIN))
{ {
volatile uint32_t* set = &m_port->SET; volatile uint32_t* set = &m_port->SET;
volatile uint32_t* clr = &m_port->CLEAR; volatile uint32_t* clr = &m_port->CLEAR;