stspin250 2.0.0.0
Public function

Functions

void stspin250_cfg_setup (stspin250_cfg_t *cfg)
 Config Object Initialization function.
 
STSPIN250_RETVAL stspin250_init (stspin250_t *ctx, stspin250_cfg_t *cfg)
 Initialization function.
 
void stspin250_default_cfg (stspin250_t *ctx)
 Click Default Configuration function.
 
void stspin250_set_duty_cycle (stspin250_t *ctx, float duty_cycle)
 Generic sets PWM duty cycle.
 
void stspin250_pwm_stop (stspin250_t *ctx)
 Stop PWM module.
 
void stspin250_pwm_start (stspin250_t *ctx)
 Start PWM module.
 
void stspin250_enable (stspin250_t *ctx, uint8_t state)
 Enable pin function.
 
void stspin250_set_ph (stspin250_t *ctx, uint8_t state)
 Dir ctrl pin function.
 
void stspin250_reset (stspin250_t *ctx)
 Reset pin function.
 
uint8_t stspin250_get_fault (stspin250_t *ctx)
 Fault get function.
 

Detailed Description

Function Documentation

◆ stspin250_cfg_setup()

void stspin250_cfg_setup ( stspin250_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.

◆ stspin250_default_cfg()

void stspin250_default_cfg ( stspin250_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for Stspin250 click.

◆ stspin250_enable()

void stspin250_enable ( stspin250_t * ctx,
uint8_t state )

Enable pin function.

Parameters
ctxClick object.
stateDesired pin state.

@description This function regulates enable pin state.

◆ stspin250_get_fault()

uint8_t stspin250_get_fault ( stspin250_t * ctx)

Fault get function.

Parameters
ctxClick object.
stateDesired pin state.

@description This function gets fault state from the flt pin.

◆ stspin250_init()

STSPIN250_RETVAL stspin250_init ( stspin250_t * ctx,
stspin250_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ stspin250_pwm_start()

void stspin250_pwm_start ( stspin250_t * ctx)

Start PWM module.

Parameters
ctxClick object.

@description This function starts PWM module.

◆ stspin250_pwm_stop()

void stspin250_pwm_stop ( stspin250_t * ctx)

Stop PWM module.

Parameters
ctxClick object.

@description This function stops PWM module.

◆ stspin250_reset()

void stspin250_reset ( stspin250_t * ctx)

Reset pin function.

Parameters
ctxClick object.
stateDesired pin state.

@description This function regulates reset pin state.

◆ stspin250_set_duty_cycle()

void stspin250_set_duty_cycle ( stspin250_t * ctx,
float duty_cycle )

Generic sets PWM duty cycle.

Parameters
ctxClick object.
duty_cycleDuty cycle.

@description This function sets the PWM duty cycle.

◆ stspin250_set_ph()

void stspin250_set_ph ( stspin250_t * ctx,
uint8_t state )

Dir ctrl pin function.

Parameters
ctxClick object.
stateDesired pin state.

@description This function regulates Direction control pin state. It controls direction of the current.