circuitpython/tests/renesas-ra/i2c.py
Takeo Takahashi dc7de6ed83 renesas-ra: Change MICROPY_HW_BOARD_NAME definition to product name.
Changes in this commit:
- Change MICROPY_HW_BOARD_NAME definition to match the product name.
- Rename board folder's name to match the product name style.
- Change related files like Makefile, document descriptions, test cases, CI
  and tools.

Signed-off-by: Takeo Takahashi <takeo.takahashi.xv@renesas.com>
2023-04-27 14:12:53 +10:00

18 lines
293 B
Python

import os
import time
n = os.uname().machine
if "EK-RA6M2" in n:
i2c_id = 2
elif "EK-RA6M1" in n:
i2c_id = 0
elif ("RA4M1 CLICKER" in n) or ("EK-RA4M1" in n) or ("EK-RA4W1" in n):
print("SKIP")
raise SystemExit
else:
i2c_id = 0
from machine import I2C
i2c = I2C(i2c_id)