Hierodule 1.6.2
Utility module set for STM32 MCUs
Loading...
Searching...
No Matches
HIERODULE_I2C_Wrapper Struct Reference

Struct that keeps variables for the data buffers, a pointer to the I2C peripheral, the slave address and pointers to the transmission end callback routines. More...

#include <hierodule_i2c.h>

Data Fields

I2C_TypeDef * _I2C
 Pointer to the I2C peripheral.
 
HIERODULE_I2C_Status Status
 I2C wrapper status.
 
uint8_t SlaveAddress
 Target address.
 
uint32_t I2C_Period_Length
 I2C clock to system clock ratio.
 
uint8_t * SRX_Buffer
 The ring buffer where the data received in slave receiver mode is appended.
 
uint32_t SRX_Index
 Index of next-byte-to-be-received in the ring buffer.
.
 
uint32_t SRX_New
 Number of new bytes in the ring buffer.
.
 
uint16_t SRX_BufferSize
 Number of elements in the ring buffer.
.
 
void(* SRX_Handler )(void)
 Pointer to callback function to be called on a completed transmission in slave receiver mode.
 
uint8_t * MTX_Buffer
 Buffer that keeps data to be transmitted in master transmitter mode.
 
uint32_t MTX_Counter
 Used to continue transmission until buffer size is received.
 
uint32_t MTX_BufferSize
 Number of bytes in the buffer.
 
void(* MTX_Handler )(void)
 Pointer to callback function to be called on a completed transmission in master transmitter mode.
 
uint8_t * STX_Buffer
 Buffer that keeps data to be transmitted in slave transmitter mode.
 
uint32_t STX_Counter
 Used to continue transmission until buffer size is received.
 
void(* STX_Handler )(void)
 Pointer to callback function to be called on a completed transmission in slave transmitter mode.
 
uint8_t * MRX_Buffer
 The ring buffer where the data received in master receiver mode is appended.
 
uint32_t MRX_Counter
 Used to continue transmission until buffer size is received.
 
uint32_t MRX_BufferSize
 Number of bytes in the buffer.
 
void(* MRX_Handler )(void)
 Pointer to callback function to be called on a completed transmission in master receiver mode.
 

Detailed Description

Used by all routines in the module.
Alias typedefs for custom pointers are not defined, since they're not used excessively in the module.

Definition at line 81 of file hierodule_i2c.h.

Field Documentation

◆ _I2C

I2C_TypeDef* _I2C

This field is meant to be set via HIERODULE_I2C_InitWrapper, changing it manually may result in unexpected behavior.

Definition at line 86 of file hierodule_i2c.h.

◆ I2C_Period_Length

uint32_t I2C_Period_Length

This field is meant to be set via HIERODULE_I2C_InitWrapper, changing it manually may result in unexpected behavior.

Definition at line 101 of file hierodule_i2c.h.

◆ MRX_Buffer

uint8_t* MRX_Buffer

This field is meant to be set via HIERODULE_I2C_MasterReceive, changing it manually may result in unexpected behavior.

Definition at line 162 of file hierodule_i2c.h.

◆ MRX_BufferSize

uint32_t MRX_BufferSize

This field is meant to be set via HIERODULE_I2C_MasterReceive, changing it manually may result in unexpected behavior.

Definition at line 170 of file hierodule_i2c.h.

◆ MRX_Counter

uint32_t MRX_Counter

This field is meant to be set via HIERODULE_I2C_MasterReceive, changing it manually may result in unexpected behavior.

Definition at line 166 of file hierodule_i2c.h.

◆ MRX_Handler

void(* MRX_Handler) (void)

Definition at line 174 of file hierodule_i2c.h.

◆ MTX_Buffer

uint8_t* MTX_Buffer

Set via a call to HIERODULE_I2C_MasterTransmit.

Definition at line 131 of file hierodule_i2c.h.

◆ MTX_BufferSize

uint32_t MTX_BufferSize

This field is meant to be set via HIERODULE_I2C_MasterTransmit, changing it manually may result in unexpected behavior.

Definition at line 139 of file hierodule_i2c.h.

◆ MTX_Counter

uint32_t MTX_Counter

This field is meant to be set via HIERODULE_I2C_MasterTransmit, changing it manually may result in unexpected behavior.

Definition at line 135 of file hierodule_i2c.h.

◆ MTX_Handler

void(* MTX_Handler) (void)

Definition at line 143 of file hierodule_i2c.h.

◆ SlaveAddress

uint8_t SlaveAddress

Updated on a HIERODULE_I2C_MasterTransmit or HIERODULE_I2C_MasterReceive call.

Definition at line 96 of file hierodule_i2c.h.

◆ SRX_Buffer

uint8_t* SRX_Buffer

Use HIERODULE_I2C_GetNextByte to unidirectionally parse the buffer.
This field is meant to be set via HIERODULE_I2C_InitWrapper, changing it manually may result in unexpected behavior.

Definition at line 109 of file hierodule_i2c.h.

◆ SRX_BufferSize

uint16_t SRX_BufferSize

This field is meant to be set via HIERODULE_I2C_InitWrapper, changing it manually may result in unexpected behavior.

Definition at line 121 of file hierodule_i2c.h.

◆ SRX_Handler

void(* SRX_Handler) (void)

Definition at line 125 of file hierodule_i2c.h.

◆ SRX_Index

uint32_t SRX_Index

This field is meant to be set via HIERODULE_I2C_InitWrapper, changing it manually may result in unexpected behavior.

Definition at line 113 of file hierodule_i2c.h.

◆ SRX_New

uint32_t SRX_New

This field is meant to be set via HIERODULE_I2C_InitWrapper, changing it manually may result in unexpected behavior.

Definition at line 117 of file hierodule_i2c.h.

◆ Status

Updated in the background, approach as a read-only field.

Definition at line 90 of file hierodule_i2c.h.

◆ STX_Buffer

uint8_t* STX_Buffer

This needs to be set manually before the transmission begins.

Definition at line 148 of file hierodule_i2c.h.

◆ STX_Counter

uint32_t STX_Counter

This needs to be set manually before the transmission begins.

Definition at line 152 of file hierodule_i2c.h.

◆ STX_Handler

void(* STX_Handler) (void)

Definition at line 156 of file hierodule_i2c.h.


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