Module: IT8951
- Extended by:
- FFI::Library
- Defined in:
- lib/ruby_it8951.rb
Defined Under Namespace
Modules: IT8951_P
Classes: DeviceInfo, Error
Class Method Summary
collapse
Class Method Details
.get_device_info ⇒ Object
30
31
32
33
|
# File 'lib/ruby_it8951.rb', line 30
def get_device_info
d = IT8951_P.get_device_info
[d[:panelW], d[:panelH], d[:imgBufAddrL] + d[:imgBufAddrH] * 256, d[:fwVersion].to_s, d[:lutVersion].to_s]
end
|
.transfer_image(x, y, w, h, data) ⇒ Object
35
36
37
38
39
40
|
# File 'lib/ruby_it8951.rb', line 35
def transfer_image(x, y, w, h, data)
FFI::MemoryPointer.new(:uint8, data.length) do |p|
p.write_array_of_uint8(data)
IT8951_P.transfer_image(x, y, w, h, p)
end
end
|