ezocarrierec 2.1.0.0
main.c File Reference

EZO Carrier EC Click Example. More...

#include "board.h"
#include "log.h"
#include "ezocarrierec.h"

Macros

#define APP_BUFFER_SIZE   200
 
#define PROCESS_BUFFER_SIZE   200
 
#define PROBE_TYPE   "1.0"
 
#define DRY_CALIBRATION   "dry"
 
#define CALIBRATION_VALUE   "80"
 
#define DISABLE_CONT_READ   "0"
 

Functions

void application_init (void)
 
void application_task (void)
 
int main (void)
 

Detailed Description

EZO Carrier EC Click Example.

Description

This example demonstrates the use of EZO Carrier EC click board by processing the incoming data and displaying them on the USB UART.

The demo application is composed of two sections :

Application Init

Initializes the driver, performs the click default factory reset, and single point calibration.

Application Task

Reads and processes all incoming conductivity data from the probe, and displays them on the USB UART in uS.

Additional Function

  • static void ezocarrierec_clear_app_buf ( void )
  • static void ezocarrierec_log_app_buf ( void )
  • static err_t ezocarrierec_process ( ezocarrierec_t *ctx )
  • static err_t ezocarrierec_rsp_check ( ezocarrierec_t *ctx, uint8_t *rsp )
  • static void ezocarrierec_error_check ( err_t error_flag )
Author
Stefan Ilic

Macro Definition Documentation

◆ APP_BUFFER_SIZE

#define APP_BUFFER_SIZE   200

◆ CALIBRATION_VALUE

#define CALIBRATION_VALUE   "80"

◆ DISABLE_CONT_READ

#define DISABLE_CONT_READ   "0"

◆ DRY_CALIBRATION

#define DRY_CALIBRATION   "dry"

◆ PROBE_TYPE

#define PROBE_TYPE   "1.0"

◆ PROCESS_BUFFER_SIZE

#define PROCESS_BUFFER_SIZE   200

Function Documentation

◆ application_init()

void application_init ( void )

< Logger config object.

< Click config object.

Logger initialization. Default baud rate: 115200 Default log level: LOG_LEVEL_DEBUG

Note
If USB_UART_RX and USB_UART_TX are defined as HAL_PIN_NC, you will need to define them manually for log to work. See LOG_MAP_USB_UART macro definition for detailed explanation.

◆ application_task()

void application_task ( void )

◆ main()

int main ( void )