import platform
dev_sys = platform.system()

if dev_sys != "Windows":
    import iic_gpio

class i2c_gpio:
    def __init__(self):
        if dev_sys != "Windows":
            self._iic_gpio =  iic_gpio   

    def init_isr_gpio(self, io, mode):
        if dev_sys != "Windows":
            iic_gpio.init_isr_gpio(str(io), str(mode))        
        
    def set_callback(self, callback=None):
        if dev_sys != "Windows":    
            iic_gpio.set_callback(callback)

    def wait_interrupt(self, io): 
        if dev_sys != "Windows":    
            iic_gpio.wait_interrupt(str(io))
    
    def set_collect_flag(self):
        if dev_sys != "Windows":     
            iic_gpio.set_collect_flag()
    
    def get_timestamps(self):
        if dev_sys != "Windows":     
            return iic_gpio.get_timestamps()
        return 0, None
    
    def write_gpio(self, io, level):
        if dev_sys != "Windows":     
           iic_gpio.write_gpio(str(io), str(level)) 

    