All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pi4j.io.spi.SpiConfig Maven / Gradle / Ivy

The newest version!
package com.pi4j.io.spi;

/*-
 * #%L
 * **********************************************************************
 * ORGANIZATION  :  Pi4J
 * PROJECT       :  Pi4J :: LIBRARY  :: Java Library (CORE)
 * FILENAME      :  SpiConfig.java
 *
 * This file is part of the Pi4J project. More information about
 * this project can be found here:  https://pi4j.com/
 * **********************************************************************
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * #L%
 */

import com.pi4j.config.AddressConfig;
import com.pi4j.context.Context;
import com.pi4j.io.IOConfig;

/**
 * 

SpiConfig interface.

* * @author Robert Savage (http://www.savagehomeautomation.com) * @version $Id: $Id */ public interface SpiConfig extends AddressConfig, IOConfig { /** Constant BAUD_KEY="baud" */ String BAUD_KEY = "baud"; /** Constant BUS_KEY="bus" */ String BUS_KEY = "bus"; /** Constant MODE_KEY="mode" */ String MODE_KEY = "mode"; /** Constant FLAGS_KEY="flags" */ String FLAGS_KEY = "flags"; /** *

newBuilder.

* * @param context {@link Context} * @return a {@link com.pi4j.io.i2c.I2CConfigBuilder} object. */ static SpiConfigBuilder newBuilder(Context context) { return SpiConfigBuilder.newInstance(context); } /** *

baud.

* * @return a {@link java.lang.Integer} object. */ Integer baud(); /** *

getBaud.

* * @return a {@link java.lang.Integer} object. */ default Integer getBaud() { return baud(); } /** *

bus.

*

If the Bus value is configured, that SpiBus * value will be set in the flags {@link #flags()} bit 'A' 8 *

* * @return a {@link com.pi4j.io.spi.SpiBus} object. */ SpiBus bus(); /** *

getBus.

* * @return a {@link com.pi4j.io.spi.SpiBus} object. */ default SpiBus getBus() { return bus(); } /** *

busUserProvided.

* @return a boolean. */ boolean busUserProvided(); /** *

getBusUserProvided.

* @return a {@link java.lang.Boolean} object. */ default boolean getBusUserProvided(){ return busUserProvided(); } /** *

mode.

*

If the Mode value is configured, that SpiMode * value will be set in the flags {@link #mode()} bit 'm m' 1:0 *

* * @return a {@link com.pi4j.io.spi.SpiMode} object. */ SpiMode mode(); /** *

getMode.

* * @return a {@link com.pi4j.io.spi.SpiMode} object. */ default SpiMode getMode() { return mode(); } /** *

modeUserProvided.

* @return a boolean. */ boolean modeUserProvided(); /** *

bgetModeUserProvided.

* @return a {@link java.lang.Boolean} object. */ default boolean getModeUserProvided(){ return modeUserProvided(); } /** *

flags.

* * @return a {@link java.lang.Long} object. */ Long flags(); /** *

getFlags.

* * @return a {@link java.lang.Long} object. */ default Long getFlags() { return flags(); } /** *

channel. (ALIAS for 'address')

* * @return a {@link java.lang.Integer} object. */ Integer channel(); /** *

getFlags. (ALIAS for 'getAddress')

* * @return a {@link java.lang.Long} object. */ default Integer getChannel() { return channel(); } /** *

chipSelect. (ALIAS for 'address')

* * @return a {@link com.pi4j.io.spi.SpiChipSelect} object. */ SpiChipSelect chipSelect(); /** *

getFlags. (ALIAS for 'getAddress')

* * @return a {@link com.pi4j.io.spi.SpiChipSelect} object. */ default SpiChipSelect getChipSelect() { return chipSelect(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy