Funcionando: FDC eixo x y z
Dependencies: ST_INTERFACES X_NUCLEO_COMMON
Fork of X_NUCLEO_IHM01A1 by
Revision 21:83138e702683, committed 2016-01-19
- Comitter:
- Davidroid
- Date:
- Tue Jan 19 15:57:24 2016 +0000
- Parent:
- 20:a8e81b65f0af
- Child:
- 22:ed3a6990a6eb
- Commit message:
- + Changed "L6474_Init()" function's prototype, to be consistent with the "MOTOR_DrvVTableTypeDef" type.
Changed in this revision
--- a/Components/l6474/l6474_class.cpp Fri Jan 15 16:42:39 2016 +0000
+++ b/Components/l6474/l6474_class.cpp Tue Jan 19 15:57:24 2016 +0000
@@ -107,7 +107,7 @@
* @param init Initialization structure.
* @retval COMPONENT_OK in case of success.
**********************************************************/
-DrvStatusTypeDef L6474::L6474_Init(L6474_InitTypeDef *init)
+DrvStatusTypeDef L6474::L6474_Init(void *init)
{
/* Initialise the PWMs used for the Step clocks ----------------------------*/
L6474_PwmInit();
@@ -128,7 +128,7 @@
L6474_SetRegisterToPredefinedValues();
else
/* Set device registers to the passed initialization values. */
- L6474_SetRegisterToInitializationValues(init);
+ L6474_SetRegisterToInitializationValues((L6474_InitTypeDef *) init);
/* Disable L6474 powerstage */
L6474_CmdDisable();
--- a/Components/l6474/l6474_class.h Fri Jan 15 16:42:39 2016 +0000
+++ b/Components/l6474/l6474_class.h Tue Jan 19 15:57:24 2016 +0000
@@ -150,7 +150,7 @@
*/
virtual int Init(void *init = NULL)
{
- return (int) L6474_Init((L6474_InitTypeDef *) init);
+ return (int) L6474_Init((void *) init);
}
/**
@@ -698,7 +698,7 @@
* DrvStatusTypeDef COMPONENT_ComputeAverage(void); //(3) *
*------------------------------------------------------------------------*/
void L6474_AttachErrorHandler(void (*callback)(uint16_t error));
- DrvStatusTypeDef L6474_Init(L6474_InitTypeDef *init);
+ DrvStatusTypeDef L6474_Init(void *init);
DrvStatusTypeDef L6474_ReadID(uint8_t *id);
uint16_t L6474_GetAcceleration(void);
uint16_t L6474_GetCurrentSpeed(void);
