File tree Expand file tree Collapse file tree 4 files changed +13
-5
lines changed
src/adafruit_blinka/microcontroller/generic_agnostic_board Expand file tree Collapse file tree 4 files changed +13
-5
lines changed Original file line number Diff line number Diff line change
1
+ # SPDX-FileCopyrightText: 2024 Brent Rubell for Adafruit Industries
2
+ #
3
+ # SPDX-License-Identifier: MIT
1
4
import pytest
2
5
import board
3
6
import analogio
4
7
5
8
# Analog Outputs
6
-
7
-
8
9
def test_Ax_OUTPUT ():
9
10
"""Test analog output pin functionality."""
10
11
assert board .board_id == "GENERIC_AGNOSTIC_BOARD"
Original file line number Diff line number Diff line change
1
+ # SPDX-FileCopyrightText: 2024 Brent Rubell for Adafruit Industries
2
+ #
3
+ # SPDX-License-Identifier: MIT
1
4
import pytest
2
5
import board
3
6
import digitalio
Original file line number Diff line number Diff line change
1
+ # SPDX-FileCopyrightText: 2024 Brent Rubell for Adafruit Industries
2
+ #
3
+ # SPDX-License-Identifier: MIT
1
4
import pytest
2
5
import busio
3
6
from board import *
4
7
5
-
6
8
def test_i2c_scan_random ():
7
9
i2c = busio .I2C (SCL , SDA )
8
10
i2c .try_lock ()
Original file line number Diff line number Diff line change @@ -71,6 +71,8 @@ class Pin:
71
71
PULL_UP = 1
72
72
PULL_DOWN = 2
73
73
74
+ # pylint: disable=no-self-use
75
+
74
76
def return_toggle (self ):
75
77
"""Returns the pin's expected value, toggling between True and False"""
76
78
toggle_state = not self .previous_value
@@ -150,10 +152,10 @@ def read(self):
150
152
self .current_value = self .pin_behavior .get (self .id )()
151
153
152
154
# is pin a pull up and pin is LOW?
153
- if self ._pull == Pin .PULL_UP and self .current_value == False :
155
+ if self ._pull == Pin .PULL_UP and self .current_value is False :
154
156
self .current_value = False
155
157
# is pin a pull down and pin is HIGH?
156
- if self ._pull == Pin .PULL_DOWN and self .current_value == True :
158
+ if self ._pull == Pin .PULL_DOWN and self .current_value is True :
157
159
self .current_value = False
158
160
return self .current_value
159
161
You can’t perform that action at this time.
0 commit comments