File syn_ccp.c¶
Go to the source code of this file
ASAM CAN Calibration Protocol v2.1 (CCP) Slave Implementation.
#include "syn_ccp.h"#include "../util/syn_assert.h"#include "../util/syn_pack.h"#include <string.h>
Public Functions¶
| Type | Name |
|---|---|
| void | syn_ccp_init (SYN_CCP_Slave * slave, uint16_t station_addr) Initialize CCP slave instance. |
| bool | syn_ccp_process_cro (SYN_CCP_Slave * slave, const uint8_t cro, uint8_t dto_out) Process incoming Command Receive Object (CRO) frame. |
| bool | syn_ccp_service_daq (SYN_CCP_Slave * slave, uint8_t event_channel, uint8_t dto_out, uint8_t * list_idx, uint8_t * odt_idx) Service periodic DAQ sampling tick. |
| void | syn_ccp_set_mta (SYN_CCP_Slave * slave, uint8_t mta_num, uint8_t ext, uintptr_t addr) Set Memory Transfer Address (MTA0 or MTA1). |
Public Functions Documentation¶
function syn_ccp_init¶
Initialize CCP slave instance.
Parameters:
slavePointer to CCP slave handle.station_addr16-bit CCP station address.
function syn_ccp_process_cro¶
Process incoming Command Receive Object (CRO) frame.
Parameters:
slavePointer to CCP slave handle.cro8-byte CRO input CAN payload.dto_out8-byte buffer to receive Command Return Message (DTO/CRM).
Returns:
True if DTO response frame is ready to transmit.
function syn_ccp_service_daq¶
Service periodic DAQ sampling tick.
bool syn_ccp_service_daq (
SYN_CCP_Slave * slave,
uint8_t event_channel,
uint8_t dto_out,
uint8_t * list_idx,
uint8_t * odt_idx
)
Parameters:
slavePointer to CCP slave handle.event_channelTrigger event channel index.dto_outOutput buffer for DAQ DTO packet.list_idxOutput index of transmitting DAQ list.odt_idxOutput index of transmitting ODT.
Returns:
True if a DAQ packet is ready to send.
function syn_ccp_set_mta¶
Set Memory Transfer Address (MTA0 or MTA1).
Parameters:
slavePointer to CCP slave handle.mta_num0 for MTA0, 1 for MTA1.extAddress extension.addrTarget memory address.
The documentation for this class was generated from the following file src/syntropic/proto/syn_ccp.c