mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Renaming templates
This commit is contained in:
@@ -32,7 +32,10 @@ import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* @webref
|
||||
* The GPIO class reads and writes from General Purpose I/O pins
|
||||
*
|
||||
* @webref GPIO
|
||||
* @webBrief The GPIO class reads and writes from General Purpose I/O pins
|
||||
*/
|
||||
public class GPIO {
|
||||
|
||||
@@ -109,7 +112,7 @@ public class GPIO {
|
||||
* @see noInterrupts
|
||||
* @see interrupts
|
||||
* @see releaseInterrupt
|
||||
* @webref
|
||||
* @webref GPIO
|
||||
* @webBrief Calls a function when the value of an input pin changes
|
||||
*/
|
||||
public static void attachInterrupt(int pin, PApplet parent, String method, int mode) {
|
||||
@@ -190,7 +193,7 @@ public class GPIO {
|
||||
* @return GPIO.HIGH (1) or GPIO.LOW (0)
|
||||
* @see pinMode
|
||||
* @see digitalWrite
|
||||
* @webref
|
||||
* @webref GPIO
|
||||
* @webBrief Returns the value of an input pin
|
||||
*/
|
||||
public static int digitalRead(int pin) {
|
||||
@@ -231,7 +234,7 @@ public class GPIO {
|
||||
* @param value GPIO.HIGH (1) or GPIO.LOW (0)
|
||||
* @see pinMode
|
||||
* @see digitalRead
|
||||
* @webref
|
||||
* @webref GPIO
|
||||
* @webBrief Sets an output pin to be either high or low
|
||||
*/
|
||||
public static void digitalWrite(int pin, int value) {
|
||||
@@ -337,7 +340,7 @@ public class GPIO {
|
||||
* @see attachInterrupt
|
||||
* @see noInterrupts
|
||||
* @see releaseInterrupt
|
||||
* @webref
|
||||
* @webref GPIO
|
||||
* @webBrief Allows interrupts to happen
|
||||
*/
|
||||
public static void interrupts() {
|
||||
@@ -360,7 +363,7 @@ public class GPIO {
|
||||
* @see attachInterrupt
|
||||
* @see interrupts
|
||||
* @see releaseInterrupt
|
||||
* @webref
|
||||
* @webref GPIO
|
||||
* @webBrief Prevents interrupts from happpening
|
||||
*/
|
||||
public static void noInterrupts() {
|
||||
@@ -389,7 +392,7 @@ public class GPIO {
|
||||
* @see digitalRead
|
||||
* @see digitalWrite
|
||||
* @see releasePin
|
||||
* @webref
|
||||
* @webref GPIO
|
||||
* @webBrief Configures a pin to act either as input or output
|
||||
*/
|
||||
public static void pinMode(int pin, int mode) {
|
||||
@@ -469,7 +472,7 @@ public class GPIO {
|
||||
* @see attachInterrupt
|
||||
* @see noInterrupts
|
||||
* @see interrupts
|
||||
* @webref
|
||||
* @webref GPIO
|
||||
* @webBrief Stops listening for interrupts on an input pin
|
||||
*/
|
||||
public static void releaseInterrupt(int pin) {
|
||||
@@ -499,7 +502,7 @@ public class GPIO {
|
||||
*
|
||||
* @param pin GPIO pin
|
||||
* @see pinMode
|
||||
* @webref
|
||||
* @webref GPIO
|
||||
* @webBrief Gives ownership of a pin back to the operating system
|
||||
*/
|
||||
public static void releasePin(int pin) {
|
||||
@@ -536,7 +539,7 @@ public class GPIO {
|
||||
* wait indefinitely until the input pin has changed to the desired state.
|
||||
* @param pin GPIO pin
|
||||
* @param mode what to wait for: GPIO.CHANGE, GPIO.FALLING or GPIO.RISING
|
||||
* @webref
|
||||
* @webref GPIO
|
||||
* @webBrief Waits for the value of an input pin to change
|
||||
*/
|
||||
public static void waitFor(int pin, int mode) {
|
||||
@@ -558,7 +561,7 @@ public class GPIO {
|
||||
*
|
||||
* This function will throw a RuntimeException in case of a timeout.
|
||||
* @param timeout don't wait more than timeout milliseconds
|
||||
* @webref
|
||||
* @webref GPIO
|
||||
* @webBrief Waits for the value of an input pin to change
|
||||
*/
|
||||
public static void waitFor(int pin, int mode, int timeout) {
|
||||
|
||||
@@ -53,7 +53,7 @@ import java.util.Arrays;
|
||||
* passing it as an argument to
|
||||
* <a href="I2C_beginTransmission_.html">beginTransmission()</a>.
|
||||
*
|
||||
* @webref
|
||||
* @webref I2C
|
||||
* @webBrief Opens an I2C interface as master
|
||||
*/
|
||||
public class I2C {
|
||||
@@ -69,7 +69,7 @@ public class I2C {
|
||||
* Opens an I2C interface as master
|
||||
* @param dev interface name
|
||||
* @see list
|
||||
* @webref
|
||||
* @webref I2C
|
||||
*/
|
||||
public I2C(String dev) {
|
||||
NativeInterface.loadLibrary();
|
||||
@@ -99,7 +99,7 @@ public class I2C {
|
||||
* @see write
|
||||
* @see read
|
||||
* @see endTransmission
|
||||
* @webref
|
||||
* @webref I2C
|
||||
* @webBrief Begins a transmission to an attached device
|
||||
*/
|
||||
public void beginTransmission(int slave) {
|
||||
@@ -123,7 +123,7 @@ public class I2C {
|
||||
* Note: It is possible to have two or more object using the same interface at a
|
||||
* time.
|
||||
*
|
||||
* @webref
|
||||
* @webref I2C
|
||||
* @webBrief Closes the I2C device.
|
||||
*/
|
||||
public void close() {
|
||||
@@ -154,7 +154,7 @@ public class I2C {
|
||||
*
|
||||
* @see beginTransmission
|
||||
* @see write
|
||||
* @webref
|
||||
* @webref I2C
|
||||
* @webBrief Ends the current transmissions.
|
||||
*/
|
||||
public void endTransmission() {
|
||||
@@ -183,7 +183,7 @@ public class I2C {
|
||||
/**
|
||||
* Lists all available I2C interfaces
|
||||
* @return String array
|
||||
* @webref
|
||||
* @webref I2C
|
||||
* @webBrief Lists all available I2C interfaces
|
||||
*/
|
||||
public static String[] list() {
|
||||
@@ -222,7 +222,7 @@ public class I2C {
|
||||
* @see beginTransmission
|
||||
* @see write
|
||||
* @see endTransmission
|
||||
* @webref
|
||||
* @webref I2C
|
||||
* @webBrief Read bytes from the attached device.
|
||||
*/
|
||||
public byte[] read(int len) {
|
||||
@@ -260,7 +260,7 @@ public class I2C {
|
||||
* @see beginTransmission
|
||||
* @see read
|
||||
* @see endTransmission
|
||||
* @webref
|
||||
* @webref I2C
|
||||
* @webBrief Add bytes to be written to the device.
|
||||
*/
|
||||
public void write(byte[] out) {
|
||||
|
||||
@@ -44,7 +44,7 @@ import java.util.Arrays;
|
||||
* /sys/class/leds. You can also try running Processing as root user using
|
||||
* "sudo", but this is generally not recommended.
|
||||
*
|
||||
* @webref
|
||||
* @webref LED
|
||||
* @webBrief Opens a LED device
|
||||
*/
|
||||
public class LED {
|
||||
@@ -59,7 +59,8 @@ public class LED {
|
||||
* Opens a LED device
|
||||
* @param dev device name
|
||||
* @see list
|
||||
* @webref Opens a LED device
|
||||
* @webref LED
|
||||
* @webBrief Opens a LED device
|
||||
*/
|
||||
public LED(String dev) {
|
||||
NativeInterface.loadLibrary();
|
||||
@@ -118,7 +119,7 @@ public class LED {
|
||||
/**
|
||||
* Sets the brightness
|
||||
* @param bright 0.0 (off) to 1.0 (maximum)
|
||||
* @webref
|
||||
* @webref LED
|
||||
* @webBrief Sets the brightness
|
||||
*/
|
||||
public void brightness(float bright) {
|
||||
@@ -145,7 +146,7 @@ public class LED {
|
||||
* Without calling this function the LED will remain in the current state even
|
||||
* after the sketch has been closed.
|
||||
*
|
||||
* @webref
|
||||
* @webref LED
|
||||
* @webBrief Restores the previous state
|
||||
*/
|
||||
public void close() {
|
||||
@@ -171,7 +172,7 @@ public class LED {
|
||||
/**
|
||||
* Lists all available LED devices
|
||||
* @return String array
|
||||
* @webref
|
||||
* @webref LED
|
||||
* @webBrief Lists all available LED devices
|
||||
*/
|
||||
public static String[] list() {
|
||||
|
||||
@@ -35,7 +35,7 @@ import java.util.Arrays;
|
||||
/**
|
||||
* Opens a PWM channel
|
||||
*
|
||||
* @webref
|
||||
* @webref PWM
|
||||
* @webBrief Opens a PWM channel
|
||||
*/
|
||||
public class PWM {
|
||||
@@ -48,7 +48,8 @@ public class PWM {
|
||||
* Opens a PWM channel
|
||||
* @param channel PWM channel
|
||||
* @see list
|
||||
* @webref Opens a PWM channel
|
||||
* @webref PWM
|
||||
* @webBrief Opens a PWM channel
|
||||
*/
|
||||
public PWM(String channel) {
|
||||
NativeInterface.loadLibrary();
|
||||
@@ -94,7 +95,7 @@ public class PWM {
|
||||
/**
|
||||
* Disables the PWM output
|
||||
*
|
||||
* @webref
|
||||
* @webref PWM
|
||||
* @webBrief Disables the PWM output
|
||||
*/
|
||||
public void clear() {
|
||||
@@ -116,7 +117,7 @@ public class PWM {
|
||||
* Without calling this function the channel will remain in the current state
|
||||
* even after the sketch has been closed.
|
||||
*
|
||||
* @webref
|
||||
* @webref PWM
|
||||
* @webBrief Gives ownership of a channel back to the operating system
|
||||
*/
|
||||
public void close() {
|
||||
@@ -143,7 +144,7 @@ public class PWM {
|
||||
/**
|
||||
* Lists all available PWM channels
|
||||
* @return String array
|
||||
* @webref
|
||||
* @webref PWM
|
||||
* @webBrief Lists all available PWM channels
|
||||
*/
|
||||
public static String[] list() {
|
||||
@@ -182,7 +183,7 @@ public class PWM {
|
||||
*
|
||||
* @param period cycle period in Hz
|
||||
* @param duty duty cycle, 0.0 (always off) to 1.0 (always on)
|
||||
* @webref
|
||||
* @webref PWM
|
||||
* @webBrief Enables the PWM output
|
||||
*/
|
||||
public void set(int period, float duty) {
|
||||
|
||||
@@ -53,7 +53,7 @@ import java.util.Map;
|
||||
* This library supports multiple SPI objects making use of the same SPI
|
||||
* interface.
|
||||
*
|
||||
* @webref
|
||||
* @webref SPI
|
||||
* @webBrief Opens an SPI interface as master
|
||||
*/
|
||||
public class SPI {
|
||||
@@ -95,7 +95,7 @@ public class SPI {
|
||||
* Opens an SPI interface as master
|
||||
* @param dev device name
|
||||
* @see list
|
||||
* @webref
|
||||
* @webref SPI
|
||||
* @webBrief Opens an SPI interface as master
|
||||
*/
|
||||
public SPI(String dev) {
|
||||
@@ -122,7 +122,7 @@ public class SPI {
|
||||
* Note: It is possible to have two or more objects using the same interface at
|
||||
* a time.
|
||||
*
|
||||
* @webref
|
||||
* @webref SPI
|
||||
* @webBrief Closes the SPI interface
|
||||
*/
|
||||
public void close() {
|
||||
@@ -147,7 +147,7 @@ public class SPI {
|
||||
/**
|
||||
* Lists all available SPI interfaces
|
||||
* @return String array
|
||||
* @webref
|
||||
* @webref SPI
|
||||
* @webBrief Lists all available SPI interfaces
|
||||
*/
|
||||
public static String[] list() {
|
||||
@@ -186,7 +186,7 @@ public class SPI {
|
||||
* @param mode <a href=
|
||||
* "https://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus#Clock_polarity_and_phase">SPI.MODE0
|
||||
* to SPI.MODE3</a>
|
||||
* @webref
|
||||
* @webref SPI
|
||||
* @webBrief Configures the SPI interface
|
||||
*/
|
||||
public void settings(int maxSpeed, int dataOrder, int mode) {
|
||||
@@ -205,7 +205,8 @@ public class SPI {
|
||||
*
|
||||
* @param out bytes to send
|
||||
* @return bytes read in (array is the same length as out)
|
||||
* @webref Transfers data over the SPI bus
|
||||
* @webref SPI
|
||||
* @webBrief Transfers data over the SPI bus
|
||||
*/
|
||||
public byte[] transfer(byte[] out) {
|
||||
if (NativeInterface.isSimulated()) {
|
||||
|
||||
@@ -35,7 +35,7 @@ import processing.core.*;
|
||||
* Connect the signal wire (typically colored yellow) to any available GPIO pin
|
||||
* and control the servo's angle as shown in the example sketch.
|
||||
*
|
||||
* @webref
|
||||
* @webref software_servo
|
||||
* @webBrief Opens an RC servo motor connected to a GPIO pin
|
||||
*/
|
||||
public class SoftwareServo {
|
||||
@@ -54,7 +54,7 @@ public class SoftwareServo {
|
||||
/**
|
||||
* Opens a servo motor
|
||||
* @param parent typically use "this"
|
||||
* @webref
|
||||
* @webref software_servo
|
||||
* @webBrief Opens a servo motor
|
||||
*/
|
||||
public SoftwareServo(PApplet parent) {
|
||||
@@ -64,8 +64,7 @@ public class SoftwareServo {
|
||||
|
||||
/**
|
||||
* Closes a servo motor
|
||||
* @webref
|
||||
* @webBrief Closes a servo motor
|
||||
*
|
||||
*/
|
||||
public void close() {
|
||||
detach();
|
||||
@@ -92,7 +91,7 @@ public class SoftwareServo {
|
||||
* Servo class, should be compatible with most servo motors.
|
||||
*
|
||||
* @param pin GPIO pin
|
||||
* @webref
|
||||
* @webref software_servo
|
||||
* @webBrief Attaches a servo motor to a GPIO pin
|
||||
*/
|
||||
public void attach(int pin) {
|
||||
@@ -104,10 +103,18 @@ public class SoftwareServo {
|
||||
|
||||
|
||||
/**
|
||||
* Attaches a servo motor to a GPIO pin using custom pulse widths
|
||||
* Attaches a servo motor to a GPIO pin<br/>
|
||||
* <br/>
|
||||
* You must call this function before calling write(). Note that the servo motor
|
||||
* will only be instructed to move after the first time write() is called.<br/>
|
||||
* <br/>
|
||||
* The optional parameters minPulse and maxPulse control the minimum and maximum
|
||||
* pulse width durations. The default values, identical to those of Arduino's
|
||||
* Servo class, should be compatible with most servo motors.
|
||||
*
|
||||
* @param minPulse minimum pulse width in microseconds (default: 544, same as on Arduino)
|
||||
* @param maxPulse maximum pulse width in microseconds (default: 2400, same as on Arduino)
|
||||
* @webref
|
||||
* @webref software_servo
|
||||
*/
|
||||
public void attach(int pin, int minPulse, int maxPulse) {
|
||||
detach();
|
||||
@@ -127,7 +134,7 @@ public class SoftwareServo {
|
||||
*
|
||||
* @param angle angle in degrees (controls speed and direction on
|
||||
* continuous-rotation servos)
|
||||
* @webref
|
||||
* @webref software_servo
|
||||
* @webBrief Moves a servo motor to a given orientation
|
||||
*/
|
||||
public void write(float angle) {
|
||||
@@ -165,7 +172,7 @@ public class SoftwareServo {
|
||||
/**
|
||||
* Returns whether a servo motor is attached to a pin
|
||||
* @return true if attached, false is not
|
||||
* @webref
|
||||
* @webref software_servo
|
||||
* @webBrief Returns whether a servo motor is attached to a pin
|
||||
*/
|
||||
public boolean attached() {
|
||||
@@ -179,7 +186,7 @@ public class SoftwareServo {
|
||||
* Calling this method will stop the servo from moving or trying to hold the
|
||||
* current orientation.
|
||||
*
|
||||
* @webref
|
||||
* @webref software_servo
|
||||
* @webBrief Detatches a servo motor from a GPIO pin
|
||||
*/
|
||||
public void detach() {
|
||||
|
||||
Reference in New Issue
Block a user