i2cisolator6 2.1.0.0
main.c File Reference

I2C Isolator 6 Click example. More...

#include "board.h"
#include "log.h"
#include "i2cisolator6.h"

Macros

#define ACCEL21_DEVICE_ADDRESS_GND   0x18
 
#define ACCEL21_DEVICE_ADDRESS_VCC   0x19
 
#define ACCEL21_REG_WHO_AM_I   0x0F
 
#define ACCEL21_DEVICE_ID   0x33
 

Functions

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

Detailed Description

I2C Isolator 6 Click example.

Description

This library contains API for the I2C Isolator 6 Click driver. This demo application shows an example of an I2C Isolator 6 Click wired to the Accel 21 Click for reading device ID. The library also includes an I2C writing and reading functions.

The demo application is composed of two sections :

Application Init

The initialization of the I2C module, log UART. After the driver init, the app sets Accel 21 Click I2C Slave address.

Application Task

This example demonstrates the use of the I2C Isolator 6 Click boardâ„¢. Logs device ID values of the Accel 21 Click wired to the I2C Isolator 6 Click boardâ„¢.

Author
Nenad Filipovic

Macro Definition Documentation

◆ ACCEL21_DEVICE_ADDRESS_GND

#define ACCEL21_DEVICE_ADDRESS_GND   0x18

◆ ACCEL21_DEVICE_ADDRESS_VCC

#define ACCEL21_DEVICE_ADDRESS_VCC   0x19

◆ ACCEL21_DEVICE_ID

#define ACCEL21_DEVICE_ID   0x33

◆ ACCEL21_REG_WHO_AM_I

#define ACCEL21_REG_WHO_AM_I   0x0F

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 )