uC chip interface arduino
0.9.0
A interface for async and neuromrphic IC testing
|
This exposes all the pin functionality for use,. More...
Public Member Functions | |
def | __init__ (self, api_object, interface_id) |
def | __str__ (self) |
def | activate (self, pin_mode="OUTPUT", interval=0, time=0) |
activate the pin with the given mode and interval More... | |
def | data_from_chip (self) |
data_from_chip will retun the data recoded by the uC send from the device under test (DUT) More... | |
def | data_from_chip_and_clear (self) |
def | data_to_chip (self) |
data_to_chip will retun the data send by the uC to the device under test (DUT) More... | |
def | data_to_chip_and_clear (self) |
def | errors (self) |
errors all errors corresponding to this interface More... | |
def | header (self) |
header returns the packet headers associated whith this interface More... | |
def | interface_type (self) |
interface_type returns the currently configured mode of the pin More... | |
def | interval (self) |
interval not yet suported for PWM/analog read More... | |
def | process_packet (self, packet) |
process packets arriving for this interface, updates the internal state and stores the data More... | |
def | send (self, value, time=0) |
set the corresponding pin to the given value at the given time More... | |
def | status (self) |
status returns the state of this interface, More... | |
def | update (self) |
update the internal state representation of the pin object More... | |
This exposes all the pin functionality for use,.
for reading state and data please use the functions provided as they trigger an update of the internal state before returning values
at the moment it is limited to digital read and write but is supposed to be extended to analog read and write and PWM functionality on first need / request
Definition at line 24 of file interface_pin.py.
def __init__ | ( | self, | |
api_object, | |||
interface_id | |||
) |
Definition at line 32 of file interface_pin.py.
def __str__ | ( | self | ) |
Definition at line 153 of file interface_pin.py.
def activate | ( | self, | |
pin_mode = "OUTPUT" , |
|||
interval = 0 , |
|||
time = 0 |
|||
) |
activate the pin with the given mode and interval
pin_mode | the mode of the pin, can be "INPUT", "OUTPUT" and future "PWM", "ANALOG_INPUT", "ANALOG_OUTPUT" |
interval | the interval for the pin, not yet implemented |
time | the time when the activation should be done, 0 means as soon as possible |
Definition at line 205 of file interface_pin.py.
def data_from_chip | ( | self | ) |
data_from_chip will retun the data recoded by the uC send from the device under test (DUT)
will retun 2 lists: one with the word recoded and one with the time when it was recorded, linked by index :return: the words from the DUT and the times of those words :rtype: ([int],[int])
Definition at line 103 of file interface_pin.py.
def data_from_chip_and_clear | ( | self | ) |
Definition at line 128 of file interface_pin.py.
def data_to_chip | ( | self | ) |
data_to_chip will retun the data send by the uC to the device under test (DUT)
will retun 2 lists: one with the word send and one with the exact time when it was send, linked by index the time might differ slightly from the time you sheduled the send word, as it is the time when it was send out and the uC can only send one word at a time :return: the words send to the DUT and the times of those words :rtype: ([int],[int])
Definition at line 114 of file interface_pin.py.
def data_to_chip_and_clear | ( | self | ) |
Definition at line 136 of file interface_pin.py.
def errors | ( | self | ) |
errors all errors corresponding to this interface
:return: list of all errors :rtype: [string]
Definition at line 144 of file interface_pin.py.
def header | ( | self | ) |
header returns the packet headers associated whith this interface
:return: packet headers of this interface :rtype: Header (IntEnum)
Definition at line 61 of file interface_pin.py.
def interface_type | ( | self | ) |
interface_type returns the currently configured mode of the pin
:return: mode of the pin like "INPUT" or "OUTPUT" :rtype: string
Definition at line 85 of file interface_pin.py.
def interval | ( | self | ) |
interval not yet suported for PWM/analog read
:return: _description_ :rtype: _type_
Definition at line 94 of file interface_pin.py.
def process_packet | ( | self, | |
packet | |||
) |
process packets arriving for this interface, updates the internal state and stores the data
packet | the packet to process |
Definition at line 165 of file interface_pin.py.
def send | ( | self, | |
value, | |||
time = 0 |
|||
) |
set the corresponding pin to the given value at the given time
value | the value to set the pin to, 0 or 1 |
time | the time when the value should be set, 0 means as soon as possible |
Definition at line 238 of file interface_pin.py.
def status | ( | self | ) |
status returns the state of this interface,
it can be: - active - everything is working fine - activation pending - the uC has not acknolaged the activation yet after the request to activate the interface - not active - the interface has not been configured and activate - error - there was an error during activation or during use, please consult the errors using the errors function :return: the state of the interface and the timestamp in us :rtype: (string, int)
Definition at line 69 of file interface_pin.py.
def update | ( | self | ) |
update the internal state representation of the pin object
Definition at line 249 of file interface_pin.py.