"""NXP LPC4330 pin names"""
try:
from greatfet import GreatFET
from greatfet.interfaces.adc import ADC
gf = GreatFET()
"""NXP LPC4330 pin names"""
try:
from greatfet import GreatFET
from greatfet.interfaces.adc import ADC
gf = GreatFET()
- "Unable to create GreatFET object. Make sure library is installed and the device is connected."
- )
+ "Unable to create GreatFET object. Make sure library is "
+ "installed and the device is connected."
+ ) from ModuleNotFoundError
if mode in (Pin.IN, Pin.OUT):
if self.id not in gf.GPIO_MAPPINGS:
raise ValueError("Pin does not have GPIO capabilities")
if mode in (Pin.IN, Pin.OUT):
if self.id not in gf.GPIO_MAPPINGS:
raise ValueError("Pin does not have GPIO capabilities")
# ADC only available on these pins
if self.id not in gf.ADC_MAPPINGS:
raise ValueError("Pin does not have ADC capabilities")
# ADC only available on these pins
if self.id not in gf.ADC_MAPPINGS:
raise ValueError("Pin does not have ADC capabilities")
self._pin = ADC(gf, self.id)
elif mode == Pin.DAC:
# DAC only available on these pins
self._pin = ADC(gf, self.id)
elif mode == Pin.DAC:
# DAC only available on these pins