CANopenNode
CANopen protocol stack
Loading...
Searching...
No Matches
CO_LSS.h File Reference

CANopen Layer Setting Services protocol (common). More...

#include "301/CO_driver.h"
+ Include dependency graph for CO_LSS.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

union  CO_LSS_address_t
 The LSS address is a 128 bit number, uniquely identifying each node. More...
 

Macros

#define CO_LSS_SWITCH_STATE_GLOBAL   0x04U
 Switch state global protocol.
 
#define CO_LSS_SWITCH_STATE_SEL_VENDOR   0x40U
 Switch state selective protocol - Vendor ID.
 
#define CO_LSS_SWITCH_STATE_SEL_PRODUCT   0x41U
 Switch state selective protocol - Product code.
 
#define CO_LSS_SWITCH_STATE_SEL_REV   0x42U
 Switch state selective protocol - Revision number.
 
#define CO_LSS_SWITCH_STATE_SEL_SERIAL   0x43U
 Switch state selective protocol - Serial number.
 
#define CO_LSS_SWITCH_STATE_SEL   0x44U
 Switch state selective protocol - Slave response.
 
#define CO_LSS_CFG_NODE_ID   0x11U
 Configure node ID protocol.
 
#define CO_LSS_CFG_BIT_TIMING   0x13U
 Configure bit timing parameter protocol.
 
#define CO_LSS_CFG_ACTIVATE_BIT_TIMING   0x15U
 Activate bit timing parameter protocol.
 
#define CO_LSS_CFG_STORE   0x17U
 Store configuration protocol.
 
#define CO_LSS_IDENT_SLAVE   0x4FU
 LSS Fastscan response.
 
#define CO_LSS_IDENT_FASTSCAN   0x51U
 LSS Fastscan protocol.
 
#define CO_LSS_INQUIRE_VENDOR   0x5AU
 Inquire identity vendor-ID protocol.
 
#define CO_LSS_INQUIRE_PRODUCT   0x5BU
 Inquire identity product-code protocol.
 
#define CO_LSS_INQUIRE_REV   0x5CU
 Inquire identity revision-number protocol.
 
#define CO_LSS_INQUIRE_SERIAL   0x5DU
 Inquire identity serial-number protocol.
 
#define CO_LSS_INQUIRE_NODE_ID   0x5EU
 Inquire node-ID protocol.
 
#define CO_LSS_CFG_NODE_ID_OK   0x00U
 Protocol successfully completed.
 
#define CO_LSS_CFG_NODE_ID_OUT_OF_RANGE   0x01U
 NID out of range.
 
#define CO_LSS_CFG_NODE_ID_MANUFACTURER   0xFFU
 Manufacturer specific error.
 
#define CO_LSS_CFG_BIT_TIMING_OK   0x00U
 Protocol successfully completed.
 
#define CO_LSS_CFG_BIT_TIMING_OUT_OF_RANGE   0x01U
 Bit timing / Bit rate not supported.
 
#define CO_LSS_CFG_BIT_TIMING_MANUFACTURER   0xFFU
 Manufacturer specific error.
 
#define CO_LSS_CFG_STORE_OK   0x00U
 Protocol successfully completed.
 
#define CO_LSS_CFG_STORE_NOT_SUPPORTED   0x01U
 Store configuration not supported.
 
#define CO_LSS_CFG_STORE_FAILED   0x02U
 Storage media access error.
 
#define CO_LSS_CFG_STORE_MANUFACTURER   0xFFU
 Manufacturer specific error.
 
#define CO_LSS_FASTSCAN_BIT0   0x00U
 Least significant bit of IDnumbners bit area to be checked.
 
#define CO_LSS_FASTSCAN_BIT31   0x1FU
 dito
 
#define CO_LSS_FASTSCAN_CONFIRM   0x80U
 All LSS slaves waiting for scan respond and previous scan is reset.
 
#define CO_LSS_FASTSCAN_VENDOR_ID   0x00U
 Vendor ID.
 
#define CO_LSS_FASTSCAN_PRODUCT   0x01U
 Product code.
 
#define CO_LSS_FASTSCAN_REV   0x02U
 Revision number.
 
#define CO_LSS_FASTSCAN_SERIAL   0x03U
 Serial number.
 
#define CO_LSS_STATE_WAITING   0x00U
 LSS FSA waiting for requests.
 
#define CO_LSS_STATE_CONFIGURATION   0x01U
 LSS FSA waiting for configuration.
 
#define CO_LSS_BIT_TIMING_1000   0U
 1000kbit/s
 
#define CO_LSS_BIT_TIMING_800   1U
 800kbit/s
 
#define CO_LSS_BIT_TIMING_500   2U
 500kbit/s
 
#define CO_LSS_BIT_TIMING_250   3U
 250kbit/s
 
#define CO_LSS_BIT_TIMING_125   4U
 125kbit/s
 
#define CO_LSS_BIT_TIMING_50   6U
 50kbit/s
 
#define CO_LSS_BIT_TIMING_20   7U
 20kbit/s
 
#define CO_LSS_BIT_TIMING_10   8U
 10kbit/s
 
#define CO_LSS_BIT_TIMING_AUTO   9U
 Automatic bit rate detection.
 
#define CO_LSS_NODE_ID_ASSIGNMENT   0xFFU
 Invalid node ID triggers node ID assignment.
 
#define CO_LSS_NODE_ID_VALID(nid)   (((nid >= 1U) && (nid <= 0x7FU)) || (nid == CO_LSS_NODE_ID_ASSIGNMENT))
 Macro to check if node id is valid.
 
#define CO_LSS_ADDRESS_EQUAL(a1, a2)
 Macro to check if two LSS addresses are equal.
 

Variables

static const uint16_t CO_LSS_bitTimingTableLookup [] = {1000, 800, 500, 250, 125, 0, 50, 20, 10, 0}
 Lookup table for conversion between bit timing table and numerical bit rate.
 

Detailed Description

CANopen Layer Setting Services protocol (common).

Author
Martin Wagner

This file is part of https://github.com/CANopenNode/CANopenNode, a CANopen Stack.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.