![]() |
Serial Wombat Arduino Library
|
extends the SerialWombatPulseTimer class with SW18AB specific functionality More...
#include <SerialWombatPulseTimer.h>
Public Types | |
enum | publicDataOutput { HIGH_TIME = 0, LOW_TIME = 1, PULSE_COUNT = 2, PERIOD_ON_LTH_TRANSITION = 3, PERIOD_ON_HTL_TRANSITION = 4, FREQUENCY_ON_LTH_TRANSITION = 5, FREQUENCY_ON_HTL_TRANSITION = 6, DUTYCYCLE_ON_LTH_TRANSITION = 7, DUTYCYCLE_ON_HTL_TRANSITION = 8 } |
Public Member Functions | |
SerialWombatPulseTimer_18AB (SerialWombatChip &serialWombat) | |
constructor for SerialWombatPulseTimer_18AB More... | |
int16_t | configurePublicDataOutput (SerialWombatPulseTimer_18AB::publicDataOutput publicDataOutput) |
configures which measurement is the Public Data Output of this pin mode More... | |
![]() | |
SerialWombatPulseTimer (SerialWombatChip &serialWombat) | |
Class constructor for SerialWombatPulseTimer. More... | |
void | begin (uint8_t pin, SerialWombatPulseTimerUnits units=SW_PULSETIMER_uS, bool pullUpEnabled=false) |
Initialization routine for SerialWombatPulseTimer. More... | |
void | refresh () |
Retreive the latest values for HighCounts, LowCounts, Pulses, and MeasurementOverflowOccured. More... | |
void | refreshHighCountsLowCounts () |
Retreive the High and Low counts from the Serial Wombat chip in a single transaction. More... | |
void | refreshHighCountsPulses () |
Retreive the High counts and number of pulses Serial Wombat chip in a single transaction. More... | |
uint16_t | readHighCounts () |
Retreives the most recent Counts in the configured units for the most recent high pulse. More... | |
uint16_t | readLowCounts () |
Retreives the most recent Counts in the configured units for the most recent low pulse. More... | |
uint16_t | readPulses () |
Retreives the number of pulses. More... | |
![]() | |
SerialWombatPin (SerialWombatChip &serialWombatChip) | |
Instantiates a Serial Wombat Pin. More... | |
SerialWombatPin (SerialWombatChip &serialWombatChip, uint8_t pin) | |
Instantiates a Serial Wombat Pin. More... | |
uint16_t | readPublicData () |
Read the 16 Bit public data associated with this pin. More... | |
void | pinMode (uint8_t mode) |
Set pin to INPUT or OUTPUT. More... | |
void | pinMode (uint8_t mode, bool pullDown, bool openDrain) |
Set pin to INPUT or OUTPUT, with options for pull Ups and open Drain settings. More... | |
void | digitalWrite (uint8_t val) |
Set output pin High or Low. More... | |
int | digitalRead () |
Reads the state of the Pin. More... | |
uint16_t | writePublicData (uint16_t value) |
Write a 16 bit value to this pin. More... | |
uint8_t | pin () |
Returns the current SW pin number. Used primarily for virtual calls by derived classes. More... | |
uint8_t | swPinModeNumber () |
Returns the Mode number. Used primarily by derived classes to populate packet data. More... | |
Additional Inherited Members | |
![]() | |
uint16_t | HighCounts = 0 |
Count in selected units of last retreived high pulse. More... | |
uint16_t | LowCounts = 0 |
Count in selected units of last retreived low pulse. More... | |
uint16_t | Pulses = 0 |
Count of last retreived pulses. More... | |
bool | MeasurementOverflowOccurred = false |
![]() | |
uint8_t | _pin = 255 |
SerialWombatChip & | _sw |
uint8_t | _pinMode = 0 |
extends the SerialWombatPulseTimer class with SW18AB specific functionality
This class adds functionality that is specific to the SW18AB firmware in addition to generic SerialWombatPulseTimer functionality avaialble on all Serial Wombat chips
SerialWombatPulseTimer_18AB::SerialWombatPulseTimer_18AB | ( | SerialWombatChip & | serialWombat | ) |
constructor for SerialWombatPulseTimer_18AB
serialWombat | reference to the SerialWombat chip on which the SerialWombatPulseTimer_18AB will run |
int16_t SerialWombatPulseTimer_18AB::configurePublicDataOutput | ( | SerialWombatPulseTimer_18AB::publicDataOutput | publicDataOutput | ) |
configures which measurement is the Public Data Output of this pin mode
This function sets what data is avaialble through the public data This function is only avaialble on the Serial Wombat 18AB chip
publicDataOutput | An enumerated type indicating what data to output |