Library for MAX14871 Shield, MAXREFDES89#

Dependencies:   MAX5387 MAX7300

Dependents:   MAXREFDES89_MAX14871_Shield_Demo MAXREFDES89_Test_Program Line_Following_Bot Line_Following_Bot_Pololu

MAXREFDES89# Component Page

Revision:
5:a206f6505109
Parent:
3:89bf07b855e5
Child:
6:dc06cc75c1c8
--- a/max14871_shield.h	Mon Aug 24 17:11:41 2015 +0000
+++ b/max14871_shield.h	Tue Dec 22 04:24:07 2015 +0000
@@ -168,6 +168,24 @@
     
     
     /**********************************************************//**
+    * @brief Sets pwm channel for given motor driver
+    *
+    * @details Must use default, or alternate channel for specific 
+    *          motor driver.  Function allows for mix of default and 
+    *          alternates for each motor driver vs all default or 
+    *          all alternate.
+    *
+    * On Entry:
+    *    @param[in] md - 1 of 4 motor drivers on the shield
+    *    @param[in] ch - PWM channel using Arduino naming convention
+    *
+    * On Exit:
+    *    @return 0 on success, non-0 on failure
+    **************************************************************/
+    int16_t set_pwm_channel(max14871_motor_driver_t md, PinName ch);
+    
+    
+    /**********************************************************//**
     * @brief Sets period of pwm signal for selected motor driver
     *
     * @details period must be in micro-seconds
@@ -241,6 +259,20 @@
     
     
     /**********************************************************//**
+    * @brief Get pwm period of selected motor driver
+    *
+    * @details 
+    *
+    * On Entry:
+    *    @param[in] md - 1 of 4 motor drivers on the shield
+    *    
+    * On Exit:
+    *    @return pwm period of selected motor driver
+    **************************************************************/
+    float get_pwm_period(max14871_motor_driver_t md);
+    
+    
+    /**********************************************************//**
     * @brief Get external voltage reference of selected motor driver
     *
     * @details 
@@ -261,6 +293,7 @@
         max14871_operating_mode_t op_mode;
         max14871_current_regulation_mode_t i_reg_mode;
         float duty_cycle;
+        float period;
         float v_ref;
     };