mux9 2.1.0.0
MUX 9 Click Driver

API for configuring and manipulating MUX 9 Click driver. More...

Topics

 MUX 9 Registers Settings
 Settings for registers of MUX 9 Click driver.
 
 MUX 9 MikroBUS Map
 MikroBUS pin mapping of MUX 9 Click driver.
 

Functions

void mux9_cfg_setup (mux9_cfg_t *cfg)
 MUX 9 configuration object setup function.
 
err_t mux9_init (mux9_t *ctx, mux9_cfg_t *cfg)
 MUX 9 initialization function.
 
void mux9_reset (mux9_t *ctx)
 MUX 9 reset function.
 
void mux9_enable (mux9_t *ctx)
 MUX 9 enable function.
 
void mux9_disable (mux9_t *ctx)
 MUX 9 disable function.
 
err_t mux9_generic_write (mux9_t *ctx, uint8_t data_in)
 MUX 9 data writing function.
 
err_t mux9_active_channel (mux9_t *ctx, uint8_t sel_ch)
 MUX 9 active channel function.
 

Detailed Description

API for configuring and manipulating MUX 9 Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ mux9_active_channel()

err_t mux9_active_channel ( mux9_t * ctx,
uint8_t sel_ch )

MUX 9 active channel function.

This function enable is the selected channel of the ADG1438B Serially Controlled, ±15 V/+12 V/±5 V, 8-Channel/4-Channel, iCMOS Multiplexers/Matrix Switches on the MUX 9 click board™.

Parameters
[in]ctx: Click context object. See mux9_t object definition for detailed explanation.
[in]sel_ch: Selection of the desired channel [1-8].
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ mux9_cfg_setup()

void mux9_cfg_setup ( mux9_cfg_t * cfg)

MUX 9 configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See mux9_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ mux9_disable()

void mux9_disable ( mux9_t * ctx)

MUX 9 disable function.

This function turns off all switches of the ADG1438B Serially Controlled, ±15 V/+12 V/±5 V, 8-Channel/4-Channel, iCMOS Multiplexers/Matrix Switches on the MUX 9 click board™.

Parameters
[in]ctx: Click context object. See mux9_t object definition for detailed explanation.
Returns
Nothing. See #err_t definition for detailed explanation.
Note
None.

◆ mux9_enable()

void mux9_enable ( mux9_t * ctx)

MUX 9 enable function.

This function turns on all switches of the ADG1438B Serially Controlled, ±15 V/+12 V/±5 V, 8-Channel/4-Channel, iCMOS Multiplexers/Matrix Switches on the MUX 9 click board™.

Parameters
[in]ctx: Click context object. See mux9_t object definition for detailed explanation.
Returns
Nothing. See #err_t definition for detailed explanation.
Note
None.

◆ mux9_generic_write()

err_t mux9_generic_write ( mux9_t * ctx,
uint8_t data_in )

MUX 9 data writing function.

This function writes a desired number of data bytes starting from the selected register by using SPI serial interface.

Parameters
[in]ctx: Click context object. See mux9_t object definition for detailed explanation.
[in]data_in: Data to be written.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ mux9_init()

err_t mux9_init ( mux9_t * ctx,
mux9_cfg_t * cfg )

MUX 9 initialization function.

This function initializes all necessary pins and peripherals used for this click board.

Parameters
[out]ctx: Click context object. See mux9_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See mux9_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ mux9_reset()

void mux9_reset ( mux9_t * ctx)

MUX 9 reset function.

This function executes the reset of the ADG1438B Serially Controlled, ±15 V/+12 V/±5 V, 8-Channel/4-Channel, iCMOS Multiplexers/Matrix Switches on the MUX 9 click board™.

Parameters
[in]ctx: Click context object. See mux9_t object definition for detailed explanation.
Returns
Nothing. See #err_t definition for detailed explanation.
Note
None.