예제 #1
0
def ReadReg(reg):
    print "Read Reg [", reg, "] =",
    if Click.WriteI2C(WR_PTR, reg >> 7, reg & 0x7f):
        r = Click.ReadI2C(RD_IND)
        if r[0] == 0x21:
            print r[1]
            return
    #else
    print "Fail"
예제 #2
0
def readError():
    if I2C:
        return Click.ReadI2C(RD_ERR)
    else:
        return 0