Pico-Arduino
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
PicoPinFunction Class Reference

The pico requires that the function of the pin is defined. In Arduino, there is no such concept - however we need to define if the pin is input or output. More...

#include <PicoPinFunction.h>

Public Member Functions

bool setPinMode (pin_size_t pinNumber, PinMode pinMode)
 defines the actual Arduino PinMode. Returns true if it needed to be changed
 
bool isModeDefined (pin_size_t pinNumber)
 checks if the mode was defined for the pin
 
bool isInput (pin_size_t pinNumber)
 checks if the pin has been defined as input
 
bool isOutput (pin_size_t pinNumber)
 checks if the pin has been defined as output
 
bool isSetup (pin_size_t pinNumber)
 checks if the setup has been done for the pin
 
void setSetup (pin_size_t pinNumber)
 marks the pin setup as completed
 
PinMode pinMode (pin_size_t pinNumber)
 returns the pin mode
 
const char * pinModeStr (pin_size_t pinNumber)
 returns the PinMode as string
 
void clear (pin_size_t pinNumber)
 set gpio function to GPIO_FUNC_NULL
 
void usePin (pin_size_t pinNumber, PinFunction pinFunction, PinSetup *setup=nullptr)
 setup Pico pin init function bysed on functionality
 

Static Public Member Functions

static PicoPinFunctioninstance ()
 

Protected Member Functions

 PicoPinFunction ()
 protected constructor because this is a singleton
 

Protected Attributes

PinInfopinInfo
 
bool adc_init_flag = false
 
int current_adc
 

Detailed Description

The pico requires that the function of the pin is defined. In Arduino, there is no such concept - however we need to define if the pin is input or output.

Author
Phil Schatzmann

The documentation for this class was generated from the following file: