Browse Source

examples/hwapi/hwconfig*: Use inline Signal() args where possible.

pull/2555/merge
Paul Sokolovsky 8 years ago
parent
commit
5feeba8897
  1. 2
      examples/hwapi/hwconfig_esp8266_esp12.py
  2. 8
      examples/hwapi/hwconfig_pyboard.py
  3. 2
      examples/hwapi/hwconfig_z_frdm_k64f.py

2
examples/hwapi/hwconfig_esp8266_esp12.py

@ -2,4 +2,4 @@ from machine import Pin, Signal
# ESP12 module as used by many boards # ESP12 module as used by many boards
# Blue LED on pin 2, active low (inverted) # Blue LED on pin 2, active low (inverted)
LED = Signal(Pin(2, Pin.OUT), invert=True) LED = Signal(2, Pin.OUT, invert=True)

8
examples/hwapi/hwconfig_pyboard.py

@ -1,13 +1,13 @@
from machine import Pin, Signal from machine import Pin, Signal
# Red LED on pin LED_RED also kown as A13 # Red LED on pin LED_RED also kown as A13
LED = Signal(Pin('LED_RED', Pin.OUT)) LED = Signal('LED_RED', Pin.OUT)
# Green LED on pin LED_GREEN also known as A14 # Green LED on pin LED_GREEN also known as A14
LED2 = Signal(Pin('LED_GREEN', Pin.OUT)) LED2 = Signal('LED_GREEN', Pin.OUT)
# Yellow LED on pin LED_YELLOW also known as A15 # Yellow LED on pin LED_YELLOW also known as A15
LED3 = Signal(Pin('LED_YELLOW', Pin.OUT)) LED3 = Signal('LED_YELLOW', Pin.OUT)
# Blue LED on pin LED_BLUE also known as B4 # Blue LED on pin LED_BLUE also known as B4
LED4 = Signal(Pin('LED_BLUE', Pin.OUT)) LED4 = Signal('LED_BLUE', Pin.OUT)

2
examples/hwapi/hwconfig_z_frdm_k64f.py

@ -2,4 +2,4 @@ from machine import Pin, Signal
# Freescale/NXP FRDM-K64F board # Freescale/NXP FRDM-K64F board
# Blue LED on port B, pin 21 # Blue LED on port B, pin 21
LED = Signal(Pin(("GPIO_1", 21), Pin.OUT)) LED = Signal(("GPIO_1", 21), Pin.OUT)

Loading…
Cancel
Save