|
Serial Wombat Arduino Library
|
A class representing a Serial Wombat Blink Output. More...
#include <SerialWombatBlink.h>


Public Member Functions | |
| SerialWombatBlink (SerialWombatChip &serialWombat) | |
| Constructor for SerialWombatBlink class. | |
| int16_t | begin (uint8_t pin, uint8_t publicDataSource) |
| Initialize a pin that has been declared as Blink. | |
| int16_t | begin (uint8_t pin, SerialWombatDataSource publicDataSource) |
| Initialize a pin that has been declared as Blink. | |
Public Member Functions inherited from SerialWombatPin | |
| SerialWombatPin (SerialWombatChip &serialWombatChip) | |
| Instantiates a Serial Wombat Pin. | |
| SerialWombatPin (SerialWombatChip &serialWombatChip, uint8_t pin) | |
| Instantiates a Serial Wombat Pin. | |
| uint16_t | readPublicData () |
| Read the 16 Bit public data associated with this pin. | |
| void | pinMode (uint8_t mode, bool pullDown=false, bool openDrain=false) |
| Set pin to INPUT or OUTPUT, with options for pull Ups and open Drain settings. | |
| void | digitalWrite (uint8_t val) |
| Set output pin High or Low. | |
| int | digitalRead () |
| Reads the state of the Pin. | |
| uint16_t | writePublicData (uint16_t value) |
| Write a 16 bit value to this pin. | |
| uint8_t | pin () |
| Returns the current SW pin number. Used primarily for virtual calls by derived classes. | |
| uint8_t | swPinModeNumber () |
| Returns the Mode number. Used primarily by derived classes to populate packet data. | |
| 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) |
| int16_t | initPacketNoResponse (uint8_t packetNumber, uint16_t param0=0x55, uint8_t param1=0x55, uint8_t param2=0x55, uint8_t param3=0x55) |
| int16_t | initPacketNoResponse (uint8_t packetNumber, uint16_t param0, uint16_t param1, uint8_t param2=0x55) |
| int16_t | disable () |
| Disables the pin mode (if applicable) | |
| int16_t | enablePullup (bool enabled) |
| Enables the weak pull up on a pin. Implemented on SW18AB and SW8B only. | |
| int16_t | enablePulldown (bool enabled) |
| Enables the weak pull down on a pin. Implemented on SW18AB and SW8B only. | |
| int16_t | enableOpenDrain (bool enabled) |
| Enables open drain mode on a pin. Implemented on SW18AB and SW8B only. | |
| int16_t | forceDMA (bool enabled) |
| Forces use of DMA instead of hardware timing resources on SW18AB. | |
| void | setPinNumberForTesting (uint8_t pin) |
| A function designed for testing only. May have unpredictable results if used in real time. Not intended for general use. | |
Additional Inherited Members | |
Protected Attributes inherited from SerialWombatPin | |
| uint8_t | _pin = 255 |
| SerialWombatChip & | _sw |
| uint8_t | _pinMode = 0 |
A class representing a Serial Wombat Blink Output.
An instance of this class should be declared for each pin to be used as a Serial Wombat Blink Output.
This is a very simple pin mode that sets an output high for at least 30mS each time a public data value changes. Otherwise the pin is digital low.
A constantly changing output can cause this pin to remain high (the 30mS timer is reset to 30 each time the public data input changes.
The public data of this pin indicates how many mS of on time remain.
This pin mode exists to provide a blink option using very little microcontroller flash space, so it can be included with all SW8B builds. See the SerialWombatPulseOnChange pin mode for a much more powerful and configurable version.
Definition at line 52 of file SerialWombatBlink.h.
|
inline |
Constructor for SerialWombatBlink class.
| serialWombat | SerialWombat chip on which the Blink output will run |
Definition at line 59 of file SerialWombatBlink.h.
|
inline |
Initialize a pin that has been declared as Blink.
| pin | Pin to initialize to Blink mode. |
| publicDataSource | Pin that will cause a blink if it changes. |
Definition at line 80 of file SerialWombatBlink.h.
|
inline |
Initialize a pin that has been declared as Blink.
| pin | Pin to initialize to Blink mode. |
| publicDataSource | Pin that will cause a blink if it changes. |
Definition at line 67 of file SerialWombatBlink.h.