Go to the documentation of this file.
27 #ifndef CO_LSSmaster_H
28 #define CO_LSSmaster_H
32 #if ((CO_CONFIG_LSS) & CO_CONFIG_LSS_MASTER) || defined CO_DOXYGEN
122 #if ((CO_CONFIG_LSS) & CO_CONFIG_FLAG_CALLBACK_PRE) || defined CO_DOXYGEN
123 void (*pFunctSignal)(
void *object);
135 #ifndef CO_LSSmaster_DEFAULT_TIMEOUT
136 #define CO_LSSmaster_DEFAULT_TIMEOUT 1000U
190 #if ((CO_CONFIG_LSS) & CO_CONFIG_FLAG_CALLBACK_PRE) || defined CO_DOXYGEN
206 void (*pFunctSignal)(
void *
object));
@ CO_LSSmaster_OK_MANUFACTURER
LSS success, node rejected argument with manufacturer error code.
Definition: CO_LSSmaster.h:101
unsigned long int uint32_t
UNSIGNED32 in CANopen (0007h), 32-bit unsigned integer.
Definition: CO_driver.h:155
uint8_t fsLssSub
Current state of node state machine.
Definition: CO_LSSmaster.h:116
@ CO_LSSmaster_SCAN_NOACK
No node found that matches scan request.
Definition: CO_LSSmaster.h:98
CO_LSS_address_t found
Scan result.
Definition: CO_LSSmaster.h:410
CANopen Layer Setting Services protocol (common).
unsigned int uint16_t
UNSIGNED16 in CANopen (0006h), 16-bit unsigned integer.
Definition: CO_driver.h:153
CO_LSSmaster_return_t CO_LSSmaster_InquireLssAddress(CO_LSSmaster_t *LSSmaster, uint32_t timeDifference_us, CO_LSS_address_t *lssAddress)
Request LSS inquire LSS address.
uint8_t fsBitChecked
Current scan bit position.
Definition: CO_LSSmaster.h:117
CO_LSSmaster_return_t CO_LSSmaster_ActivateBit(CO_LSSmaster_t *LSSmaster, uint16_t switchDelay_ms)
Request LSS activate bit timing.
CO_ReturnError_t
Return values of some CANopen functions.
Definition: CO_driver.h:488
CO_CANmodule_t * CANdevTx
From CO_LSSmaster_init()
Definition: CO_LSSmaster.h:126
CO_LSSmaster_return_t CO_LSSmaster_IdentifyFastscan(CO_LSSmaster_t *LSSmaster, uint32_t timeDifference_us, CO_LSSmaster_fastscan_t *fastscan)
Select a node by LSS identify fastscan.
CO_LSS_cs_t
LSS protocol command specifiers.
Definition: CO_LSS.h:86
CO_LSSmaster_return_t CO_LSSmaster_switchStateDeselect(CO_LSSmaster_t *LSSmaster)
Request LSS switch state deselect.
CO_LSSmaster_return_t CO_LSSmaster_switchStateSelect(CO_LSSmaster_t *LSSmaster, uint32_t timeDifference_us, CO_LSS_address_t *lssAddress)
Request LSS switch state select.
void * functSignalObject
Pointer to object.
Definition: CO_LSSmaster.h:124
@ CO_LSSmaster_OK
Success, end of communication.
Definition: CO_LSSmaster.h:94
void CO_LSSmaster_initCallbackPre(CO_LSSmaster_t *LSSmaster, void *object, void(*pFunctSignal)(void *object))
Initialize LSSmasterRx callback function.
CO_LSSmaster_return_t CO_LSSmaster_configureNodeId(CO_LSSmaster_t *LSSmaster, uint32_t timeDifference_us, uint8_t nodeId)
Request LSS configure node ID.
@ CO_LSSmaster_SCAN_FAILED
An error occurred while scanning.
Definition: CO_LSSmaster.h:99
uint8_t fsState
Current state of fastscan master state machine.
Definition: CO_LSSmaster.h:115
CO_LSSmaster_return_t CO_LSSmaster_Inquire(CO_LSSmaster_t *LSSmaster, uint32_t timeDifference_us, CO_LSS_cs_t lssInquireCs, uint32_t *value)
Request LSS inquire node ID or part of LSS address.
@ CO_LSSmaster_WAIT_SLAVE
No response arrived from slave yet.
Definition: CO_LSSmaster.h:93
uint32_t timeout_us
LSS response timeout in us.
Definition: CO_LSSmaster.h:109
uint8_t state
Node is currently selected.
Definition: CO_LSSmaster.h:111
uint32_t fsIdNumber
Current scan result.
Definition: CO_LSSmaster.h:118
CO_LSSmaster_scantype_t
Scan type for CO_LSSmaster_fastscan_t scan.
Definition: CO_LSSmaster.h:398
Parameters for LSS fastscan CO_LSSmaster_IdentifyFastscan.
Definition: CO_LSSmaster.h:407
LSS master object.
Definition: CO_LSSmaster.h:108
CO_LSSmaster_return_t
Return values of LSS master functions.
Definition: CO_LSSmaster.h:91
@ CO_LSSmaster_FS_SKIP
Skip this value.
Definition: CO_LSSmaster.h:400
void CO_LSSmaster_changeTimeout(CO_LSSmaster_t *LSSmaster, uint16_t timeout_ms)
Change LSS master timeout.
@ CO_LSSmaster_ILLEGAL_ARGUMENT
Invalid argument.
Definition: CO_LSSmaster.h:96
CO_CANtx_t * TXbuff
CAN transmit buffer.
Definition: CO_LSSmaster.h:127
@ CO_LSSmaster_FS_MATCH
Full 32 bit value is given as argument, just verify.
Definition: CO_LSSmaster.h:401
@ CO_LSSmaster_FS_SCAN
Do full 32 bit scan.
Definition: CO_LSSmaster.h:399
@ CO_LSSmaster_SCAN_FINISHED
Scanning finished successful.
Definition: CO_LSSmaster.h:92
@ CO_LSSmaster_TIMEOUT
No reply received.
Definition: CO_LSSmaster.h:95
CO_LSS_address_t match
Value to match in case of CO_LSSmaster_FS_MATCH.
Definition: CO_LSSmaster.h:409
Complete CAN module object.
Definition: CO_driver.h:319
@ CO_LSSmaster_OK_ILLEGAL_ARGUMENT
LSS success, node rejected argument because of non-supported value.
Definition: CO_LSSmaster.h:100
CO_LSSmaster_return_t CO_LSSmaster_configureStore(CO_LSSmaster_t *LSSmaster, uint32_t timeDifference_us)
Request LSS store configuration.
uint32_t timeoutTimer
Timeout timer for LSS communication.
Definition: CO_LSSmaster.h:113
@ CO_LSSmaster_INVALID_STATE
State machine not ready or already processing a request.
Definition: CO_LSSmaster.h:97
The LSS address is a 128 bit number, uniquely identifying each node.
Definition: CO_LSS.h:162
CO_LSSmaster_return_t CO_LSSmaster_configureBitTiming(CO_LSSmaster_t *LSSmaster, uint32_t timeDifference_us, uint16_t bit)
Request LSS configure Bit Timing.
Configuration object for CAN transmit message for specific CANopenNode Object.
Definition: CO_driver.h:299
uint8_t command
Active command.
Definition: CO_LSSmaster.h:112
volatile void * CANrxNew
Indication if new LSS message is received from CAN bus.
Definition: CO_LSSmaster.h:120
CO_ReturnError_t CO_LSSmaster_init(CO_LSSmaster_t *LSSmaster, uint16_t timeout_ms, CO_CANmodule_t *CANdevRx, uint16_t CANdevRxIdx, uint32_t CANidLssSlave, CO_CANmodule_t *CANdevTx, uint16_t CANdevTxIdx, uint32_t CANidLssMaster)
Initialize LSS object.
unsigned char uint8_t
UNSIGNED8 in CANopen (0005h), 8-bit unsigned integer.
Definition: CO_driver.h:151