precision-converters-firmware
Classes | Macros | Functions
pl_gui_views.h File Reference

Pocket lab GUI views. More...

#include <stdint.h>
#include "lvgl/lvgl.h"
#include "adi_fft.h"
Include dependency graph for pl_gui_views.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  pl_gui_device_param
 
struct  pl_gui_init_param
 
struct  pl_gui_views
 
struct  pl_gui_desc
 

Macros

#define PL_GUI_ADD_POWER_UP_DEF_VIEW
 
#define PL_GUI_ADD_ATTR_EDIT_DEF_VIEW
 
#define PL_GUI_ADD_REG_DEBUG_DEF_VIEW
 
#define PL_GUI_ADD_DMM_DEF_VIEW
 
#define PL_GUI_ADD_CAPTURE_DEF_VIEW
 
#define PL_GUI_ADD_ANALYSIS_DEF_VIEW
 
#define PL_GUI_ADD_ABOUT_DEF_VIEW
 
#define PL_GUI_ADD_VIEW(_name, _function)
 
#define PL_GUI_REQ_DATA_SAMPLES   400
 

Functions

int32_t pl_gui_init (struct pl_gui_desc **desc, struct pl_gui_init_param *param)
 Init pocket lab GUI. More...
 
int32_t pl_gui_create_power_up_view (lv_obj_t *parent, struct pl_gui_init_param *param)
 Create pocket lab GUI power-up view. More...
 
int32_t pl_gui_create_attributes_view (lv_obj_t *parent, struct pl_gui_init_param *param)
 Create pocket lab GUI attributes view. More...
 
int32_t pl_gui_create_register_view (lv_obj_t *parent, struct pl_gui_init_param *param)
 Create pocket lab GUI register view. More...
 
int32_t pl_gui_create_dmm_view (lv_obj_t *parent, struct pl_gui_init_param *param)
 Create pocket lab GUI DMM view. More...
 
int32_t pl_gui_create_capture_view (lv_obj_t *parent, struct pl_gui_init_param *param)
 Create pocket lab GUI data capture view. More...
 
int32_t pl_gui_create_analysis_view (lv_obj_t *parent, struct pl_gui_init_param *param)
 Create pocket lab GUI analysis view. More...
 
int32_t pl_gui_create_about_view (lv_obj_t *parent, struct pl_gui_init_param *param)
 Create pocket lab GUI about view. More...
 
uint32_t get_data_samples_count (void)
 Get the count for data samples to be captured. More...
 
void pl_gui_get_capture_chns_mask (uint32_t *chn_mask)
 Get the channels mask based on enabled channels count. More...
 
void pl_gui_display_captured_data (uint8_t *buf, uint32_t rec_bytes)
 Display the captured data onto GUI. More...
 
bool pl_gui_is_dmm_running (void)
 DMM running status check. More...
 
bool pl_gui_is_capture_running (void)
 Capture running status check. More...
 
bool pl_gui_is_fft_running (void)
 FFT running status check. More...
 
void pl_gui_perform_dmm_read (void)
 Perform the DMM read operations. More...
 
uint32_t pl_gui_get_active_device_index (void)
 Read the active device index for current view. More...
 
float pl_gui_cnv_data_to_volt_without_vref (int32_t data, uint8_t chn)
 Convert input data to voltage without Vref. More...
 
float pl_gui_cnv_data_to_volt_wrt_vref (int32_t data, uint8_t chn)
 Convert input data code to voltage w.r.t Vref. More...
 
int32_t pl_gui_cnv_code_to_straight_binary (uint32_t code, uint8_t chn)
 Convert input code to straight binary data. More...
 

Detailed Description

Pocket lab GUI views.

Copyright (c) 2023 Analog Devices, Inc. All rights reserved.

This software is proprietary to Analog Devices, Inc. and its licensors. By using this software you agree to the terms of the associated Analog Devices Software License Agreement.

Macro Definition Documentation

◆ PL_GUI_ADD_ABOUT_DEF_VIEW

#define PL_GUI_ADD_ABOUT_DEF_VIEW
Value:
{\
.view_name = "About", \
.create_view = &pl_gui_create_about_view\
}
int32_t pl_gui_create_about_view(lv_obj_t *parent, struct pl_gui_init_param *param)
Create pocket lab GUI about view.
Definition: pl_gui_views.c:1867

