Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of X_NUCLEO_IHM02A1 by
L6470_Conversion_Functions
[L6470_Exported_Functions]
The following functions act just on one driver inside the L6470 daisy chain. More...
Modules | |
| L6470_AppCMDs | |
Functions | |
| int32_t | L6470_AbsPos_2_Position (uint32_t AbsPos) |
| Convert the absolute position as 2's complement format into the signed number. | |
| uint32_t | L6470_Position_2_AbsPos (int32_t Position) |
| Convert the position as signed number into absolute position as 2's complement format. | |
| float | L6470_Speed_2_Step_s (uint32_t Speed) |
| Convert the SPEED register value into step/s. | |
| uint32_t | L6470_Step_s_2_Speed (float Step_s) |
| Convert the speed as step/s into a right value for SPEED register. | |
| float | L6470_Acc_2_Step_s2 (uint16_t Acc) |
| Convert the ACC register value into step/(s^2). | |
| uint16_t | L6470_Step_s2_2_Acc (float Step_s2) |
| Convert the acceleartion as step/(s^2) into a right value for ACC register. | |
| float | L6470_Dec_2_Step_s2 (uint16_t Dec) |
| Convert the DEC register value into step/(s^2). | |
| uint16_t | L6470_Step_s2_2_Dec (float Step_s2) |
| Convert the deceleration as step/(s^2) into a right value for DEC register. | |
| float | L6470_MaxSpeed_2_Step_s (uint16_t MaxSpeed) |
| Convert the MAX_SPEED register value into step/s. | |
| uint16_t | L6470_Step_s_2_MaxSpeed (float Step_s) |
| Convert the max speed as step/s into a right value for MAX_SPEED register. | |
| float | L6470_MinSpeed_2_Step_s (uint16_t MinSpeed) |
| Convert the MIN_SPEED register value into step/s. | |
| uint16_t | L6470_Step_s_2_MinSpeed (float Step_s) |
| Convert the min speed as step/s into a right value for MIN_SPEED register. | |
| float | L6470_FsSpd_2_Step_s (uint16_t FsSpd) |
| Convert the FS_SPD register value into step/s. | |
| uint16_t | L6470_Step_s_2_FsSpd (float Step_s) |
| Convert the full-step speed as step/s into a right value for FS_SPD register. | |
| float | L6470_IntSpeed_2_Step_s (uint16_t IntSpeed) |
| Convert the INT_SPEED register value into step/s. | |
| uint16_t | L6470_Step_s_2_IntSpeed (float Step_s) |
| Convert the intersect speed as step/s into a right value for INT_SPEED register. | |
| float | L6470_StSlp_2_s_Step (uint8_t StSlp) |
| Convert the ST_SLP register value into s/step. | |
| uint8_t | L6470_s_Step_2_StSlp (float s_Step) |
| Convert the intersect speed as step/s into a right value for INT_SPEED register. | |
| float | L6470_FnSlpAcc_2_s_Step (uint8_t FnSlpAcc) |
| Convert the INT_SPEED register value into step/s. | |
| uint8_t | L6470_s_Step_2_FnSlpAcc (float s_Step) |
| Convert the intersect speed as step/s into a right value for INT_SPEED register. | |
| float | L6470_FnSlpDec_2_s_Step (uint8_t FnSlpDec) |
| Convert the INT_SPEED register value into step/s. | |
| uint8_t | L6470_s_Step_2_FnSlpDec (float s_Step) |
| Convert the intersect speed as step/s into a right value for INT_SPEED register. | |
| float | L6470_OcdTh_2_mA (uint8_t OcdTh) |
| Convert the OCD_TH register value into mA. | |
| uint8_t | L6470_mA_2_OcdTh (float mA) |
| Convert the overcurrent threshold as mA into a right value for OCD_TH register. | |
| float | L6470_StallTh_2_mA (uint8_t StallTh) |
| Convert the STALL_TH register value into mA. | |
| uint8_t | L6470_mA_2_StallTh (float mA) |
| Convert the stall detection threshold as mA into a right value for STALL_TH register. | |
Detailed Description
The following functions act just on one driver inside the L6470 daisy chain.
The command is immediately sent.
Function Documentation
| int32_t L6470_AbsPos_2_Position | ( | uint32_t | AbsPos ) | [protected, inherited] |
Convert the absolute position as 2's complement format into the signed number.
- Parameters:
-
AbsPos The absolute position in the range from [-(2^21)] to [+(2^21)-1].
- Return values:
-
Position The position as signed number.
Definition at line 365 of file l6470_class.cpp.
| float L6470_Acc_2_Step_s2 | ( | uint16_t | Acc ) | [protected, inherited] |
Convert the ACC register value into step/(s^2).
- Parameters:
-
Acc The ACC register value.
- Return values:
-
step/(s^2) The acceleration as step/(s^2).
Definition at line 423 of file l6470_class.cpp.
| float L6470_Dec_2_Step_s2 | ( | uint16_t | Dec ) | [protected, inherited] |
Convert the DEC register value into step/(s^2).
- Parameters:
-
Dec The DEC register value.
- Return values:
-
step/(s^2) The deceleration as step/(s^2).
Definition at line 451 of file l6470_class.cpp.
| float L6470_FnSlpAcc_2_s_Step | ( | uint8_t | FnSlpAcc ) | [protected, inherited] |
Convert the INT_SPEED register value into step/s.
- Parameters:
-
IntSpeed The INT_SPEED register value.
- Return values:
-
step/s The intersect speed as step/s.
Definition at line 619 of file l6470_class.cpp.
| float L6470_FnSlpDec_2_s_Step | ( | uint8_t | FnSlpDec ) | [protected, inherited] |
Convert the INT_SPEED register value into step/s.
- Parameters:
-
IntSpeed The INT_SPEED register value.
- Return values:
-
step/s The intersect speed as step/s.
Definition at line 647 of file l6470_class.cpp.
| float L6470_FsSpd_2_Step_s | ( | uint16_t | FsSpd ) | [protected, inherited] |
Convert the FS_SPD register value into step/s.
- Parameters:
-
FsSpd The FS_SPD register value.
- Return values:
-
step/s The full-step speed as step/s.
Definition at line 535 of file l6470_class.cpp.
| float L6470_IntSpeed_2_Step_s | ( | uint16_t | IntSpeed ) | [protected, inherited] |
Convert the INT_SPEED register value into step/s.
- Parameters:
-
IntSpeed The INT_SPEED register value.
- Return values:
-
step/s The intersect speed as step/s.
Definition at line 563 of file l6470_class.cpp.
| uint8_t L6470_mA_2_OcdTh | ( | float | mA ) | [protected, inherited] |
Convert the overcurrent threshold as mA into a right value for OCD_TH register.
- Parameters:
-
mA The overcurrent threshold as mA.
- Return values:
-
OcdTh The OCD_TH register value.
Definition at line 689 of file l6470_class.cpp.
| uint8_t L6470_mA_2_StallTh | ( | float | mA ) | [protected, inherited] |
Convert the stall detection threshold as mA into a right value for STALL_TH register.
- Parameters:
-
mA The stall detection threshold as mA.
- Return values:
-
StallTh The STALL_TH register value.
Definition at line 727 of file l6470_class.cpp.
| float L6470_MaxSpeed_2_Step_s | ( | uint16_t | MaxSpeed ) | [protected, inherited] |
Convert the MAX_SPEED register value into step/s.
- Parameters:
-
MaxSpeed The MAX_SPEED register value.
- Return values:
-
step/s The max speed as step/s.
Definition at line 479 of file l6470_class.cpp.
| float L6470_MinSpeed_2_Step_s | ( | uint16_t | MinSpeed ) | [protected, inherited] |
Convert the MIN_SPEED register value into step/s.
- Parameters:
-
MinSpeed The MIN_SPEED register value.
- Return values:
-
step/s The min speed as step/s.
Definition at line 507 of file l6470_class.cpp.
| float L6470_OcdTh_2_mA | ( | uint8_t | OcdTh ) | [protected, inherited] |
Convert the OCD_TH register value into mA.
- Parameters:
-
OcdTh The OCD_TH register value.
- Return values:
-
mA The overcurrent threshold as mA.
Definition at line 675 of file l6470_class.cpp.
| uint32_t L6470_Position_2_AbsPos | ( | int32_t | Position ) | [protected, inherited] |
Convert the position as signed number into absolute position as 2's complement format.
- Parameters:
-
Position The position as signed number.
- Return values:
-
AbsPos The absolute position in the range from [-(2^21)] to [+(2^21)-1].
Definition at line 379 of file l6470_class.cpp.
| uint8_t L6470_s_Step_2_FnSlpAcc | ( | float | s_Step ) | [protected, inherited] |
Convert the intersect speed as step/s into a right value for INT_SPEED register.
- Parameters:
-
step/s The full-step speed as step/s.
- Return values:
-
FsSpd The FS_SPD register value.
Definition at line 633 of file l6470_class.cpp.
| uint8_t L6470_s_Step_2_FnSlpDec | ( | float | s_Step ) | [protected, inherited] |
Convert the intersect speed as step/s into a right value for INT_SPEED register.
- Parameters:
-
step/s The full-step speed as step/s.
- Return values:
-
FsSpd The FS_SPD register value.
Definition at line 661 of file l6470_class.cpp.
| uint8_t L6470_s_Step_2_StSlp | ( | float | s_Step ) | [protected, inherited] |
Convert the intersect speed as step/s into a right value for INT_SPEED register.
- Parameters:
-
step/s The full-step speed as step/s.
- Return values:
-
FsSpd The FS_SPD register value.
Definition at line 605 of file l6470_class.cpp.
| float L6470_Speed_2_Step_s | ( | uint32_t | Speed ) | [protected, inherited] |
Convert the SPEED register value into step/s.
- Parameters:
-
Speed The SPEED register value.
- Return values:
-
step/s The speed as step/s.
Definition at line 398 of file l6470_class.cpp.
| float L6470_StallTh_2_mA | ( | uint8_t | StallTh ) | [protected, inherited] |
Convert the STALL_TH register value into mA.
- Parameters:
-
StallTh The STALL_TH register value.
- Return values:
-
mA The stall detection threshold as mA.
Definition at line 713 of file l6470_class.cpp.
| uint16_t L6470_Step_s2_2_Acc | ( | float | Step_s2 ) | [protected, inherited] |
Convert the acceleartion as step/(s^2) into a right value for ACC register.
- Parameters:
-
step/(s^2) The acceleration as step/(s^2).
- Return values:
-
Acc The ACC register value.
Definition at line 437 of file l6470_class.cpp.
| uint16_t L6470_Step_s2_2_Dec | ( | float | Step_s2 ) | [protected, inherited] |
Convert the deceleration as step/(s^2) into a right value for DEC register.
- Parameters:
-
step/(s^2) The deceleration as step/(s^2).
- Return values:
-
Dec The DEC register value.
Definition at line 465 of file l6470_class.cpp.
| uint16_t L6470_Step_s_2_FsSpd | ( | float | Step_s ) | [protected, inherited] |
Convert the full-step speed as step/s into a right value for FS_SPD register.
- Parameters:
-
step/s The full-step speed as step/s.
- Return values:
-
FsSpd The FS_SPD register value.
Definition at line 549 of file l6470_class.cpp.
| uint16_t L6470_Step_s_2_IntSpeed | ( | float | Step_s ) | [protected, inherited] |
Convert the intersect speed as step/s into a right value for INT_SPEED register.
- Parameters:
-
step/s The full-step speed as step/s.
- Return values:
-
FsSpd The FS_SPD register value.
Definition at line 577 of file l6470_class.cpp.
| uint16_t L6470_Step_s_2_MaxSpeed | ( | float | Step_s ) | [protected, inherited] |
Convert the max speed as step/s into a right value for MAX_SPEED register.
- Parameters:
-
step/s The max speed as step/s.
- Return values:
-
MaxSpeed The MAX_SPEED register value.
Definition at line 493 of file l6470_class.cpp.
| uint16_t L6470_Step_s_2_MinSpeed | ( | float | Step_s ) | [protected, inherited] |
Convert the min speed as step/s into a right value for MIN_SPEED register.
- Parameters:
-
step/s The min speed as step/s.
- Return values:
-
MinSpeed The MIN_SPEED register value.
Definition at line 521 of file l6470_class.cpp.
| uint32_t L6470_Step_s_2_Speed | ( | float | Step_s ) | [protected, inherited] |
Convert the speed as step/s into a right value for SPEED register.
- Parameters:
-
step/s The speed as step/s.
- Return values:
-
Speed The SPEED register value.
Definition at line 409 of file l6470_class.cpp.
| float L6470_StSlp_2_s_Step | ( | uint8_t | StSlp ) | [protected, inherited] |
Convert the ST_SLP register value into s/step.
- Parameters:
-
StartSlope The ST_SLP register value.
- Return values:
-
s/step The start slope as s/step.
Definition at line 591 of file l6470_class.cpp.
Generated on Thu Jul 14 2022 03:27:24 by
1.7.2
