mac-rom/OS/I2C/I2C_Cyclone.h
Elliot Nunn 4325cdcc78 Bring in CubeE sources
Resource forks are included only for .rsrc files. These are DeRezzed into their data fork. 'ckid' resources, from the Projector VCS, are not included.

The Tools directory, containing mostly junk, is also excluded.
2017-12-26 09:52:23 +08:00

39 lines
1.3 KiB
C

/*
File name: I2C_Cyclone.h
Function: Header file for the I2C Component
History: 10/26/92 New for Cyclone (code was orginally from Touchstone Project.)
*/
/* globals */
typedef struct I2CShadow
{
unsigned char gDMSDRec[25]; /* DMSD array */
unsigned char gVDCRec[17]; /* VDC array */
};
typedef struct I2CShadow I2CShadow;
typedef I2CShadow *I2CShadowPtr;
typedef struct {
ComponentInstance gSelf; /* Saved component instance */
Handle gShadowHandle; /* Saved handle to shadow registers */
I2CShadowPtr gShadowPtr; /* Pointer to the shadow registers */
// unsigned char gDMSDRec[25]; /* DMSD array */
// unsigned char gVDCRec[17]; /* VDC array */
} I2CGlobals;
/* i2c Interface */
#define ki2cSelectors 4
pascal ComponentResult tI2CRead(Handle storage, unsigned short slaveAddr, short byteCount, unsigned char *dataBuf);
pascal ComponentResult tI2CWrite(Handle storage, unsigned short slaveAddr, short byteCount, unsigned char *dataBuf);
pascal ComponentResult tI2CReadWithSubAddr(Handle storage, unsigned short slaveAddr, unsigned short subAddr, short byteCount, unsigned char *dataBuf);
pascal ComponentResult tI2CWriteWithSubAddr(Handle storage, unsigned short slaveAddr, unsigned short subAddr, short byteCount, unsigned char *dataBuf);