Serial Wombat Arduino Library

Loading...
Searching...
No Matches
PCB0048_Mux.h
Go to the documentation of this file.
1#pragma once
2/*
3 Copyright 2026 Broadwell Consulting Inc.
4
5"Serial Wombat" is a registered trademark of Broadwell Consulting Inc. in
6 the United States. See SerialWombat.com for usage guidance.
7
8 Permission is hereby granted, free of charge, to any person obtaining a
9 copy of this software and associated documentation files (the "Software"),
10 to deal in the Software without restriction, including without limitation
11 the rights to use, copy, modify, merge, publish, distribute, sublicense,
12 and/or sell copies of the Software, and to permit persons to whom the
13 Software is furnished to do so, subject to the following conditions:
14
15 The above copyright notice and this permission notice shall be included in
16 all copies or substantial portions of the Software.
17
18 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
21 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
22 OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
23 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24 OTHER DEALINGS IN THE SOFTWARE.
25*/
29#include "SerialWombat.h"
30
69
70 class PCB0048_Mux : public SerialWombatChip
71{
72 public:
73 PCB0048_Mux() : SerialWombatChip(), bus1(*this), bus2(*this), bus3(*this), bus7(*this)
74 {}
75
76 SerialWombatDigitalOutput_18AB bus1, bus2,bus3,bus7;
77
78
79
80
89 int16_t begin(uint8_t i2cAddress)
90 {
91 SerialWombatChip::begin(Wire, i2cAddress, true);
92 bus1.begin(1);
93 bus2.begin(2);
94 bus3.begin(3);
95 bus7.begin(7);
96 return (0);
97 }
98
99
100
101 private:
102};
103
SerialWombat.h
PCB0048_Mux::bus7
SerialWombatDigitalOutput_18AB bus7
Definition PCB0048_Mux.h:76
PCB0048_Mux::bus1
SerialWombatDigitalOutput_18AB bus1
Definition PCB0048_Mux.h:76
PCB0048_Mux::PCB0048_Mux
PCB0048_Mux()
Definition PCB0048_Mux.h:73
PCB0048_Mux::begin
int16_t begin(uint8_t i2cAddress)
Initialize a PCB0048_Mux pcb on a given I2C address.
Definition PCB0048_Mux.h:89
PCB0048_Mux::bus3
SerialWombatDigitalOutput_18AB bus3
Definition PCB0048_Mux.h:76
PCB0048_Mux::bus2
SerialWombatDigitalOutput_18AB bus2
Definition PCB0048_Mux.h:76
SerialWombatChip::SerialWombatChip
SerialWombatChip()
Definition SerialWombat.cpp:31
SerialWombatChip::begin
int16_t begin(HardwareSerial &serial, bool reset=true)
initialize a Serial Wombat chip to use a Serial Interface.
Definition SerialWombat.h:550
SerialWombatDigitalOutput_18AB
Definition SerialWombatDigitalOutput.h:28