getPinModes :: IPin -> Arduino [PinMode]
getPinModes p = do
  BoardCapabilities caps <- gets capabilities
  case p `M.lookup` caps of
    Nothing                            -> return []
    Just PinCapabilities{allowedModes} -> return $ map fst allowedModes

-- | Current state of the pin
getPinModes :: IPin -> Arduino [PinMode]
getPinModes p = do
  BoardCapabilities caps <- gets capabilities
  case p `M.lookup` caps of
    Nothing                            -> return []
    Just PinCapabilities{allowedModes} -> return $ map fst allowedModes

-- | Current state of the pin
getPinModes p = do
  BoardCapabilities caps <- gets capabilities
  case p `M.lookup` caps of
    Nothing                            -> return []
    Just PinCapabilities{allowedModes} -> return $ map fst allowedModes

-- | Current state of the pin