From e1c500414b0c81f63a2837a8fb4ad668579200f8 Mon Sep 17 00:00:00 2001 From: Fathi Boudra Date: Wed, 6 Apr 2016 13:44:06 +0300 Subject: [PATCH] docs: fix spelling errors Signed-off-by: Fathi Boudra Signed-off-by: Brendan Le Foll --- api/mraa/firmata.h | 2 +- api/mraa/gpio.h | 14 +++++++------- api/mraa/gpio.hpp | 14 +++++++------- api/mraa/pwm.h | 4 ++-- api/mraa/pwm.hpp | 2 +- docs/changelog.md | 2 +- docs/galileorevd.md | 2 +- examples/python/hello_isr.py | 2 +- include/mraa_internal_types.h | 10 +++++----- src/javascript/doxygen2jsdoc_custom.json | 2 +- src/pwm/pwm.c | 2 +- src/python/docs/example.rst | 6 +++--- 12 files changed, 31 insertions(+), 31 deletions(-) diff --git a/api/mraa/firmata.h b/api/mraa/firmata.h index 2ec7f8d..ba8684e 100644 --- a/api/mraa/firmata.h +++ b/api/mraa/firmata.h @@ -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. * * @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. * @return Result of operation */ diff --git a/api/mraa/gpio.h b/api/mraa/gpio.h index a920df2..32e1c6e 100644 --- a/api/mraa/gpio.h +++ b/api/mraa/gpio.h @@ -77,13 +77,13 @@ typedef enum { } mraa_gpio_dir_t; /** - * Gpio Edge types for interupts + * Gpio Edge types for interrupts */ typedef enum { MRAA_GPIO_EDGE_NONE = 0, /**< No interrupt on Gpio */ - MRAA_GPIO_EDGE_BOTH = 1, /**< Interupt on rising & falling */ - MRAA_GPIO_EDGE_RISING = 2, /**< Interupt on rising only */ - MRAA_GPIO_EDGE_FALLING = 3 /**< Interupt on falling only */ + MRAA_GPIO_EDGE_BOTH = 1, /**< Interrupt on rising & falling */ + MRAA_GPIO_EDGE_RISING = 2, /**< Interrupt on rising only */ + MRAA_GPIO_EDGE_FALLING = 3 /**< Interrupt on falling only */ } 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); /** - * Set an interupt on pin + * Set an interrupt on pin * * @param dev The Gpio context * @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 * @param args Arguments passed to the interrupt handler (fptr) * @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); /** - * 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 * * @param dev The Gpio context diff --git a/api/mraa/gpio.hpp b/api/mraa/gpio.hpp index 98693ac..4c63e20 100644 --- a/api/mraa/gpio.hpp +++ b/api/mraa/gpio.hpp @@ -60,13 +60,13 @@ typedef enum { } Dir; /** - * Gpio Edge types for interupts + * Gpio Edge types for interrupts */ typedef enum { EDGE_NONE = 0, /**< No interrupt on Gpio */ - EDGE_BOTH = 1, /**< Interupt on rising & falling */ - EDGE_RISING = 2, /**< Interupt on rising only */ - EDGE_FALLING = 3 /**< Interupt on falling only */ + EDGE_BOTH = 1, /**< Interrupt on rising & falling */ + EDGE_RISING = 2, /**< Interrupt on rising only */ + EDGE_FALLING = 3 /**< Interrupt on falling only */ } Edge; /** @@ -80,7 +80,7 @@ class Gpio { public: /** - * Instanciates a Gpio object + * Instantiates a Gpio object * * @param pin pin number to use * @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 * * @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 * @param args Arguments passed to the interrupt handler (fptr) * @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 * * @return Result of operation diff --git a/api/mraa/pwm.h b/api/mraa/pwm.h index 48b5e77..87010d4 100644 --- a/api/mraa/pwm.h +++ b/api/mraa/pwm.h @@ -65,7 +65,7 @@ mraa_pwm_context mraa_pwm_init(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 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); /** - * 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 * @return percentage A floating-point value representing percentage of output. diff --git a/api/mraa/pwm.hpp b/api/mraa/pwm.hpp index 9f0efc2..a823e53 100644 --- a/api/mraa/pwm.hpp +++ b/api/mraa/pwm.hpp @@ -88,7 +88,7 @@ class Pwm 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 * output. The value should lie between 0.0f (representing on 0%) and diff --git a/docs/changelog.md b/docs/changelog.md index 9c99ad0..8b74fde 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -35,7 +35,7 @@ they are listed here. Anything pre 0.2.x is ignored. **0.9.3** * Intel edison detection much improved - * ftdi ft4222 interupt improvement + * ftdi ft4222 interrupt improvement * small fixes to java lib **0.9.2** diff --git a/docs/galileorevd.md b/docs/galileorevd.md index 42201a5..20c07e9 100644 --- a/docs/galileorevd.md +++ b/docs/galileorevd.md @@ -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 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 - 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 diff --git a/examples/python/hello_isr.py b/examples/python/hello_isr.py index 76912ad..7cdd276 100644 --- a/examples/python/hello_isr.py +++ b/examples/python/hello_isr.py @@ -31,7 +31,7 @@ class 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 def test(gpio): print("pin " + repr(gpio.getPin(True)) + " = " + repr(gpio.read())) diff --git a/include/mraa_internal_types.h b/include/mraa_internal_types.h index 6c72cc7..bf90ab9 100644 --- a/include/mraa_internal_types.h +++ b/include/mraa_internal_types.h @@ -59,8 +59,8 @@ struct _gpio { int pin; /**< the pin number, as known to the os. */ int phy_pin; /**< pin passed to clean init. -1 none and raw*/ int value_fp; /**< the file pointer to the value of the gpio */ - void (* isr)(void *); /**< the interupt service request */ - void *isr_args; /**< args return when interupt service request triggered */ + void (* isr)(void *); /**< the interrupt service request */ + void *isr_args; /**< args return when interrupt service request triggered */ pthread_t thread_id; /**< the isr handler thread id */ int isr_value_fp; /**< the isr file pointer on the value */ #ifndef HAVE_PTHREAD_CANCEL @@ -148,9 +148,9 @@ struct _iio { char* name; /**< IIO device name */ int fp; /**< IIO device in /dev */ int fp_event; /**< event file descriptor for IIO device */ - void (* isr)(char* data); /**< the interupt service request */ - void *isr_args; /**< args return when interupt service request triggered */ - void (* isr_event)(struct iio_event_data* data, void* args); /**< the event interupt service request */ + void (* isr)(char* data); /**< the interrupt service request */ + void *isr_args; /**< args return when interrupt service request triggered */ + void (* isr_event)(struct iio_event_data* data, void* args); /**< the event interrupt service request */ int chan_num; pthread_t thread_id; /**< the isr handler thread id */ mraa_iio_channel* channels; diff --git a/src/javascript/doxygen2jsdoc_custom.json b/src/javascript/doxygen2jsdoc_custom.json index e5a2af6..c5095e0 100644 --- a/src/javascript/doxygen2jsdoc_custom.json +++ b/src/javascript/doxygen2jsdoc_custom.json @@ -65,7 +65,7 @@ }, "func": { "type": "Function", - "description": "Function to be called when interupt is triggered" + "description": "Function to be called when interrupt is triggered" } }, "return": { diff --git a/src/pwm/pwm.c b/src/pwm/pwm.c index 9b24231..9b3fb0f 100644 --- a/src/pwm/pwm.c +++ b/src/pwm/pwm.c @@ -161,7 +161,7 @@ mraa_pwm_read_duty(mraa_pwm_context dev) char* endptr; long int ret = strtol(output, &endptr, 10); if ('\0' != *endptr && '\n' != *endptr) { - syslog(LOG_ERR, "pwm: Error in string converstion"); + syslog(LOG_ERR, "pwm: Error in string conversion"); return -1; } else if (ret > INT_MAX || ret < INT_MIN) { syslog(LOG_ERR, "pwm: Number is invalid"); diff --git a/src/python/docs/example.rst b/src/python/docs/example.rst index 4daf98c..ab11be5 100644 --- a/src/python/docs/example.rst +++ b/src/python/docs/example.rst @@ -16,13 +16,13 @@ Here is the simplest Gpio program in mraa. :prepend: 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 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. **Note:** Galileo Gen1 only supports EDGE_BOTH