Serial Wombat 4A and 4B Firmware
Public Attributes | List of all members
quadEnc_n Struct Reference

Public Attributes

uint8_t secondPin
 The Second pin used for the qudrature Encoder. More...
 
uint8_t debounceFrames
 Number of 1mS frames after a transition before another transition is recognized. More...
 
uint8_t debounceCount
 How many frames remaining before a transiton will be recognized. More...
 
uint8_t readState
 When and how to read inputs: 0: High to Low, interrupt driven. 1: Low to high, Interrupt Driven 2: Both transitions, interrupt driven. 4: High to Low, Polled. 5: Low to High, Polled. 6: Both transitions, Polled. More...
 
uint8_t tempPrimaryPinState:1
 Temporary bit that stores whether this pin is high or low (or was during interrupt) More...
 
uint8_t tempSecondPinState:1
 Temporary bit that stores whether 2nd pin is high or low (or was during interrupt) More...
 
uint8_t updateCounter:1
 Temporary bit indicating if counter needs changed based on transition of primary pin. More...
 
uint8_t lastState:1
 State of primary pin on last examination, used to detect transitions. More...
 
uint8_t ignoreRemaining:1
 Temporary bit set to ignore any additional transitions detected this frame (used for debouncing interrupt based input) More...
 

Member Data Documentation

◆ debounceCount

uint8_t quadEnc_n::debounceCount

How many frames remaining before a transiton will be recognized.

◆ debounceFrames

uint8_t quadEnc_n::debounceFrames

Number of 1mS frames after a transition before another transition is recognized.

◆ ignoreRemaining

uint8_t quadEnc_n::ignoreRemaining

Temporary bit set to ignore any additional transitions detected this frame (used for debouncing interrupt based input)

◆ lastState

uint8_t quadEnc_n::lastState

State of primary pin on last examination, used to detect transitions.

◆ readState

uint8_t quadEnc_n::readState

When and how to read inputs: 0: High to Low, interrupt driven. 1: Low to high, Interrupt Driven 2: Both transitions, interrupt driven. 4: High to Low, Polled. 5: Low to High, Polled. 6: Both transitions, Polled.

◆ secondPin

uint8_t quadEnc_n::secondPin

The Second pin used for the qudrature Encoder.

◆ tempPrimaryPinState

uint8_t quadEnc_n::tempPrimaryPinState

Temporary bit that stores whether this pin is high or low (or was during interrupt)

◆ tempSecondPinState

uint8_t quadEnc_n::tempSecondPinState

Temporary bit that stores whether 2nd pin is high or low (or was during interrupt)

◆ updateCounter

uint8_t quadEnc_n::updateCounter

Temporary bit indicating if counter needs changed based on transition of primary pin.