diff options
author | David Madison <dmadison@users.noreply.github.com> | 2020-02-01 04:25:52 -0500 |
---|---|---|
committer | David Madison <dmadison@users.noreply.github.com> | 2020-02-01 04:25:52 -0500 |
commit | 923b4441fed740c5ff1e42bb8f2f58ea87d4eaf7 (patch) | |
tree | 39aad14af9ba55cc9f26f2920f6ff873552f4c62 /cores/arduino/Arduino.h | |
parent | 59dd6085ec8ec0a5438c1019e982fefb77f485d3 (diff) | |
parent | 0e7fae85bdfbab43242374c0289cdd806d13b0bc (diff) |
Merge ArduinoCore-avr Release 1.8.2
Diffstat (limited to 'cores/arduino/Arduino.h')
-rw-r--r-- | cores/arduino/Arduino.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/cores/arduino/Arduino.h b/cores/arduino/Arduino.h index 09c1448..91eeb16 100644 --- a/cores/arduino/Arduino.h +++ b/cores/arduino/Arduino.h @@ -111,7 +111,8 @@ void yield(void); #define bitRead(value, bit) (((value) >> (bit)) & 0x01) #define bitSet(value, bit) ((value) |= (1UL << (bit))) #define bitClear(value, bit) ((value) &= ~(1UL << (bit))) -#define bitWrite(value, bit, bitvalue) (bitvalue ? bitSet(value, bit) : bitClear(value, bit)) +#define bitToggle(value, bit) ((value) ^= (1UL << (bit))) +#define bitWrite(value, bit, bitvalue) ((bitvalue) ? bitSet(value, bit) : bitClear(value, bit)) // avr-libc defines _NOP() since 1.6.2 #ifndef _NOP @@ -130,16 +131,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 +148,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); |