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>
15 void METHOD(ATII2C
, Hidd_I2C
, PutBits
)
17 struct ati_staticdata
*sd
= SD(cl
);
20 val
= INREG(sd
->Card
.DDCReg
) & (ULONG
)~(RADEON_GPIO_EN_0
| RADEON_GPIO_EN_1
);
21 val
|= (msg
->scl
? 0:RADEON_GPIO_EN_1
);
22 val
|= (msg
->sda
? 0:RADEON_GPIO_EN_0
);
23 OUTREG(sd
->Card
.DDCReg
, val
);
24 val
= INREG(sd
->Card
.DDCReg
);
27 void METHOD(ATII2C
, Hidd_I2C
, GetBits
)
29 struct ati_staticdata
*sd
= SD(cl
);
31 ULONG val
= INREG(sd
->Card
.DDCReg
);
32 *msg
->sda
= (val
& RADEON_GPIO_Y_0
) != 0;
33 *msg
->scl
= (val
& RADEON_GPIO_Y_1
) != 0;
36 ADD2LIBS((STRPTR
)"i2c.hidd", 0, static struct Library
*, I2CBase
);