ngc 1.5.0
 
Loading...
Searching...
No Matches
ngcbI2C_IO Class Reference

#include <ngcbIFC.hpp>

Inheritance diagram for ngcbI2C_IO:
ngcbI2C

Public Member Functions

 ngcbI2C_IO (ngcbIFC *dev, ngcb_route_t r, int cnt)
 Constructor.
 
virtual ~ngcbI2C_IO ()
 Destructor.
 
int OutCB (int d, int *resultCode, char *erms)
 Write one word (call-back)
 
int InCB (int *d, int *resultCode, char *erms)
 Read one word (call-back)
 
- Public Member Functions inherited from ngcbI2C
 ngcbI2C ()
 
 ngcbI2C (int cnt)
 
 ngcbI2C (int scl, int sda)
 
 ngcbI2C (int scl, int sda, int cnt)
 
 ngcbI2C (int scl, int sda, int sclIn, int sdaIn, int ackIn, int cnt)
 
virtual ~ngcbI2C ()
 Destructor.
 
char * ErrMsg ()
 Return error-message buffer.
 
void AckOn ()
 Enable acknowledge handling.
 
void AckOff ()
 Disable acknowledge handling.
 
void SCL_IN (int bit)
 Define clock-line bit fot read (clock-stretching)
 
void SDA_IN (int bit)
 Define data-line bit for read (by default ack-line is the same)
 
void ACK_IN (int bit)
 Define ack-line bit.
 
void SDA_DIR_SWITCH (int bit)
 Define SDA direction switch bit.
 
void SCL_DIR_SWITCH (int bit)
 Define SCL direction switch bit.
 
void ClkStretching (int rx, int tx)
 Set clock-stretching capabilities.
 
void ClkStretchCnt (int cnt)
 Set counter for clock-stretching.
 
int ClkStretchCnt ()
 Return clock-stretching counter.
 
int Write (int addr, const char *byte, int n)
 Standard 7-bit write operation.
 
int Write10 (int addr, const char *byte, int n)
 10-bit write operation
 
int Read (int addr, char *byte, int n)
 Standard 7-bit read operation.
 
int Read10 (int addr, char *byte, int n)
 10-bit read operation
 
int LastState ()
 Return last state of SDA and SCL.
 

Public Attributes

int tmo
 Timeout for microsleep.
 

Detailed Description

I2C i/o-class

Constructor & Destructor Documentation

◆ ngcbI2C_IO()

ngcbI2C_IO::ngcbI2C_IO ( ngcbIFC * dev,
ngcb_route_t r,
int cnt )
inline

Constructor.

◆ ~ngcbI2C_IO()

virtual ngcbI2C_IO::~ngcbI2C_IO ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ InCB()

int ngcbI2C_IO::InCB ( int * d,
int * resultCode,
char * erms )
inlinevirtual

Read one word (call-back)

Reimplemented from ngcbI2C.

◆ OutCB()

int ngcbI2C_IO::OutCB ( int d,
int * resultCode,
char * erms )
inlinevirtual

Write one word (call-back)

Reimplemented from ngcbI2C.

Member Data Documentation

◆ tmo

int ngcbI2C_IO::tmo

Timeout for microsleep.


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