swipeswitch  2.0.0.0
Functions

Functions

void swipeswitch_cfg_setup (swipeswitch_cfg_t *cfg)
 Config Object Initialization function. More...
 
SWIPESWITCH_RETVAL swipeswitch_init (swipeswitch_t *ctx, swipeswitch_cfg_t *cfg)
 Initialization function. More...
 
void swipeswitch_generic_write (swipeswitch_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function. More...
 
void swipeswitch_generic_read (swipeswitch_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function. More...
 
uint8_t swipeswitch_wait_for_ready (swipeswitch_t *ctx)
 Function that waits for the module to be ready for operation. More...
 
void swipeswitch_disable_halt_timeout (swipeswitch_t *ctx)
 Function for disable halt time. More...
 
void swipeswitch_disable_events (swipeswitch_t *ctx, uint8_t event)
 Function for disabled Event. More...
 
void swipeswitch_enable_events (swipeswitch_t *ctx, uint8_t event)
 Function for enabled Event. More...
 
void swipeswitch_go_to_event_mode (swipeswitch_t *ctx)
 Function for Event mode. More...
 
void swipeswitch_go_to_stream_mode (swipeswitch_t *ctx)
 Function for Stream mode. More...
 
uint8_t swipeswitch_read_system_flags (swipeswitch_t *ctx)
 Function for reads system falgs. More...
 
uint8_t swipeswitch_read_events (swipeswitch_t *ctx)
 Function for reading event. More...
 
uint8_t swipeswitch_read_gestures (swipeswitch_t *ctx)
 Function for reading Gestures. More...
 
uint8_t swipeswitch_read_trackpad_flags (swipeswitch_t *ctx)
 Function for reading Trackpad falgs. More...
 
uint8_t swipeswitch_read_prox_byte (swipeswitch_t *ctx)
 Function for reading Prox byte. More...
 
uint8_t swipeswitch_read_touch_byte (swipeswitch_t *ctx)
 Function for reading Touch byte. More...
 
uint8_t swipeswitch_read_x_coordinate (swipeswitch_t *ctx)
 Function for reading X coordinate. More...
 
uint8_t swipeswitch_read_y_coordinate (swipeswitch_t *ctx)
 Function for reading Y coordinate. More...
 
void swipeswitch_set_touch_sensitivity (swipeswitch_t *ctx, uint8_t sensitivity)
 Function for setting Touch Sensitivity. More...
 
void swipeswitch_set_prox_sensitivity (swipeswitch_t *ctx, uint8_t sensitivity)
 Function for setting Prox Sensitivity. More...
 
void swipeswitch_set_event_mask (swipeswitch_t *ctx, uint8_t event_mask)
 Function for setting Event mask. More...
 
void swipeswitch_enable_channel (swipeswitch_t *ctx, uint8_t channel)
 Function for enabling channels. More...
 
void swipeswitch_disable_channel (swipeswitch_t *ctx, uint8_t channel)
 Function for disabling channels. More...
 
uint16_t swipeswitch_read_channel (swipeswitch_t *ctx, uint8_t read_data, uint8_t channel)
 Function for reading channel. More...
 
void swipeswitch_set_tap_timer_limit (swipeswitch_t *ctx, uint8_t time_limit)
 Function for setting tap timer limit. More...
 
void swipeswitch_set_tap_threshold (swipeswitch_t *ctx, uint8_t threshold)
 Function for setting tap threshold. More...
 
void swipeswitch_set_swipe_timer_limit (swipeswitch_t *ctx, uint8_t time_limit)
 Function for setting swipe timer limit. More...
 
void swipeswitch_set_swipe_threshold (swipeswitch_t *ctx, uint8_t threshold)
 Function for setting swipe threshold. More...
 
void swipeswitch_set_report_rate_nm (swipeswitch_t *ctx, uint8_t report_rate)
 Function for setting report rate NM. More...
 
void swipeswitch_set_report_rate_lp (swipeswitch_t *ctx, uint8_t report_rate)
 Function for setting report rate LP. More...
 
void swipeswitch_set_np_segment_rate (swipeswitch_t *ctx, uint8_t segment_rate)
 Function for setting segment rate. More...
 
void swipeswitch_set_zoom_timeout (swipeswitch_t *ctx, uint8_t timeout_period)
 Function for setting zoom timeout. More...
 
void swipeswitch_set_halt_timeout (swipeswitch_t *ctx, uint8_t halt_time)
 Function for setting halt timeout. More...
 

Detailed Description

Function Documentation

◆ swipeswitch_cfg_setup()

void swipeswitch_cfg_setup ( swipeswitch_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.

◆ swipeswitch_disable_channel()

void swipeswitch_disable_channel ( swipeswitch_t ctx,
uint8_t  channel 
)

Function for disabling channels.

Parameters
ctxClick object.

@description This function disable channels.

◆ swipeswitch_disable_events()

void swipeswitch_disable_events ( swipeswitch_t ctx,
uint8_t  event 
)

Function for disabled Event.

Parameters
ctxClick object.

@description This function disable desired event.

◆ swipeswitch_disable_halt_timeout()

void swipeswitch_disable_halt_timeout ( swipeswitch_t ctx)

Function for disable halt time.

Parameters
ctxClick object.

@description This function disable halt time

◆ swipeswitch_enable_channel()

void swipeswitch_enable_channel ( swipeswitch_t ctx,
uint8_t  channel 
)

Function for enabling channels.

Parameters
ctxClick object.

@description This function enable channels.

◆ swipeswitch_enable_events()

void swipeswitch_enable_events ( swipeswitch_t ctx,
uint8_t  event 
)

Function for enabled Event.

Parameters
ctxClick object.

@description This function anable desired event.

◆ swipeswitch_generic_read()

void swipeswitch_generic_read ( swipeswitch_t ctx,
uint8_t  reg,
uint8_t *  data_buf,
uint8_t  len 
)

Generic read function.

Parameters
ctxClick object.
regRegister address.
data_bufOutput data buf
lenNumber of the bytes to be read

@description This function reads data from the desired register.

◆ swipeswitch_generic_write()

void swipeswitch_generic_write ( swipeswitch_t ctx,
uint8_t  reg,
uint8_t *  data_buf,
uint8_t  len 
)

Generic write function.

Parameters
ctxClick object.
regRegister address.
data_bufData buf to be written.
lenNumber of the bytes in data buf.

@description This function writes data to the desired register.

◆ swipeswitch_go_to_event_mode()

void swipeswitch_go_to_event_mode ( swipeswitch_t ctx)

Function for Event mode.

Parameters
ctxClick object.

@description This function is for going to Event mode.

◆ swipeswitch_go_to_stream_mode()

void swipeswitch_go_to_stream_mode ( swipeswitch_t ctx)

Function for Stream mode.

Parameters
ctxClick object.

@description This function is for going to Stream mode.

◆ swipeswitch_init()

SWIPESWITCH_RETVAL swipeswitch_init ( swipeswitch_t ctx,
swipeswitch_cfg_t cfg 
)

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ swipeswitch_read_channel()

uint16_t swipeswitch_read_channel ( swipeswitch_t ctx,
uint8_t  read_data,
uint8_t  channel 
)

Function for reading channel.

Parameters
ctxClick object.
Returns
Returns value from selected channel. @description This function reads channel.

◆ swipeswitch_read_events()

uint8_t swipeswitch_read_events ( swipeswitch_t ctx)

Function for reading event.

Parameters
ctxClick object.
Returns
Get Event value.

@description This function reads event.

◆ swipeswitch_read_gestures()

uint8_t swipeswitch_read_gestures ( swipeswitch_t ctx)

Function for reading Gestures.

Parameters
ctxClick object. returns Gesture value.

@description This function reads Gestures.

◆ swipeswitch_read_prox_byte()

uint8_t swipeswitch_read_prox_byte ( swipeswitch_t ctx)

Function for reading Prox byte.

Parameters
ctxClick object.
Returns
Reads Prox byte value.

@description This function reads Prox byte.

◆ swipeswitch_read_system_flags()

uint8_t swipeswitch_read_system_flags ( swipeswitch_t ctx)

Function for reads system falgs.

Parameters
ctxClick object.
Returns
Get System flag value.

@description This function reads system falgs.

◆ swipeswitch_read_touch_byte()

uint8_t swipeswitch_read_touch_byte ( swipeswitch_t ctx)

Function for reading Touch byte.

Parameters
ctxClick object.

@description This function reads Touch byte.

◆ swipeswitch_read_trackpad_flags()

uint8_t swipeswitch_read_trackpad_flags ( swipeswitch_t ctx)

Function for reading Trackpad falgs.

Parameters
ctxClick object.
Returns
Gets Trackpad Flag.

@description This function reads Trackpad flag.

◆ swipeswitch_read_x_coordinate()

uint8_t swipeswitch_read_x_coordinate ( swipeswitch_t ctx)

Function for reading X coordinate.

Parameters
ctxClick object.
Returns
Reads value of X coordinate. @description This function reads X coordinate.

◆ swipeswitch_read_y_coordinate()

uint8_t swipeswitch_read_y_coordinate ( swipeswitch_t ctx)

Function for reading Y coordinate.

Parameters
ctxClick object.
Returns
Reads value of Y coordinate. @description This function reads Y coordinate.

◆ swipeswitch_set_event_mask()

void swipeswitch_set_event_mask ( swipeswitch_t ctx,
uint8_t  event_mask 
)

Function for setting Event mask.

Parameters
ctxClick object.

@description This function set Event mask.

◆ swipeswitch_set_halt_timeout()

void swipeswitch_set_halt_timeout ( swipeswitch_t ctx,
uint8_t  halt_time 
)

Function for setting halt timeout.

Parameters
ctxClick object.

@description This function sets halt timeout.

◆ swipeswitch_set_np_segment_rate()

void swipeswitch_set_np_segment_rate ( swipeswitch_t ctx,
uint8_t  segment_rate 
)

Function for setting segment rate.

Parameters
ctxClick object.

@description This function sets segment rate.

◆ swipeswitch_set_prox_sensitivity()

void swipeswitch_set_prox_sensitivity ( swipeswitch_t ctx,
uint8_t  sensitivity 
)

Function for setting Prox Sensitivity.

Parameters
ctxClick object.

@description This function set Prox Sensitivity.

◆ swipeswitch_set_report_rate_lp()

void swipeswitch_set_report_rate_lp ( swipeswitch_t ctx,
uint8_t  report_rate 
)

Function for setting report rate LP.

Parameters
ctxClick object.

@description This function sets LP report rate.

◆ swipeswitch_set_report_rate_nm()

void swipeswitch_set_report_rate_nm ( swipeswitch_t ctx,
uint8_t  report_rate 
)

Function for setting report rate NM.

Parameters
ctxClick object.

@description This function sets NM report rate.

◆ swipeswitch_set_swipe_threshold()

void swipeswitch_set_swipe_threshold ( swipeswitch_t ctx,
uint8_t  threshold 
)

Function for setting swipe threshold.

Parameters
ctxClick object.

@description This function sets swipe threshold.

◆ swipeswitch_set_swipe_timer_limit()

void swipeswitch_set_swipe_timer_limit ( swipeswitch_t ctx,
uint8_t  time_limit 
)

Function for setting swipe timer limit.

Parameters
ctxClick object.

@description This function sets swipe timer limit.

◆ swipeswitch_set_tap_threshold()

void swipeswitch_set_tap_threshold ( swipeswitch_t ctx,
uint8_t  threshold 
)

Function for setting tap threshold.

Parameters
ctxClick object.

@description This function sets tap threshold.

◆ swipeswitch_set_tap_timer_limit()

void swipeswitch_set_tap_timer_limit ( swipeswitch_t ctx,
uint8_t  time_limit 
)

Function for setting tap timer limit.

Parameters
ctxClick object.

@description This function sets tap timer limit.

◆ swipeswitch_set_touch_sensitivity()

void swipeswitch_set_touch_sensitivity ( swipeswitch_t ctx,
uint8_t  sensitivity 
)

Function for setting Touch Sensitivity.

Parameters
ctxClick object.

@description This function set Touch Sensitivity.

◆ swipeswitch_set_zoom_timeout()

void swipeswitch_set_zoom_timeout ( swipeswitch_t ctx,
uint8_t  timeout_period 
)

Function for setting zoom timeout.

Parameters
ctxClick object.

@description This function sets zoom timeout.

◆ swipeswitch_wait_for_ready()

uint8_t swipeswitch_wait_for_ready ( swipeswitch_t ctx)

Function that waits for the module to be ready for operation.

Parameters
ctxClick object.
Returns
0 or 1

@description This function waits for the module to be ready for operation