uC chip interface arduino
0.9.0
A interface for async and neuromrphic IC testing
|
This class is the API for the I2C interfaces of the uC It is used to configure, send and recive data from the I2C interfaces. More...
Public Member Functions | |
def | __init__ (self, api_object, interface_id) |
Constructor for the I2C interface. More... | |
def | __str__ (self) |
def | activate (self, speed=400000, order="LSBFIRST", number_of_bytes=1, time=0) |
Activat the I2C interface and configure it with the given speed, byte order and number of bytes. More... | |
def | byte_order (self) |
Returns the byte order of the I2C interface, and the time of when this status was processed by the uC. More... | |
def | data_from_chip (self) |
Returns the data recived from the chip, and the time it was processed by the uC. More... | |
def | data_from_chip_and_clear (self) |
Returns the data recived from the chip, and the time it was processed by the uC, and clears the data. More... | |
def | data_to_chip (self) |
Returns the data send to the chip, and the time it was processed by the uC. More... | |
def | data_to_chip_and_clear (self) |
Returns the data send to the chip, and the time it was processed by the uC, and clears the data data_to_chip will retun the data send by the uC to the device under test (DUT) More... | |
def | errors (self) |
Returns the errors and unhandled packets reported by the uC for this interface. More... | |
def | header (self) |
Returns the headers this I2C interface object is responsible for. More... | |
def | number_of_bytes (self) |
Returns the protocol data word width of the I2C interface, and the time of when this status was processed by the uC. More... | |
def | process_packet (self, packet) |
Processes a packet from the uC, and updates the status and stores the data of/in the I2C interface object. More... | |
def | send_read_request (self, device_address, register_address, word, time=0) |
Send a read request on the I2C interface. More... | |
def | send_write (self, device_address, register_address, word, time=0) |
Send a write request on the I2C interface. More... | |
def | speed (self) |
Returns the speed of the I2C interface, and the time of when this status was processed by the uC. More... | |
def | status (self) |
Returns the status of the I2C interface, and the time of when this status was processed by the uC. More... | |
def | update (self) |
update the data repersentation of the API object More... | |
This class is the API for the I2C interfaces of the uC It is used to configure, send and recive data from the I2C interfaces.
Definition at line 24 of file interface_i2c.py.
def __init__ | ( | self, | |
api_object, | |||
interface_id | |||
) |
Constructor for the I2C interface.
api_object | the parent API object |
interface_id | the id of the I2C interface |
Definition at line 28 of file interface_i2c.py.
def __str__ | ( | self | ) |
Definition at line 169 of file interface_i2c.py.
def activate | ( | self, | |
speed = 400000 , |
|||
order = "LSBFIRST" , |
|||
number_of_bytes = 1 , |
|||
time = 0 |
|||
) |
Activat the I2C interface and configure it with the given speed, byte order and number of bytes.
speed | the speed of the I2C interface possible values are 10000, 100000, 400000, 1000000, 3400000 |
order | the byte order of the I2C interface possible values are "LSBFIRST" or "MSBFIRST" |
number_of_bytes | the protocol data word width of the I2C interface possible values are 1 or 2 |
time | the time when the activation should be processed by the uC (0 means as soon as possible) |
Definition at line 233 of file interface_i2c.py.
def byte_order | ( | self | ) |
Returns the byte order of the I2C interface, and the time of when this status was processed by the uC.
Definition at line 98 of file interface_i2c.py.
def data_from_chip | ( | self | ) |
Returns the data recived from the chip, and the time it was processed by the uC.
will retun 2 lists: one with the word recoded and one with the time when it was recorded, linked by index @return: ([data_from_chip], [data_from_chip_times]) where data_from_chip is the data recived from the chip, and data_from_chip_times is the time it was processed by the uC
Definition at line 105 of file interface_i2c.py.
def data_from_chip_and_clear | ( | self | ) |
Returns the data recived from the chip, and the time it was processed by the uC, and clears the data.
will retun 2 lists: one with the word recoded and one with the time when it was recorded, linked by index @return: ([data_from_chip], [data_from_chip_times]) where data_from_chip is the data recived from the chip, and data_from_chip_times is the time it was processed by the uC
Definition at line 130 of file interface_i2c.py.
def data_to_chip | ( | self | ) |
Returns the data send to the chip, and the time it was processed by the uC.
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: ([data_to_chip], [data_to_chip_times]) where data_to_chip is the data send to the chip, and data_to_chip_times is the time it was processed by the uC
Definition at line 115 of file interface_i2c.py.
def data_to_chip_and_clear | ( | self | ) |
Returns the data send to the chip, and the time it was processed by the uC, and clears the data 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
Definition at line 144 of file interface_i2c.py.
def errors | ( | self | ) |
Returns the errors and unhandled packets reported by the uC for this interface.
Definition at line 162 of file interface_i2c.py.
def header | ( | self | ) |
Returns the headers this I2C interface object is responsible for.
Definition at line 70 of file interface_i2c.py.
def number_of_bytes | ( | self | ) |
Returns the protocol data word width of the I2C interface, and the time of when this status was processed by the uC.
Definition at line 84 of file interface_i2c.py.
def process_packet | ( | self, | |
packet | |||
) |
Processes a packet from the uC, and updates the status and stores the data of/in the I2C interface object.
packet | the packet to process |
Definition at line 182 of file interface_i2c.py.
def send_read_request | ( | self, | |
device_address, | |||
register_address, | |||
word, | |||
time = 0 |
|||
) |
Send a read request on the I2C interface.
device_address | the address of the device to read from (7bit) |
register_address | the address of the register to read from (8bit) |
word | ? |
time | the time when the read request should be processed by the uC (0 means as soon as possible) |
Definition at line 280 of file interface_i2c.py.
def send_write | ( | self, | |
device_address, | |||
register_address, | |||
word, | |||
time = 0 |
|||
) |
Send a write request on the I2C interface.
device_address | the address of the device to write to (7bit) |
register_address | the address of the register to write to (8bit) |
word | the word to write (8 or 16 bit depending on the number of bytes configured) |
time | the time when the write request should be processed by the uC (0 means as soon as possible) |
Definition at line 269 of file interface_i2c.py.
def speed | ( | self | ) |
Returns the speed of the I2C interface, and the time of when this status was processed by the uC.
Definition at line 91 of file interface_i2c.py.
def status | ( | self | ) |
Returns the status of the I2C interface, and the time of when this status was processed by the uC.
Definition at line 76 of file interface_i2c.py.
def update | ( | self | ) |
update the data repersentation of the API object
Definition at line 290 of file interface_i2c.py.