]> Repositories - Adafruit_Blinka-hackapet.git/blobdiff - src/adafruit_blinka/microcontroller/generic_linux/sysfs_analogout.py
Add GPIO support for Rock 5
[Adafruit_Blinka-hackapet.git] / src / adafruit_blinka / microcontroller / generic_linux / sysfs_analogout.py
index 56263d39555a384178cef873328139438747af36..0b2d857ef5ea95cb23b03f9b6f7cb57959df06ed 100644 (file)
@@ -1,3 +1,6 @@
+# SPDX-FileCopyrightText: 2021 Melissa LeBlanc-Williams for Adafruit Industries
+#
+# SPDX-License-Identifier: MIT
 """
 `analogio` - Analog output control
 =================================================
 """
 `analogio` - Analog output control
 =================================================
@@ -85,7 +88,7 @@ class AnalogOut(ContextManaged):
             self._channel_path.format(self._channel),
         )
 
             self._channel_path.format(self._channel),
         )
 
-        with open(path, "w") as analog_out:
+        with open(path, "w", encoding="utf-8") as analog_out:
             return analog_out.write(value + "\n")
 
     def deinit(self):
             return analog_out.write(value + "\n")
 
     def deinit(self):