proxfusion 2.0.0.0

Functions

void proxfusion_cfg_setup (proxfusion_cfg_t *cfg)
 Config Object Initialization function.
 
err_t proxfusion_init (proxfusion_t *ctx, proxfusion_cfg_t *cfg)
 Initialization function.
 
err_t proxfusion_default_cfg (proxfusion_t *ctx)
 Click Default Configuration function.
 
err_t proxfusion_generic_write (proxfusion_t *ctx, uint8_t reg, uint8_t *data_buffer, uint8_t len)
 Generic write function.
 
err_t proxfusion_generic_read (proxfusion_t *ctx, uint8_t reg, uint8_t *data_buffer, uint8_t len)
 Generic read function.
 
uint8_t proxfusion_get_touch (proxfusion_t *ctx)
 Touch event.
 
err_t proxfusion_set_system_reg (proxfusion_t *ctx, uint8_t cfg)
 Sets system register.
 
err_t proxfusion_set_event_reg (proxfusion_t *ctx, uint8_t cfg)
 Selecting events.
 

Detailed Description

Function Documentation

◆ proxfusion_cfg_setup()

void proxfusion_cfg_setup ( proxfusion_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ proxfusion_default_cfg()

err_t proxfusion_default_cfg ( proxfusion_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
This function executes default configuration for ProxFusion click.
Note
Default configuration of the chip contains the settings : Sysyem register:
  • PROXFUSION_SYSTEM_RESET
  • PROXFUSION_EVENT_MODE_1
  • PROXFUSION_CLOCK_16MHz
  • PROXFUSION_ATI_ENABLED
  • PROXFUSION_ATI_BAND_1_16
  • PROXFUSION_SYSTEM_ATI_RESET Event register:
    • PROXFUSION_MASK_SYS_EVENT

◆ proxfusion_generic_read()

err_t proxfusion_generic_read ( proxfusion_t * ctx,
uint8_t reg,
uint8_t * data_buffer,
uint8_t len )

Generic read function.

Parameters
ctxClick object.
regRegister address.
data_bufferData buffer to be written.
lenNumber of the bytes in data buffer.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
This function reads data from the desired register.

◆ proxfusion_generic_write()

err_t proxfusion_generic_write ( proxfusion_t * ctx,
uint8_t reg,
uint8_t * data_buffer,
uint8_t len )

Generic write function.

Parameters
ctxClick object.
regRegister address.
data_bufferOutput data buffer
lenNumber of the bytes to be read
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
This function writes data to the desired register.

◆ proxfusion_get_touch()

uint8_t proxfusion_get_touch ( proxfusion_t * ctx)

Touch event.

Parameters
ctxClick object.
Returns
Current touch event ( rignt, left or both )

◆ proxfusion_init()

err_t proxfusion_init ( proxfusion_t * ctx,
proxfusion_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
This function initializes all necessary pins and peripherals used for this click.

◆ proxfusion_set_event_reg()

err_t proxfusion_set_event_reg ( proxfusion_t * ctx,
uint8_t cfg )

Selecting events.

Parameters
ctxClick object.
cfgEvent register configuration
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
Selection options:
  • SAR activation state,
  • Power management unit event,
  • System event,
  • Temperature event,
  • Hysteresis UI event,
  • Hall-effect event,
  • SAR event and
  • ProxSense event.

◆ proxfusion_set_system_reg()

err_t proxfusion_set_system_reg ( proxfusion_t * ctx,
uint8_t cfg )

Sets system register.

Parameters
ctxClick object.
cfgSystem register configuration
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
Configuration data (value) consists of multiple settings:
  • Software Reset and ACK Reset set on 1 (default),
  • Event mode enable,
  • Main Clock frequency selection,
  • Communications during ATI,
  • Re-ATI Band selection,
  • Redo ATI on all channels set on 1 (default)
  • Reseed all Long-term filters set on 1 (default).