summaryrefslogtreecommitdiff
path: root/drivers/nrf24l01/nrf24l01test.py
diff options
context:
space:
mode:
authorstijn <stijn@ignitron.net>2020-06-18 11:19:14 +0200
committerDamien George <damien@micropython.org>2020-09-04 00:10:24 +1000
commit40ad8f1666b265dafc7844d765f45cfae4b6299f (patch)
treed073a4b4f791f53d1a73c47d029bf2b49f041d5e /drivers/nrf24l01/nrf24l01test.py
parentb0932fcf2e2f9a81abf7737ed4b2573bd9ad4a49 (diff)
all: Rename "sys" module to "usys".
This is consistent with the other 'micro' modules and allows implementing additional features in Python via e.g. micropython-lib's sys. Note this is a breaking change (not backwards compatible) for ports which do not enable weak links, as "import sys" must now be replaced with "import usys".
Diffstat (limited to 'drivers/nrf24l01/nrf24l01test.py')
-rw-r--r--drivers/nrf24l01/nrf24l01test.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/nrf24l01/nrf24l01test.py b/drivers/nrf24l01/nrf24l01test.py
index 14efbffd2..56bdb6e26 100644
--- a/drivers/nrf24l01/nrf24l01test.py
+++ b/drivers/nrf24l01/nrf24l01test.py
@@ -1,6 +1,6 @@
"""Test for nrf24l01 module. Portable between MicroPython targets."""
-import sys
+import usys
import ustruct as struct
import utime
from machine import Pin, SPI
@@ -14,14 +14,14 @@ _RX_POLL_DELAY = const(15)
# master may be a slow device. Value tested with Pyboard, ESP32 and ESP8266.
_SLAVE_SEND_DELAY = const(10)
-if sys.platform == "pyboard":
+if usys.platform == "pyboard":
cfg = {"spi": 2, "miso": "Y7", "mosi": "Y8", "sck": "Y6", "csn": "Y5", "ce": "Y4"}
-elif sys.platform == "esp8266": # Hardware SPI
+elif usys.platform == "esp8266": # Hardware SPI
cfg = {"spi": 1, "miso": 12, "mosi": 13, "sck": 14, "csn": 4, "ce": 5}
-elif sys.platform == "esp32": # Software SPI
+elif usys.platform == "esp32": # Software SPI
cfg = {"spi": -1, "miso": 32, "mosi": 33, "sck": 25, "csn": 26, "ce": 27}
else:
- raise ValueError("Unsupported platform {}".format(sys.platform))
+ raise ValueError("Unsupported platform {}".format(usys.platform))
# Addresses are in little-endian format. They correspond to big-endian
# 0xf0f0f0f0e1, 0xf0f0f0f0d2