Serial Wombat Arduino Library
Loading...
Searching...
No Matches
SerialWombat.h File Reference
Include dependency graph for SerialWombat.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  SerialWombatChip
 Class for a Serial Wombat chip. Each Serial Wombat chip on a project should have its own instance. More...
 
class  SerialWombat18ABOscillatorTuner
 A class which tunes the oscillator on a Serial Wombat 18AB chip. More...
 
class  SerialWombat
 This class name is depricated. Do not use for new development. Use SerialWombatChip instead. More...
 

Macros

#define SW_LE16(_a)
 Convert a uint16_t to two bytes in little endian format for array initialization.
 
#define SW_LE32(_a)
 Convert a uint32_t to four bytes in little endian format for array initialization.
 
#define ARRAY_UINT32(_array, _index)
 
#define SW18AB_LATEST_FIRMWARE   214
 
#define SW08B_LATEST_FIRMWARE   215
 
#define SW4B_LATEST_FIRMWARE   203
 
#define ERROR_HOST_INCORRECT_NUMBER_BYTES_WRITTEN   0x10000
 Write routine returned wrong number of bytes.
 
#define ERROR_HOST_DATA_TOO_LONG   0x10001
 endTransmission returned data too long
 
#define ERROR_HOST_NACK_ADDRESS   0x10002
 endTransmission returned address NACK
 
#define ERROR_HOST_NACK_DATA   0x10003
 endTransmission returned data NACK
 
#define ERROR_HOST_OTHER_I2C_ERROR   0x10004
 endTransmission returned other error
 
#define WOMBAT_MAXIMUM_PINS   20
 

Typedefs

typedef void(* SerialWombatErrorHandler_t) (uint16_t errorNumber, SerialWombatChip *sw)
 

Enumerations

enum  SerialWombatPinState_t { SW_LOW = 0 , SW_HIGH = 1 , SW_INPUT = 2 }
 
enum class  SerialWombatDataSource {
  SW_DATA_SOURCE_PIN_0 = 0 , SW_DATA_SOURCE_PIN_1 = 1 , SW_DATA_SOURCE_PIN_2 = 2 , SW_DATA_SOURCE_PIN_3 = 3 ,
  SW_DATA_SOURCE_PIN_4 = 4 , SW_DATA_SOURCE_PIN_5 = 5 , SW_DATA_SOURCE_PIN_6 = 6 , SW_DATA_SOURCE_PIN_7 = 7 ,
  SW_DATA_SOURCE_PIN_8 = 8 , SW_DATA_SOURCE_PIN_9 = 9 , SW_DATA_SOURCE_PIN_10 = 10 , SW_DATA_SOURCE_PIN_11 = 11 ,
  SW_DATA_SOURCE_PIN_12 = 12 , SW_DATA_SOURCE_PIN_13 = 13 , SW_DATA_SOURCE_PIN_14 = 14 , SW_DATA_SOURCE_PIN_15 = 15 ,
  SW_DATA_SOURCE_PIN_16 = 16 , SW_DATA_SOURCE_PIN_17 = 17 , SW_DATA_SOURCE_PIN_18 = 18 , SW_DATA_SOURCE_PIN_19 = 19 ,
  SW_DATA_SOURCE_INCREMENTING_NUMBER = 65 , SW_DATA_SOURCE_1024mvCounts = 66 , SW_DATA_SOURCE_FRAMES_RUN_LSW = 67 , SW_DATA_SOURCE_FRAMES_RUN_MSW = 68 ,
  SW_DATA_SOURCE_OVERRUN_FRAMES = 69 , SW_DATA_SOURCE_TEMPERATURE = 70 , SW_DATA_SOURCE_PACKETS_RECEIVED = 71 , SW_DATA_SOURCE_ERRORS = 72 ,
  SW_DATA_SOURCE_DROPPED_FRAMES = 73 , SW_DATA_SOURCE_SYSTEM_UTILIZATION = 74 , SW_DATA_SOURCE_VCC_mVOLTS = 75 , SW_DATA_SOURCE_VBG_COUNTS_VS_VREF = 76 ,
  SW_DATA_SOURCE_LFSR = 78 , SW_DATA_SOURCE_0x55 = 85 , SW_DATA_SOURCE_PIN_0_MV = 100 , SW_DATA_SOURCE_PIN_1_MV = 101 ,
  SW_DATA_SOURCE_PIN_2_MV = 102 , SW_DATA_SOURCE_PIN_3_MV = 103 , SW_DATA_SOURCE_PIN_4_MV = 104 , SW_DATA_SOURCE_PIN_16_MV = 116 ,
  SW_DATA_SOURCE_PIN_17_MV = 117 , SW_DATA_SOURCE_PIN_18_MV = 118 , SW_DATA_SOURCE_PIN_19_MV = 119 , SW_DATA_SOURCE_2HZ_SQUARE = 164 ,
  SW_DATA_SOURCE_2HZ_SAW = 165 , SW_DATA_SOURCE_1HZ_SQUARE = 167 , SW_DATA_SOURCE_1HZ_SAW = 168 , SW_DATA_SOURCE_2SEC_SQUARE = 170 ,
  SW_DATA_SOURCE_2SEC_SAW = 171 , SW_DATA_SOURCE_8SEC_SQUARE = 173 , SW_DATA_SOURCE_8SEC_SAW = 174 , SW_DATA_SOURCE_65SEC_SQUARE = 176 ,
  SW_DATA_SOURCE_65SEC_SAW = 177 , SW_DATA_SOURCE_NONE = 255
}
 A list of Serial Wombat public data sources. More...
 
