コード例 #1
0
ファイル: epd2in7.py プロジェクト: fraserk9/ereader
 def send_data(self, data):
     self.digital_write(self.dc_pin, GPIO.HIGH)
     # the parameter type is list but not int
     # so use [data] instead of data
     epdif.spi_transfer([data])
コード例 #2
0
ファイル: epd2in7.py プロジェクト: fraserk9/ereader
 def send_command(self, command):
     self.digital_write(self.dc_pin, GPIO.LOW)
     # the parameter type is list but not int
     # so use [command] instead of command
     epdif.spi_transfer([command])
コード例 #3
0
 def send_data(self, data):
     self.bus.write_byte_data(DEVICE_ADDRESS, 0x35, 0x10) # DC HIGH
     # the parameter type is list but not int
     # so use [data] instead of data
     epdif.spi_transfer([data])
コード例 #4
0
 def send_command(self, command):
     self.bus.write_byte_data(DEVICE_ADDRESS, 0x35, 0x00) # DC LOW
     # the parameter type is list but not int
     # so use [command] instead of command
     epdif.spi_transfer([command])
コード例 #5
0
ファイル: epd4in2b.py プロジェクト: markfinn/pool-control
 def send_buffer(self, buffer):
     self.digital_write(self.dc_pin, GPIO.HIGH)
     for chunk in (buffer[i:i + 1024]
                   for i in xrange(0, len(buffer), 1024)):
         epdif.spi_transfer(chunk)