Class: HackRF::Internals::RegisterArray
- Inherits:
-
Object
- Object
- HackRF::Internals::RegisterArray
show all
- Defined in:
- lib/hackrf/internals.rb
Instance Method Summary
collapse
Constructor Details
Returns a new instance of RegisterArray.
4
5
6
|
# File 'lib/hackrf/internals.rb', line 4
def initialize(device)
@device = device.ptr
end
|
Instance Method Details
#[](register) ⇒ Object
7
8
9
10
11
12
13
|
# File 'lib/hackrf/internals.rb', line 7
def [](register)
value = FFI::MemoryPointer.new(:uint16)
read(register,value)
return value.read_uint16
end
|
#[]=(register, value) ⇒ Object
15
16
17
|
# File 'lib/hackrf/internals.rb', line 15
def []=(register,value)
write(register,value)
end
|