Mux Class

class MuxClass

MuxClass. A MUX is a multiplexer that takes one or more similar inputs (bus, connection, or signal) and allows switching to one or more outputs. An analogy would be the switchboard of a telephone operator. Calls (inputs) come in and by re-connecting the input to an output, the operator (multiplexor) can direct that input to on or more outputs.

One possible output is to not connect the input to anything which essentially disables that input’s connection to anything.

Not every MUX has multiple inputs. Some may simply be a single input that can be enabled (connected to a single output) or disabled (not connected to anything).

Public Functions

MuxClass(Acroname::BrainStem::MuxClass &rcservo)

Constructor.

~MuxClass()

Destructor.

Acroname::BrainStem2CLI::MuxClass::!MuxClass()

Finalizer.

aErr getEnable(unsigned char %bEnabled)

Get the mux enable/disable status

Return

Returns common entity return values

Parameters
  • bEnabled: true: mux is enabled, false: the mux is disabled.

aErr setEnable(const unsigned char bEnable)

Enable the mux.

Return

Returns common entity return values

Parameters
  • bEnable: true: enables the mux for the selected channel.

aErr getChannel(unsigned char %channel)

Get the current selected mux channel.

Return

Returns common entity return values

Parameters
  • channel: Indicates which chanel is selected.

aErr setChannel(const unsigned char channel)

Set the current mux channel.

Return

Returns common entity return values

Parameters
  • channel: mux channel to select.

aErr getChannelVoltage(const unsigned char channel, int %microVolts)

Get the voltage of the indicated mux channel.

Note

Not all modules provide 32 bits of accuracy; Refer to the module’s datasheet to determine the analog bit depth and reference voltage.

Return

Returns common entity return values

Parameters
  • channel: The channel in which voltage was requested.

  • microVolts: 32 bit signed integer (in microVolts) based on the board’s ground and reference voltages.

aErr getConfiguration(int %config)

Get the configuration of the mux.

Return

Returns common entity return values

Parameters
  • config: integer representing the mux configuration either default, or split-mode.

aErr setConfiguration(const int config)

Set the configuration of the mux.

Return

Returns common entity return values

Parameters
  • config: integer representing the mux configuration either muxConfig_default, or muxConfig_splitMode.

aErr getSplitMode(int %splitMode)

Get the current mux mode.

Return

Returns common entity return values

Parameters
  • splitMode: integer representing the channel selection for each sub-channel within the mux. See the data-sheet for the device for specific information.

aErr setSplitMode(const int splitMode)

Set the current mux mode.

Return

Returns common entity return values

Parameters
  • splitMode: integer representing the channel selection for each sub-channel within the mux. See the data-sheet for the device for specific information.