motor control
Fork of X_NUCLEO_IHM01A1 by
Diff: Components/l6474/l6474_class.h
- Revision:
- 22:ed3a6990a6eb
- Parent:
- 21:83138e702683
- Child:
- 23:58264db10a17
diff -r 83138e702683 -r ed3a6990a6eb Components/l6474/l6474_class.h --- a/Components/l6474/l6474_class.h Tue Jan 19 15:57:24 2016 +0000 +++ b/Components/l6474/l6474_class.h Tue Feb 09 10:53:31 2016 +0000 @@ -693,13 +693,13 @@ * source files but not pointed by the component's virtual table (3). * * * * Example: * - * DrvStatusTypeDef COMPONENT_GetValue(float* pfData); //(1) * - * DrvStatusTypeDef COMPONENT_EnableFeature(void); //(2) * - * DrvStatusTypeDef COMPONENT_ComputeAverage(void); //(3) * + * Status_t COMPONENT_GetValue(float *f); //(1) * + * Status_t COMPONENT_EnableFeature(void); //(2) * + * Status_t COMPONENT_ComputeAverage(void); //(3) * *------------------------------------------------------------------------*/ void L6474_AttachErrorHandler(void (*callback)(uint16_t error)); - DrvStatusTypeDef L6474_Init(void *init); - DrvStatusTypeDef L6474_ReadID(uint8_t *id); + Status_t L6474_Init(void *init); + Status_t L6474_ReadID(uint8_t *id); uint16_t L6474_GetAcceleration(void); uint16_t L6474_GetCurrentSpeed(void); uint16_t L6474_GetDeceleration(void); @@ -739,7 +739,7 @@ void L6474_ErrorHandler(uint16_t error); void L6474_SendCommand(uint8_t param); void L6474_SetRegisterToPredefinedValues(void); - void L6474_SetRegisterToInitializationValues(L6474_InitTypeDef *init); + void L6474_SetRegisterToInitializationValues(L6474_Init_t *init); void L6474_WriteBytes(uint8_t *pByteToTransmit, uint8_t *pReceivedByte); void L6474_SetDeviceParamsToPredefinedValues(void); void L6474_StartMovement(void); @@ -758,7 +758,7 @@ * @param[in] NumBytesToRead number of bytes to read. * @retval COMPONENT_OK in case of success, COMPONENT_ERROR otherwise. */ - DrvStatusTypeDef Read(uint8_t* pBuffer, uint16_t NumBytesToRead) + Status_t Read(uint8_t* pBuffer, uint16_t NumBytesToRead) { if (dev_spi.spi_read(pBuffer, ssel, NumBytesToRead) != 0) return COMPONENT_ERROR; @@ -771,7 +771,7 @@ * @param[in] NumBytesToWrite number of bytes to write. * @retval COMPONENT_OK in case of success, COMPONENT_ERROR otherwise. */ - DrvStatusTypeDef Write(uint8_t* pBuffer, uint16_t NumBytesToWrite) + Status_t Write(uint8_t* pBuffer, uint16_t NumBytesToWrite) { if (dev_spi.spi_write(pBuffer, ssel, NumBytesToWrite) != 0) return COMPONENT_ERROR; @@ -785,7 +785,7 @@ * @param[in] NumBytes number of bytes to read and write. * @retval COMPONENT_OK in case of success, COMPONENT_ERROR otherwise. */ - DrvStatusTypeDef ReadWrite(uint8_t* pBufferToRead, uint8_t* pBufferToWrite, uint16_t NumBytes) + Status_t ReadWrite(uint8_t* pBufferToRead, uint8_t* pBufferToWrite, uint16_t NumBytes) { if (dev_spi.spi_read_write(pBufferToRead, pBufferToWrite, ssel, NumBytes) != 0) return COMPONENT_ERROR;