wiring digital speed optimization #15

Merged
klassents merged 11 commits from v0.5.0_wiringDigital_optimization into v0.5.0 2025-03-17 07:53:29 +03:00
2 changed files with 2 additions and 1 deletions
Showing only changes of commit 348d9b2f69 - Show all commits

View File

@ -36,6 +36,7 @@ extern "C" {
*/
typedef enum __HAL_PinsTypeDef
{
NOT_A_PIN = (0 << 0), /**< Не выбран пин. */
GPIO_PIN_0 = (1 << 0), /**< Выбран пин 0. */
GPIO_PIN_1 = (1 << 1), /**< Выбран пин 1. */
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
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* clr = &m_port->CLEAR;