i2cextend 2.0.0.0
main.c File Reference

I2CExtend Click example. More...

#include "board.h"
#include "log.h"
#include "i2cextend.h"

Functions

void i2cextend_6dofimu11_get_axis (i2cextend_t *ctx, uint8_t axis_out_reg)
 
void application_init (void)
 
void application_task (void)
 
int main (void)
 

Variables

int16_t axis
 

Detailed Description

I2CExtend Click example.

Description

This is an example which demonstrates the use of I2C Extend Click board.

The demo application is composed of two sections :

Application Init

Initialization driver enables - I2C, check communication with device 6DOF IMU 11 Click connected to the I2C Extend Click ( Remote Mode ), set default configuration and start measurement.

Application Task

In this example, we read Accel and Mag axis of the connected 6DOF IMU 11 Click boards to the I2C Extend Click ( Remote Mode ) which is connected by a LAN cable to I2C Extend Click ( Local Mode ). Results are being sent to the Usart Terminal where you can track their changes. All data logs write on USB uart changes for every 2 sec.

Author
Stefan Ilic

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 )

◆ i2cextend_6dofimu11_get_axis()

void i2cextend_6dofimu11_get_axis ( i2cextend_t * ctx,
uint8_t axis_out_reg )

◆ main()

int main ( void )

Variable Documentation

◆ axis

int16_t axis