Nut/OS  5.0.5
API Reference
_NUTTWIBUS Struct Reference

TWI/I2C bus structure. More...

#include <twif.h>

Collaboration diagram for _NUTTWIBUS:
[legend]

Data Fields

uptr_t bus_base
 Bus base address.
IRQ_HANDLERbus_sig_ev
 Bus data and event interrupt handler.
IRQ_HANDLERbus_sig_er
 Bus error interrupt handler. If not supported by your device, leave it empty.
HANDLE bus_mutex
 Bus lock queue.
NUTTWIICBbus_icb
 Interface Control Block.
uint_fast8_t bus_dma_tx
 DMA channel for TX direction.
uint_fast8_t bus_dma_rx
 DMA channel for RX direction.
int(* bus_initbus )(void)
 Initialize bus controller.
int(* bus_recover )(void)
 Recover bus controller.

Detailed Description

TWI/I2C bus structure.


Field Documentation

Bus data and event interrupt handler.

Referenced by NutDestroyTwiBus(), and NutRegisterTwiBus().

Bus error interrupt handler. If not supported by your device, leave it empty.

Referenced by NutRegisterTwiBus().

DMA channel for TX direction.

DMA channel for RX direction.

Initialize bus controller.

This routine is called during device registration.

Referenced by NutRegisterTwiBus().

Recover bus controller.

This routine is called for recovering where a slave hangs with SCL low.


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