pwm.hpp: Pwm constructor optional arg order change
authorBrendan Le Foll <brendan.le.foll@intel.com>
Wed, 14 Jan 2015 11:43:40 +0000 (11:43 +0000)
committerBrendan Le Foll <brendan.le.foll@intel.com>
Wed, 14 Jan 2015 11:52:13 +0000 (11:52 +0000)
This means that you can initialise a non raw Pwm pin without having to redefine
chipid as -1 (anything but -1 enables raw mode for Pwm)

Fixes #93.

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
api/mraa/pwm.hpp

index a627e41..ed93cc1 100644 (file)
@@ -42,12 +42,12 @@ class Pwm {
          * instanciates a PWM object on a pin
          *
          * @param pin the pin number used on your board
-         * @param chipid the pwmchip to use, use only in raw mode
          * @param owner if you are the owner of the pin the destructor will
+         * @param chipid the pwmchip to use, use only in raw mode
          * unexport the pin from sysfs, default behaviour is you are the owner
          * if the pinmapper exported it
          */
-        Pwm(int pin, int chipid=-1, bool owner = true) {
+        Pwm(int pin, bool owner=true, int chipid=-1) {
             if (chipid == -1) {
                 m_pwm = mraa_pwm_init(pin);
             }