Class RaspberryPiMmapGpio
java.lang.Object
com.diozero.internal.board.raspberrypi.RaspberryPiMmapGpio
- All Implemented Interfaces:
MmapGpioInterface
,Closeable
,AutoCloseable
public class RaspberryPiMmapGpio extends Object implements MmapGpioInterface
-
Constructor Summary
Constructors Constructor Description RaspberryPiMmapGpio(boolean piIs2711)
-
Method Summary
Modifier and Type Method Description void
close()
DeviceMode
getMode(int gpio)
Returns the function of a GPIO: 0=input, 1=output, 4=alt0boolean
gpioRead(int gpio)
void
gpioWrite(int gpio, boolean value)
void
initialise()
static void
main(String[] args)
void
setMode(int gpio, DeviceMode mode)
void
setPullUpDown(int gpio, GpioPullUpDown pud)
-
Constructor Details
-
RaspberryPiMmapGpio
public RaspberryPiMmapGpio(boolean piIs2711)
-
-
Method Details
-
initialise
public void initialise()- Specified by:
initialise
in interfaceMmapGpioInterface
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceMmapGpioInterface
-
getMode
Returns the function of a GPIO: 0=input, 1=output, 4=alt0- Specified by:
getMode
in interfaceMmapGpioInterface
- Parameters:
gpio
- GPIO number- Returns:
- GPIO mode (0 - INPUT, 1 - OUTPUT)
-
setMode
- Specified by:
setMode
in interfaceMmapGpioInterface
-
setPullUpDown
- Specified by:
setPullUpDown
in interfaceMmapGpioInterface
-
gpioRead
public boolean gpioRead(int gpio)- Specified by:
gpioRead
in interfaceMmapGpioInterface
-
gpioWrite
public void gpioWrite(int gpio, boolean value)- Specified by:
gpioWrite
in interfaceMmapGpioInterface
-
main
-