◆ PL_GUI_ADD_ANALYSIS_DEF_VIEW

#define PL_GUI_ADD_ANALYSIS_DEF_VIEW
Value:
{\
.view_name = "Analysis", \
.create_view = &pl_gui_create_analysis_view\
}
int32_t pl_gui_create_analysis_view(lv_obj_t *parent, struct pl_gui_init_param *param)
Create pocket lab GUI analysis view.
Definition: pl_gui_views.c:1722

◆ PL_GUI_ADD_ATTR_EDIT_DEF_VIEW

#define PL_GUI_ADD_ATTR_EDIT_DEF_VIEW
Value:
{\
.view_name = "Configure", \
}
int32_t pl_gui_create_attributes_view(lv_obj_t *parent, struct pl_gui_init_param *param)
Create pocket lab GUI attributes view.
Definition: pl_gui_views.c:1059

◆ PL_GUI_ADD_CAPTURE_DEF_VIEW

#define PL_GUI_ADD_CAPTURE_DEF_VIEW
Value:
{\
.view_name = "Capture", \
.create_view = &pl_gui_create_capture_view\
}
int32_t pl_gui_create_capture_view(lv_obj_t *parent, struct pl_gui_init_param *param)
Create pocket lab GUI data capture view.
Definition: pl_gui_views.c:1513

◆ PL_GUI_ADD_DMM_DEF_VIEW

#define PL_GUI_ADD_DMM_DEF_VIEW
Value:
{\
.view_name = "DMM", \
.create_view = &pl_gui_create_dmm_view\
}
int32_t pl_gui_create_dmm_view(lv_obj_t *parent, struct pl_gui_init_param *param)
Create pocket lab GUI DMM view.
Definition: pl_gui_views.c:1359

◆ PL_GUI_ADD_POWER_UP_DEF_VIEW

#define PL_GUI_ADD_POWER_UP_DEF_VIEW
Value:
{\
.view_name = " ", \
.create_view = &pl_gui_create_power_up_view\
}
int32_t pl_gui_create_power_up_view(lv_obj_t *parent, struct pl_gui_init_param *param)
Create pocket lab GUI power-up view.
Definition: pl_gui_views.c:1038

◆ PL_GUI_ADD_REG_DEBUG_DEF_VIEW

#define PL_GUI_ADD_REG_DEBUG_DEF_VIEW
Value:
{\
.view_name = "Register", \
.create_view = &pl_gui_create_register_view\
}
int32_t pl_gui_create_register_view(lv_obj_t *parent, struct pl_gui_init_param *param)
Create pocket lab GUI register view.
Definition: pl_gui_views.c:1215

◆ PL_GUI_ADD_VIEW

#define PL_GUI_ADD_VIEW (   _name,
  _function 
)
Value:
{\
.view_name = _name,\
.create_view = _function\
}

◆ PL_GUI_REQ_DATA_SAMPLES

#define PL_GUI_REQ_DATA_SAMPLES   400

Function Documentation

◆ get_data_samples_count()

uint32_t get_data_samples_count ( void  )

Get the count for data samples to be captured.

Returns
data samples count

◆ pl_gui_cnv_code_to_straight_binary()

int32_t pl_gui_cnv_code_to_straight_binary ( uint32_t  code,
uint8_t  chn 
)

Convert input code to straight binary data.

Parameters
code[in]- Input code (unsigned)
chn[in]- Input channel
Returns
straight binary data

◆ pl_gui_cnv_data_to_volt_without_vref()

float pl_gui_cnv_data_to_volt_without_vref ( int32_t  data,
uint8_t  chn 
)

Convert input data to voltage without Vref.

Parameters
data[in]- Input data (signed, straight binary)
chn[in]- Input channel
Returns
voltage

◆ pl_gui_cnv_data_to_volt_wrt_vref()

float pl_gui_cnv_data_to_volt_wrt_vref ( int32_t  data,
uint8_t  chn 
)

Convert input data code to voltage w.r.t Vref.

Parameters
data[in]- Input data (signed, straight binary)
chn[in]- Input channel
Returns
voltage

◆ pl_gui_create_about_view()

int32_t pl_gui_create_about_view ( lv_obj_t *  parent,
struct pl_gui_init_param param 
)

Create pocket lab GUI about view.

Parameters
parent[in]- tabview instance
param[in]- pointer to pocket lab gui init params
Returns
0 in case of success, negative error code otherwise

◆ pl_gui_create_analysis_view()

int32_t pl_gui_create_analysis_view ( lv_obj_t *  parent,
struct pl_gui_init_param param 
)

Create pocket lab GUI analysis view.

Parameters
parent[in]- tabview instance
param[in]- pointer to pocket lab gui init params
Returns
0 in case of success, negative error code otherwise

◆ pl_gui_create_attributes_view()

int32_t pl_gui_create_attributes_view ( lv_obj_t *  parent,
struct pl_gui_init_param param 
)

Create pocket lab GUI attributes view.

Parameters
parent[in]- tabview instance
param[in]- pointer to pocket lab gui init params
Returns
0 in case of success, negative error code otherwise

◆ pl_gui_create_capture_view()

int32_t pl_gui_create_capture_view ( lv_obj_t *  parent,
struct pl_gui_init_param param 
)

Create pocket lab GUI data capture view.

Parameters
parent[in]- tabview instance
param[in]- pointer to pocket lab gui init params
Returns
0 in case of success, negative error code otherwise

◆ pl_gui_create_dmm_view()

int32_t pl_gui_create_dmm_view ( lv_obj_t *  parent,
struct pl_gui_init_param param 
)

Create pocket lab GUI DMM view.

Parameters
parent[in]- tabview instance
param[in]- pointer to pocket lab gui init params
Returns
0 in case of success, negative error code otherwise

◆ pl_gui_create_power_up_view()

int32_t pl_gui_create_power_up_view ( lv_obj_t *  parent,
struct pl_gui_init_param param 
)

Create pocket lab GUI power-up view.

Parameters
parent[in]- tabview instance
param[in]- pointer to pocket lab gui init params
Returns
0 in case of success, negative error code otherwise

◆ pl_gui_create_register_view()

int32_t pl_gui_create_register_view ( lv_obj_t *  parent,
struct pl_gui_init_param param 
)

Create pocket lab GUI register view.

Parameters
parent[in]- tabview instance
param[in]- pointer to pocket lab gui init params
Returns
0 in case of success, negative error code otherwise

◆ pl_gui_display_captured_data()

void pl_gui_display_captured_data ( uint8_t *  buf,
uint32_t  rec_bytes 
)

Display the captured data onto GUI.

Parameters
buf[in]- Data buffer
rec_bytes[in]- Number of received bytes
Returns
None

◆ pl_gui_get_active_device_index()

uint32_t pl_gui_get_active_device_index ( void  )

Read the active device index for current view.

Returns
active device index

◆ pl_gui_get_capture_chns_mask()

void pl_gui_get_capture_chns_mask ( uint32_t *  chn_mask)

Get the channels mask based on enabled channels count.

Parameters
chn_mask[in,out]- Channel mask
Returns
None

◆ pl_gui_init()

int32_t pl_gui_init ( struct pl_gui_desc **  desc,
struct pl_gui_init_param param 
)

Init pocket lab GUI.

Parameters
desc[in]- Pocket lab GUI descriptor
param[in]- Pocket lab GUI init parameters
Returns
0 in case of success, negative error code otherwise

◆ pl_gui_is_capture_running()

bool pl_gui_is_capture_running ( void  )

Capture running status check.

Returns
Capture running status
Here is the caller graph for this function:

◆ pl_gui_is_dmm_running()

bool pl_gui_is_dmm_running ( void  )

DMM running status check.

Returns
DMM running status
Here is the caller graph for this function:

◆ pl_gui_is_fft_running()

bool pl_gui_is_fft_running ( void  )

FFT running status check.

Returns
FFT running status
Here is the caller graph for this function:

◆ pl_gui_perform_dmm_read()

void pl_gui_perform_dmm_read ( void  )

Perform the DMM read operations.

Returns
None
Note
DMM results are manipulated based on the raw, offset and scale attribute values read from the device
Here is the caller graph for this function: