From ff4c3a26a5832f2b3d2d6db58616656b0624f2b7 Mon Sep 17 00:00:00 2001 From: KLASSENTS Date: Fri, 17 Jan 2025 09:58:37 +0700 Subject: [PATCH] =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D1=84=D1=83=D0=BD=D0=BA=D1=86=D0=B8=D1=8F=20?= =?UTF-8?q?=D0=B1=D1=8B=D1=81=D1=82=D1=80=D0=BE=D0=B3=D0=BE=20=D0=BA=D0=BE?= =?UTF-8?q?=D0=BD=D1=84=D0=B8=D0=B3=D1=83=D1=80=D0=B8=D1=80=D0=BE=D0=B2?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D1=8F=20=D0=B2=D1=8B=D0=B2=D0=BE=D0=B4=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cores/arduino/wiring_digital.h | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/cores/arduino/wiring_digital.h b/cores/arduino/wiring_digital.h index ed5cb82..9c5bea8 100644 --- a/cores/arduino/wiring_digital.h +++ b/cores/arduino/wiring_digital.h @@ -26,26 +26,35 @@ extern "C" { /** * \brief Configures the specified pin to behave either as an input or an output. * - * \param dwPin The number of the pin whose mode you wish to set - * \param dwMode Either INPUT, INPUT_PULLUP or OUTPUT + * \param PinNumber The number of the pin whose mode you wish to set + * \param PinMode Either INPUT, INPUT_PULLUP or OUTPUT */ void pinMode(uint32_t PinNumber, uint32_t PinMode); +/** + * \brief Configures the specified pin to behave either as an input or an output + * using quick macros and without calling checks + * + * \param PinNumber The number of the pin whose mode you wish to set + * \param PinMode Either INPUT, INPUT_PULLUP or OUTPUT + */ +void fastPinMode(uint32_t PinNumber, uint32_t PinMode); + /** * \brief Write a HIGH or a LOW value to a digital pin. * * If the pin has been configured as an OUTPUT with pinMode(), its voltage will be set to the * corresponding value: 3.3V for HIGH, 0V (ground) for LOW. * - * \param dwPin the pin number - * \param dwVal HIGH or LOW + * \param PinNumber the pin number + * \param PinMode HIGH or LOW */ void digitalWrite(uint32_t PinNumber, uint32_t Val); /** * \brief Reads the value from a specified digital pin, either HIGH or LOW. * - * \param ulPin The number of the digital pin you want to read (int) + * \param PinNumber The number of the digital pin you want to read (int) * * \return HIGH or LOW */ @@ -54,7 +63,7 @@ int digitalRead(uint32_t PinNumber); /** * \brief Toggle the value from a specified digital pin. * - * \param ulPin The number of the digital pin you want to toggle (int) + * \param PinNumber The number of the digital pin you want to toggle (int) */ void digitalToggle(uint32_t PinNumber);