Dependencies:
mbed
« Back to documentation index
L6474_Control_Functions
Functions
void L6474_CmdDisable (uint8_t deviceId)
Issue the Disable command to the L6474 of the specified device.
void L6474_CmdEnable (uint8_t deviceId)
Issues the Enable command to the L6474 of the specified device.
uint32_t L6474_CmdGetParam (uint8_t deviceId, uint32_t param)
Issues the GetParam command to the L6474 of the specified device.
uint16_t L6474_CmdGetStatus (uint8_t deviceId)
Issues the GetStatus command to the L6474 of the specified device.
void L6474_CmdNop (uint8_t deviceId)
Issues the Nop command to the L6474 of the specified device.
void L6474_CmdSetParam (uint8_t deviceId, uint32_t param, uint32_t value)
Issues the SetParam command to the L6474 of the specified device.
uint16_t L6474_ReadStatusRegister (uint8_t deviceId)
Reads the Status Register value.
void L6474_ReleaseReset (void)
Releases the L6474 reset (pin set to High) of all devices.
void L6474_Reset (void)
Resets the L6474 (reset pin set to low) of all devices.
void L6474_SelectStepMode (uint8_t deviceId, motorStepMode_t stepMod)
Set the stepping mode.
void L6474_SetDirection (uint8_t deviceId, motorDir_t dir)
Specifies the direction.
Function Documentation
void L6474_CmdDisable
(
uint8_t
deviceId )
Issue the Disable command to the L6474 of the specified device.
Parameters:
[in] deviceId (from 0 to 2)
Return values:
Definition at line 747 of file l6474.cpp .
void L6474_CmdEnable
(
uint8_t
deviceId )
Issues the Enable command to the L6474 of the specified device.
Parameters:
[in] deviceId (from 0 to 2)
Return values:
Definition at line 757 of file l6474.cpp .
uint32_t L6474_CmdGetParam
(
uint8_t
deviceId ,
uint32_t
param
)
Issues the GetParam command to the L6474 of the specified device.
Parameters:
[in] deviceId (from 0 to 2)
[in] param Register adress (L6474_ABS_POS, L6474_MARK,...)
Return values:
Definition at line 768 of file l6474.cpp .
uint16_t L6474_CmdGetStatus
(
uint8_t
deviceId )
Issues the GetStatus command to the L6474 of the specified device.
Parameters:
[in] deviceId (from 0 to 2)
Return values:
Note: Once the GetStatus command is performed, the flags of the status register are reset. This is not the case when the status register is read with the GetParam command (via the functions L6474ReadStatusRegister or L6474CmdGetParam).
Definition at line 846 of file l6474.cpp .
void L6474_CmdNop
(
uint8_t
deviceId )
Issues the Nop command to the L6474 of the specified device.
Parameters:
[in] deviceId (from 0 to 2)
Return values:
Definition at line 896 of file l6474.cpp .
void L6474_CmdSetParam
(
uint8_t
deviceId ,
uint32_t
param ,
uint32_t
value
)
Issues the SetParam command to the L6474 of the specified device.
Parameters:
[in] deviceId (from 0 to 2)
[in] param Register adress (L6474_ABS_POS, L6474_MARK,...)
[in] value Value to set in the register
Return values:
Definition at line 908 of file l6474.cpp .
uint16_t L6474_ReadStatusRegister
(
uint8_t
deviceId )
Reads the Status Register value.
Parameters:
[in] deviceId (from 0 to 2)
Return values:
Note: The status register flags are not cleared at the difference with L6474CmdGetStatus()
Definition at line 977 of file l6474.cpp .
void L6474_ReleaseReset
(
void
)
Releases the L6474 reset (pin set to High) of all devices.
Parameters:
Return values:
Definition at line 987 of file l6474.cpp .
void L6474_Reset
(
void
)
Resets the L6474 (reset pin set to low) of all devices.
Parameters:
Return values:
Definition at line 997 of file l6474.cpp .
void L6474_SelectStepMode
(
uint8_t
deviceId ,
motorStepMode_t
stepMod
)
Set the stepping mode.
Parameters:
[in] deviceId (from 0 to 2)
[in] stepMod from full step to 1/16 microstep as specified in enum motorStepMode_t
Return values:
Definition at line 1008 of file l6474.cpp .
void L6474_SetDirection
(
uint8_t
deviceId ,
motorDir_t
dir
)
Specifies the direction.
Parameters:
[in] deviceId (from 0 to 2)
[in] dir FORWARD or BACKWARD
Note: The direction change is only applied if the device is in INACTIVE state
Return values:
Definition at line 1057 of file l6474.cpp .