C++ DevKit
C++ set of OOP library
Loading...
Searching...
No Matches
struct_ConfigMasterI2C Struct Reference

The configuration data of I2C interface used as Master. More...

#include <hw_i2c.h>

Collaboration diagram for struct_ConfigMasterI2C:
Collaboration graph

Public Attributes

i2c_inst_t * i2c = i2c0
 the I2C interface used in the rp2040: i2c0 or i2c1
 
uint sda_pin = 04
 the associated gpio pin for data
 
uint scl_pin = 05
 the associated gpio pin for clock
 
uint baud_rate = 100 * 1000
 the I2C baudrate:
 
irq_handler_t i2c_tx_master_handler = NULL
 a function pointer to the IRQ i2c_master_exclusive_handler, to the program that manage the I2C IRQ when used with DMA
 

Detailed Description

The configuration data of I2C interface used as Master.

Member Data Documentation

◆ baud_rate

uint struct_ConfigMasterI2C::baud_rate = 100 * 1000

the I2C baudrate:

  • I2C_STANDARD_MODE = 100kb/s
  • I2C_FAST_MODE = 400kb/s
  • I2C_FAST_MODE_PLUS = 1Mb/s

◆ i2c_tx_master_handler

irq_handler_t struct_ConfigMasterI2C::i2c_tx_master_handler = NULL

a function pointer to the IRQ i2c_master_exclusive_handler, to the program that manage the I2C IRQ when used with DMA

NOTICE: This i2c_master_exclusive_handler is the one given to NVIC IRQ map. It seems that it must be a static function defined in the main code.


The documentation for this struct was generated from the following file: