Skip to content

Commit

Permalink
rename DSSC_ prefix to FRMSC_
Browse files Browse the repository at this point in the history
  • Loading branch information
sksat committed Oct 5, 2023
1 parent d237862 commit ff5d571
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions hal/i2c_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ static FRM_ERR_CODE I2C_write_bytes_(Framing* p_super, uint8_t stream, I2C_Confi
tx_data[0] = register_address;
ENDIAN_memcpy(tx_data + sizeof(register_address), data_v, data_len);
I2C_set_stop_flag(p_i2c_config, 1);
DSSC_set_tx_frame(stream_config, tx_data);
DSSC_set_tx_frame_size(stream_config, sizeof(register_address) + data_len);
FRMSC_set_tx_frame(stream_config, tx_data);
FRMSC_set_tx_frame_size(stream_config, sizeof(register_address) + data_len);

return FRM_send_general_cmd(p_super, stream);
}
Expand All @@ -80,25 +80,25 @@ static FRM_ERR_CODE I2C_read_bytes_(Framing* p_super, uint8_t stream, I2C_Config
FRM_StreamConfig* stream_config = &(p_super->stream_config[stream]);

// read setting
DSSC_set_rx_frame_size(stream_config, buffer_size);
FRMSC_set_rx_frame_size(stream_config, buffer_size);
I2C_set_rx_length(p_i2c_config, buffer_size);
FRM_clear_rx_buffer(p_super);
// send
I2C_set_stop_flag(p_i2c_config, 0);
DSSC_set_tx_frame(stream_config, &register_address);
DSSC_set_tx_frame_size(stream_config, sizeof(register_address));
FRMSC_set_tx_frame(stream_config, &register_address);
FRMSC_set_tx_frame_size(stream_config, sizeof(register_address));
ret = FRM_send_req_tlm_cmd(p_super, stream);
if (ret != FRM_ERR_CODE_OK) return ret;
// read
I2C_set_stop_flag(p_i2c_config, 1);
ret = FRM_receive(p_super);
if (ret != FRM_ERR_CODE_OK) return ret;
if (DSSC_get_rec_status(stream_config)->status_code != FRM_STREAM_REC_STATUS_FIXED_FRAME)
if (FRMSC_get_rec_status(stream_config)->status_code != FRM_STREAM_REC_STATUS_FIXED_FRAME)
{
return FRM_ERR_CODE_ERR;
}

rx_data = DSSC_get_rx_frame(stream_config);
rx_data = FRMSC_get_rx_frame(stream_config);
ENDIAN_memcpy(data_v, rx_data, buffer_size);

return ret;
Expand Down

0 comments on commit ff5d571

Please sign in to comment.