i2cmux5 2.0.0.0
main.c File Reference

I2cMux5 Click example. More...

#include "board.h"
#include "log.h"
#include "i2cmux5.h"

Functions

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

Detailed Description

I2cMux5 Click example.

Description

This app reads "Who am I" and "Status" register of the connected click boards to the I2C MUX 5 click.

The demo application is composed of two sections :

Application Init

Initializes I2C driver, set the default configuration and start to write log.

Application Task

This is an example that demonstrates the use of the I2C MUX 5 click board. In this example, we read "Who am I" ( or "Status" ) register of the connected click boards to the I2C MUX 5 click. Channel 1 : 6DOF IMU 9 click [slave address: 0x69; reg: 0x75; ID val.: 0xA9], Channel 2 : 6DOF IMU 11 click [slave address: 0x0E; reg: 0x00; ID val.: 0x2D], Channel 3 : RTC 10 click [slave address: 0x68; reg: 0x0F; St val.: 0x88], Channel 4 : Accel 10 click [slave address: 0x18; reg: 0x0F; ID val.: 0x44]. Results are being sent to the Usart Terminal where you can track their changes.

Author
Nenad Filipovic

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 )