Home2L - C/C++ API v1.4-0-g38cc (2024-05-25)
Smart Tools for a Private Home
All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
twi.h File Reference

Description

This file is the interface to the TWI slave, master and hub functionality.

Definition in file twi.h.

#include "core.h"
Include dependency graph for twi.h:

Go to the source code of this file.

TWI Master ...

Note: These functions may only be called if the hub functionality is disabled.

void TwiMaInit ()
 Init all TWI master ports.
 
static void TwiMaSelectPort (int8_t port)
 Select the TWI master port for the next operations.
 
void TwiMaSendStart ()
 Send a start condition.
 
void TwiMaSendStop ()
 Send a stop condition.
 
bool TwiMaSendByte (uint8_t data)
 Send a byte (returns the ACK bit).
 
uint8_t TwiMaReceiveByte (bool ack)
 Receive a byte ('ack' to be set to 1 if more bytes are expected).