enum class  SerialWombatCommands {
  CMD_ECHO ='!' , CMD_READ_BUFFER_ASCII = 'G' , CMD_ASCII_SET_PIN ='P' , CMD_RESET = 'R' ,
  CMD_SET_BUFFER_ASCII = 'S' , CMD_RESYNC = 'U' , CMD_VERSION = 'V' , CMD_SUPPLYVOLTAGE = 'v' ,
  COMMAND_BINARY_READ_PIN_BUFFFER = 0x81 , COMMAND_BINARY_SET_PIN_BUFFFER = 0x82 , COMMAND_BINARY_READ_USER_BUFFER = 0x83 , COMMAND_BINARY_WRITE_USER_BUFFER = 0x84 ,
  COMMAND_BINARY_WRITE_USER_BUFFER_CONTINUE = 0x85 , COMMAND_BINARY_PIN_POLL_THRESHOLD = 0x8F , COMMAND_BINARY_QUEUE_INITIALIZE = 0x90 , COMMAND_BINARY_QUEUE_ADD_BYTES = 0x91 ,
  COMMAND_BINARY_QUEUE_ADD_7BYTES = 0x92 , COMMAND_BINARY_QUEUE_READ_BYTES = 0x93 , COMMAND_BINARY_QUEUE_INFORMATION = 0x94 , COMMAND_BINARY_QUEUE_CLONE = 0x95 ,
  COMMAND_BINARY_CONFIG_DATALOGGER = 0x96 , COMMAND_BINARY_CONFIGURE = 0x9F , COMMAND_BINARY_READ_RAM = 0xA0 , COMMAND_BINARY_READ_FLASH = 0xA1 ,
  COMMAND_BINARY_READ_EEPROM = 0xA2 , COMMAND_BINARY_WRITE_RAM = 0xA3 , COMMAND_BINARY_WRITE_FLASH = 0xA4 , COMMAND_CALIBRATE_ANALOG = 0xA5 ,
  COMMAND_ENABLE_2ND_UART = 0xA6 , COMMAND_READ_LAST_ERROR_PACKET = 0xA7 , COMMAND_UART0_TX_7BYTES = 0xB0 , COMMAND_UART0_RX_7BYTES = 0xB1 ,
  COMMAND_UART1_TX_7BYTES = 0xB2 , COMMAND_UART1_RX_7BYTES = 0xB3 , COMMAND_BINARY_TEST_SEQUENCE = 0xB4 , COMMAND_BINARY_RW_PIN_MEMORY = 0xB5 ,
  COMMAND_CAPTURE_STARTUP_SEQUENCE = 0xB6 , COMMAND_ADJUST_FREQUENCY = 0xB7 , COMMAND_SET_PIN_HW = 0xB8 , CONFIGURE_PIN_MODE0 = 200 ,
  CONFIGURE_PIN_MODE1 = 201 , CONFIGURE_PIN_MODE2 = 202 , CONFIGURE_PIN_MODE3 = 203 , CONFIGURE_PIN_MODE4 = 204 ,
  CONFIGURE_PIN_MODE5 = 205 , CONFIGURE_PIN_MODE6 = 206 , CONFIGURE_PIN_MODE7 = 207 , CONFIGURE_PIN_MODE8 = 208 ,
  CONFIGURE_PIN_MODE9 = 209 , CONFIGURE_PIN_MODE10 = 210 , CONFIGURE_PIN_OUTPUTSCALE = 210 , CONFIGURE_PIN_MODE_DISABLE = 219 ,
  CONFIGURE_PIN_INPUTPROCESS = 211 , CONFIGURE_PIN_MODE_HW_0 = 220 , CONFIGURE_CHANNEL_MODE_HW_1 = 221 , CONFIGURE_CHANNEL_MODE_HW_2 = 222 ,
  CONFIGURE_CHANNEL_MODE_HW_3 = 223
}
 
