From 8f752bf8c2785049eca2b546f8105ff856a06f48 Mon Sep 17 00:00:00 2001 From: "Paul R. Nash" Date: Mon, 21 Jan 2019 17:23:44 -0800 Subject: Add parameters names to common prototypes Putting the parameter names in these commonly used prototypes makes syntax help like VS Code's Intellisense work 99% more useful. Without them, it doesn't give you the names of the parameters and you have to remember the semantics yourself. :( --- cores/arduino/Arduino.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'cores') diff --git a/cores/arduino/Arduino.h b/cores/arduino/Arduino.h index 09c1448..e178cf4 100644 --- a/cores/arduino/Arduino.h +++ b/cores/arduino/Arduino.h @@ -130,16 +130,16 @@ void initVariant(void); int atexit(void (*func)()) __attribute__((weak)); -void pinMode(uint8_t, uint8_t); -void digitalWrite(uint8_t, uint8_t); -int digitalRead(uint8_t); -int analogRead(uint8_t); +void pinMode(uint8_t pin, uint8_t mode); +void digitalWrite(uint8_t pin, uint8_t val); +int digitalRead(uint8_t pin); +int analogRead(uint8_t pin); void analogReference(uint8_t mode); -void analogWrite(uint8_t, int); +void analogWrite(uint8_t pin, int val); unsigned long millis(void); unsigned long micros(void); -void delay(unsigned long); +void delay(unsigned long ms); void delayMicroseconds(unsigned int us); unsigned long pulseIn(uint8_t pin, uint8_t state, unsigned long timeout); unsigned long pulseInLong(uint8_t pin, uint8_t state, unsigned long timeout); @@ -147,8 +147,8 @@ unsigned long pulseInLong(uint8_t pin, uint8_t state, unsigned long timeout); void shiftOut(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder, uint8_t val); uint8_t shiftIn(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder); -void attachInterrupt(uint8_t, void (*)(void), int mode); -void detachInterrupt(uint8_t); +void attachInterrupt(uint8_t interruptNum, void (*userFunc)(void), int mode); +void detachInterrupt(uint8_t interruptNum); void setup(void); void loop(void); -- cgit v1.2.3-18-g5258