Private
Public Access
2
0

docs: fix spelling errors

Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Fathi Boudra
2016-04-06 13:44:06 +03:00
committed by Brendan Le Foll
parent a9429204e3
commit e1c500414b
12 changed files with 31 additions and 31 deletions

View File

@@ -71,7 +71,7 @@ mraa_result_t mraa_firmata_write_sysex(mraa_firmata_context dev, char* msg, int
* calling it need to make sure they are the only thread calling this. * calling it need to make sure they are the only thread calling this.
* *
* @param dev The Firmata context * @param dev The Firmata context
* @param fptr Function pointer to function to be called when interupt is * @param fptr Function pointer to function to be called when interrupt is
* triggered, the returned buffer and length are the arguments. * triggered, the returned buffer and length are the arguments.
* @return Result of operation * @return Result of operation
*/ */

View File

@@ -77,13 +77,13 @@ typedef enum {
} mraa_gpio_dir_t; } mraa_gpio_dir_t;
/** /**
* Gpio Edge types for interupts * Gpio Edge types for interrupts
*/ */
typedef enum { typedef enum {
MRAA_GPIO_EDGE_NONE = 0, /**< No interrupt on Gpio */ MRAA_GPIO_EDGE_NONE = 0, /**< No interrupt on Gpio */
MRAA_GPIO_EDGE_BOTH = 1, /**< Interupt on rising & falling */ MRAA_GPIO_EDGE_BOTH = 1, /**< Interrupt on rising & falling */
MRAA_GPIO_EDGE_RISING = 2, /**< Interupt on rising only */ MRAA_GPIO_EDGE_RISING = 2, /**< Interrupt on rising only */
MRAA_GPIO_EDGE_FALLING = 3 /**< Interupt on falling only */ MRAA_GPIO_EDGE_FALLING = 3 /**< Interrupt on falling only */
} mraa_gpio_edge_t; } mraa_gpio_edge_t;
/** /**
@@ -112,11 +112,11 @@ mraa_gpio_context mraa_gpio_init_raw(int gpiopin);
mraa_result_t mraa_gpio_edge_mode(mraa_gpio_context dev, mraa_gpio_edge_t mode); mraa_result_t mraa_gpio_edge_mode(mraa_gpio_context dev, mraa_gpio_edge_t mode);
/** /**
* Set an interupt on pin * Set an interrupt on pin
* *
* @param dev The Gpio context * @param dev The Gpio context
* @param edge The edge mode to set the gpio into * @param edge The edge mode to set the gpio into
* @param fptr Function pointer to function to be called when interupt is * @param fptr Function pointer to function to be called when interrupt is
* triggered * triggered
* @param args Arguments passed to the interrupt handler (fptr) * @param args Arguments passed to the interrupt handler (fptr)
* @return Result of operation * @return Result of operation
@@ -124,7 +124,7 @@ mraa_result_t mraa_gpio_edge_mode(mraa_gpio_context dev, mraa_gpio_edge_t mode);
mraa_result_t mraa_gpio_isr(mraa_gpio_context dev, mraa_gpio_edge_t edge, void (*fptr)(void*), void* args); mraa_result_t mraa_gpio_isr(mraa_gpio_context dev, mraa_gpio_edge_t edge, void (*fptr)(void*), void* args);
/** /**
* Stop the current interupt watcher on this Gpio, and set the Gpio edge mode * Stop the current interrupt watcher on this Gpio, and set the Gpio edge mode
* to MRAA_GPIO_EDGE_NONE * to MRAA_GPIO_EDGE_NONE
* *
* @param dev The Gpio context * @param dev The Gpio context

View File

@@ -60,13 +60,13 @@ typedef enum {
} Dir; } Dir;
/** /**
* Gpio Edge types for interupts * Gpio Edge types for interrupts
*/ */
typedef enum { typedef enum {
EDGE_NONE = 0, /**< No interrupt on Gpio */ EDGE_NONE = 0, /**< No interrupt on Gpio */
EDGE_BOTH = 1, /**< Interupt on rising & falling */ EDGE_BOTH = 1, /**< Interrupt on rising & falling */
EDGE_RISING = 2, /**< Interupt on rising only */ EDGE_RISING = 2, /**< Interrupt on rising only */
EDGE_FALLING = 3 /**< Interupt on falling only */ EDGE_FALLING = 3 /**< Interrupt on falling only */
} Edge; } Edge;
/** /**
@@ -80,7 +80,7 @@ class Gpio
{ {
public: public:
/** /**
* Instanciates a Gpio object * Instantiates a Gpio object
* *
* @param pin pin number to use * @param pin pin number to use
* @param owner (optional) Set pin owner, default behaviour is to 'own' * @param owner (optional) Set pin owner, default behaviour is to 'own'
@@ -186,7 +186,7 @@ class Gpio
* Sets a callback to be called when pin value changes * Sets a callback to be called when pin value changes
* *
* @param mode The edge mode to set * @param mode The edge mode to set
* @param fptr Function pointer to function to be called when interupt is * @param fptr Function pointer to function to be called when interrupt is
* triggered * triggered
* @param args Arguments passed to the interrupt handler (fptr) * @param args Arguments passed to the interrupt handler (fptr)
* @return Result of operation * @return Result of operation
@@ -198,7 +198,7 @@ class Gpio
} }
/** /**
* Exits callback - this call will not kill the isr thread immediatly * Exits callback - this call will not kill the isr thread immediately
* but only when it is out of it's critical section * but only when it is out of it's critical section
* *
* @return Result of operation * @return Result of operation

View File

@@ -65,7 +65,7 @@ mraa_pwm_context mraa_pwm_init(int pin);
mraa_pwm_context mraa_pwm_init_raw(int chipid, int pin); mraa_pwm_context mraa_pwm_init_raw(int chipid, int pin);
/** /**
* Set the ouput duty-cycle percentage, as a float * Set the output duty-cycle percentage, as a float
* *
* @param dev The Pwm context to use * @param dev The Pwm context to use
* @param percentage A floating-point value representing percentage of output. * @param percentage A floating-point value representing percentage of output.
@@ -76,7 +76,7 @@ mraa_pwm_context mraa_pwm_init_raw(int chipid, int pin);
mraa_result_t mraa_pwm_write(mraa_pwm_context dev, float percentage); mraa_result_t mraa_pwm_write(mraa_pwm_context dev, float percentage);
/** /**
* Read the ouput duty-cycle percentage, as a float * Read the output duty-cycle percentage, as a float
* *
* @param dev The Pwm context to use * @param dev The Pwm context to use
* @return percentage A floating-point value representing percentage of output. * @return percentage A floating-point value representing percentage of output.

View File

@@ -88,7 +88,7 @@ class Pwm
return (Result) mraa_pwm_write(m_pwm, percentage); return (Result) mraa_pwm_write(m_pwm, percentage);
} }
/** /**
* Read the ouput duty-cycle percentage, as a float * Read the output duty-cycle percentage, as a float
* *
* @return A floating-point value representing percentage of * @return A floating-point value representing percentage of
* output. The value should lie between 0.0f (representing on 0%) and * output. The value should lie between 0.0f (representing on 0%) and

View File

@@ -35,7 +35,7 @@ they are listed here. Anything pre 0.2.x is ignored.
**0.9.3** **0.9.3**
* Intel edison detection much improved * Intel edison detection much improved
* ftdi ft4222 interupt improvement * ftdi ft4222 interrupt improvement
* small fixes to java lib * small fixes to java lib
**0.9.2** **0.9.2**

View File

@@ -8,7 +8,7 @@ The rev D board has the following limitations in libmraa:
- gpio 13 will not switch the LED as it's a different Gpio, use raw gpio '3' to do this - gpio 13 will not switch the LED as it's a different Gpio, use raw gpio '3' to do this
- gpio register access via /dev/uio is limited to pin2 and 3 - gpio register access via /dev/uio is limited to pin2 and 3
- gpio interupts will only work on GPIO_EDGE_BOTH - gpio interrupts will only work on GPIO_EDGE_BOTH
- adc kernel module will return 12bit number. MRAA defaults shift this to 10bits - adc kernel module will return 12bit number. MRAA defaults shift this to 10bits
- AIO pins are treated as 0-5 in mraa_aio_init() but as 14-19 for everything - AIO pins are treated as 0-5 in mraa_aio_init() but as 14-19 for everything
else. Therefore use mraa_gpio_init(14) to use A0 as a Gpio else. Therefore use mraa_gpio_init(14) to use A0 as a Gpio

View File

@@ -31,7 +31,7 @@ class Counter:
c = Counter() c = Counter()
# inside a python interupt you cannot use 'basic' types so you'll need to use # inside a python interrupt you cannot use 'basic' types so you'll need to use
# objects # objects
def test(gpio): def test(gpio):
print("pin " + repr(gpio.getPin(True)) + " = " + repr(gpio.read())) print("pin " + repr(gpio.getPin(True)) + " = " + repr(gpio.read()))

View File

@@ -59,8 +59,8 @@ struct _gpio {
int pin; /**< the pin number, as known to the os. */ int pin; /**< the pin number, as known to the os. */
int phy_pin; /**< pin passed to clean init. -1 none and raw*/ int phy_pin; /**< pin passed to clean init. -1 none and raw*/
int value_fp; /**< the file pointer to the value of the gpio */ int value_fp; /**< the file pointer to the value of the gpio */
void (* isr)(void *); /**< the interupt service request */ void (* isr)(void *); /**< the interrupt service request */
void *isr_args; /**< args return when interupt service request triggered */ void *isr_args; /**< args return when interrupt service request triggered */
pthread_t thread_id; /**< the isr handler thread id */ pthread_t thread_id; /**< the isr handler thread id */
int isr_value_fp; /**< the isr file pointer on the value */ int isr_value_fp; /**< the isr file pointer on the value */
#ifndef HAVE_PTHREAD_CANCEL #ifndef HAVE_PTHREAD_CANCEL
@@ -148,9 +148,9 @@ struct _iio {
char* name; /**< IIO device name */ char* name; /**< IIO device name */
int fp; /**< IIO device in /dev */ int fp; /**< IIO device in /dev */
int fp_event; /**< event file descriptor for IIO device */ int fp_event; /**< event file descriptor for IIO device */
void (* isr)(char* data); /**< the interupt service request */ void (* isr)(char* data); /**< the interrupt service request */
void *isr_args; /**< args return when interupt service request triggered */ void *isr_args; /**< args return when interrupt service request triggered */
void (* isr_event)(struct iio_event_data* data, void* args); /**< the event interupt service request */ void (* isr_event)(struct iio_event_data* data, void* args); /**< the event interrupt service request */
int chan_num; int chan_num;
pthread_t thread_id; /**< the isr handler thread id */ pthread_t thread_id; /**< the isr handler thread id */
mraa_iio_channel* channels; mraa_iio_channel* channels;

View File

@@ -65,7 +65,7 @@
}, },
"func": { "func": {
"type": "Function", "type": "Function",
"description": "Function to be called when interupt is triggered" "description": "Function to be called when interrupt is triggered"
} }
}, },
"return": { "return": {

View File

@@ -161,7 +161,7 @@ mraa_pwm_read_duty(mraa_pwm_context dev)
char* endptr; char* endptr;
long int ret = strtol(output, &endptr, 10); long int ret = strtol(output, &endptr, 10);
if ('\0' != *endptr && '\n' != *endptr) { if ('\0' != *endptr && '\n' != *endptr) {
syslog(LOG_ERR, "pwm: Error in string converstion"); syslog(LOG_ERR, "pwm: Error in string conversion");
return -1; return -1;
} else if (ret > INT_MAX || ret < INT_MIN) { } else if (ret > INT_MAX || ret < INT_MIN) {
syslog(LOG_ERR, "pwm: Number is invalid"); syslog(LOG_ERR, "pwm: Number is invalid");

View File

@@ -16,13 +16,13 @@ Here is the simplest Gpio program in mraa.
:prepend: import mraa :prepend: import mraa
:start-after: import mraa :start-after: import mraa
GPIO Interupt (isr) GPIO Interrupt (isr)
=================== ===================
The GPIO module allows you to set an interupt on a GPIO. This interupt is The GPIO module allows you to set an interrupt on a GPIO. This interrupt is
controlled by the mode that the 'edge' is in. Before setting another isr please controlled by the mode that the 'edge' is in. Before setting another isr please
remove the first one, multiple isrs on one pin are not supported. Some remove the first one, multiple isrs on one pin are not supported. Some
platforms will not support interupts on all pins so please check your return platforms will not support interrupts on all pins so please check your return
values. values.
**Note:** Galileo Gen1 only supports EDGE_BOTH **Note:** Galileo Gen1 only supports EDGE_BOTH