enum  SerialWombatPinMode_t {
  PIN_MODE_DIGITALIO = 0 , PIN_MODE_CONTROLLED = 1 , PIN_MODE_ANALOGINPUT = 2 , PIN_MODE_SERVO = 3 ,
  PIN_MODE_THROUGHPUT_CONSUMER = 4 , PIN_MODE_QUADRATUREENCODER = 5 , PIN_MODE_HBRIDGE = 6 , PIN_MODE_WATCHDOG = 7 ,
  PIN_MODE_PROTECTED_OUTPUT = 8 , PIN_MODE_DEBOUNCE = 10 , PIN_MODE_TM1637 = 11 , PIN_MODE_WS2812 = 12 ,
  PIN_MODE_SW_UART = 13 , PIN_MODE_INPUT_PROCESSOR = 14 , PIN_MODE_MATRIX_KEYPAD = 15 , PIN_MODE_PWM = 16 ,
  PIN_MODE_UART_RX_TX = 17 , PIN_MODE_PULSETIMER = 18 , PIN_MODE_FRAME_TIMER = 21 , PIN_MODE_SW18AB_CAPTOUCH = 22 ,
  PIN_MODE_UART1_RX_TX = 23 , PIN_MODE_RESISTANCEINPUT = 24 , PIN_MODE_PULSE_ON_CHANGE = 25 , PIN_MODE_HS_SERVO = 26 ,
  PIN_MODE_ULTRASONIC_DISTANCE = 27 , PIN_MODE_LIQUIDCRYSTAL = 28 , PIN_MODE_HS_CLOCK = 29 , PIN_MODE_HS_COUNTER = 30 ,
  PIN_MODE_VGA = 31 , PIN_MODE_PS2KEYBOARD = 32 , PIN_MODE_I2C_CONTROLLER = 33 , PIN_MODE_QUEUED_PULSE_OUTPUT = 34 ,
  PIN_MODE_FREQUENCY_OUTPUT = 36 , PIN_MODE_UNKNOWN = 255
}
 

Functions

void SerialWombatSerialErrorHandlerBrief (uint16_t error, SerialWombatChip *sw)
 a sample error handler that can be registered with registerErrorHandler to report protocol errors on Serial.
 
void SerialWombatSerialErrorHandlerVerbose (uint16_t error, SerialWombatChip *sw)
 

Macro Definition Documentation

◆ ARRAY_UINT32

#define ARRAY_UINT32 ( _array,
_index )
Value:
((((uint32_t) _array[_index +3])<<24) + (((uint32_t) _array[_index +2])<<16) + (((uint32_t) _array[_index +1])<<8) + _array[_index])

