110 result =
initPacketNoResponse(0,(uint8_t)activeMode,(uint8_t)inactiveMode, orNotAnd);
if (result < 0) {
return result; }
125 return setEntryMode(entryID, sourcePin, 0);
137 return setEntryMode(entryID, sourcePin, 1);
149 return setEntryMode(entryID, sourcePin, 2);
162 int16_t result = setEntryParams(entryID, value, 0);
if (result < 0)
return result;
163 return setEntryMode(entryID, sourcePin, 3);
176 int16_t result = setEntryParams(entryID, value, 0);
if (result < 0)
return result;
177 return setEntryMode(entryID, sourcePin, 4);
190 int16_t result = setEntryParams(entryID, value, 0);
if (result < 0)
return result;
191 return setEntryMode(entryID, sourcePin, 5);
206 int16_t result = setEntryParams(entryID, value, 0);
if (result < 0)
return result;
207 return setEntryMode(entryID, sourcePin, 6);
220 int16_t result = setEntryParams(entryID, secondPin, 0);
if (result < 0)
return result;
221 return setEntryMode(entryID, sourcePin, 7);
235 int16_t result = setEntryParams(entryID, secondPin, 0);
if (result < 0)
return result;
236 return setEntryMode(entryID, sourcePin, 10);
317 int16_t setEntryParams(uint8_t entryID, uint16_t firstParam, uint16_t secondParam)
321 int16_t setEntryMode(uint8_t entryID, uint8_t
pin, uint8_t mode)
#define SW_LE16(_a)
Convert a uint16_t to two bytes in little endian format for array initialization.
@ PIN_MODE_PULSE_ON_CHANGE
(25)
Class for a Serial Wombat chip. Each Serial Wombat chip on a project should have its own instance.
This class name is depricated. Do not use for new development. Use SerialWombatChip instead.
SerialWombatPin(SerialWombatChip &serialWombatChip)
Instantiates a Serial Wombat Pin.
int16_t initPacketNoResponse(uint8_t packetNumber, uint8_t param0=0x55, uint8_t param1=0x55, uint8_t param2=0x55, uint8_t param3=0x55, uint8_t param4=0x55)
uint8_t pin()
Returns the current SW pin number. Used primarily for virtual calls by derived classes.
int16_t setEntryOnPinsEqual(uint8_t entryID, uint8_t sourcePin, uint8_t secondPin)
Configure a change entry to pulse when a pin or public data equals a second pin or public data's valu...
int16_t setEntryOnGreaterThanValue(uint8_t entryID, uint8_t sourcePin, uint16_t value)
Configure a change entry to pulse when a pin or public data is above a specified value.
int16_t setEntryOnPinOutsideRange(uint8_t entryID, uint8_t sourcePin, uint16_t lowValue, uint16_t highValue)
Configure a change entry to pulse when a pin or public data is within a specified range.
int16_t setEntryOnPinCrossDescending(uint8_t entryID, uint8_t sourcePin, uint16_t value)
Configure a change entry to pulse when a pin or public data falls below a specified value.
int16_t setEntryOnIncrease(uint8_t entryID, uint8_t sourcePin)
Configure a change entry to pulse when a pin or public data increases.
int16_t setEntryOnEqualValue(uint8_t entryID, uint8_t sourcePin, uint16_t value)
Configure a change entry to pulse when a pin or public data equals a specified value.
int16_t setEntryOnNotEqualValue(uint8_t entryID, uint8_t sourcePin, uint16_t value)
Configure a change entry to pulse when a pin or public data is not equal to a specified value.
int16_t begin(uint8_t pin, SerialWombatPinState_t activeMode=SW_HIGH, SerialWombatPinState_t inactiveMode=SW_LOW, uint16_t pulseOnTime=50, uint16_t pulseOffTime=50, uint8_t orNotAnd=1, uint16_t PWMperiod=0, uint16_t PWMdutyCycle=0x8000)
Initialization routine for SerialWombatPulseOnChange.
int16_t setEntryOnPinGTPin(uint8_t entryID, uint8_t sourcePin, uint8_t secondPin)
Configure a change entry to pulse when a pin or public data is greater than a second pin or public da...
int16_t setEntryOnPinLTPin(uint8_t entryID, uint8_t sourcePin, uint8_t secondPin)
Configure a change entry to pulse when a pin or public data is less than a second pin or public data'...
int16_t setEntryOnPinsNotEqual(uint8_t entryID, uint8_t sourcePin, uint8_t secondPin)
Configure a change entry to pulse when a pin or public data is not equal to a second pin or public da...
int16_t setEntryOnPinCrossAscending(uint8_t entryID, uint8_t sourcePin, uint16_t value)
Configure a change entry to pulse when a pin or public data rises above a specified value.
int16_t setEntryOnDecrease(uint8_t entryID, uint8_t sourcePin)
Configure a change entry to pulse when a pin or public data Decreases.
int16_t setEntryOnPinWithinRange(uint8_t entryID, uint8_t sourcePin, uint16_t lowValue, uint16_t highValue)
Configure a change entry to pulse when a pin or public data is within a specified range.
SerialWombatPulseOnChange(SerialWombatChip &serialWombat)
Class constructor for SerialWombatPulseOnChange.
int16_t setEntryOnLessThanValue(uint8_t entryID, uint8_t sourcePin, uint16_t value)
Configure a change entry to pulse when a pin or public data is below a specified value.
int16_t setEntryOnChange(uint8_t entryID, uint8_t sourcePin)
Configure a change entry to pulse when a pin or public data changes.
int16_t setEntryOnPinCrossValue(uint8_t entryID, uint8_t sourcePin, uint16_t value)
Configure a change entry to pulse when a pin or public data crosses a specified value.