pwm: move internal context structure to internal header
authorThomas Ingleby <thomas.c.ingleby@intel.com>
Thu, 24 Jul 2014 13:21:06 +0000 (14:21 +0100)
committerThomas Ingleby <thomas.c.ingleby@intel.com>
Thu, 24 Jul 2014 13:21:06 +0000 (14:21 +0100)
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
include/mraa_internal_types.h
src/pwm/pwm.c

index ed3849d..39e3903 100644 (file)
@@ -57,3 +57,15 @@ struct _i2c {
     int addr; /**< the address of the i2c slave */
     /*@}*/
 };
+
+/**
+ * A structure representing a PWM pin
+ */
+struct _pwm {
+    /*@{*/
+    int pin; /**< the pin number, as known to the os. */
+    int chipid; /**< the chip id, which the pwm resides */
+    int duty_fp; /**< File pointer to duty file */
+    mraa_boolean_t owner; /**< Owner of pwm context*/
+    /*@}*/
+};
index a0ffb4b..64db405 100644 (file)
 #define MAX_SIZE 64
 #define SYSFS_PWM "/sys/class/pwm"
 
-/**
- * A structure representing a PWM pin
- */
-struct _pwm {
-    /*@{*/
-    int pin; /**< the pin number, as known to the os. */
-    int chipid; /**< the chip id, which the pwm resides */
-    int duty_fp; /**< File pointer to duty file */
-    mraa_boolean_t owner; /**< Owner of pwm context*/
-    /*@}*/
-};
-
 static int
 mraa_pwm_setup_duty_fp(mraa_pwm_context dev)
 {