mil.dod.th.ose.bbb.platform/src/mil/dod/th/ose/bbb/platform/BeagleBoneBlackGpioManager.java
private void enablePinAsOutput(final int pin) throws IOException
    {
        final File exportGpio = m_FileService.getFile(GPIO_PATH, "export");
        try (FileOutputStream fos = m_FileService.createFileOutputStream(exportGpio, false);
                PrintStream printStream = m_FileService.createPrintStream(fos))
        {
            printStream.print(pin);
        }
        
        final String gpioStr = GPIO_PREFIX + pin + "/direction";
        final File gpioDirection = m_FileService.getFile(GPIO_PATH, gpioStr);
        try (FileOutputStream fos = m_FileService.createFileOutputStream(gpioDirection, false);
                PrintStream printStream = m_FileService.createPrintStream(fos))
        {
            printStream.print("out");
        }
    }
/**
     * Method that enables and sets the specified GPIO pin as output.
     * 
     * @param pin
     *      The pin to be enabled and set as output.
     * @throws IOException
     *      Thrown if the pin cannot be enabled or setup to output.
     */
Method that enables and sets the specified GPIO pin as output.

@param pin
The pin to be enabled and set as output.
@throws IOException
Thrown if the pin cannot be enabled or setup to output.
Method that enables and sets the specified GPIO pin as output . @param pin The pin to be enabled and set as output . @throws IOException Thrown if the pin cannot be enabled or setup to output .
private void enablePinAsOutput(final int pin) throws IOException
    {
        final File exportGpio = m_FileService.getFile(GPIO_PATH, "export");
        try (FileOutputStream fos = m_FileService.createFileOutputStream(exportGpio, false);
                PrintStream printStream = m_FileService.createPrintStream(fos))
        {
            printStream.print(pin);
        }
        final String gpioStr = GPIO_PREFIX + pin + "/direction";
        final File gpioDirection = m_FileService.getFile(GPIO_PATH, gpioStr);
        try (FileOutputStream fos = m_FileService.createFileOutputStream(gpioDirection, false);
                PrintStream printStream = m_FileService.createPrintStream(fos))
        {
            printStream.print("out");
        }
    }
private void enablePinAsOutput ( final int pin ) throws IOException { final File exportGpio = m_FileService . getFile ( GPIO_PATH , "export" ) ; try ( FileOutputStream fos = m_FileService . createFileOutputStream ( exportGpio , false ) ; PrintStream printStream = m_FileService . createPrintStream ( fos ) ) { printStream . print ( pin ) ; } final String gpioStr = GPIO_PREFIX + pin + "/direction" ; final File gpioDirection = m_FileService . getFile ( GPIO_PATH , gpioStr ) ; try ( FileOutputStream fos = m_FileService . createFileOutputStream ( gpioDirection , false ) ; PrintStream printStream = m_FileService . createPrintStream ( fos ) ) { printStream . print ( "out" ) ; } }
Method that enables and sets the specified GPIO pin as output.
Method that enables and sets the specified GPIO pin as output .