src.services.hardware_interface package¶
Subpackages¶
- src.services.hardware_interface.interfaces package
- Submodules
- src.services.hardware_interface.interfaces.dummy_interface module
DummyInterfaceDummyInterface.SPI_change_settings()DummyInterface.cleanup()DummyInterface.get_uart_dummy_data_from_tx()DummyInterface.is_UART_data_available()DummyInterface.read_gpio()DummyInterface.receive_I2C_byte_data()DummyInterface.receive_I2C_data()DummyInterface.receive_I2C_word_data()DummyInterface.receive_UART_byte_data()DummyInterface.receive_UART_data()DummyInterface.send_I2C_byte_data()DummyInterface.send_I2C_data()DummyInterface.send_I2C_word_data()DummyInterface.send_SPI_data()DummyInterface.send_UART_byte_data()DummyInterface.send_UART_data()DummyInterface.send_and_receive_SPI_data()DummyInterface.set_uart_dummy_data_for_rx()DummyInterface.setup()DummyInterface.setup_gpio()DummyInterface.write_gpio()
- src.services.hardware_interface.interfaces.raspberrypi_interface module
- Module contents
- src.services.hardware_interface.testing package
Submodules¶
src.services.hardware_interface.base module¶
- class src.services.hardware_interface.base.HardwareInterface¶
Bases:
ABC- abstractmethod SPI_change_settings(spi_name: str, frequency: int, mode: int)¶
- abstractmethod cleanup()¶
- abstractmethod is_UART_data_available(uart_name: str) bool¶
- abstractmethod read_gpio(pin: int) int¶
- abstractmethod receive_I2C_byte_data(i2c_name: str, i2c_address: int, register: int) int¶
- abstractmethod receive_I2C_data(i2c_name: str, i2c_address: int, register: int, length: int) list[int]¶
- abstractmethod receive_I2C_word_data(i2c_name: str, i2c_address: int, register: int) int¶
- abstractmethod receive_UART_byte_data(uart_name: str, number_of_bytes: int, timeout: float) bytes¶
- abstractmethod receive_UART_data(uart_name: str, *args, **kwargs) str¶
- abstractmethod send_I2C_byte_data(i2c_name: str, i2c_address: int, register: int, data: int)¶
- abstractmethod send_I2C_data(i2c_name: str, i2c_address: int, register: int, data: list[int])¶
- abstractmethod send_I2C_word_data(i2c_name: str, i2c_address: int, register: int, data: int)¶
- abstractmethod send_SPI_data(spi_name: str, data: list[int])¶
- abstractmethod send_UART_byte_data(uart_name: str, data: bytes)¶
- abstractmethod send_UART_data(uart_name: str, data: str, *args, **kwargs)¶
- abstractmethod send_and_receive_SPI_data(spi_name: str, data: list[int]) list[int]¶
- abstractmethod setup(uart_setup: list[UARTSetup], spi_setup: list[SPISetup], i2c_setup: list[I2CSetup])¶
- abstractmethod setup_gpio(pin: int, direction: EGPIO_Direction)¶
- abstractmethod write_gpio(pin: int, value: int)¶
- class src.services.hardware_interface.base.I2CSetup(bus: int | str, name: str)¶
Bases:
object- bus: int | str¶
- name: str¶
src.services.hardware_interface.setup_interface module¶
- src.services.hardware_interface.setup_interface.interface_factory(communication_type: str) HardwareInterface¶
- src.services.hardware_interface.setup_interface.setup_interface(communication_type: str, uart_setup: list[UARTSetup], spi_setup: list[SPISetup], i2c_setup: list[I2CSetup]) HardwareInterface¶