Class BoardInfo

    • Constructor Detail

    • Method Detail

      • populateBoardPinInfo

        public abstract void populateBoardPinInfo()
        Pin initialisation is done separately to the constructor since all known BoardInfo instances get instantiated on startup by the Java ServiceLoader.
      • getMake

        public String getMake()
        The make of the connected board, e.g. "Raspberry Pi"
        Returns:
        the make of the connected board
      • getModel

        public String getModel()
        The model of the connected board, e.g. "3B+"
        Returns:
        the model of the connected board
      • getMemoryKb

        public int getMemoryKb()
        Get the memory (in KB) of the connected board
        Returns:
        memory in KB
      • getLibraryPath

        public String getLibraryPath()
        Internal diozero method to get the library path prefix to be used when loading native libraries for this device.
        Returns:
        the library path prefix
      • getAdcVRef

        public float getAdcVRef()
        Get the Analog to Digital converter reference voltage to be used when taking ADC readings
        Returns:
        the reference voltage for this board
      • getOperatingSystemId

        public String getOperatingSystemId()
      • getOperatingSystemVersion

        public String getOperatingSystemVersion()
      • getName

        public String getName()
        Get the name of this board - usual a concatenation of make and model
        Returns:
        the name of this board
      • getLongName

        public String getLongName()
      • compareMakeAndModel

        public boolean compareMakeAndModel​(String make2,
                                           String model2)
        Compare make and model
        Parameters:
        make2 - the make to compare
        model2 - the model to compare
        Returns:
        true if the make and model are the same
      • createMmapGpio

        public MmapGpioInterface createMmapGpio()
        Instantiate the memory mapped GPIO interface for this board. Not that the caller needs to call initialise prior to use.
        Returns:
        the MMAP GPIO interface implementation for this board, null if there isn't one