#ifndef _TDA844_IMPL_H
#define _TDA844_IMPL_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#include <sys/promif.h>
#define TDA8444_MAX_DACS 16
#define TDA8444_CHANS 8
#define TDA8444_BUSY 0x01
#define TDA8444_SUSPENDED 0x02
#define TDA8444_REGBASE 0xf0
#define TDA8444_UNKNOWN_OUT -1
#define TDA8444_MAX_OUT 0x3f
#define TDA8444_MIN_OUT 0x0
#define TDA8444_MINOR_TO_DEVINST(x) ((x & 0xf00) >> 8)
#define TDA8444_MINOR_TO_CHANNEL(x) (x & 0x00f)
#define TDA8444_CHANNEL_TO_MINOR(x) x
#define TDA8444_DEVINST_TO_MINOR(x) (x << 8)
#define TDA8444_NODE_TYPE "ddi_i2c:adio"
#define DPRINTF(print_flag, args) \
if (tda8444_debug & (print_flag)) { prom_printf args; }
#define RESUME 0x01
#define IO 0x02
struct tda8444_unit {
i2c_transfer_t *tda8444_transfer;
kmutex_t tda8444_mutex;
kcondvar_t tda8444_cv;
uint8_t tda8444_flags;
int8_t tda8444_output[TDA8444_MAX_DACS];
i2c_client_hdl_t tda8444_hdl;
char tda8444_name[12];
uint16_t tda8444_oflag[TDA8444_MAX_DACS];
};
#ifdef __cplusplus
}
#endif
#endif