27#if (((CO_CONFIG_LSS)&CO_CONFIG_LSS_MASTER) != 0) || defined CO_DOXYGEN
107#if (((CO_CONFIG_LSS)&CO_CONFIG_FLAG_CALLBACK_PRE) != 0) || defined CO_DOXYGEN
108 void (*pFunctSignal)(
void* object);
119#ifndef CO_LSSmaster_DEFAULT_TIMEOUT
120#define CO_LSSmaster_DEFAULT_TIMEOUT 1000U
160#if (((CO_CONFIG_LSS)&CO_CONFIG_FLAG_CALLBACK_PRE) != 0) || defined CO_DOXYGEN
CANopen Layer Setting Services protocol (common).
CO_LSSmaster_return_t CO_LSSmaster_Inquire(CO_LSSmaster_t *LSSmaster, uint32_t timeDifference_us, uint8_t lssInquireCs, uint32_t *value)
Request LSS inquire node ID or part of LSS address.
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.
CO_LSSmaster_return_t CO_LSSmaster_configureNodeId(CO_LSSmaster_t *LSSmaster, uint32_t timeDifference_us, uint8_t nodeId)
Request LSS configure node ID.
CO_ReturnError_t CO_LSSmaster_init(CO_LSSmaster_t *LSSmaster, uint16_t timeout_ms, CO_CANmodule_t *CANdevRx, uint16_t CANdevRxIdx, uint16_t CANidLssSlave, CO_CANmodule_t *CANdevTx, uint16_t CANdevTxIdx, uint16_t CANidLssMaster)
Initialize LSS object.
CO_LSSmaster_scantype_t
Scan type for CO_LSSmaster_fastscan_t scan.
Definition CO_LSSmaster.h:314
CO_LSSmaster_return_t CO_LSSmaster_configureBitTiming(CO_LSSmaster_t *LSSmaster, uint32_t timeDifference_us, uint16_t bit)
Request LSS configure Bit Timing.
CO_LSSmaster_return_t CO_LSSmaster_ActivateBit(CO_LSSmaster_t *LSSmaster, uint16_t switchDelay_ms)
Request LSS activate bit timing.
void CO_LSSmaster_initCallbackPre(CO_LSSmaster_t *LSSmaster, void *object, void(*pFunctSignal)(void *object))
Initialize LSSmasterRx callback function.
CO_LSSmaster_return_t CO_LSSmaster_configureStore(CO_LSSmaster_t *LSSmaster, uint32_t timeDifference_us)
Request LSS store configuration.
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_LSSmaster_return_t CO_LSSmaster_swStateDeselect(CO_LSSmaster_t *LSSmaster)
Request LSS switch state deselect.
void CO_LSSmaster_changeTimeout(CO_LSSmaster_t *LSSmaster, uint16_t timeout_ms)
Change LSS master timeout.
CO_LSSmaster_return_t CO_LSSmaster_swStateSelect(CO_LSSmaster_t *LSSmaster, uint32_t timeDifference_us, CO_LSS_address_t *lssAddress)
Request LSS switch state select.
CO_LSSmaster_return_t
Return values of LSS master functions.
Definition CO_LSSmaster.h:79
@ CO_LSSmaster_FS_SCAN
Do full 32 bit scan.
Definition CO_LSSmaster.h:315
@ CO_LSSmaster_FS_MATCH
Full 32 bit value is given as argument, just verify.
Definition CO_LSSmaster.h:317
@ CO_LSSmaster_FS_SKIP
Skip this value.
Definition CO_LSSmaster.h:316
@ CO_LSSmaster_SCAN_FINISHED
Scanning finished successful.
Definition CO_LSSmaster.h:80
@ CO_LSSmaster_OK
Success, end of communication.
Definition CO_LSSmaster.h:82
@ CO_LSSmaster_INVALID_STATE
State machine not ready or already processing a request.
Definition CO_LSSmaster.h:85
@ CO_LSSmaster_WAIT_SLAVE
No response arrived from slave yet.
Definition CO_LSSmaster.h:81
@ CO_LSSmaster_TIMEOUT
No reply received.
Definition CO_LSSmaster.h:83
@ CO_LSSmaster_OK_MANUFACTURER
LSS success, node rejected argument with manufacturer error code.
Definition CO_LSSmaster.h:89
@ CO_LSSmaster_ILLEGAL_ARGUMENT
Invalid argument.
Definition CO_LSSmaster.h:84
@ CO_LSSmaster_OK_ILLEGAL_ARGUMENT
LSS success, node rejected argument because of non-supported value.
Definition CO_LSSmaster.h:88
@ CO_LSSmaster_SCAN_NOACK
No node found that matches scan request.
Definition CO_LSSmaster.h:86
@ CO_LSSmaster_SCAN_FAILED
An error occurred while scanning.
Definition CO_LSSmaster.h:87
unsigned int uint16_t
UNSIGNED16 in CANopen (0006h), 16-bit unsigned integer.
Definition CO_driver.h:132
unsigned long int uint32_t
UNSIGNED32 in CANopen (0007h), 32-bit unsigned integer.
Definition CO_driver.h:133
unsigned char uint8_t
UNSIGNED8 in CANopen (0005h), 8-bit unsigned integer.
Definition CO_driver.h:131
CO_ReturnError_t
Return values of some CANopen functions.
Definition CO_driver.h:449
Complete CAN module object.
Definition CO_driver.h:268
Configuration object for CAN transmit message for specific CANopenNode Object.
Definition CO_driver.h:250
Parameters for LSS fastscan CO_LSSmaster_IdentifyFastscan.
Definition CO_LSSmaster.h:323
CO_LSS_address_t match
Value to match in case of CO_LSSmaster_FS_MATCH.
Definition CO_LSSmaster.h:325
CO_LSS_address_t found
Scan result.
Definition CO_LSSmaster.h:326
LSS master object.
Definition CO_LSSmaster.h:95
uint8_t state
Node is currently selected.
Definition CO_LSSmaster.h:97
CO_CANmodule_t * CANdevTx
From CO_LSSmaster_init()
Definition CO_LSSmaster.h:111
uint8_t command
Active command.
Definition CO_LSSmaster.h:98
uint8_t fsLssSub
Current state of node state machine.
Definition CO_LSSmaster.h:101
uint32_t timeoutTimer
Timeout timer for LSS communication.
Definition CO_LSSmaster.h:99
void * functSignalObject
Pointer to object.
Definition CO_LSSmaster.h:109
uint8_t fsBitChecked
Current scan bit position.
Definition CO_LSSmaster.h:102
uint32_t fsIdNumber
Current scan result.
Definition CO_LSSmaster.h:103
volatile void * CANrxNew
Indication if new LSS message is received from CAN bus.
Definition CO_LSSmaster.h:104
uint8_t fsState
Current state of fastscan master state machine.
Definition CO_LSSmaster.h:100
CO_CANtx_t * TXbuff
CAN transmit buffer.
Definition CO_LSSmaster.h:112
uint32_t timeout_us
LSS response timeout in us.
Definition CO_LSSmaster.h:96
The LSS address is a 128 bit number, uniquely identifying each node.
Definition CO_LSS.h:150