robotframework-rzsbc-i2c


Namerobotframework-rzsbc-i2c JSON
Version 1.0.2 PyPI version JSON
download
home_pageNone
SummaryRobot Framework Library for RZ-SBC I2C communication with board configuration and examples
upload_time2025-07-08 12:05:00
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT
keywords robot framework i2c rz-sbc renesas embedded hardware automation board-config
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Robot Framework RZ-SBC I2C Library

[![PyPI version](https://badge.fury.io/py/robotframework-rzsbc-i2c.svg)](https://badge.fury.io/py/robotframework-rzsbc-i2c)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

Robot Framework library for RZ-SBC I2C communication with dynamic board configuration support.

## Features

- **I2C Communication**: Full I2C support with hardware abstraction
- **Board Configuration**: Dynamic board configuration via YAML
- **Multiple Board Support**: Support for different RZ-SBC variants
- **Configuration Management**: Centralized configuration for boards, features, and instances
- **Example Test Cases**: Ready-to-use Robot Framework examples

## Installation

```bash
pip install robotframework-rzsbc-i2c
```

## Quick Start

### Basic I2C Operations

```robot
*** Settings ***
Library    robotframework_rzsbc_i2c.I2CLibrary

*** Test Cases ***
Simple I2C Test
    Open I2C Bus    1
    ${devices}=    Scan I2C Bus
    Log    Found devices: ${devices}
    Close I2C Bus
```

### With Board Configuration

```robot
*** Settings ***
Library    robotframework_rzsbc_i2c.I2CLibrary.I2CLibrary
Library    robotframework_rzsbc_i2c.common.board_config

*** Variables ***
${BOARD_TYPE}    rzsbc

*** Test Cases ***
I2C Test with Board Config
    # Set up board configuration
    Set Board Type    ${BOARD_TYPE}
    ${board_config}=    Get Board Config
    
    # Get I2C configuration from YAML
    ${i2c_config}=    Get Feature Config    i2c    ${BOARD_TYPE}    core-image-bsp
    ${i2c_instances}=    Get Feature Instances    i2c    ${BOARD_TYPE}    core-image-bsp
    
    # Initialize I2C with board config
    Init I2C Library    /dev/ttyUSB0    ${BOARD_TYPE}
    
    # Test each configured I2C instance
    FOR    ${instance_name}    IN    @{i2c_instances.keys()}
        ${instance}=    Set Variable    ${i2c_instances}[${instance_name}]
        Continue For Loop If    not ${instance}[enabled]
        
        Set I2C Parameters    i2c_bus=${instance}[i2c_bus]    expected_addr=${instance}[expected_addr]
        Detect I2C Adapter
        Scan I2C Device    ${instance}[i2c_bus]
    END
```

## Configuration Structure

The library uses YAML configuration files to define board-specific settings:

```yaml
board_configs:
  rzsbc:
    enabled: true
    board_type: "rzsbc"
    serial_port: "/dev/ttyUSB0"
    baud_rate: 115200
    platform: "rzg2l-sbc"
    
    usb_relay_config:
      name: "usbrelay"
      port: "0_1"
      
      core-image-bsp:
        enabled: true
        features:
          i2c:
            enabled: true
            instances:
              i2c_0:
                enabled: true
                i2c_bus: 0
                expected_addr: "12"
              i2c_3:
                enabled: true
                i2c_bus: 3
                expected_addr: "50"
```

## Library Components

### I2CLibrary Keywords

#### Hardware Operations
- `Init I2C Library` - Initialize with serial connection and board type
- `Open I2C Bus` - Open I2C bus for communication
- `Close I2C Bus` - Close I2C bus
- `Scan I2C Bus` - Scan for I2C devices
- `Detect I2C Adapter` - Detect I2C adapter on board

#### Device Communication
- `Read I2C Register` - Read from device register
- `Write I2C Register` - Write to device register
- `Read I2C Block` - Read block of data
- `Write I2C Block` - Write block of data
- `I2C Device Present` - Check device presence

#### Configuration
- `Set I2C Parameters` - Set I2C bus and address parameters
- `Set I2C Delay` - Set delay between operations

### Board Configuration Keywords

- `Set Board Type` - Set current board type
- `Get Board Config` - Get board configuration
- `Get Feature Config` - Get feature-specific configuration
- `Get Feature Instances` - Get feature instances
- `Get USB Relay Config` - Get USB relay configuration

## Examples

### Hardware-Independent Test

```robot
*** Settings ***
Library    robotframework_rzsbc_i2c.I2CLibrary

*** Test Cases ***
Safe I2C Operations
    TRY
        Open I2C Bus    1
        ${devices}=    Scan I2C Bus
        Log    Found ${devices.__len__()} devices
        
        FOR    ${device}    IN    @{devices}
            Log    Device: ${device}
            ${present}=    I2C Device Present    ${device}
            Should Be True    ${present}
        END
        
        Close I2C Bus
    EXCEPT    AS    ${error}
        Log    I2C operations failed: ${error}
        Log    This is expected without proper I2C hardware
    END
```

### Board-Specific Test

```robot
*** Settings ***
Library    robotframework_rzsbc_i2c.I2CLibrary.I2CLibrary
Library    robotframework_rzsbc_i2c.common.board_config

*** Test Cases ***
Board Specific I2C Test
    Set Board Type    rzsbc
    
    ${i2c_instances}=    Get Feature Instances    i2c    rzsbc    core-image-bsp
    
    Init I2C Library    /dev/ttyUSB0    rzsbc
    
    FOR    ${instance_name}    ${instance_config}    IN    &{i2c_instances}
        Continue For Loop If    not ${instance_config.enabled}
        
        Log    Testing ${instance_name}: Bus ${instance_config.i2c_bus}
        Set I2C Parameters    i2c_bus=${instance_config.i2c_bus}    expected_addr=${instance_config.expected_addr}
        
        Detect I2C Adapter
        Scan I2C Device    ${instance_config.i2c_bus}
    END
```

## Package Structure

```
robotframework_rzsbc_i2c/
├── __init__.py                 # Package initialization
├── I2CLibrary/                 # I2C Library implementation
│   ├── __init__.py
│   └── I2CLibrary.py          # Main I2C library
├── common/                     # Common utilities
│   ├── __init__.py
│   └── board_config.py        # Board configuration management
├── config/                     # Configuration files
│   └── config.yml             # Default board configurations
└── examples/                   # Example test files
    └── i2c_example.robot       # Complete usage example
```

## Supported Platforms

- Renesas RZ-SBC boards
- Systems with I2C support and `/dev/i2c-*` devices
- Linux-based embedded systems

## Hardware Requirements

- I2C-enabled hardware
- Serial connection for board communication (optional)
- Proper I2C device permissions

## Troubleshooting

### Permission Issues
```bash
# Add user to i2c group
sudo usermod -a -G i2c $USER

# Set device permissions
sudo chmod 666 /dev/i2c-*
```

### Missing I2C Tools
```bash
# Install i2c-tools (Ubuntu/Debian)
sudo apt-get install i2c-tools

# Install smbus2 (Python)
pip install smbus2
```

### Configuration Issues
- Ensure `config.yml` is properly formatted
- Check board type matches configuration
- Verify serial port permissions and availability

## License

MIT License - see LICENSE file for details.

## Contributing

Contributions welcome! Please submit pull requests or issues on GitHub.t Framework RZ-SBC I2C Library

[![PyPI version](https://badge.fury.io/py/robotframework-rzsbc-i2c.svg)](https://badge.fury.io/py/robotframework-rzsbc-i2c)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

Robot Framework library for RZ-SBC I2C communication with dynamic board configuration support for Renesas RZ-SBC systems.

## Features

-   **Dynamic Board Configuration**: Automatically loads I2C settings based on board type
-   **Serial Integration**: Works with serial connections for remote I2C operations
-   **Configuration Management**: Uses YAML-based configuration files for different board types
-   **Comprehensive I2C Operations**: Supports device detection, scanning, and communication
-   **Error Handling**: Robust error handling and logging for debugging

## Installation

```bash
pip install robotframework-rzsbc-i2c
```

## Requirements

-   Robot Framework (>=3.2.2)
-   pyserial (>=3.5)
-   pyyaml (>=5.4.0)

## Quick Start

```robot
*** Settings ***
Library    robotframework_rzsbc_i2c.I2CLibrary.I2CLibrary

*** Test Cases ***
Test I2C Communication
    Init I2C Library    ${serial_connection}    RZ_SBC_Board
    Set I2C Parameters    i2c_bus=1    expected_addr=0x48
    Detect I2C Adapter
    ${devices}=    Scan I2C Device    1
    Log    Found devices: ${devices}
```

## Keywords

### Initialization and Configuration

-   `Init I2C Library` - Initialize the library with serial connection and board type
-   `Set I2C Parameters` - Configure I2C bus, addresses, and timing parameters

### Device Operations

-   `Detect I2C Adapter` - Detect and validate I2C adapter presence
-   `Scan I2C Device` - Scan for devices on specified I2C bus
-   `Verify I2C Address Present` - Check if a specific device address is present
-   `Get I2C Bus Address Pairs` - Retrieve configured I2C bus/address pairs for board type

## Board Configuration

The library uses YAML configuration files to define board-specific I2C settings:

```yaml
boards:
    RZ_SBC_Board:
        images:
            linux_image:
                features:
                    i2c:
                        enabled: true
                        instances:
                            temp_sensor:
                                i2c_bus: 1
                                expected_addr: "0x48"
                            rtc:
                                i2c_bus: 1
                                expected_addr: "0x68"
```

## Examples

### Basic I2C Device Detection

```robot
*** Settings ***
Library    robotframework_rzsbc_i2c.I2CLibrary.I2CLibrary

*** Test Cases ***
Detect I2C Devices
    Init I2C Library    ${SERIAL}    RZ_SBC_Board
    Detect I2C Adapter    delay=2

    ${pairs}=    Get I2C Bus Address Pairs    RZ_SBC_Board
    FOR    ${bus}    ${addr}    IN    @{pairs}
        ${present}=    Verify I2C Address Present    ${bus}    ${addr}
        Should Be True    ${present}    Device ${addr} not found on bus ${bus}
    END
```

### Advanced I2C Scanning

```robot
*** Settings ***
Library    robotframework_rzsbc_i2c.I2CLibrary.I2CLibrary

*** Test Cases ***
Comprehensive I2C Test
    Init I2C Library    ${SERIAL}    RZ_SBC_Board
    Set I2C Parameters    retry_count=3    delay_between_commands=1

    # Scan multiple buses
    FOR    ${bus}    IN RANGE    0    3
        TRY
            ${devices}=    Scan I2C Device    ${bus}    delay=2
            Log    Bus ${bus} devices: ${devices}
        EXCEPT
            Log    Bus ${bus} not available or no devices found
        END
    END
```

### Board-Specific Configuration

```robot
*** Settings ***
Library    robotframework_rzsbc_i2c.I2CLibrary.I2CLibrary

*** Test Cases ***
Test Multiple Board Types
    @{board_types}=    Create List    RZ_SBC_Board    RZ_G2L_Board    RZ_V2L_Board

    FOR    ${board}    IN    @{board_types}
        TRY
            Init I2C Library    ${SERIAL}    ${board}
            ${pairs}=    Get I2C Bus Address Pairs    ${board}
            Log    ${board} I2C configuration: ${pairs}
        EXCEPT    AS    ${error}
            Log    Board ${board} not configured: ${error}
        END
    END
```

## Configuration File Structure

The library expects a `config.yml` file with the following structure:

```yaml
boards:
    BOARD_TYPE:
        images:
            IMAGE_NAME:
                features:
                    i2c:
                        enabled: true/false
                        instances:
                            INSTANCE_NAME:
                                i2c_bus: BUS_NUMBER
                                expected_addr: "DEVICE_ADDRESS"
```

## Error Handling

The library provides comprehensive error handling:

-   **Missing Configuration**: Graceful handling when board configs are not found
-   **Serial Communication**: Robust serial connection error handling
-   **I2C Hardware**: Proper error reporting for I2C hardware issues
-   **Device Detection**: Clear feedback when devices are not present

## Supported Platforms

-   Renesas RZ-SBC systems
-   Any Linux system with I2C support
-   Remote systems via serial connection

## Hardware Requirements

-   I2C-enabled system or board
-   Serial connection for remote operations
-   Proper I2C device permissions

## Troubleshooting

### Common Issues

1. **Import Errors**: Ensure all dependencies are installed
2. **Permission Denied**: Check I2C device permissions (`/dev/i2c-*`)
3. **Configuration Not Found**: Verify `config.yml` file location and format
4. **Serial Connection**: Ensure proper serial connection and baud rate

### Debug Mode

Enable detailed logging by setting the Robot Framework log level:

```robot
*** Settings ***
Library    robotframework_rzsbc_i2c.I2CLibrary.I2CLibrary    WITH NAME    I2C
```

## License

MIT License. See LICENSE file for details.

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## Support

For issues and questions, please use the GitHub issue tracker.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "robotframework-rzsbc-i2c",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "robot, framework, i2c, rz-sbc, renesas, embedded, hardware, automation, board-config",
    "author": null,
    "author_email": "RZ-CI Team <rz-ci@renesas.com>",
    "download_url": "https://files.pythonhosted.org/packages/c2/97/4a8a11a1efd650193a25c23ffef1065738464b8faa3370e9a8af60c78684/robotframework_rzsbc_i2c-1.0.2.tar.gz",
    "platform": null,
    "description": "# Robot Framework RZ-SBC I2C Library\n\n[![PyPI version](https://badge.fury.io/py/robotframework-rzsbc-i2c.svg)](https://badge.fury.io/py/robotframework-rzsbc-i2c)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nRobot Framework library for RZ-SBC I2C communication with dynamic board configuration support.\n\n## Features\n\n- **I2C Communication**: Full I2C support with hardware abstraction\n- **Board Configuration**: Dynamic board configuration via YAML\n- **Multiple Board Support**: Support for different RZ-SBC variants\n- **Configuration Management**: Centralized configuration for boards, features, and instances\n- **Example Test Cases**: Ready-to-use Robot Framework examples\n\n## Installation\n\n```bash\npip install robotframework-rzsbc-i2c\n```\n\n## Quick Start\n\n### Basic I2C Operations\n\n```robot\n*** Settings ***\nLibrary    robotframework_rzsbc_i2c.I2CLibrary\n\n*** Test Cases ***\nSimple I2C Test\n    Open I2C Bus    1\n    ${devices}=    Scan I2C Bus\n    Log    Found devices: ${devices}\n    Close I2C Bus\n```\n\n### With Board Configuration\n\n```robot\n*** Settings ***\nLibrary    robotframework_rzsbc_i2c.I2CLibrary.I2CLibrary\nLibrary    robotframework_rzsbc_i2c.common.board_config\n\n*** Variables ***\n${BOARD_TYPE}    rzsbc\n\n*** Test Cases ***\nI2C Test with Board Config\n    # Set up board configuration\n    Set Board Type    ${BOARD_TYPE}\n    ${board_config}=    Get Board Config\n    \n    # Get I2C configuration from YAML\n    ${i2c_config}=    Get Feature Config    i2c    ${BOARD_TYPE}    core-image-bsp\n    ${i2c_instances}=    Get Feature Instances    i2c    ${BOARD_TYPE}    core-image-bsp\n    \n    # Initialize I2C with board config\n    Init I2C Library    /dev/ttyUSB0    ${BOARD_TYPE}\n    \n    # Test each configured I2C instance\n    FOR    ${instance_name}    IN    @{i2c_instances.keys()}\n        ${instance}=    Set Variable    ${i2c_instances}[${instance_name}]\n        Continue For Loop If    not ${instance}[enabled]\n        \n        Set I2C Parameters    i2c_bus=${instance}[i2c_bus]    expected_addr=${instance}[expected_addr]\n        Detect I2C Adapter\n        Scan I2C Device    ${instance}[i2c_bus]\n    END\n```\n\n## Configuration Structure\n\nThe library uses YAML configuration files to define board-specific settings:\n\n```yaml\nboard_configs:\n  rzsbc:\n    enabled: true\n    board_type: \"rzsbc\"\n    serial_port: \"/dev/ttyUSB0\"\n    baud_rate: 115200\n    platform: \"rzg2l-sbc\"\n    \n    usb_relay_config:\n      name: \"usbrelay\"\n      port: \"0_1\"\n      \n      core-image-bsp:\n        enabled: true\n        features:\n          i2c:\n            enabled: true\n            instances:\n              i2c_0:\n                enabled: true\n                i2c_bus: 0\n                expected_addr: \"12\"\n              i2c_3:\n                enabled: true\n                i2c_bus: 3\n                expected_addr: \"50\"\n```\n\n## Library Components\n\n### I2CLibrary Keywords\n\n#### Hardware Operations\n- `Init I2C Library` - Initialize with serial connection and board type\n- `Open I2C Bus` - Open I2C bus for communication\n- `Close I2C Bus` - Close I2C bus\n- `Scan I2C Bus` - Scan for I2C devices\n- `Detect I2C Adapter` - Detect I2C adapter on board\n\n#### Device Communication\n- `Read I2C Register` - Read from device register\n- `Write I2C Register` - Write to device register\n- `Read I2C Block` - Read block of data\n- `Write I2C Block` - Write block of data\n- `I2C Device Present` - Check device presence\n\n#### Configuration\n- `Set I2C Parameters` - Set I2C bus and address parameters\n- `Set I2C Delay` - Set delay between operations\n\n### Board Configuration Keywords\n\n- `Set Board Type` - Set current board type\n- `Get Board Config` - Get board configuration\n- `Get Feature Config` - Get feature-specific configuration\n- `Get Feature Instances` - Get feature instances\n- `Get USB Relay Config` - Get USB relay configuration\n\n## Examples\n\n### Hardware-Independent Test\n\n```robot\n*** Settings ***\nLibrary    robotframework_rzsbc_i2c.I2CLibrary\n\n*** Test Cases ***\nSafe I2C Operations\n    TRY\n        Open I2C Bus    1\n        ${devices}=    Scan I2C Bus\n        Log    Found ${devices.__len__()} devices\n        \n        FOR    ${device}    IN    @{devices}\n            Log    Device: ${device}\n            ${present}=    I2C Device Present    ${device}\n            Should Be True    ${present}\n        END\n        \n        Close I2C Bus\n    EXCEPT    AS    ${error}\n        Log    I2C operations failed: ${error}\n        Log    This is expected without proper I2C hardware\n    END\n```\n\n### Board-Specific Test\n\n```robot\n*** Settings ***\nLibrary    robotframework_rzsbc_i2c.I2CLibrary.I2CLibrary\nLibrary    robotframework_rzsbc_i2c.common.board_config\n\n*** Test Cases ***\nBoard Specific I2C Test\n    Set Board Type    rzsbc\n    \n    ${i2c_instances}=    Get Feature Instances    i2c    rzsbc    core-image-bsp\n    \n    Init I2C Library    /dev/ttyUSB0    rzsbc\n    \n    FOR    ${instance_name}    ${instance_config}    IN    &{i2c_instances}\n        Continue For Loop If    not ${instance_config.enabled}\n        \n        Log    Testing ${instance_name}: Bus ${instance_config.i2c_bus}\n        Set I2C Parameters    i2c_bus=${instance_config.i2c_bus}    expected_addr=${instance_config.expected_addr}\n        \n        Detect I2C Adapter\n        Scan I2C Device    ${instance_config.i2c_bus}\n    END\n```\n\n## Package Structure\n\n```\nrobotframework_rzsbc_i2c/\n\u251c\u2500\u2500 __init__.py                 # Package initialization\n\u251c\u2500\u2500 I2CLibrary/                 # I2C Library implementation\n\u2502   \u251c\u2500\u2500 __init__.py\n\u2502   \u2514\u2500\u2500 I2CLibrary.py          # Main I2C library\n\u251c\u2500\u2500 common/                     # Common utilities\n\u2502   \u251c\u2500\u2500 __init__.py\n\u2502   \u2514\u2500\u2500 board_config.py        # Board configuration management\n\u251c\u2500\u2500 config/                     # Configuration files\n\u2502   \u2514\u2500\u2500 config.yml             # Default board configurations\n\u2514\u2500\u2500 examples/                   # Example test files\n    \u2514\u2500\u2500 i2c_example.robot       # Complete usage example\n```\n\n## Supported Platforms\n\n- Renesas RZ-SBC boards\n- Systems with I2C support and `/dev/i2c-*` devices\n- Linux-based embedded systems\n\n## Hardware Requirements\n\n- I2C-enabled hardware\n- Serial connection for board communication (optional)\n- Proper I2C device permissions\n\n## Troubleshooting\n\n### Permission Issues\n```bash\n# Add user to i2c group\nsudo usermod -a -G i2c $USER\n\n# Set device permissions\nsudo chmod 666 /dev/i2c-*\n```\n\n### Missing I2C Tools\n```bash\n# Install i2c-tools (Ubuntu/Debian)\nsudo apt-get install i2c-tools\n\n# Install smbus2 (Python)\npip install smbus2\n```\n\n### Configuration Issues\n- Ensure `config.yml` is properly formatted\n- Check board type matches configuration\n- Verify serial port permissions and availability\n\n## License\n\nMIT License - see LICENSE file for details.\n\n## Contributing\n\nContributions welcome! Please submit pull requests or issues on GitHub.t Framework RZ-SBC I2C Library\n\n[![PyPI version](https://badge.fury.io/py/robotframework-rzsbc-i2c.svg)](https://badge.fury.io/py/robotframework-rzsbc-i2c)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nRobot Framework library for RZ-SBC I2C communication with dynamic board configuration support for Renesas RZ-SBC systems.\n\n## Features\n\n-   **Dynamic Board Configuration**: Automatically loads I2C settings based on board type\n-   **Serial Integration**: Works with serial connections for remote I2C operations\n-   **Configuration Management**: Uses YAML-based configuration files for different board types\n-   **Comprehensive I2C Operations**: Supports device detection, scanning, and communication\n-   **Error Handling**: Robust error handling and logging for debugging\n\n## Installation\n\n```bash\npip install robotframework-rzsbc-i2c\n```\n\n## Requirements\n\n-   Robot Framework (>=3.2.2)\n-   pyserial (>=3.5)\n-   pyyaml (>=5.4.0)\n\n## Quick Start\n\n```robot\n*** Settings ***\nLibrary    robotframework_rzsbc_i2c.I2CLibrary.I2CLibrary\n\n*** Test Cases ***\nTest I2C Communication\n    Init I2C Library    ${serial_connection}    RZ_SBC_Board\n    Set I2C Parameters    i2c_bus=1    expected_addr=0x48\n    Detect I2C Adapter\n    ${devices}=    Scan I2C Device    1\n    Log    Found devices: ${devices}\n```\n\n## Keywords\n\n### Initialization and Configuration\n\n-   `Init I2C Library` - Initialize the library with serial connection and board type\n-   `Set I2C Parameters` - Configure I2C bus, addresses, and timing parameters\n\n### Device Operations\n\n-   `Detect I2C Adapter` - Detect and validate I2C adapter presence\n-   `Scan I2C Device` - Scan for devices on specified I2C bus\n-   `Verify I2C Address Present` - Check if a specific device address is present\n-   `Get I2C Bus Address Pairs` - Retrieve configured I2C bus/address pairs for board type\n\n## Board Configuration\n\nThe library uses YAML configuration files to define board-specific I2C settings:\n\n```yaml\nboards:\n    RZ_SBC_Board:\n        images:\n            linux_image:\n                features:\n                    i2c:\n                        enabled: true\n                        instances:\n                            temp_sensor:\n                                i2c_bus: 1\n                                expected_addr: \"0x48\"\n                            rtc:\n                                i2c_bus: 1\n                                expected_addr: \"0x68\"\n```\n\n## Examples\n\n### Basic I2C Device Detection\n\n```robot\n*** Settings ***\nLibrary    robotframework_rzsbc_i2c.I2CLibrary.I2CLibrary\n\n*** Test Cases ***\nDetect I2C Devices\n    Init I2C Library    ${SERIAL}    RZ_SBC_Board\n    Detect I2C Adapter    delay=2\n\n    ${pairs}=    Get I2C Bus Address Pairs    RZ_SBC_Board\n    FOR    ${bus}    ${addr}    IN    @{pairs}\n        ${present}=    Verify I2C Address Present    ${bus}    ${addr}\n        Should Be True    ${present}    Device ${addr} not found on bus ${bus}\n    END\n```\n\n### Advanced I2C Scanning\n\n```robot\n*** Settings ***\nLibrary    robotframework_rzsbc_i2c.I2CLibrary.I2CLibrary\n\n*** Test Cases ***\nComprehensive I2C Test\n    Init I2C Library    ${SERIAL}    RZ_SBC_Board\n    Set I2C Parameters    retry_count=3    delay_between_commands=1\n\n    # Scan multiple buses\n    FOR    ${bus}    IN RANGE    0    3\n        TRY\n            ${devices}=    Scan I2C Device    ${bus}    delay=2\n            Log    Bus ${bus} devices: ${devices}\n        EXCEPT\n            Log    Bus ${bus} not available or no devices found\n        END\n    END\n```\n\n### Board-Specific Configuration\n\n```robot\n*** Settings ***\nLibrary    robotframework_rzsbc_i2c.I2CLibrary.I2CLibrary\n\n*** Test Cases ***\nTest Multiple Board Types\n    @{board_types}=    Create List    RZ_SBC_Board    RZ_G2L_Board    RZ_V2L_Board\n\n    FOR    ${board}    IN    @{board_types}\n        TRY\n            Init I2C Library    ${SERIAL}    ${board}\n            ${pairs}=    Get I2C Bus Address Pairs    ${board}\n            Log    ${board} I2C configuration: ${pairs}\n        EXCEPT    AS    ${error}\n            Log    Board ${board} not configured: ${error}\n        END\n    END\n```\n\n## Configuration File Structure\n\nThe library expects a `config.yml` file with the following structure:\n\n```yaml\nboards:\n    BOARD_TYPE:\n        images:\n            IMAGE_NAME:\n                features:\n                    i2c:\n                        enabled: true/false\n                        instances:\n                            INSTANCE_NAME:\n                                i2c_bus: BUS_NUMBER\n                                expected_addr: \"DEVICE_ADDRESS\"\n```\n\n## Error Handling\n\nThe library provides comprehensive error handling:\n\n-   **Missing Configuration**: Graceful handling when board configs are not found\n-   **Serial Communication**: Robust serial connection error handling\n-   **I2C Hardware**: Proper error reporting for I2C hardware issues\n-   **Device Detection**: Clear feedback when devices are not present\n\n## Supported Platforms\n\n-   Renesas RZ-SBC systems\n-   Any Linux system with I2C support\n-   Remote systems via serial connection\n\n## Hardware Requirements\n\n-   I2C-enabled system or board\n-   Serial connection for remote operations\n-   Proper I2C device permissions\n\n## Troubleshooting\n\n### Common Issues\n\n1. **Import Errors**: Ensure all dependencies are installed\n2. **Permission Denied**: Check I2C device permissions (`/dev/i2c-*`)\n3. **Configuration Not Found**: Verify `config.yml` file location and format\n4. **Serial Connection**: Ensure proper serial connection and baud rate\n\n### Debug Mode\n\nEnable detailed logging by setting the Robot Framework log level:\n\n```robot\n*** Settings ***\nLibrary    robotframework_rzsbc_i2c.I2CLibrary.I2CLibrary    WITH NAME    I2C\n```\n\n## License\n\nMIT License. See LICENSE file for details.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## Support\n\nFor issues and questions, please use the GitHub issue tracker.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Robot Framework Library for RZ-SBC I2C communication with board configuration and examples",
    "version": "1.0.2",
    "project_urls": {
        "Documentation": "https://renesas.github.io/robotframework-rzsbc-i2c/",
        "Homepage": "https://github.com/renesas/robotframework-rzsbc-i2c",
        "Issues": "https://github.com/renesas/robotframework-rzsbc-i2c/issues",
        "Repository": "https://github.com/renesas/robotframework-rzsbc-i2c"
    },
    "split_keywords": [
        "robot",
        " framework",
        " i2c",
        " rz-sbc",
        " renesas",
        " embedded",
        " hardware",
        " automation",
        " board-config"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "9f0223a814c3fdd32fb6dfa5673d5afe86a62db57d41be1018873e2ea8fa6882",
                "md5": "c9427abd82709623cec5910ec1d73b30",
                "sha256": "801118022e06042a93958c59581e1936fc1e7f365df2784319c56ec4f045fa37"
            },
            "downloads": -1,
            "filename": "robotframework_rzsbc_i2c-1.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c9427abd82709623cec5910ec1d73b30",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 16494,
            "upload_time": "2025-07-08T12:04:59",
            "upload_time_iso_8601": "2025-07-08T12:04:59.292671Z",
            "url": "https://files.pythonhosted.org/packages/9f/02/23a814c3fdd32fb6dfa5673d5afe86a62db57d41be1018873e2ea8fa6882/robotframework_rzsbc_i2c-1.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c2974a8a11a1efd650193a25c23ffef1065738464b8faa3370e9a8af60c78684",
                "md5": "8c18caedec04c2abd8f38b72b4f6e3ff",
                "sha256": "04a48ac3c4cbbe64cf817575f5488df45398c0d67c6db84a0dcd3b287ed8f84b"
            },
            "downloads": -1,
            "filename": "robotframework_rzsbc_i2c-1.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "8c18caedec04c2abd8f38b72b4f6e3ff",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 17168,
            "upload_time": "2025-07-08T12:05:00",
            "upload_time_iso_8601": "2025-07-08T12:05:00.967354Z",
            "url": "https://files.pythonhosted.org/packages/c2/97/4a8a11a1efd650193a25c23ffef1065738464b8faa3370e9a8af60c78684/robotframework_rzsbc_i2c-1.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-08 12:05:00",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "renesas",
    "github_project": "robotframework-rzsbc-i2c",
    "github_not_found": true,
    "lcname": "robotframework-rzsbc-i2c"
}
        
Elapsed time: 0.50412s