Definition at line 46 of file SerialWombat.h.

◆ ERROR_HOST_DATA_TOO_LONG

#define ERROR_HOST_DATA_TOO_LONG   0x10001

endTransmission returned data too long

Definition at line 179 of file SerialWombat.h.

◆ ERROR_HOST_INCORRECT_NUMBER_BYTES_WRITTEN

#define ERROR_HOST_INCORRECT_NUMBER_BYTES_WRITTEN   0x10000

Write routine returned wrong number of bytes.

Definition at line 178 of file SerialWombat.h.

◆ ERROR_HOST_NACK_ADDRESS

#define ERROR_HOST_NACK_ADDRESS   0x10002

endTransmission returned address NACK

Definition at line 180 of file SerialWombat.h.

◆ ERROR_HOST_NACK_DATA

#define ERROR_HOST_NACK_DATA   0x10003

endTransmission returned data NACK

Definition at line 181 of file SerialWombat.h.

◆ ERROR_HOST_OTHER_I2C_ERROR

#define ERROR_HOST_OTHER_I2C_ERROR   0x10004

endTransmission returned other error

Definition at line 182 of file SerialWombat.h.

◆ SW08B_LATEST_FIRMWARE

#define SW08B_LATEST_FIRMWARE   215

Definition at line 48 of file SerialWombat.h.

◆ SW18AB_LATEST_FIRMWARE

#define SW18AB_LATEST_FIRMWARE   214

Definition at line 47 of file SerialWombat.h.

◆ SW4B_LATEST_FIRMWARE

#define SW4B_LATEST_FIRMWARE   203

Definition at line 49 of file SerialWombat.h.

◆ SW_LE16

#define SW_LE16 ( _a)
Value:
(uint8_t)((_a) & 0xFF), (uint8_t)((_a) >>8)

Convert a uint16_t to two bytes in little endian format for array initialization.

Definition at line 41 of file SerialWombat.h.

◆ SW_LE32

#define SW_LE32 ( _a)
Value:
(uint8_t)((_a) & 0xFF), (uint8_t)((_a) >>8) , (uint8_t)((_a) >>16), (uint8_t)((_a) >>24)

Convert a uint32_t to four bytes in little endian format for array initialization.

Definition at line 44 of file SerialWombat.h.

◆ WOMBAT_MAXIMUM_PINS

#define WOMBAT_MAXIMUM_PINS   20

Definition at line 184 of file SerialWombat.h.

Typedef Documentation

◆ SerialWombatErrorHandler_t

typedef void(* SerialWombatErrorHandler_t) (uint16_t errorNumber, SerialWombatChip *sw)

Definition at line 288 of file SerialWombat.h.

Enumeration Type Documentation

◆ SerialWombatCommands

enum class SerialWombatCommands
strong
Enumerator
CMD_ECHO 

('!')

CMD_READ_BUFFER_ASCII 

('G')

CMD_ASCII_SET_PIN 

('P')

CMD_RESET 

('R')

CMD_SET_BUFFER_ASCII 

('S')

CMD_RESYNC 

('U')

CMD_VERSION 

('V')

CMD_SUPPLYVOLTAGE 

('v')

COMMAND_BINARY_READ_PIN_BUFFFER 

(0x81)

COMMAND_BINARY_SET_PIN_BUFFFER 

(0x82)

COMMAND_BINARY_READ_USER_BUFFER 

(0x83)

COMMAND_BINARY_WRITE_USER_BUFFER 

(0x84)

COMMAND_BINARY_WRITE_USER_BUFFER_CONTINUE 

(0x85)

COMMAND_BINARY_PIN_POLL_THRESHOLD 

(0x8F)

COMMAND_BINARY_QUEUE_INITIALIZE 

(0x90)

COMMAND_BINARY_QUEUE_ADD_BYTES 

(0x91)

COMMAND_BINARY_QUEUE_ADD_7BYTES 

(0x92)

COMMAND_BINARY_QUEUE_READ_BYTES 

(0x93)

COMMAND_BINARY_QUEUE_INFORMATION 

