Library for MAX14871 Shield, MAXREFDES89#
Dependents: MAXREFDES89_MAX14871_Shield_Demo MAXREFDES89_Test_Program Line_Following_Bot Line_Following_Bot_Pololu
Diff: max14871_shield.h
- Revision:
- 1:7e9b864ddacf
- Parent:
- 0:b5189f4ce1cb
- Child:
- 3:89bf07b855e5
--- a/max14871_shield.h Thu Jul 23 23:36:46 2015 +0000 +++ b/max14871_shield.h Sun Jul 26 22:19:50 2015 +0000 @@ -1,5 +1,5 @@ /******************************************************************//** -* @file Max14871_Shield.h +* @file max14871_shield.h * * @author Justin Jordan * @@ -157,13 +157,14 @@ * @param[in] md - 1 of 4 motor drivers on the shield * @param[in] mode - 1 of 6 current regulation modes of the * motor driver + * @param[in] vref - sets maximum motor current, Max of 2.0V * * On Exit: * @return 0 on success, non-0 on failure **************************************************************/ int16_t set_current_regulation_mode(max14871_motor_driver_t md, max14871_current_regulation_mode_t mode, - uint8_t vref); + float vref); /**********************************************************//** @@ -173,13 +174,12 @@ * * On Entry: * @param[in] md - 1 of 4 motor drivers on the shield - * @param[in] period - period of the pwm signal in - * micro-seconds + * @param[in] period - PWM period specified in seconds * * On Exit: * @return 0 on success, non-0 on failure **************************************************************/ - int16_t set_pwm_period(max14871_motor_driver_t md, uint16_t period); + int16_t set_pwm_period(max14871_motor_driver_t md, float period); /**********************************************************//** @@ -189,13 +189,13 @@ * * On Entry: * @param[in] md - 1 of 4 motor drivers on the shield - * @param[in] duty_cycle - duty cycle of the pwm signal in - * micro-seconds + * @param[in] duty_cycle - duty cycle of the pwm signal specified + * as a percentage * * On Exit: * @return 0 on success, non-0 on failure **************************************************************/ - int16_t set_pwm_duty_cycle(max14871_motor_driver_t md, uint16_t duty_cycle); + int16_t set_pwm_duty_cycle(max14871_motor_driver_t md, float duty_cycle); private: