headphoneamp2 2.1.0.0
headphoneamp2.h File Reference

This file contains API for Headphone AMP 2 Click Driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"

Go to the source code of this file.

Data Structures

struct  headphoneamp2_t
 Headphone AMP 2 Click context object. More...
 
struct  headphoneamp2_cfg_t
 Headphone AMP 2 Click configuration object. More...
 
struct  headphoneamp2_cmd_t
 Headphone AMP 2 Click command object. More...
 

Macros

#define HEADPHONEAMP2_VOL_MUTE   0x00
 Headphone AMP 2 volume level control.
 
#define HEADPHONEAMP2_VOL_LVL_1   0x01
 
#define HEADPHONEAMP2_VOL_LVL_2   0x02
 
#define HEADPHONEAMP2_VOL_LVL_3   0x03
 
#define HEADPHONEAMP2_VOL_LVL_4   0x04
 
#define HEADPHONEAMP2_VOL_LVL_5   0x05
 
#define HEADPHONEAMP2_VOL_LVL_6   0x06
 
#define HEADPHONEAMP2_VOL_LVL_7   0x07
 
#define HEADPHONEAMP2_VOL_LVL_8   0x08
 
#define HEADPHONEAMP2_VOL_LVL_9   0x09
 
#define HEADPHONEAMP2_VOL_LVL_10   0x0A
 
#define HEADPHONEAMP2_VOL_LVL_11   0x0B
 
#define HEADPHONEAMP2_VOL_LVL_12   0x0C
 
#define HEADPHONEAMP2_VOL_LVL_13   0x0D
 
#define HEADPHONEAMP2_VOL_LVL_14   0x0E
 
#define HEADPHONEAMP2_VOL_LVL_MAX   0x0F
 
#define HEADPHONEAMP2_DEVICE_ADDRESS   0x4C
 Headphone AMP 2 device address setting.
 
#define HEADPHONEAMP2_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  headphoneamp2_cmd_ctrl_value_t { HEADPHONEAMP2_CMD_DISABLE = 0 , HEADPHONEAMP2_CMD_ENABLE }
 Headphone AMP 2 Click command mode control value data. More...
 
enum  headphoneamp2_return_value_t { HEADPHONEAMP2_OK = 0 , HEADPHONEAMP2_ERROR = -1 }
 Headphone AMP 2 Click return value data. More...
 

Functions

void headphoneamp2_cfg_setup (headphoneamp2_cfg_t *cfg)
 Headphone AMP 2 configuration object setup function.
 
err_t headphoneamp2_init (headphoneamp2_t *ctx, headphoneamp2_cfg_t *cfg)
 Headphone AMP 2 initialization function.
 
err_t headphoneamp2_default_cfg (headphoneamp2_t *ctx)
 Headphone AMP 2 default configuration function.
 
err_t headphoneamp2_write_data (headphoneamp2_t *ctx, uint8_t data_in)
 Headphone AMP 2 I2C writing function.
 
void headphoneamp2_enable (headphoneamp2_t *ctx)
 Headphone AMP 2 enable the device function.
 
void headphoneamp2_disable (headphoneamp2_t *ctx)
 Headphone AMP 2 disable the device function.
 
err_t headphoneamp2_set_command (headphoneamp2_t *ctx, headphoneamp2_cmd_t cmd_ctrl)
 Headphone AMP 2 set the command function.
 

Detailed Description

This file contains API for Headphone AMP 2 Click Driver.

Enumeration Type Documentation

◆ headphoneamp2_cmd_ctrl_value_t

Headphone AMP 2 Click command mode control value data.

Predefined enum values for command mode control.

Enumerator
HEADPHONEAMP2_CMD_DISABLE 
HEADPHONEAMP2_CMD_ENABLE 

◆ headphoneamp2_return_value_t

Headphone AMP 2 Click return value data.

Predefined enum values for driver return values.

Enumerator
HEADPHONEAMP2_OK 
HEADPHONEAMP2_ERROR