Skip to content

Commit adca790

Browse files
author
Martino Facchin
committed
pulseIn: change function signature and set width to uint_32
1 parent 43e6ed0 commit adca790

File tree

3 files changed

+281
-112
lines changed

3 files changed

+281
-112
lines changed

hardware/arduino/avr/cores/arduino/wiring_private.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ extern "C"{
4343
#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
4444
#endif
4545

46-
uint16_t countPulseASM_B(const uint8_t port, const uint8_t bit, uint16_t maxloops, uint8_t state);
47-
uint16_t countPulseASM_C(const uint8_t port, const uint8_t bit, uint16_t maxloops, uint8_t state);
48-
uint16_t countPulseASM_D(const uint8_t port, const uint8_t bit, uint16_t maxloops, uint8_t state);
46+
uint32_t countPulseASM_B(const uint8_t bit, uint8_t state, uint32_t maxloops);
47+
uint32_t countPulseASM_C(const uint8_t bit, uint8_t state, uint32_t maxloops);
48+
uint32_t countPulseASM_D(const uint8_t bit, uint8_t state, uint32_t maxloops);
4949

5050
#if defined(__AVR_ATmega1280__)||defined(__AVR_ATmega2560__)
51-
uint16_t countPulseASM_E(const uint8_t port, const uint8_t bit, uint16_t maxloops, uint8_t state);
52-
uint16_t countPulseASM_F(const uint8_t port, const uint8_t bit, uint16_t maxloops, uint8_t state);
53-
uint16_t countPulseASM_G(const uint8_t port, const uint8_t bit, uint16_t maxloops, uint8_t state);
51+
uint32_t countPulseASM_E(const uint8_t bit, uint8_t state, uint32_t maxloops);
52+
uint32_t countPulseASM_F(const uint8_t bit, uint8_t state, uint32_t maxloops);
53+
uint32_t countPulseASM_G(const uint8_t bit, uint8_t state, uint32_t maxloops);
5454
#endif
5555

5656
#define EXTERNAL_INT_0 0

0 commit comments

Comments
 (0)