ecg4 2.0.0.0
main.c File Reference

Ecg4 Click example. More...

#include "board.h"
#include "log.h"
#include "ecg4.h"
#include "string.h"

Functions

void plot_data (int16_t plot_data)
 
void log_data (uint8_t code_val, uint8_t data_val)
 
void make_response (uint8_t *op_code, uint8_t *row_size, uint8_t *rx_buff, uint8_t *row_cnt)
 
void process_response ()
 
void application_init (void)
 
void application_task (void)
 
int main (void)
 

Detailed Description

Ecg4 Click example.

Description

This example reads and processes data from ECG 4 clicks.

The demo application is composed of two sections :

Application Init

Initializes the driver, sets the driver handler and enables the click board.

Application Task

Reads the received data and parses it on the USB UART if the response buffer is ready.

Additional Function

  • ecg4_process - The general process of collecting data the module sends.
  • plot_data - Displays raw ECG data.
  • log_data - Displays the real time BPM heart rate.
  • process_response - Checks the response and displays raw ECG data or heart rate (BPM).
  • make_response - Driver handler function which stores data in the response buffer.
Note
Use the Serial Plot application for data plotting.
Author
MikroE Team

Function Documentation

◆ application_init()

void application_init ( void )

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 )

◆ log_data()

void log_data ( uint8_t code_val,
uint8_t data_val )

◆ main()

int main ( void )

◆ make_response()

void make_response ( uint8_t * op_code,
uint8_t * row_size,
uint8_t * rx_buff,
uint8_t * row_cnt )

◆ plot_data()

void plot_data ( int16_t plot_data)

◆ process_response()

void process_response ( )