i2cisolator7 2.1.0.0
main.c File Reference

I2C Isolator 7 Click example. More...

#include "board.h"
#include "log.h"
#include "i2cisolator7.h"

Macros

#define PRESS_DEVICE_ADDRESS   0x5C
 
#define PRESS_REG_WHO_AM_I   0x0F
 
#define PRESS_WHO_AM_I   0xB4
 

Functions

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

Detailed Description

I2C Isolator 7 Click example.

Description

This demo application shows an example of an I2C Isolator 7 Click wired to the PRESS Click board™ for reading device ID (Who am I). The library also includes an I2C writing and reading functions.

The demo application is composed of two sections :

Application Init

The initialization of I2C module and log UART. After driver initialization, the app sets the PRESS Click board™ slave address.

Application Task

This example demonstrates the use of the I2C Isolator 7 Click board™. Logs device ID values of the PRESS Click board™ wired to the I2C Isolator 7 Click board™.

Author
Nenad Filipovic

Macro Definition Documentation

◆ PRESS_DEVICE_ADDRESS

#define PRESS_DEVICE_ADDRESS   0x5C

◆ PRESS_REG_WHO_AM_I

#define PRESS_REG_WHO_AM_I   0x0F

◆ PRESS_WHO_AM_I

#define PRESS_WHO_AM_I   0xB4

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 )