mirror of
https://github.com/eclipse/upm.git
synced 2025-07-01 09:21:12 +03:00
Button: Removed grove dependency
* Renamed all files from groverrotary to rotary * Replaced all instances of groverrotary with rotary * Updated all CMake files Signed-off-by: Sisinty Sasmita Patra <sisinty.s.patra@intel.com>
This commit is contained in:

committed by
Noel Eck

parent
6a6a572069
commit
3753a1be5c
@ -22,12 +22,12 @@
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
public class GroveButtonSample {
|
||||
public class ButtonSample {
|
||||
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
// ! [Interesting]
|
||||
// Create the button object using GPIO pin 2
|
||||
upm_grove.GroveButton button = new upm_grove.GroveButton(2);
|
||||
upm_button.Button button = new upm_button.Button(2);
|
||||
|
||||
while (true) {
|
||||
System.out.println(button.name() + " value is " + button.value());
|
||||
@ -37,4 +37,4 @@ public class GroveButtonSample {
|
||||
// ! [Interesting]
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -22,13 +22,13 @@
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
public class GroveButton_intrSample {
|
||||
public class Button_intrSample {
|
||||
|
||||
public static int counter = 0;
|
||||
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
// ! [Interesting]
|
||||
upm_grove.GroveButton b = new upm_grove.GroveButton(2);
|
||||
upm_button.Button b = new upm_button.Button(2);
|
||||
|
||||
ButtonISR callback = new ButtonISR();
|
||||
b.installISR(2, callback);
|
||||
@ -47,7 +47,7 @@ class ButtonISR implements Runnable {
|
||||
}
|
||||
|
||||
public void run() {
|
||||
GroveButton_intrSample.counter++;
|
||||
Button_intrSample.counter++;
|
||||
System.out.println("Button pressed!");
|
||||
}
|
||||
}
|
||||
}
|
@ -30,8 +30,8 @@ add_example(CJQ4435Sample cjq4435)
|
||||
add_example(DS1307Sample ds1307)
|
||||
add_example(ENC03RSample enc03r)
|
||||
add_example(ES08ASample servo)
|
||||
add_example(GroveButtonSample grove)
|
||||
add_example(GroveButton_intrSample grove)
|
||||
add_example(ButtonSample button)
|
||||
add_example(Button_intrSample button)
|
||||
add_example(Collision collision)
|
||||
add_example(EHRSample ehr)
|
||||
add_example(Emg emg)
|
||||
|
Reference in New Issue
Block a user