Serial Wombat Arduino Library
SerialWombatThroughputConsumer.h
Go to the documentation of this file.
1 #pragma once
2 /*
3 Copyright 2021 Broadwell Consulting Inc.
4 
5 Serial Wombat is a registered trademark of Broadwell Consulting Inc. in the United States.
6 
7 Permission is hereby granted, free of charge, to any person obtaining a
8  * copy of this software and associated documentation files (the "Software"),
9  * to deal in the Software without restriction, including without limitation
10  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
11  * and/or sell copies of the Software, and to permit persons to whom the
12  * Software is furnished to do so, subject to the following conditions:
13 
14 The above copyright notice and this permission notice shall be included in
15  * all copies or substantial portions of the Software.
16 
17 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
21  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
22  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23  * OTHER DEALINGS IN THE SOFTWARE.
24 */
25 
26 #include <stdint.h>
27 #include "SerialWombat.h"
28 
29 
43 {
44 public:
48 
52  int16_t begin(uint8_t pin);
53 
54 
60  int16_t writeAll(uint16_t delay);
61 
68  int16_t write(uint8_t frame, uint16_t delay);
69 
70 
76  int16_t delayInCommProcessing(uint16_t delay);
77 private:
78 
79 };
80 
SerialWombatChip
Class for a Serial Wombat chip. Each Serial Wombat chip on a project should have its own instance.
Definition: SerialWombat.h:267
SerialWombatThroughputConsumer::write
int16_t write(uint8_t frame, uint16_t delay)
Set a frame delay time to a specified number of uS.
Definition: SerialWombatThroughputConsumer.cpp:58
SerialWombatThroughputConsumer::delayInCommProcessing
int16_t delayInCommProcessing(uint16_t delay)
Delay a specified number of uS within the packet processing routine.
Definition: SerialWombatThroughputConsumer.cpp:68
SerialWombat.h
SerialWombatPin
Describes a Serial Wombat Pin. Is base class for other pin modes.
Definition: SerialWombat.h:727
SerialWombatPin::pin
uint8_t pin()
Returns the current SW pin number. Used primarily for virtual calls by derived classes.
Definition: SerialWombat.h:789
SerialWombatThroughputConsumer::SerialWombatThroughputConsumer
SerialWombatThroughputConsumer(SerialWombatChip &serialWombat)
Constructor for SerialWombatThroughputConsumer class.
Definition: SerialWombatThroughputConsumer.cpp:26
SerialWombatThroughputConsumer::writeAll
int16_t writeAll(uint16_t delay)
Set all delay times to a specified number of uS.
Definition: SerialWombatThroughputConsumer.cpp:40
SerialWombatThroughputConsumer
A Class that consumes CPU time on the Serial Wombat chip in order to facilitate testing.
Definition: SerialWombatThroughputConsumer.h:42
SerialWombatThroughputConsumer::begin
int16_t begin(uint8_t pin)
Initialize an instance of the Throughput Conumer class. All delays are set to 0.
Definition: SerialWombatThroughputConsumer.cpp:31