10#define SDRV_FLEXRAY_H_
17#include "sdrv_flexray_driver.h"
18#include "sdrv_flexray_general_types.h"
37typedef Fr_CCLowLevelConfigSetType
199 uint8_t abs_timer_idx,
200 uint8_t cycle, uint16_t offset);
219 const uint8_t *lsdu_ptr,
283 uint16_t *macro_tick_ptr);
295 uint8_t *network_vector);
307 uint8_t *number_startup_frame_ptr);
321 uint16_t *channel_a_status_ptr, uint16_t *channel_b_status_ptr);
335 sint16 *rate_correction_ptr, sint32 *offset_correction_ptr);
357 uint16_t *channel_a_even_list_ptr,
358 uint16_t *channel_b_even_list_ptr, uint16_t *channel_a_odd_list_ptr,
359 uint16_t *channel_b_odd_list_ptr);
372 uint8_t *wakeup_rx_status_ptr);
383 uint8_t abs_timer_idx);
396 uint8_t config_paramter_idx, uint32_t *config_para_value_ptr);
407 uint8_t abs_timer_idx);
418 uint8_t abs_timer_idx);
429 uint8_t abs_timer_idx);
442 uint8_t abs_timer_idx,
443 boolean *irq_status_ptr);
SemiDrive driver common header file.
@ SDRV_STATUS_GROUP_FLEXRAY
Definition: sdrv_common.h:62
int32_t status_t
Type used for all status and error return values.
Definition: sdrv_common.h:82
#define SDRV_ERROR_STATUS(group, code)
Construct a status code value from a group and code number. All the error statuses are negetive numbe...
Definition: sdrv_common.h:17
status_t sdrv_flexray_get_number_startup_frames(sdrv_flexray_t *handle, uint8_t *number_startup_frame_ptr)
Gets the current number of startup frames seen on the cluster.
Fr_CCRxBufferConfigType sdrv_flexray_cc_rx_buffer_config_type
Definition: sdrv_flexray.h:39
Fr_CCTxBufferConfigType sdrv_flexray_cc_tx_buffer_config_type
Definition: sdrv_flexray.h:32
status_t sdrv_flexray_read_cc_config(sdrv_flexray_t *handle, uint8_t config_paramter_idx, uint32_t *config_para_value_ptr)
Reconfigures physical resource.
Fr_ConfigType sdrv_flexray_config_type
Definition: sdrv_flexray.h:25
status_t sdrv_flexray_set_absolute_timer(sdrv_flexray_t *handle, uint8_t abs_timer_idx, uint8_t cycle, uint16_t offset)
Sets the absolute flexray timer.
status_t sdrv_flexray_get_absolute_timer_irq_status(sdrv_flexray_t *handle, uint8_t abs_timer_idx, boolean *irq_status_ptr)
Checks if the absolute timer flag is set.
Fr_CCLpduInfoType sdrv_flexray_cc_lpdu_info_type
Definition: sdrv_flexray.h:42
Fr_SoftwareStatesType sdrv_flexray_software_states_type
Definition: sdrv_flexray.h:30
status_t sdrv_flexray_send_wakeup(sdrv_flexray_t *handle)
Initiates transition to POC:Wakeup.
status_t sdrv_flexray_halt_communication(sdrv_flexray_t *handle)
This API call stops communication.
status_t sdrv_flexray_interrupt_disable(sdrv_flexray_t *handle, sdrv_flexray_global_interrupt_type interrupt_source)
disable flexray interrupt
Fr_CCFifoConfigType sdrv_flexray_cc_fifo_config_type
Definition: sdrv_flexray.h:40
status_t sdrv_flexray_start_communication(sdrv_flexray_t *handle)
Starts the communication.
Fr_CCBufferConfigSetType sdrv_flexray_cc_buffer_config_set_type
Definition: sdrv_flexray.h:41
Fr_ChannelType sdrv_flexray_channel_type
Definition: sdrv_flexray.h:27
Fr_POCStatusType sdrv_flexray_poc_status_type
Definition: sdrv_flexray.h:28
Fr_SoftwareStatesType
Definition: sdrv_flexray.h:20
@ FR_INIT
Definition: sdrv_flexray.h:22
@ FR_UNINIT
Definition: sdrv_flexray.h:21
Fr_CCHardwareConfigType sdrv_flexray_cc_hardware_config_type
Definition: sdrv_flexray.h:36
status_t sdrv_flexray_receive_rx_lpdu(sdrv_flexray_t *handle, uint16_t lpdu_idx, uint8_t *lsdu_ptr, sdrv_flexray_rx_lpdu_status_type *lpdu_status_ptr, uint8_t *lsdu_length_ptr, sdrv_flexray_slot_assignment_type *slot_assignment_ptr)
Receives data.
status_t sdrv_flexray_check_tx_lpdu_status(sdrv_flexray_t *handle, uint16_t lpdu_idx, sdrv_flexray_tx_lpdu_status_type *tx_lpdu_status_ptr, sdrv_flexray_slot_assignment_type *slot_assignment_ptr)
Checks if data have been transmitted.
Fr_CCBufferOffset16Type sdrv_flexray_cc_buffer_offset16_type
Definition: sdrv_flexray.h:44
status_t sdrv_flexray_get_network_vector(sdrv_flexray_t *handle, uint8_t *network_vector)
Read network management vector.
Fr_CCLowLevelConfigSetType sdrv_flexray_cc_low_level_config_set_type
Definition: sdrv_flexray.h:38
status_t sdrv_flexray_allow_coldstart(sdrv_flexray_t *handle)
Invokes the CC CHI command ALLOW_COLDSTART.
Fr_ConfigurationType sdrv_flexray_configuration_type
Definition: sdrv_flexray.h:29
status_t sdrv_flexray_get_poc_status(sdrv_flexray_t *handle, sdrv_flexray_poc_status_type *poc_status_ptr)
Query for the controller status.
status_t sdrv_flexray_get_wakeup_rx_status(sdrv_flexray_t *handle, uint8_t *wakeup_rx_status_ptr)
Gets clock correction values.
status_t sdrv_flexray_enable_absolute_timer_irq(sdrv_flexray_t *handle, uint8_t abs_timer_idx)
Enables absolute timer interrupts.
Fr_CtrlCfgType sdrv_flexray_ctrl_cfg_type
Definition: sdrv_flexray.h:26
status_t sdrv_flexray_interrupt_enable(sdrv_flexray_t *handle, sdrv_flexray_global_interrupt_type interrupt_source)
open flexray interrupt
Fr_CCBufferAddressType sdrv_flexray_cc_buffer_address_type
Definition: sdrv_flexray.h:43
status_t sdrv_flexray_get_channel_status(sdrv_flexray_t *handle, uint16_t *channel_a_status_ptr, uint16_t *channel_b_status_ptr)
Read channel status.
sdrv_flexray_error
flexray status error code.
Definition: sdrv_flexray.h:59
@ SDRV_FLEXRAY_INIT_FAILED
Definition: sdrv_flexray.h:73
@ SDRV_FLEXRAY_INV_CHNL_IDX
Definition: sdrv_flexray.h:69
@ SDRV_FLEXRAY_INV_LPDU_IDX
Definition: sdrv_flexray.h:79
@ SDRV_FLEXRAY_INV_TIMER_IDX
Definition: sdrv_flexray.h:61
@ SDRV_FLEXRAY_INV_POCSTATE
Definition: sdrv_flexray.h:75
@ SDRV_FLEXRAY_INV_CYCLE
Definition: sdrv_flexray.h:71
@ SDRV_FLEXRAY_PARAM_CONFIG
Definition: sdrv_flexray.h:88
@ SDRV_FLEXRAY_INV_BASE_ADDR
Definition: sdrv_flexray.h:67
@ SDRV_FLEXRAY_INV_LENGTH
Definition: sdrv_flexray.h:77
@ SDRV_FLEXRAY_INV_CONFIG_IDX
Definition: sdrv_flexray.h:83
@ SDRV_FLEXRAY_INV_HEADERCRC
Definition: sdrv_flexray.h:81
@ SDRV_FLEXRAY_INV_OFFSET
Definition: sdrv_flexray.h:65
@ SDRV_FLEXRAY_PARAM_POINTER
Definition: sdrv_flexray.h:63
@ SDRV_FLEXRAY_INV_FRAMELIST_SIZE
Definition: sdrv_flexray.h:85
status_t sdrv_flexray_ack_absolute_timer_irq(sdrv_flexray_t *handle, uint8_t abs_timer_idx)
Clears absolute timer interrupt flag.
status_t sdrv_flexray_transmit_tx_lpdu(sdrv_flexray_t *handle, uint16_t lpdu_idx, const uint8_t *lsdu_ptr, uint8_t lsdu_length, sdrv_flexray_slot_assignment_type *slot_assignment_ptr)
Update selected message buffer with new data.
status_t sdrv_flexray_disable_absolute_timer_irq(sdrv_flexray_t *handle, uint8_t abs_timer_idx)
Disables absolute timer interrupt generation.
GlobalInterruptType sdrv_flexray_global_interrupt_type
Definition: sdrv_flexray.h:35
Fr_RxLPduStatusType sdrv_flexray_rx_lpdu_status_type
Definition: sdrv_flexray.h:33
struct sdrv_flexray sdrv_flexray_t
flexray status error code.
status_t sdrv_flexray_cancel_tx_lpdu(sdrv_flexray_t *handle, uint16_t lpdu_idx)
Reconfigures physical resource.
status_t sdrv_flexray_get_clock_correction(sdrv_flexray_t *handle, sint16 *rate_correction_ptr, sint32 *offset_correction_ptr)
Gets clock correction values.
status_t sdrv_flexray_init(sdrv_flexray_t *handle)
Controller initialization function.
status_t sdrv_flexray_get_sync_frame_list(sdrv_flexray_t *handle, uint8_t list_size, uint16_t *channel_a_even_list_ptr, uint16_t *channel_b_even_list_ptr, uint16_t *channel_a_odd_list_ptr, uint16_t *channel_b_odd_list_ptr)
Gets clock correction values.
status_t sdrv_flexray_cancel_absolute_timer(sdrv_flexray_t *handle, uint8_t abs_timer_idx)
Stops an absolute timer.
status_t sdrv_flexray_get_global_time(sdrv_flexray_t *handle, uint8_t *cycle_ptr, uint16_t *macro_tick_ptr)
Function gets flexray cluster global time.
Fr_SlotAssignmentType sdrv_flexray_slot_assignment_type
Definition: sdrv_flexray.h:31
status_t sdrv_flexray_set_wakeup_channel(sdrv_flexray_t *handle, sdrv_flexray_channel_type channel_idx)
Selects which channel sends WUPs.
Fr_TxLPduStatusType sdrv_flexray_tx_lpdu_status_type
Definition: sdrv_flexray.h:34
status_t sdrv_flexray_controller_init(sdrv_flexray_t *handle)
CC configuration.
status_t sdrv_flexray_all_slots(sdrv_flexray_t *handle)
Invokes the CC CHI command ALL_SLOTS.
status_t sdrv_flexray_abort_communication(sdrv_flexray_t *handle)
Abort the communication.
flexray status error code.
Definition: sdrv_flexray.h:49
uint32_t irq
Definition: sdrv_flexray.h:50
const sdrv_flexray_configuration_type * internal_cfg
Definition: sdrv_flexray.h:53
uint32_t abs_timers_num
Definition: sdrv_flexray.h:51
sdrv_flexray_software_states_type status
Definition: sdrv_flexray.h:52