(0x94)

COMMAND_BINARY_QUEUE_CLONE 

(0x95)

COMMAND_BINARY_CONFIG_DATALOGGER 

(0x96)

COMMAND_BINARY_CONFIGURE 

(0x9F)

COMMAND_BINARY_READ_RAM 

(0xA0)

COMMAND_BINARY_READ_FLASH 

(0xA1)

COMMAND_BINARY_READ_EEPROM 

(0xA2)

COMMAND_BINARY_WRITE_RAM 

(0xA3)

COMMAND_BINARY_WRITE_FLASH 

(0xA4)

COMMAND_CALIBRATE_ANALOG 

(0xA5)

COMMAND_ENABLE_2ND_UART 

(0xA6)

COMMAND_READ_LAST_ERROR_PACKET 

(0xA7)

COMMAND_UART0_TX_7BYTES 

(0xB0)

COMMAND_UART0_RX_7BYTES 

(0xB1)

COMMAND_UART1_TX_7BYTES 

(0xB2)

COMMAND_UART1_RX_7BYTES 

(0xB3)

COMMAND_BINARY_TEST_SEQUENCE 

(0xB4)

COMMAND_BINARY_RW_PIN_MEMORY 

(0xB5)

COMMAND_CAPTURE_STARTUP_SEQUENCE 

(0xB6)

COMMAND_ADJUST_FREQUENCY 

(0xB7)

COMMAND_SET_PIN_HW 

(0xB8)

CONFIGURE_PIN_MODE0 

(200)

CONFIGURE_PIN_MODE1 

(201)

CONFIGURE_PIN_MODE2 

(202)

CONFIGURE_PIN_MODE3 

(203)

CONFIGURE_PIN_MODE4 

(204)

CONFIGURE_PIN_MODE5 

(205)

CONFIGURE_PIN_MODE6 

(206)

CONFIGURE_PIN_MODE7 

(207)

CONFIGURE_PIN_MODE8 

(208)

CONFIGURE_PIN_MODE9 

(209)

CONFIGURE_PIN_MODE10 

(210)

CONFIGURE_PIN_OUTPUTSCALE 

(210)

CONFIGURE_PIN_MODE_DISABLE 

(219)

CONFIGURE_PIN_INPUTPROCESS 

(211)

CONFIGURE_PIN_MODE_HW_0 

(220)

CONFIGURE_CHANNEL_MODE_HW_1 

(221)

CONFIGURE_CHANNEL_MODE_HW_2 

(222)

CONFIGURE_CHANNEL_MODE_HW_3 

(223)

Definition at line 186 of file SerialWombat.h.

◆ SerialWombatDataSource

enum class SerialWombatDataSource
strong

A list of Serial Wombat public data sources.

Enumerator
SW_DATA_SOURCE_PIN_0 

(0) 16 bit public data provided by Pin 0

SW_DATA_SOURCE_PIN_1 

(1) 16 bit public data provided by Pin 1

SW_DATA_SOURCE_PIN_2 

(2) 16 bit public data provided by Pin 2

SW_DATA_SOURCE_PIN_3 

(3) 16 bit public data provided by Pin 3

SW_DATA_SOURCE_PIN_4 

(4) 16 bit public data provided by Pin 4

SW_DATA_SOURCE_PIN_5 

(5) 16 bit public data provided by Pin 5

SW_DATA_SOURCE_PIN_6 

(6) 16 bit public data provided by Pin 6

SW_DATA_SOURCE_PIN_7 

(7) 16 bit public data provided by Pin 7

SW_DATA_SOURCE_PIN_8 

(8) 16 bit public data provided by Pin 8

SW_DATA_SOURCE_PIN_9 

(9) 16 bit public data provided by Pin 9

SW_DATA_SOURCE_PIN_10 

(10) 16 bit public data provided by Pin 10

SW_DATA_SOURCE_PIN_11 

(11) 16 bit public data provided by Pin 11

SW_DATA_SOURCE_PIN_12 

(12) 16 bit public data provided by Pin 12

SW_DATA_SOURCE_PIN_13 

