]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lib.git/blob - rpp/include/rpp/fr.h
Doxygen warnings repaired
[pes-rpp/rpp-lib.git] / rpp / include / rpp / fr.h
1 /**
2  * FlexRay Communication RPP API header file.
3  *
4  * @file fr.h
5  *
6  * @copyright Copyright (C) 2013 Czech Technical University in Prague
7  *
8  * @author Carlos Jenkins <carlos@jenkins.co.cr>
9  * @author Michal Horn <hornmich@fel.cvut.cz>
10  */
11
12
13 #ifndef __RPP_FR_H
14 #define __RPP_FR_H
15
16 #include "drv/Fr_GeneralTypes.h"
17 #include "drv/fr_tms570.h"
18
19 typedef enum {
20         RPP_FR_UNKNOWN,
21         RPP_FR_CONFIGURED,
22         RPP_FR_NOT_INITIALIZED,
23         RPP_FR_DRV_INITIALIZED,
24         RPP_FR_CTR_INITIALIZED,
25         RPP_FR_RUNNING,
26         RPP_FR_HALTED,
27         RPP_FR_ABORTED
28 } rpp_fr_state_t;
29
30 #define RPP_FR_MAX_STATIC_BUF_CNT       32
31 #define RPP_FR_MAX_DYNAMIC_BUF_CNT      32
32 #define RPP_FR_MAX_FIFO_BUF_DEPTH       32
33
34 /* AUTOSAR-like API */
35
36 /**
37  * FlexRay driver initialization.
38  *
39  * This method should be called before any other function from this
40  * module, except rpp_fr_config_* functions.
41  *
42  * The function copies configuration data into drivers internal
43  * structures and initializes the driver.
44  *
45  * There are two ways how to configure FlexRay.
46  * 1) Passing address of the config structure as an argument from the application.
47  * 2) Using rpp_fr_config_* functions to create configuration at run-time. Then the argument
48  * for this function has to be NULL and configuration functions have to be called before
49  * this function.
50  *
51  * After a successful driver initialization, the driver is ready for calling:
52  * - rpp_fr_init_controller()
53  * - rpp_fr_get_poc_status()
54  * - rpp_fr_get_wakeup_rx_status()
55  * - rpp_fr_get_timer_irq_status()
56  *
57  * @param [in] config_ptr Address of the structure with all FlexRay
58  * configuration parameters. If it is NULL, then the default structure,
59  * filled by rpp_fr_config functions, is used.
60  * @param [out] error Address where error flags will be stored. The flags
61  * definitions can be found in fr_tms570h, with ERR_PARAM prefix.
62  *
63  * @return SUCCESS if initialization successful.
64  *         FAILURE if module already initialized.
65  *
66  */
67 int8_t rpp_fr_init_driver(const Fr_ConfigType* config_ptr, uint32_t* error);
68
69 /**
70  * FlexRay controller initialization.
71  *
72  * This method should be called after rpp_fr_init_driver() or rpp_fr_halt_communication() and
73  * rpp_fr_abort_communication() and before any other function from this module.
74  *:236
75  * To restart communication after halt or abort functions were called, this sequence should be used:
76  * - rpp_fr_init_controller
77  * - rpp_fr_start_communication
78  * -rpp_fr_all_slots (optionally)
79  *
80  * The functions checks configuration parameters and configures FlexRay
81  * controller registers.
82  *
83  * After successful controller initialization, the FlexRay driver is ready for calling:
84  * - rpp_fr_get_poc_status()
85  * - rpp_fr_get_wakeup_rx_status()
86  * - rpp_fr_get_timer_irq_status()
87  * - rpp_fr_start_communication()
88  * - rpp_fr_send_wup()
89  * - rpp_fr_set_wu_channel()
90  * - rpp_fr_get_global_time()
91  * - rpp_fr_get_network_management_vector()
92  * - rpp_fr_get_channel_status()
93  *
94  * @param [in] ctrl Not used, set always to zero.
95  * @param [out] error Address where error flags will be stored. The flags
96  * definitions can be found in fr_tms570h, with ERR_PARAM and FR_INIT_ERR
97  * prefix.
98  *
99  * @return SUCCESS if initialization if successful.
100  *         FAILURE if module already initialized.
101  *
102  */
103 int8_t rpp_fr_init_controller(uint8_t ctrl, uint32_t* error);
104
105 /**
106  * FlexRay start communication
107  *
108  * This method should be called after rpp_fr_init_controller() and
109  * before any attempt to send or receive messages.
110  *
111  * For coldstarter node the function tries to listen and join an
112  * existing network. If it fails, it tries to initiate the new one.
113  * For regular node it only listens on the bus and tries to join to
114  * some existing network.
115  *
116  * After successful communication start, the FlexRay is ready for:
117  * - rpp_fr_get_poc_status()
118  * - rpp_fr_get_wakeup_rx_status()
119  * - rpp_fr_get_timer_irq_status()
120  * - rpp_fr_set_wu_channel()
121  * - rpp_fr_get_global_time()
122  * - rpp_fr_get_network_management_vector()
123  * - rpp_fr_get_channel_status()
124  * - rpp_fr_all_slots()
125  * - rpp_fr_halt_communication()
126  * - rpp_fr_abort_communication()
127  * - rpp_fr_transmit_lpdu()
128  * - rpp_fr_cancel_transmit_lpdu()
129  * - rpp_fr_receive_lpdu()
130  * - rpp_fr_check_tx_lpdu_status()
131  * - rpp_fr_disable_lpdu()
132  * - rpp_fr_get_clock_correction()
133  * - rpp_fr_get_sync_frame_list()
134  * - rpp_fr_set_timer()
135  * - rpp_fr_cancel_timer()
136  *
137  * @param [in] ctrl Not used, set always to zero.
138  * @param [out] error Address where error flags will be stored. The flags
139  * definitions can be found in fr_tms570h, with FR_STARTUP_ERR prefix.
140  *
141  * @return SUCCESS if initialization successful.
142  *         FAILURE if module already initialized.
143  *
144  */
145 int8_t rpp_fr_start_communication(uint8_t ctrl, uint32_t* error);
146
147 /**
148  * FlexRay allow communication on all slots
149  *
150  * The FlexRay node can be configured to communicate only on key
151  * frames after the startup. If this is the case, after calling this
152  * function, communication on all configured slots is allowed.
153  *
154  * The function should be called only after rpp_fr_start_communication() has been called.
155  *
156  * @param [in] ctrl Not used, set always to zero.
157  *
158  * @return SUCCESS if started successfully.
159  *         FAILURE if timeout reached.
160  *
161  */
162 int8_t rpp_fr_all_slots(uint8_t ctrl);
163
164 /**
165  * FlexRay stop communication after the end of the communication cycle.
166  *
167  * The function should be called only after
168  * rpp_fr_start_communication() has been called.
169  *
170  * After the communication is stopped, only those functions are allowed to be called:
171  * - rpp_fr_set_wu_channel()
172  * - rpp_fr_get_global_time()
173  * - rpp_fr_get_network_management_vector()
174  * - rpp_fr_get_channel_status()
175  * - rpp_fr_get_clock_correction()
176  * - rpp_fr_get_sync_frame_list()
177  * - rpp_fr_get_wakeup_rx_status()
178  * - rpp_fr_get_poc_status()
179  * - rpp_fr_start_communication()
180  *
181  * To reestablish the communication, the  rpp_fr_start_communication() function
182  * has to be called.
183
184  * @param [in] ctrl Not used, set always to zero.
185  *
186  * @return SUCCESS if command passed successfully.
187  *         FAILURE if command rejected.
188  *
189  */
190 int8_t rpp_fr_halt_communication(uint8_t ctrl);
191
192 /**
193  * FlexRay stop communication immediately.
194  *
195  * The function should be called only after
196  * rpp_fr_start_communication() has been called.
197  *
198  * After the communication is stopped, only those functions are allowed to be called:
199  * - rpp_fr_set_wu_channel()
200  * - rpp_fr_get_global_time()
201  * - rpp_fr_get_network_management_vector()
202  * - rpp_fr_get_channel_status()
203  * - rpp_fr_get_clock_correction()
204  * - rpp_fr_get_sync_frame_list()
205  * - rpp_fr_get_wakeup_rx_status()
206  * - rpp_fr_get_poc_status()
207  * - rpp_fr_start_communication()
208  *
209  * To reestablish the communication, the  rpp_fr_start_communication() function
210  * has to be called.
211  *
212  * @param [in] ctrl Not used, set always to zero.
213  *
214  * @return SUCCESS if command passed successfully.
215  *         FAILURE if command rejected.
216  *
217  */
218 int8_t rpp_fr_abort_communication(uint8_t ctrl);
219
220 /**
221  * FlexRay send wakeup pattern.
222  *
223  * The function should be called after FlexRay controller is initialized
224  * and before the communication start.
225  *
226  * @param [in] ctrl Not used, set always to zero.
227  *
228  * @return SUCCESS if command passed successfully.
229  *         FAILURE if command rejected.
230  *
231  */
232 int8_t rpp_fr_send_wup(uint8_t ctrl);
233
234 /**
235  * FlexRay set channel for wakeup pattern sending.
236  *
237  * This allows to change the configuration passed to the
238  * rpp_fr_init_driver().
239  *
240  * The function should be called after FlexRay controller is initialized
241  * and before the communication start.
242  *
243  * @param [in] ctrl Not used, set always to zero.
244  * @param [in] channel Channel selector, where wakeup pattern will be sent
245  *
246  * @return SUCCESS if command passed successfully.
247  *         FAILURE if command rejected.
248  *
249  */
250 int8_t rpp_fr_set_wu_channel(uint8_t ctrl, Fr_ChannelType channel);
251
252 /**
253  * Get FlexRay POC state
254  *
255  * The function can be called any time after the driver is
256  * initialized.
257  *
258  * @param [in] ctrl Not used, set always to zero.
259  * @param [out] poc_status_ptr Address where status will be stored.
260  *
261  * @return SUCCESS if status retrieved successfully.
262  *         FAILURE if something failed.
263  *
264  */
265 int8_t rpp_fr_get_poc_status(uint8_t ctrl, Fr_POCStatusType* poc_status_ptr);
266
267 /**
268  * Send a message on the bus in the specified frame
269  *
270  * The function can be called any time when communication is running
271  * (rpp_fr_start_communication() was called).
272  *
273  * If the buffer assigned to the frame is configured for continuous
274  * mode, this functions starts sending the message periodically. The
275  * transmission can be stopped by rpp_fr_cancel_transmit_lpdu(). If
276  * the buffer assigned to the frame is configured for single-shot
277  * mode, the message is sent only once.
278  *
279  * @param [in] ctrl Not used, set always to zero.
280  * @param [in] lpdu_idx Index of the frame, where the message will be sent.
281  * @param [in] lsdu Address of the first byte of the message.
282  * @param [in] lsdu_length Number of bytes of the message.
283  *
284  * @return SUCCESS if message was transmitted.
285  *         FAILURE if something failed.
286  *
287  */
288 int8_t rpp_fr_transmit_lpdu(uint8_t ctrl, uint16_t lpdu_idx, const uint8_t* lsdu, uint8_t lsdu_length);
289
290 /**
291  * Cancel a transmission of the message.
292  *
293  * The function can be called any time when communication is running
294  * (rpp_fr_start_communication() was called).
295  *
296  * This is one way to stop transmission for buffers configured for
297  * continuous mode. The other way is to use rpp_fr_disable_lpdu().
298  *
299  * @param [in] ctrl Not used, set always to zero.
300  * @param [in] lpdu_idx Index of the frame, where the message transmission will be stopped.
301  *
302  * @return SUCCESS if the transmission was stopped.
303  *         FAILURE if something failed.
304  *
305  */
306 int8_t rpp_fr_cancel_transmit_lpdu(uint8_t ctrl, uint16_t lpdu_idx);
307
308 /**
309  * Receive a message from the bus from the specified frame.
310  *
311  * The function can be called any time when communication is running
312  * (rpp_fr_start_communication() was called).
313  *
314  * If a new message was received in a buffer configured for the static
315  * or dynamic segment, this function can retrieve it.
316  *
317  * @param [in] ctrl Not used, set always to zero.
318  * @param [in] lpdu_idx Index of the frame where message will be received from.
319  * @param [out] lsdu Address of the first byte of the buffer, where message will be stored.
320  * @param [out] lpdu_status Address where the status will be stored. It can be:
321  * FR_NOT_RECEIVED, FR_RECEIVED, FR_RECEIVED_MORE_DATA_AVAILABLE - for FIFO only.
322  * @param [out] lsdu_length Number of bytes of the message.
323  *
324  * @return SUCCESS if message was received.
325  *         FAILURE if something failed.
326  *
327  */
328 int8_t rpp_fr_receive_lpdu(uint8_t ctrl, uint16_t lpdu_idx, uint8_t* lsdu, Fr_RxLPduStatusType* lpdu_status, uint8_t* lsdu_length);
329
330 /**
331  * Check TX buffer status
332  *
333  * The function can be called any time when communication is running
334  * (rpp_fr_start_communication() was called).
335  *
336  * The status says whether a transmission request (TXR) is pending or
337  * not.
338  *
339  * If the buffer is configured for single-shot mode, the (TXR) is
340  * pending until the message is sent. For buffers configured in
341  * continuous mode, the transmission request is always pending.
342  *
343  *
344  * @param [in] ctrl Not used, set always to zero.
345  * @param [in] lpdu_idx Index of the frame to which the buffer is assigned.
346  * @param [out] lpdu_status Address of the status. It can be FR_TRANSMITTED,
347  * which means the TXR is not pending, or FR_NOT_TRANSMITTED which means that
348  * TXR is pending.
349  *
350  * @return SUCCESS if everything is OK.
351  *         FAILURE if something failed.
352  */
353 int8_t rpp_fr_check_tx_lpdu_status(uint8_t ctrl, uint16_t lpdu_idx, Fr_TxLPduStatusType* lpdu_status);
354
355
356 /**
357  * Reconfigure buffer
358  *
359  * The function can be called any time when after controller was initialized
360  * (rpp_fr_init_controller() was called).
361  *
362  * If the node is configured to allow buffer reconfiguration, some of the buffers
363  * can be reconfigured in runtime. Buffers used for synchronization and buffers
364  * assigned to the FIFO can not be reconfigured.
365  *
366  * It is not possible to change the direction (TX/RX) of the buffer or to change
367  * the mode (single-shot/continuous).
368  *
369  * @param [in] ctrl Not used, set always to zero.
370  * @param [in] lpdu_idx Index of the frame, where reconfigured buffer is communicating.
371  * @param [in] frame_id Frame ID, where the buffer will be communicating after the reconfiguration.
372  * @param [in] channel Channel, where the buffer will be communicating. For dynamic segment it should not be AB.
373  * @param [in] cycle Cycle rejection filter.
374  * @param [in] payload Maximum payload for the reconfigured buffer in half-word. Must not be higher than the original payload.
375  *
376  * @return SUCCESS if everything is OK.
377  *         FAILURE if something failed.
378  */
379 int8_t rpp_fr_reconfigure_lpdu(uint8_t ctrl, uint16_t lpdu_idx, uint16_t frame_id, Fr_ChannelType channel, uint8_t cycle, uint8_t payload);
380
381 /**
382  * Disable a FlexRay buffer
383  *
384  * The function can be called any time when communication is running
385  * (rpp_fr_start_communication() was called).
386  *
387  * This functions resets the configuration of the selected buffer.
388  * The disabled buffer is not usable any more.
389  *
390  * @param [in] ctrl Not used, set always to zero.
391  * @param [in] lpdu_idx Index of the frame to which the buffer is assigned.
392  *
393  * @return SUCCESS if buffer was disabled.
394  *         FAILURE if something failed.
395  *
396  */
397 int8_t rpp_fr_disable_lpdu(uint8_t ctrl, uint16_t lpdu_idx);
398
399 /**
400  * Get FlexRay global time
401  *
402  * The function can be called any time after the controller is initialized.
403  *
404  * @param [in] ctrl Not used, set always to zero.
405  * @param [out] cycle Adress where the number of actual cycle will be stored.
406  * @param [out] macroticks Address where offset in the cycle will be stored.
407  *
408  * @return SUCCESS if everything is OK.
409  *         FAILURE if something failed.
410  *
411  */
412 int8_t rpp_fr_get_global_time(uint8_t ctrl, uint8_t* cycle, uint16_t* macroticks);
413
414 /**
415  * Get Network management vector.
416  *
417  * The function can be called any time after the controller is initialized.
418  *
419  * The FlexRay controller updates the vector at the end of every cycle
420  * by doing bit-wise OR on every network managemet (NM) vectors
421  * received from all nodes.
422  *
423  * The NM vector can be sent in a frame by a buffer with the
424  * payloadPreambleIndicatorTr parameter set. Those frames are
425  * automatically processed by all the receiving controllers. But
426  * sending the vector has to be done manually by copying the NM vector
427  * data (obtainable by this function) into the TX buffer (using the
428  * rpp_fr_transmit_lpdu() function).
429  *
430  * @param [in] ctrl Not used, set always to zero.
431  * @param [out] nm_vector Address where the vector will be stored. The size of the buffer has to be at least gNetworkManagementVectorLength.
432  *
433  * @return SUCCESS if everything is OK.
434  *         FAILURE if something failed.
435  */
436 int8_t rpp_fr_get_network_management_vector(uint8_t ctrl, uint8_t* nm_vector);
437
438 /**
439  * Get Channel status.
440  *
441  * The function can be called any time after the controller is
442  * initialized.
443  *
444  * The output of the function is bitcoded in this way:
445  * - Bit 0: Channel A/B aggregated channel status vSS!ValidFrame
446  * - Bit 1: Channel A/B aggregated channel status vSS!SyntaxError
447  * - Bit 2: Channel A/B aggregated channel status vSS!ContentError
448  * - Bit 3: Channel A/B aggregated channel status additional communication
449  * - Bit 4: Channel A/B aggregated channel status vSS!Bviolation
450  * - Bit 5: Channel A/B aggregated channel status vSS!TxConflict
451  * - Bit 6: Not used (0)
452  * - Bit 7: Not used (0)
453  * - Bit 8: Channel A/B symbol window status data vSS!ValidMTS
454  * - Bit 9: Channel A/B symbol window status data vSS!SyntaxError
455  * - Bit 10: Channel A/B symbol window status data vSS!Bviolation
456  * - Bit 11: Channel A/B symbol window status data vSS!TxConflict
457  * - Bit 12: Channel A/B NIT status data vSS!SyntaxError
458  * - Bit 13: Channel A/B NIT status data vSS!Bviolation
459  * - Bit 14: Not used (0)
460  * - Bit 15: Not used (0)
461  *
462  * @param [in] ctrl Not used, set always to zero.
463  * @param [out] channel_a_status Address where the bitcoded status of the channel A will be stored.
464  * @param [out] channel_b_status Address where the bitcoded status of the channel B will be stored.
465  *
466  * @return SUCCESS if everything is OK.
467  *         FAILURE if something failed.
468  *
469  */
470 int8_t rpp_fr_get_channel_status(uint8_t ctrl, uint16_t* channel_a_status, uint16_t* channel_b_status);
471
472 /**
473  * Get clock correction.
474  *
475  * The function can be called while the communication is running or
476  * was stopped.
477  *
478  * @param [in] ctrl Not used, set always to zero.
479  * @param [out] rate_correction Address where the rate will be stored.
480  * @param [out] offset_correction Address where the offset will be stored.
481  *
482  * @return SUCCESS if everything is OK.
483  *         FAILURE if something failed.
484  *
485  */
486 int8_t rpp_fr_get_clock_correction(uint8_t ctrl, int16_t* rate_correction, int32_t* offset_correction);
487
488 /**
489  * Gets a list of syncframes received or transmitted on channel A and channel B via the even and odd communication cycle.
490  *
491  * The function can be called while communication is running or was stopped.
492  *
493  * @param [in] ctrl Not used, set always to zero.
494  * @param [in] list_size Size of the arrays passed via parameters:
495  * @param [out] channel_a_even_list Address the list of syncframes on channel A within the
496  * even communication cycle is written to. The exact
497  * number of elements written to the list is limited by
498  * parameter Fr_ListSize.
499  * Unused list elements are filled with the value '0' to indicate that no more syncframe has been seen.
500  * @param [out] channel_b_even_list Address the list of syncframes on channel B within the
501  * even communication cycle is written to. The exact
502  * number of elements written to the list is limited by
503  * parameter Fr_ListSize.
504  * @param [out] channel_a_odd_list Address the list of syncframes on channel A within the
505  * odd communication cycle is written to. The exact number
506  * of elements written to the list is limited by parameter
507  * Fr_ListSize.
508  * Unused list elements are filled with the value '0' to indicate that no more syncframe has been seen.
509  * @param [out] channel_b_odd_list Address the list of syncframes on channel B within the
510  *
511  * @return SUCCESS if everything is OK.
512  *         FAILURE if something failed.
513  *
514  */
515 int8_t rpp_fr_get_sync_frame_list(uint8_t ctrl, uint8_t list_size, uint16_t* channel_a_even_list,
516                                   uint16_t* channel_b_even_list, uint16_t* channel_a_odd_list, uint16_t* channel_b_odd_list);
517
518 /**
519  * Get the status of WUP receiving
520  *
521  * The function can be called any time after controller is initialized.
522  *
523  * If the Wake Up Pattern was received on some channel, the flag is set in status address.
524  * Bit 0: Wakeup received on channel A indicator
525  * Bit 1: Wakeup received on channel B indicator
526  * Bit 2-7: Unused
527  *
528  * @param [in] ctrl Not used, set always to zero.
529  * @param [out] status Address where the status will be stored.
530  *
531  * @return SUCCESS if everything is OK.
532  *         FAILURE if something failed.
533  *
534  */
535 int8_t rpp_fr_get_wakeup_rx_status(uint8_t ctrl, uint8_t* status);
536
537 /**
538  * Set an absolute timer and start it.
539  *
540  * The function can be called any time after communication is running.
541  * The FlexRay controller has two absolute timers. Each of them can be
542  * configured to request the interrupt, when the global time reaches
543  * configured cycle set and offset.
544  *
545  * Timer interrupt request can be detected by
546  * rpp_fr_get_timer_irq_status(). The timer interrupt request can be
547  * cleared by rpp_fr_clear_timer_irq(). The timer can be canceled by
548  * rpp_fr_cancel_timer().
549  *
550  * @param [in] ctrl Not used, set always to zero.
551  * @param [in] timer_idx Index of the timer (0,1).
552  * @param [in] cycle_set Determines the set of cycles that trigger the interrupt (see Table 23-6 in TMS570 datasheet (SPNU499))
553  * @param [in] offset_threshold Offset in the cycle in mactroticks.
554  *
555  * @return SUCCESS if everything is OK.
556  *         FAILURE if something failed.
557  *
558  */
559 int8_t rpp_fr_set_timer(uint8_t ctrl, uint8_t timer_idx, uint8_t cycle_set, uint16_t offset_threshold);
560
561 /**
562  * Stops an absolute timer, clear IRQ.
563  *
564  * The function can be called any time after communication is running.
565  *
566  * The FlexRay controller has two absolute timers. Each of them can be
567  * configured to request the interrupt, when the global time reaches
568  * configured cycle and offset. This function stops the timer and clears
569  * the interrupt request.
570  *
571  * Timer interrupt request can be detected by
572  * rpp_fr_get_timer_irq_status(). Timer interrupt request can be
573  * cleared by rpp_fr_clear_timer_irq() Timer can be started by
574  * rpp_fr_set_timer().
575  *
576  * @param [in] ctrl Not used, set always to zero.
577  * @param [in] timer_idx Index of the timer (0,1).
578  *
579  * @return SUCCESS if everything is OK.
580  *         FAILURE if something failed.
581  *
582  */
583 int8_t rpp_fr_cancel_timer(uint8_t ctrl, uint8_t timer_idx);
584
585 /**
586  * Clear the IRQ flag of the absolute timer
587  *
588  * The function can be called any time after communication is running.
589  *
590  * The FlexRay controller has two absolute timers. Each of them can be
591  * configured to request the interrupt, when the global time reaches
592  * configured cycle and offset. This function clears the IRQ flag.
593  *
594  * Timer interrupt request can be detected by rpp_fr_get_timer_irq_status().
595  * The timer can be started by rpp_fr_set_timer().
596  * The timer can be canceled by rpp_fr_cancel_timer().
597  *
598  * @param [in] ctrl Not used, set always to zero.
599  * @param [in] timer_idx Index of the timer (0,1).
600  *
601  * @return SUCCESS if everything is OK.
602  *         FAILURE if something failed.
603  *
604  */
605 int8_t rpp_fr_clear_timer_irq(uint8_t ctrl, uint8_t timer_idx);
606
607 /**
608  * Get IRQ flag of the absolute timer
609  *
610  * The function can be called any time after communication is running.
611  *
612  * The FlexRay controller has two absolute timers. Each of them can be
613  * configured to request the interrupt, when the global time reaches
614  * configured cycle and offset. Using this function the IRQ can be detected.
615  *
616  * Timer interrupt request can be cleared by rpp_fr_clear_timer_irq().
617  * The timer can be started by rpp_fr_set_timer().
618  * The timer can be canceled by rpp_fr_cancel_timer().
619  *
620  * @param [in] ctrl Not used, set always to zero.
621  * @param [in] timer_idx Index of the timer (0,1).
622  * @param [out] irq_pending Address, where status of the IRQ flag will be stored.
623  *
624  * @return SUCCESS if everything is OK.
625  *         FAILURE if something failed.
626  *
627  */
628 int8_t rpp_fr_get_timer_irq_status(uint8_t ctrl, uint8_t timer_idx, boolean_t* irq_pending);
629
630 /**
631  * Get information about the driver vendor, module and version.
632  *
633  * The function can be called any time.
634  *
635  * @param [out] version Address, where the information will be stored.
636  *
637  * @return always SUCCESS
638  *
639  */
640 int8_t rpp_fr_get_driver_version(Std_VersionInfoType* version);
641
642 /**
643  * Get configuration parameter value from the internal driver structures.
644  *
645  * The function can be called any time.
646  *
647  * @param [in] ctrl Not used, set always to zero.
648  * @param [in] param_idx The index if the parameter. You can find the indexes in Fr_GeneralTypes.h file with FR_CIDX prefix.
649  * @param [out] param_value Address, where the information will be stored.
650  *
651  * @return SUCCESS if everything is OK.
652  *         FAILURE if something failed.
653  *
654  */
655 int8_t rpp_fr_read_com_ctrl_config(uint8_t ctrl, uint8_t param_idx, uint32_t* param_value);
656
657 #endif /* __RPP_FR_H */