File syn_lss.c¶
Go to the source code of this file
CANopen CiA 305 Layer Setting Services (LSS) Implementation.
#include "syn_lss.h"#include "../util/syn_assert.h"#include "../util/syn_pack.h"#include <string.h>
Public Functions¶
| Type | Name |
|---|---|
| void | syn_lss_master_build_config_bit_timing (SYN_CAN_Frame * frame, uint8_t baud_table_idx) Build an LSS Master request frame to configure Bit Timing / Baud rate. |
| void | syn_lss_master_build_config_node_id (SYN_CAN_Frame * frame, uint8_t new_node_id) Build an LSS Master request frame to configure Node-ID. |
| void | syn_lss_master_build_store_config (SYN_CAN_Frame * frame) Build an LSS Master request frame to store configuration to NVM. |
| void | syn_lss_master_build_switch_mode (SYN_CAN_Frame * frame, uint8_t mode) Build an LSS Master request frame to switch global mode. |
| void | syn_lss_slave_init (SYN_LSSSlave * slave, const SYN_LSSAddress * addr, uint8_t initial_node_id) Initialize LSS Slave state instance. |
| bool | syn_lss_slave_process (SYN_LSSSlave * slave, const SYN_CAN_Frame * frame, SYN_CAN_Frame * resp) Process an incoming CAN frame for LSS Slave processing. |
Public Functions Documentation¶
function syn_lss_master_build_config_bit_timing¶
Build an LSS Master request frame to configure Bit Timing / Baud rate.
Parameters:
frameOutput frame buffer.baud_table_idxBaud rate index (SYN_LSS_BAUD_*).
function syn_lss_master_build_config_node_id¶
Build an LSS Master request frame to configure Node-ID.
Parameters:
frameOutput frame buffer.new_node_idTarget Node-ID (1..127).
function syn_lss_master_build_store_config¶
Build an LSS Master request frame to store configuration to NVM.
Parameters:
frameOutput frame buffer.
function syn_lss_master_build_switch_mode¶
Build an LSS Master request frame to switch global mode.
Parameters:
frameOutput frame buffer.modeTarget LSS mode (SYN_LSS_MODE_OPERATION or SYN_LSS_MODE_CONFIGURATION).
function syn_lss_slave_init¶
Initialize LSS Slave state instance.
void syn_lss_slave_init (
SYN_LSSSlave * slave,
const SYN_LSSAddress * addr,
uint8_t initial_node_id
)
Parameters:
slavePointer to slave handle.addrPointer to LSS unique 128-bit identity address.initial_node_idStarting node-ID (or 0xFF for unconfigured).
function syn_lss_slave_process¶
Process an incoming CAN frame for LSS Slave processing.
bool syn_lss_slave_process (
SYN_LSSSlave * slave,
const SYN_CAN_Frame * frame,
SYN_CAN_Frame * resp
)
Parameters:
slavePointer to LSS Slave handle.frameIncoming CAN frame (COB-ID 0x7E5).respOutput CAN frame buffer (populated with 0x7E4 response if required).
Returns:
True if a response frame should be transmitted over CAN.
The documentation for this class was generated from the following file src/syntropic/proto/syn_lss.c