(13) 16 bit public data provided by Pin 13

SW_DATA_SOURCE_PIN_14 

(14) 16 bit public data provided by Pin 14

SW_DATA_SOURCE_PIN_15 

(15) 16 bit public data provided by Pin 15

SW_DATA_SOURCE_PIN_16 

(16) 16 bit public data provided by Pin 16

SW_DATA_SOURCE_PIN_17 

(17) 16 bit public data provided by Pin 17

SW_DATA_SOURCE_PIN_18 

(18) 16 bit public data provided by Pin 18

SW_DATA_SOURCE_PIN_19 

(19) 16 bit public data provided by Pin 19

SW_DATA_SOURCE_INCREMENTING_NUMBER 

(65) An number that increments each time it is accessed.

SW_DATA_SOURCE_1024mvCounts 

(66) The number of ADC counts that result from a 1.024V reading

SW_DATA_SOURCE_FRAMES_RUN_LSW 

(67) The number of frames run since reset, least significant 16 bits

SW_DATA_SOURCE_FRAMES_RUN_MSW 

(68) The number of frames run since reset, most significant 16 bits

SW_DATA_SOURCE_OVERRUN_FRAMES 

(69) The number of frames that ran more than 1mS

SW_DATA_SOURCE_TEMPERATURE 

(70)The internal core temperature expressed in 100ths deg C

SW_DATA_SOURCE_PACKETS_RECEIVED 

(71) The nubmer of incoming command packets that have been processed since reset (rolls over at 65535)

SW_DATA_SOURCE_ERRORS 

(72)The number of incoming packets that have caused errors since reset (rolls over at 65535)

SW_DATA_SOURCE_DROPPED_FRAMES 

(73) The number of times since reset that a frame ran so far behind that it crossed two subsequent 1ms boundaries, causing a permanent lost frame

SW_DATA_SOURCE_SYSTEM_UTILIZATION 

(74) A number between 0 and 65535 that scales to the average length of pin processing frames between 0 and 1000mS

SW_DATA_SOURCE_VCC_mVOLTS 

(75) The system source voltage in mV

SW_DATA_SOURCE_VBG_COUNTS_VS_VREF 

(76) A/D conversion of VBG against VRef . Used for mfg calibration

SW_DATA_SOURCE_LFSR 

(78) A Linear Feedback Shift Register that produces a Pseudo random sequence of 16 bit values

SW_DATA_SOURCE_0x55 

(85) 0x55 is a reserved value for resyncing. Returns 0x55 0x55

SW_DATA_SOURCE_PIN_0_MV 

(100) Pin 0 public output expressed in mV (for analog modes only)

SW_DATA_SOURCE_PIN_1_MV 

(101) Pin 1 public output expressed in mV (for analog modes only)

SW_DATA_SOURCE_PIN_2_MV 

(102) Pin 2 public output expressed in mV (for analog modes only)

SW_DATA_SOURCE_PIN_3_MV 

(103) Pin 3 public output expressed in mV (for analog modes only)

SW_DATA_SOURCE_PIN_4_MV 

(104) Pin 4 public output expressed in mV (for analog modes only)

SW_DATA_SOURCE_PIN_16_MV 

(116) Pin 16 public output expressed in mV (for analog modes only)

SW_DATA_SOURCE_PIN_17_MV 

(117) Pin 17 public output expressed in mV (for analog modes only)

SW_DATA_SOURCE_PIN_18_MV 

(118) Pin 18 public output expressed in mV (for analog modes only)

SW_DATA_SOURCE_PIN_19_MV 

(119) Pin 19 public output expressed in mV (for analog modes only)

SW_DATA_SOURCE_2HZ_SQUARE 

(164) Square wave that alternates between 0 and 65535 every 256 frames

SW_DATA_SOURCE_2HZ_SAW 

(165) Sawtooth wave that goes from 0 to 65535 to 0 every 512 frames

SW_DATA_SOURCE_1HZ_SQUARE 

(167) Square wave that alternates between 0 and 65535 every 512 frames

