Kaleidoscope
Macros | Functions
twi.h File Reference
#include <inttypes.h>
Include dependency graph for twi.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define TWI_FREQ   100000L
 
#define TWI_BUFFER_LENGTH   32
 
#define TWI_READY   0
 
#define TWI_MRX   1
 
#define TWI_MTX   2
 
#define TWI_SRX   3
 
#define TWI_STX   4
 

Functions

void twi_init (void)
 
void twi_disable (void)
 
void twi_setAddress (uint8_t)
 
void twi_setFrequency (uint32_t)
 
uint8_t twi_readFrom (uint8_t, uint8_t *, uint8_t, uint8_t)
 
uint8_t twi_writeTo (uint8_t, uint8_t *, uint8_t, uint8_t, uint8_t)
 
uint8_t twi_transmit (const uint8_t *, uint8_t)
 
void twi_attachSlaveRxEvent (void(*)(uint8_t *, int))
 
void twi_attachSlaveTxEvent (void(*)(void))
 
void twi_reply (uint8_t)
 
void twi_stop (void)
 
void twi_releaseBus (void)
 

Macro Definition Documentation

◆ TWI_BUFFER_LENGTH

#define TWI_BUFFER_LENGTH   32

◆ TWI_FREQ

#define TWI_FREQ   100000L

◆ TWI_MRX

#define TWI_MRX   1

◆ TWI_MTX

#define TWI_MTX   2

◆ TWI_READY

#define TWI_READY   0

◆ TWI_SRX

#define TWI_SRX   3

◆ TWI_STX

#define TWI_STX   4

Function Documentation

◆ twi_attachSlaveRxEvent()

void twi_attachSlaveRxEvent ( void(*)(uint8_t *, int)  )

◆ twi_attachSlaveTxEvent()

void twi_attachSlaveTxEvent ( void(*)(void)  )

◆ twi_disable()

void twi_disable ( void  )

◆ twi_init()

void twi_init ( void  )

◆ twi_readFrom()

uint8_t twi_readFrom ( uint8_t  ,
uint8_t *  ,
uint8_t  ,
uint8_t   
)

◆ twi_releaseBus()

void twi_releaseBus ( void  )

◆ twi_reply()

void twi_reply ( uint8_t  )

◆ twi_setAddress()

void twi_setAddress ( uint8_t  )

◆ twi_setFrequency()

void twi_setFrequency ( uint32_t  )

◆ twi_stop()

void twi_stop ( void  )

◆ twi_transmit()

uint8_t twi_transmit ( const uint8_t *  ,
uint8_t   
)

◆ twi_writeTo()

uint8_t twi_writeTo ( uint8_t  ,
uint8_t *  ,
uint8_t  ,
uint8_t  ,
uint8_t   
)