mcp73871 2.0.0.0
Public function

Functions

void mcp73871_cfg_setup (mcp73871_cfg_t *cfg)
 Config Object Initialization function.
 
MCP73871_RETVAL mcp73871_init (mcp73871_t *ctx, mcp73871_cfg_t *cfg)
 Initialization function.
 
void mcp73871_enable_pin_control (mcp73871_t *ctx, uint8_t pin_state)
 Enable pin control.
 
void mcp73871_prog_pin_control (mcp73871_t *ctx, uint8_t pin_state)
 Prog pin control.
 
void mcp73871_timer_pin_control (mcp73871_t *ctx, uint8_t pin_state)
 Timer pin control.
 

Detailed Description

Function Documentation

◆ mcp73871_cfg_setup()

void mcp73871_cfg_setup ( mcp73871_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ mcp73871_enable_pin_control()

void mcp73871_enable_pin_control ( mcp73871_t * ctx,
uint8_t pin_state )

Enable pin control.

Parameters
ctxClick object.
pin_state1 = click enabled, 0 = click disabled

@description Controls the CE pin, enabling or disabling the click operation.

◆ mcp73871_init()

MCP73871_RETVAL mcp73871_init ( mcp73871_t * ctx,
mcp73871_cfg_t * cfg )

Initialization function.

Parameters
mcp73871Click object.
cfgClick configuration structure.

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

◆ mcp73871_prog_pin_control()

void mcp73871_prog_pin_control ( mcp73871_t * ctx,
uint8_t pin_state )

Prog pin control.

Parameters
ctxClick object.
pin_state1 = 500 mA input current, 0 = 100 mA input current

@description Controls the PROG pin, setting the USB input current.

◆ mcp73871_timer_pin_control()

void mcp73871_timer_pin_control ( mcp73871_t * ctx,
uint8_t pin_state )

Timer pin control.

Parameters
ctxClick object.
pin_state1 = timer disabled, 0 = timer enabled.

@description Controls the TE pin, disabling or enabling safety timer.