SW_DATA_SOURCE_1HZ_SAW 

(168) Sawtooth wave that goes from 0 to 65535 to 0 every 1024 frames

SW_DATA_SOURCE_2SEC_SQUARE 

(170)Square wave that alternates between 0 and 65535 every 1024 frames

SW_DATA_SOURCE_2SEC_SAW 

(171)Sawtooth wave that goes from 0 to 65535 to 0 every 2048 frames

SW_DATA_SOURCE_8SEC_SQUARE 

(173)Square wave that alternates between 0 and 65535 every 4096 frames

SW_DATA_SOURCE_8SEC_SAW 

(174)Sawtooth wave that goes from 0 to 65535 to 0 every 8192 frames

SW_DATA_SOURCE_65SEC_SQUARE 

(176) Square wave that alternates between 0 and 65535 every 32768 frames

SW_DATA_SOURCE_65SEC_SAW 

(177 )Sawtooth wave that goes from 0 to 65535 to 0 every 65536 frames

SW_DATA_SOURCE_NONE 

(255 ) Used to mean "No Source Selected"

Definition at line 60 of file SerialWombat.h.

◆ SerialWombatPinMode_t

Enumerator
PIN_MODE_DIGITALIO 

(0)

PIN_MODE_CONTROLLED 

(1)

PIN_MODE_ANALOGINPUT 

(2)

PIN_MODE_SERVO 

(3)

PIN_MODE_THROUGHPUT_CONSUMER 

(4)

PIN_MODE_QUADRATUREENCODER 

(5)

PIN_MODE_HBRIDGE 

(6)

PIN_MODE_WATCHDOG 

(7)

PIN_MODE_PROTECTED_OUTPUT 

(8)

PIN_MODE_DEBOUNCE 

(10)

PIN_MODE_TM1637 

(11)

PIN_MODE_WS2812 

(12)

PIN_MODE_SW_UART 

(13)

PIN_MODE_INPUT_PROCESSOR 

(14)

PIN_MODE_MATRIX_KEYPAD 

(15)

PIN_MODE_PWM 

(16)

PIN_MODE_UART_RX_TX 

(17)

PIN_MODE_PULSETIMER 

(18)

PIN_MODE_FRAME_TIMER 

(21)

PIN_MODE_SW18AB_CAPTOUCH 

(22)

PIN_MODE_UART1_RX_TX 

(23)

PIN_MODE_RESISTANCEINPUT 

(24)

PIN_MODE_PULSE_ON_CHANGE 

(25)

PIN_MODE_HS_SERVO 

(26)

PIN_MODE_ULTRASONIC_DISTANCE 

(27)

PIN_MODE_LIQUIDCRYSTAL 

(28)

PIN_MODE_HS_CLOCK 
PIN_MODE_HS_COUNTER 

< (29)

(30)

PIN_MODE_VGA 

(31)

PIN_MODE_PS2KEYBOARD 

(32)

PIN_MODE_I2C_CONTROLLER 

(33)

PIN_MODE_QUEUED_PULSE_OUTPUT 

(34)

PIN_MODE_FREQUENCY_OUTPUT 

(36)

PIN_MODE_UNKNOWN 

(0xFF)

Definition at line 249 of file SerialWombat.h.

◆ SerialWombatPinState_t

Enumerator
SW_LOW 
SW_HIGH 
SW_INPUT 

Definition at line 51 of file SerialWombat.h.

Function Documentation

◆ SerialWombatSerialErrorHandlerBrief()

void SerialWombatSerialErrorHandlerBrief ( uint16_t error,
SerialWombatChip * sw )

a sample error handler that can be registered with registerErrorHandler to report protocol errors on Serial.

Do not use this when using Serial to control the Serial Wombat Chip

Parameters
errorThe error number that was reported
pointerto the Serial Wombat Chip instance that generated the error

Definition at line 359 of file SerialWombat.cpp.

◆ SerialWombatSerialErrorHandlerVerbose()

void SerialWombatSerialErrorHandlerVerbose ( uint16_t error,
SerialWombatChip * sw )