]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lib.git/commitdiff
Commnts in FlexRay rpp module tuned, Function call order check tuned.
authorMichal Horn <hornmich@fel.cvut.cz>
Tue, 20 Aug 2013 08:42:06 +0000 (10:42 +0200)
committerMichal Horn <hornmich@fel.cvut.cz>
Tue, 20 Aug 2013 08:42:06 +0000 (10:42 +0200)
rpp/include/rpp/fr.h
rpp/src/rpp/fr.c

index 56b1dd3de4aa48a04569c7c8a4ad6e46f4cde287..066ecaf6835df51e7cfe9fdc4340884c9425e401 100644 (file)
@@ -6,6 +6,7 @@
  * @copyright Copyright (C) 2013 Czech Technical University in Prague
  *
  * @author Carlos Jenkins <carlos@jenkins.co.cr>
+ * @author Michal Horn <hornmich@fel.cvut.cz>
  */
 
 
@@ -272,7 +273,6 @@ int8_t rpp_fr_init_driver(const Fr_ConfigType* config_ptr, uint32_t* error);
  * controller registers.
  *
  * After successful controller initialization, the FlexRay is ready for:
- * rpp_fr_init_controller
  * rpp_fr_get_poc_status
  * rpp_fr_get_wakeup_rx_status
  * rpp_fr_get_timer_irq_status
@@ -306,12 +306,9 @@ int8_t rpp_fr_init_controller(uint8_t ctrl, uint32_t* error);
  * some existing network.
  *
  * After successful communication start, the FlexRay is ready for:
- * rpp_fr_init_controller
  * rpp_fr_get_poc_status
  * rpp_fr_get_wakeup_rx_status
  * rpp_fr_get_timer_irq_status
- * rpp_fr_start_communication
- * rpp_fr_send_wup
  * rpp_fr_set_wu_channel
  * rpp_fr_get_global_time
  * rpp_fr_get_network_management_vector
@@ -362,6 +359,7 @@ int8_t rpp_fr_all_slots(uint8_t ctrl);
  * The function should be called only when the communication is running.
  *
  * After the communication is stopped, only those functions are allowed:
+ * rpp_fr_set_wu_channel
  * rpp_fr_get_global_time
  * rpp_fr_get_network_management_vector
  * rpp_fr_get_channel_status
@@ -375,7 +373,7 @@ int8_t rpp_fr_all_slots(uint8_t ctrl);
  * @param [in] ctrl Not used, set always to zero.
  *
  * @return SUCCESS if command passed successfully.
- *         FAILURE if command rejectred.
+ *         FAILURE if command rejected.
  *
  */
 int8_t rpp_fr_halt_communication(uint8_t ctrl);
@@ -386,6 +384,7 @@ int8_t rpp_fr_halt_communication(uint8_t ctrl);
  * The function should be called only when the communication is running.
  *
  * After the communication is stopped, only those functions are allowed:
+ * rpp_fr_set_wu_channel
  * rpp_fr_get_global_time
  * rpp_fr_get_network_management_vector
  * rpp_fr_get_channel_status
@@ -399,7 +398,7 @@ int8_t rpp_fr_halt_communication(uint8_t ctrl);
  * @param [in] ctrl Not used, set always to zero.
  *
  * @return SUCCESS if command passed successfully.
- *         FAILURE if command rejectred.
+ *         FAILURE if command rejected.
  *
  */
 int8_t rpp_fr_abort_communication(uint8_t ctrl);
@@ -413,7 +412,7 @@ int8_t rpp_fr_abort_communication(uint8_t ctrl);
  * @param [in] ctrl Not used, set always to zero.
  *
  * @return SUCCESS if command passed successfully.
- *         FAILURE if command rejectred.
+ *         FAILURE if command rejected.
  *
  */
 int8_t rpp_fr_send_wup(uint8_t ctrl);
@@ -427,7 +426,7 @@ int8_t rpp_fr_send_wup(uint8_t ctrl);
  * @param [in] ctrl Not used, set always to zero.
  *
  * @return SUCCESS if command passed successfully.
- *         FAILURE if command rejectred.
+ *         FAILURE if command rejected.
  *
  */
 int8_t rpp_fr_set_wu_channel(uint8_t ctrl, Fr_ChannelType channel);
@@ -453,7 +452,7 @@ int8_t rpp_fr_get_poc_status(uint8_t ctrl, Fr_POCStatusType* poc_status_ptr);
  * (Fr_StartCommunication was called).
  *
  * If the buffer assigned to the frame is in continuous mode, this
- * functions starts periodical message sending. The transmission can
+ * functions starts sending a message periodically. The transmission can
  * be stopped by rpp_fr_cancel_transmit_lpdu.
  * If the buffer assigned to the frame is in single-shot mode, the
  * message is sent only once.
index 095cad370cd94045b0b9e98922970a6b938a4621..dedbf9db2c0c0e8c717ac65129ccd18d5b6c6c3c 100644 (file)
@@ -363,7 +363,7 @@ int8_t rpp_fr_send_wup(uint8_t ctrl) {
 }
 
 int8_t rpp_fr_set_wu_channel(uint8_t ctrl, Fr_ChannelType channel) {
-       if (rpp_fr_state == RPP_FR_CTR_INITIALIZED && Fr_SetWakeupChannel(ctrl, channel) & E_OK) {
+       if (rpp_fr_state >= RPP_FR_CTR_INITIALIZED && Fr_SetWakeupChannel(ctrl, channel) & E_OK) {
                return SUCCESS;
        }
        return FAILURE;