-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename cap12xx to cap1xxx, and update/deprecate old artifact.
Change-Id: I34d57226dcb2961980968c7965ca926d100b96b6
- Loading branch information
Showing
18 changed files
with
282 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
TYPE="capacitive touch buttons" | ||
ARTIFACT_VERSION=1.0 | ||
ARTIFACT_VERSION=2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 80 additions & 0 deletions
80
cap1xxx/src/main/java/com/google/android/things/contrib/driver/cap12xx/Cap12xx.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
/* | ||
* Copyright 2016 Google Inc. | ||
* | ||
* 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. | ||
*/ | ||
|
||
package com.google.android.things.contrib.driver.cap12xx; | ||
|
||
import android.content.Context; | ||
import android.os.Handler; | ||
|
||
import com.google.android.things.contrib.driver.cap1xxx.Cap1xxx; | ||
|
||
import java.io.IOException; | ||
|
||
/** | ||
* Driver for the Microchip CAP12xx Capacitive Touch Controller | ||
* e.g. http://www.microchip.com/wwwproducts/en/CAP1208 | ||
* @deprecated Use {@link Cap1xxx} instead. | ||
*/ | ||
@Deprecated | ||
@SuppressWarnings("WeakerAccess") | ||
public class Cap12xx extends Cap1xxx { | ||
private static final String TAG = "Cap12xx"; | ||
|
||
/** | ||
* @deprecated Use {@link #Cap12xx(String, String, Configuration)} instead. | ||
*/ | ||
@Deprecated | ||
public Cap12xx(Context context, String i2cName, String alertName, Configuration chip) throws IOException { | ||
this(i2cName, alertName, chip, null); | ||
} | ||
|
||
/** | ||
* Create a new Cap1xxx controller. | ||
* | ||
* @param i2cName I2C port name where the controller is attached. Cannot be null. | ||
* @param alertName optional GPIO pin name connected to the controller's | ||
* alert interrupt signal. Can be null. | ||
* @param chip identifier for the connected controller device chip. | ||
* @throws IOException | ||
*/ | ||
public Cap12xx(String i2cName, String alertName, Configuration chip) throws IOException { | ||
this(i2cName, alertName, chip, null); | ||
} | ||
|
||
/** | ||
* @deprecated Use {@link #Cap12xx(String, String, Configuration, Handler)} instead. | ||
*/ | ||
@Deprecated | ||
public Cap12xx(Context context, String i2cName, String alertName, Configuration chip, | ||
Handler handler) throws IOException { | ||
this(i2cName, alertName, chip, handler); | ||
} | ||
|
||
/** | ||
* Create a new Cap1xxx controller. | ||
* | ||
* @param i2cName I2C port name where the controller is attached. Cannot be null. | ||
* @param alertName optional GPIO pin name connected to the controller's | ||
* alert interrupt signal. Can be null. | ||
* @param chip identifier for the connected controller device chip. | ||
* @param handler optional {@link Handler} for software polling and callback events. | ||
* @throws IOException | ||
*/ | ||
public Cap12xx(String i2cName, String alertName, Configuration chip, Handler handler) | ||
throws IOException { | ||
super(i2cName, alertName, chip, handler); | ||
} | ||
} |
89 changes: 89 additions & 0 deletions
89
...xx/src/main/java/com/google/android/things/contrib/driver/cap12xx/Cap12xxInputDriver.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
/* | ||
* Copyright 2016 Google Inc. | ||
* | ||
* 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. | ||
*/ | ||
|
||
package com.google.android.things.contrib.driver.cap12xx; | ||
|
||
import android.content.Context; | ||
import android.os.Handler; | ||
import android.view.KeyEvent; | ||
|
||
import com.google.android.things.contrib.driver.cap1xxx.Cap1xxx.Configuration; | ||
import com.google.android.things.contrib.driver.cap1xxx.Cap1xxxInputDriver; | ||
|
||
import java.io.IOException; | ||
|
||
/** | ||
* User-space driver to process capacitive touch events from the | ||
* CAP12xx family of touch controllers and forward them to the | ||
* Android input framework. | ||
* @deprecated Use {@link Cap1xxxInputDriver} instead. | ||
*/ | ||
@Deprecated | ||
@SuppressWarnings("WeakerAccess") | ||
public class Cap12xxInputDriver extends Cap1xxxInputDriver { | ||
private static final String TAG = "Cap12xxInputDriver"; | ||
|
||
/** | ||
* @deprecated Use {@link #Cap12xxInputDriver(String, String, Configuration, int[])} instead. | ||
*/ | ||
@Deprecated | ||
public Cap12xxInputDriver(Context context, String i2cName, String alertName, Configuration chip, | ||
int[] keyCodes) throws IOException { | ||
this(i2cName, alertName, chip, null, keyCodes); | ||
} | ||
|
||
/** | ||
* Create a new Cap1xxxInputDriver to forward capacitive touch events to the Android input | ||
* framework. | ||
* | ||
* @param i2cName I2C port name where the controller is attached. Cannot be null. | ||
* @param alertName Optional GPIO pin name connected to the controller's alert interrupt signal. | ||
* Can be null. | ||
* @param chip Identifier for the connected controller device chip. | ||
* @param keyCodes {@link KeyEvent} codes to be emitted for each input channel. Length must | ||
* match the input channel count of the Configuration {@code chip}. | ||
*/ | ||
public Cap12xxInputDriver(String i2cName, String alertName, Configuration chip, int[] keyCodes) | ||
throws IOException { | ||
this(i2cName, alertName, chip, null, keyCodes); | ||
} | ||
|
||
/** | ||
* @deprecated Use {@link #Cap12xxInputDriver(String, String, Configuration, Handler, int[])} instead. | ||
*/ | ||
@Deprecated | ||
public Cap12xxInputDriver(Context context, String i2cName, String alertName, Configuration chip, | ||
Handler handler, int[] keyCodes) throws IOException { | ||
this(i2cName, alertName, chip, handler, keyCodes); | ||
} | ||
|
||
/** | ||
* Create a new Cap1xxxInputDriver to forward capacitive touch events to the Android input | ||
* framework. | ||
* | ||
* @param i2cName I2C port name where the controller is attached. Cannot be null. | ||
* @param alertName Optional GPIO pin name connected to the controller's alert interrupt signal. | ||
* Can be null. | ||
* @param chip Identifier for the connected controller device chip. | ||
* @param handler Optional {@link Handler} for software polling and callback events. | ||
* @param keyCodes {@link KeyEvent} codes to be emitted for each input channel. Length must | ||
* match the input channel count of the Configuration {@code chip}. | ||
*/ | ||
public Cap12xxInputDriver(String i2cName, String alertName, Configuration chip, Handler handler, | ||
int[] keyCodes) throws IOException { | ||
super(i2cName, alertName, chip, handler, keyCodes); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.