Library to handle the X_NUCLEO_IHM02A1 Motor Control Expansion Board based on the L6470 component.
Dependencies: X_NUCLEO_COMMON ST_INTERFACES
Dependents: HelloWorld_IHM02A1 ConcorsoFinal HelloWorld_IHM02A1_mbedOS HelloWorld_IHM02A1-Serialinterpreter ... more
Fork of X_NUCLEO_IHM02A1 by
L6470_AppCMDs_ToBePrepared
[L6470_AppCMDs]
Functions | |
void | L6470_PrepareSetParam (eL6470_RegId_t L6470_RegId, uint32_t Value) |
Prepare to send L6470_SetParam command. | |
void | L6470_PrepareGetParam (eL6470_RegId_t L6470_RegId) |
Prepare to send L6470_GetParam command. | |
void | L6470_PrepareRun (eL6470_DirId_t L6470_DirId, uint32_t Speed) |
Prepare to send L6470_Run command. | |
void | L6470_PrepareStepClock (eL6470_DirId_t L6470_DirId) |
Prepare to send L6470_StepClock command. | |
void | L6470_PrepareMove (eL6470_DirId_t L6470_DirId, uint32_t N_Step) |
Prepare to send L6470_Move command. | |
void | L6470_PrepareGoTo (uint32_t AbsPos) |
Prepare to send L6470_GoTo command. | |
void | L6470_PrepareGoToDir (eL6470_DirId_t L6470_DirId, uint32_t AbsPos) |
Prepare to send L6470_GoToDIR command. | |
void | L6470_PrepareGoUntil (eL6470_ActId_t L6470_ActId, eL6470_DirId_t L6470_DirId, uint32_t Speed) |
Prepare to send L6470_GoUntil command. | |
void | L6470_PrepareReleaseSW (eL6470_ActId_t L6470_ActId, eL6470_DirId_t L6470_DirId) |
Prepare to send L6470_ReleaseSW. | |
void | L6470_PrepareGoHome (void) |
Prepare to send L6470_GoHome command. | |
void | L6470_PrepareGoMark (void) |
Prepare to send L6470_GoMark command. | |
void | L6470_PrepareResetPos (void) |
Prepare to send L6470_ResetPos command. | |
void | L6470_PrepareResetDevice (void) |
Prepare to send L6470_ResetDevice command. | |
void | L6470_PrepareSoftStop (void) |
Prepare to send L6470_SoftStop command. | |
void | L6470_PrepareHardStop (void) |
Prepare to send L6470_HardStop command. | |
void | L6470_PrepareSoftHiZ (void) |
Prepare to send L6470_SoftHiZ command. | |
void | L6470_PrepareHardHiZ (void) |
Prepare to send L6470_HardHiZ command. | |
void | L6470_PrepareGetStatus (void) |
Prepare to send L6470_GetStatus command. | |
uint8_t * | L6470_PerformPreparedApplicationCommand (void) |
Send via SPI the command stored inside the L6470_AppCmdPkg to the L6470 daisy chain. | |
void | L6470_DaisyChainCommand (uint8_t *pL6470_DaisyChainSpiTxStruct, uint8_t *pL6470_DaisyChainSpiRxStruct) |
Send command to the L6470 daisy chain via SPI. | |
uint32_t | L6470_ExtractReturnedData (uint8_t *pL6470_DaisyChainSpiRxStruct, uint8_t LengthByte) |
Extracts the data returned by the L6470 from the matrix that contains the received SPI data. | |
uint8_t | L6470_CheckStatusRegisterFlag (uint8_t L6470_StatusRegisterFlagId) |
Check the state of a flag inside the L6470 STATUS register. | |
uint8_t * | L6470_GetRegisterName (uint8_t id) |
Return the mnemonic name for the L6470 register. | |
status_t | L6470_Config (void *init) |
Configures the L6470 registers. |
Function Documentation
uint8_t L6470_CheckStatusRegisterFlag | ( | uint8_t | L6470_StatusRegisterFlagId ) | [protected, inherited] |
status_t L6470_Config | ( | void * | init ) | [protected, inherited] |
void L6470_DaisyChainCommand | ( | uint8_t * | pL6470_DaisyChainSpiTxStruct, |
uint8_t * | pL6470_DaisyChainSpiRxStruct | ||
) | [protected, inherited] |
Send command to the L6470 daisy chain via SPI.
- Parameters:
-
pL6470_DaisyChainSpiTxStruct Pointer to the matrix array of bytes to be sent to the daisy chain L6470 pL6470_DaisyChainSpiRxStruct Pointer to the matrix array of bytes to be received from the daisy chain L6470
<Simply deselect time delay for SPI nCS
uint32_t L6470_ExtractReturnedData | ( | uint8_t * | pL6470_DaisyChainSpiRxStruct, |
uint8_t | LengthByte | ||
) | [protected, inherited] |
Extracts the data returned by the L6470 from the matrix that contains the received SPI data.
uint8_t * L6470_GetRegisterName | ( | uint8_t | id ) | [protected, inherited] |
uint8_t * L6470_PerformPreparedApplicationCommand | ( | void | ) | [protected, inherited] |
void L6470_PrepareGetParam | ( | eL6470_RegId_t | L6470_RegId ) | [protected, inherited] |
Prepare to send L6470_GetParam command.
- Parameters:
-
L6470_Id The L6470 identifier inside the daisy chain. L6470_RegId The identifier of the L6470 register to be addressed.
- Return values:
-
ReceivedValue The register value.
- Note:
- This function will properly fill the right column of the L6470_AppCmdPkg.
- The commad will be sent by L6470_PerformPreparedApplicationCommand.
void L6470_PrepareGetStatus | ( | void | ) | [protected, inherited] |
Prepare to send L6470_GetStatus command.
- Note:
- This function will properly fill the right column of the L6470_AppCmdPkg.
- The commad will be sent by L6470_PerformPreparedApplicationCommand.
void L6470_PrepareGoHome | ( | void | ) | [protected, inherited] |
Prepare to send L6470_GoHome command.
- Note:
- This function will properly fill the right column of the L6470_AppCmdPkg.
- The commad will be sent by L6470_PerformPreparedApplicationCommand.
void L6470_PrepareGoMark | ( | void | ) | [protected, inherited] |
Prepare to send L6470_GoMark command.
- Note:
- This function will properly fill the right column of the L6470_AppCmdPkg.
- The commad will be sent by L6470_PerformPreparedApplicationCommand.
void L6470_PrepareGoTo | ( | uint32_t | AbsPos ) | [protected, inherited] |
Prepare to send L6470_GoTo command.
- Parameters:
-
AbsPos The target absolute position.
- Note:
- This function will properly fill the right column of the L6470_AppCmdPkg.
- The commad will be sent by L6470_PerformPreparedApplicationCommand.
void L6470_PrepareGoToDir | ( | eL6470_DirId_t | L6470_DirId, |
uint32_t | AbsPos | ||
) | [protected, inherited] |
Prepare to send L6470_GoToDIR command.
- Parameters:
-
L6470_DirId The identifier of the L6470 motion direction. AbsPos The target absolute position.
- Note:
- This function will properly fill the right column of the L6470_AppCmdPkg.
- The commad will be sent by L6470_PerformPreparedApplicationCommand.
void L6470_PrepareGoUntil | ( | eL6470_ActId_t | L6470_ActId, |
eL6470_DirId_t | L6470_DirId, | ||
uint32_t | Speed | ||
) | [protected, inherited] |
Prepare to send L6470_GoUntil command.
- Parameters:
-
L6470_ActId The identifier of the L6470 action about the absolute position. L6470_DirId The identifier of the L6470 motion direction. Speed The speed value as (([step/s] * 250e-9) / 2^-28)
- Note:
- This function will properly fill the right column of the L6470_AppCmdPkg.
- The commad will be sent by L6470_PerformPreparedApplicationCommand.
void L6470_PrepareHardHiZ | ( | void | ) | [protected, inherited] |
Prepare to send L6470_HardHiZ command.
- Note:
- This function will properly fill the right column of the L6470_AppCmdPkg.
- The commad will be sent by L6470_PerformPreparedApplicationCommand.
void L6470_PrepareHardStop | ( | void | ) | [protected, inherited] |
Prepare to send L6470_HardStop command.
- Note:
- This function will properly fill the right column of the L6470_AppCmdPkg.
- The commad will be sent by L6470_PerformPreparedApplicationCommand.
void L6470_PrepareMove | ( | eL6470_DirId_t | L6470_DirId, |
uint32_t | N_Step | ||
) | [protected, inherited] |
Prepare to send L6470_Move command.
- Parameters:
-
L6470_DirId The identifier of the L6470 motion direction. N_Step The number of microsteps.
- Note:
- This function will properly fill the right column of the L6470_AppCmdPkg.
- The commad will be sent by L6470_PerformPreparedApplicationCommand.
void L6470_PrepareReleaseSW | ( | eL6470_ActId_t | L6470_ActId, |
eL6470_DirId_t | L6470_DirId | ||
) | [protected, inherited] |
Prepare to send L6470_ReleaseSW.
- Parameters:
-
L6470_ActId The identifier of the L6470 action about the absolute position. L6470_DirId The identifier of the L6470 motion direction.
- Note:
- This function will properly fill the right column of the L6470_AppCmdPkg.
- The commad will be sent by L6470_PerformPreparedApplicationCommand.
void L6470_PrepareResetDevice | ( | void | ) | [protected, inherited] |
Prepare to send L6470_ResetDevice command.
- Note:
- This function will properly fill the right column of the L6470_AppCmdPkg.
- The commad will be sent by L6470_PerformPreparedApplicationCommand.
void L6470_PrepareResetPos | ( | void | ) | [protected, inherited] |
Prepare to send L6470_ResetPos command.
- Note:
- This function will properly fill the right column of the L6470_AppCmdPkg.
- The commad will be sent by L6470_PerformPreparedApplicationCommand.
void L6470_PrepareRun | ( | eL6470_DirId_t | L6470_DirId, |
uint32_t | Speed | ||
) | [protected, inherited] |
Prepare to send L6470_Run command.
- Parameters:
-
L6470_DirId The identifier of the L6470 motion direction. Speed The speed value as (([step/s] * 250e-9) / 2^-28)
- Note:
- This function will properly fill the right column of the L6470_AppCmdPkg.
- The commad will be sent by L6470_PerformPreparedApplicationCommand.
void L6470_PrepareSetParam | ( | eL6470_RegId_t | L6470_RegId, |
uint32_t | Value | ||
) | [protected, inherited] |
Prepare to send L6470_SetParam command.
- Parameters:
-
L6470_RegId The identifier of the L6470 register to be addressed. Value The new value.
- Note:
- This function will properly fill the right column of the L6470_AppCmdPkg.
- The commad will be sent by L6470_PerformPreparedApplicationCommand.
void L6470_PrepareSoftHiZ | ( | void | ) | [protected, inherited] |
Prepare to send L6470_SoftHiZ command.
- Note:
- This function will properly fill the right column of the L6470_AppCmdPkg.
- The commad will be sent by L6470_PerformPreparedApplicationCommand.
void L6470_PrepareSoftStop | ( | void | ) | [protected, inherited] |
Prepare to send L6470_SoftStop command.
- Note:
- This function will properly fill the right column of the L6470_AppCmdPkg.
- The commad will be sent by L6470_PerformPreparedApplicationCommand.
void L6470_PrepareStepClock | ( | eL6470_DirId_t | L6470_DirId ) | [protected, inherited] |
Prepare to send L6470_StepClock command.
- Parameters:
-
L6470_DirId The identifier of the L6470 motion direction.
- Note:
- This function will properly fill the right column of the L6470_AppCmdPkg.
- The commad will be sent by L6470_PerformPreparedApplicationCommand.
Generated on Tue Jul 12 2022 22:48:07 by 1.7.2