2 Copyright © 2004, The AROS Development Team. All rights reserved.
8 #include "radeon_reg.h"
9 #include "radeon_macros.h"
11 #include <aros/symbolsets.h>
12 #include <aros/debug.h>
13 #include <proto/exec.h>
17 void METHOD(ATII2C
, Hidd_I2C
, PutBits
)
19 struct ati_staticdata
*sd
= SD(cl
);
22 val
= INREG(sd
->Card
.DDCReg
) & (ULONG
)~(RADEON_GPIO_EN_0
| RADEON_GPIO_EN_1
);
23 val
|= (msg
->scl
? 0:RADEON_GPIO_EN_1
);
24 val
|= (msg
->sda
? 0:RADEON_GPIO_EN_0
);
25 OUTREG(sd
->Card
.DDCReg
, val
);
26 val
= INREG(sd
->Card
.DDCReg
);
29 void METHOD(ATII2C
, Hidd_I2C
, GetBits
)
31 struct ati_staticdata
*sd
= SD(cl
);
33 ULONG val
= INREG(sd
->Card
.DDCReg
);
34 *msg
->sda
= (val
& RADEON_GPIO_Y_0
) != 0;
35 *msg
->scl
= (val
& RADEON_GPIO_Y_1
) != 0;
38 ADD2LIBS((STRPTR
)"i2c.hidd", 0, static struct Library
*, I2CBase
);