]> rtime.felk.cvut.cz Git - pes-rpp/rpp-test-sw.git/commitdiff
FlexRay commands rewritten to use newly created RPP layer.
authorMichal Horn <hornmich@fel.cvut.cz>
Wed, 14 Aug 2013 15:24:23 +0000 (17:24 +0200)
committerMichal Horn <hornmich@fel.cvut.cz>
Wed, 14 Aug 2013 15:24:23 +0000 (17:24 +0200)
commands/cmd_fr_basic_test.c
rpp-lib

index 09767ab742e655534235978cc45f62379dc5da36..85a19ab68f8d27139cfafb5c1d1c9d8e04b0f6f4 100644 (file)
 #ifndef DOCGEN
 
 #include "cmdproc_utils.h"
-#include "drv/fr_tms570.h"
+#include "drv/drv.h"
 #include "rpp/rpp.h"
 #include "hal/hal.h"
 #include "stdio.h"
 
+/**
+ * This structure contains global FlexRay configuration.
+ * All nodes in the network have to use the same values for
+ * all parameters of this structure.
+ */
 Fr_TMS570LS_ClusterConfigType Fr_cluster_config = {
        .gColdStartAttempts = 0x2,
        .gListenNoise = 0xF,
@@ -43,6 +48,12 @@ Fr_TMS570LS_ClusterConfigType Fr_cluster_config = {
        .gdWakeupSymbolTxLow = 60
 };
 
+/**
+ * This structure contains local configuration of the FlexRay node A.
+ * All nodes in the network shall have their own local configuraion,
+ * but it does not matters if they share some together, until their
+ * buffer configuration differs.
+ */
 Fr_TMS570LS_NodeConfigType Fr_node_A_config = {
        .pAllowHaltDueToClock = 0,
        .pAllowPassiveToActive = FALSE,
@@ -72,6 +83,12 @@ Fr_TMS570LS_NodeConfigType Fr_node_A_config = {
        .pDecodingCorrection = 0x33
 };
 
+/**
+ * This structure contains local configuration of the FlexRay node B.
+ * All nodes in the network shall have their own local configuraion,
+ * but it does not matters if they share some together, until their
+ * buffer configuration differs.
+ */
 Fr_TMS570LS_NodeConfigType Fr_node_B_config = {
                .pAllowHaltDueToClock = 0,
                .pAllowPassiveToActive = FALSE,
@@ -101,6 +118,17 @@ Fr_TMS570LS_NodeConfigType Fr_node_B_config = {
                .pDecodingCorrection = 0x33
 };
 
+/**
+ * Macro for selecting default FlexRay configuration or user FlexRay configuration.
+ *
+ * If the macro is defined, the commands are using predefined cluster, nodes and buffers configuration. The commands for manual buffers settings are disabled.
+ *
+ * If the macro is commented, predefined cluster and nodes configurations are used, but no default buffers are configured. The commands for manual buffers settings are enabled.
+ *
+ */
+#define CMD_FR_BT_USE_DEFAULT_CONFIG
+
+#ifdef CMD_FR_BT_USE_DEFAULT_CONFIG
 Fr_TMS570LS_MsgRAMConfig Fr_node_A_msgRAM_config = {
        .dynSegmentBufferCount = 3,
        .fifoBufferCount = 5,
@@ -467,6 +495,15 @@ Fr_ConfigType Fr_config_node_B= {
        .nodeConfiguration = &Fr_node_B_config,
        .staticBufferConfigs = Fr_node_B_static_buffers_config
 };
+#else
+#define CMD_FR_BT_MAX_STAT_BUFFERS     32
+#define CMD_FR_BT_MAX_DYN_BUFFERS      32
+#define CMD_FR_BT_MAX_FIFO_BUFFERS     32
+
+Fr_TMS570LS_BufferConfigType Fr_static_buffers_config[CMD_FR_BT_MAX_STAT_BUFFERS];
+Fr_TMS570LS_BufferConfigType Fr_dynamic_buffers_config[CMD_FR_BT_MAX_DYN_BUFFERS];
+Fr_TMS570LS_BufferConfigType Fr_fifo_buffers_config[CMD_FR_BT_MAX_FIFO_BUFFERS];
+#endif
 
 
 /**
@@ -479,7 +516,8 @@ Fr_ConfigType Fr_config_node_B= {
  */
 int cmd_do_fr_init(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[]) {
        const Fr_ConfigType* Fr_ConfigPtr = NULL;
-       Std_ReturnType retVal = ERR_PARAM_NO_ERROR;
+       int8_t retVal = SUCCESS;
+       uint32_t error = ERR_PARAM_NO_ERROR;
 
        if (*param[1] == 'A') {
                Fr_ConfigPtr = &Fr_config_node_A;
@@ -491,65 +529,33 @@ int cmd_do_fr_init(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[]) {
                return -CMDERR_BADPAR;
        }
 
-       Fr_Init(Fr_ConfigPtr);
-       rpp_sci_printf("FlexRay driver initialized.\r\n");
-
-       retVal = Fr_ControllerInit(0);
-       if (retVal & E_OK) {
-               rpp_sci_printf("FlexRay controller initialized.\r\n");
+       retVal = rpp_fr_init_driver(Fr_ConfigPtr, &error);
+       if (retVal == SUCCESS) {
+               rpp_sci_printf("FlexRay driver initialized.\r\n");
        }
        else {
-               if (retVal & FR_INIT_ERR_CLUSTER_CONFIG) {
-                       rpp_sci_printf("Cluster configuration data error: %x\r\n", (retVal & 0x3FFFFFE) >> 1 );
-               }
-               else if (retVal & FR_INIT_ERR_NODE_CONFIG) {
-                       rpp_sci_printf("Node configuration data error: %x\r\n", (retVal & 0x3FFFFFE) >> 1 );
-               }
-               else if (retVal & FR_INIT_ERR_MSGRAM_CONFIG) {
-                       rpp_sci_printf("Message RAM configuration data error: %x\r\n", (retVal & 0x3FFFFFE) >> 1 );
-               }
-               else if (retVal & FR_INIT_ERR_BUFFPARAM_CONFIG) {
-                       rpp_sci_printf("Buffer configuration data error: %x\r\n", (retVal & 0x3FFFFFE) >> 1 );
-               }
-               else if (retVal & (uint32_t)FR_INIT_ERR_BUFF_CONFIG) {
-                       rpp_sci_printf("Buffer configuration error: %x\r\n", (retVal & 0x3FFFFFE) >> 1 );
-               }
-               else {
-                       rpp_sci_printf("POC state switching error.\r\n");
-               }
+               rpp_sci_printf("FlexRay needs to be configured before initialization.\r\n");
                return -CMDERR_BADCFG;
        }
-       return 0;
-}
 
-/**
- *     @brief  Initialize the device FlexRay controller.
- *
- * @param[in]  cmd_io  Pointer to IO stack
- * @param[in]  des             Pointer to command descriptor
- * @param[in]  param   Parameters of command
- * @return     0 when OK or error code
- */
-int cmd_do_fr_ctrlinit(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[]) {
-       Std_ReturnType retVal = ERR_PARAM_NO_ERROR;
-       retVal = Fr_ControllerInit(0);
-       if (retVal & E_OK) {
+       retVal = rpp_fr_init_controller(0, &error);
+       if (retVal == SUCCESS) {
                rpp_sci_printf("FlexRay controller initialized.\r\n");
        }
        else {
-               if (retVal & FR_INIT_ERR_CLUSTER_CONFIG) {
+               if (error & FR_INIT_ERR_CLUSTER_CONFIG) {
                        rpp_sci_printf("Cluster configuration data error: %x\r\n", (retVal & 0x3FFFFFE) >> 1 );
                }
-               else if (retVal & FR_INIT_ERR_NODE_CONFIG) {
+               else if (error & FR_INIT_ERR_NODE_CONFIG) {
                        rpp_sci_printf("Node configuration data error: %x\r\n", (retVal & 0x3FFFFFE) >> 1 );
                }
-               else if (retVal & FR_INIT_ERR_MSGRAM_CONFIG) {
+               else if (error & FR_INIT_ERR_MSGRAM_CONFIG) {
                        rpp_sci_printf("Message RAM configuration data error: %x\r\n", (retVal & 0x3FFFFFE) >> 1 );
                }
-               else if (retVal & FR_INIT_ERR_BUFFPARAM_CONFIG) {
+               else if (error & FR_INIT_ERR_BUFFPARAM_CONFIG) {
                        rpp_sci_printf("Buffer configuration data error: %x\r\n", (retVal & 0x3FFFFFE) >> 1 );
                }
-               else if (retVal & (uint32_t)FR_INIT_ERR_BUFF_CONFIG) {
+               else if (error & (uint32_t)FR_INIT_ERR_BUFF_CONFIG) {
                        rpp_sci_printf("Buffer configuration error: %x\r\n", (retVal & 0x3FFFFFE) >> 1 );
                }
                else {
@@ -569,22 +575,24 @@ int cmd_do_fr_ctrlinit(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[
  * @return     0 when OK or error code
  */
 int cmd_do_fr_start(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[]) {
-       Std_ReturnType retVal = ERR_PARAM_NO_ERROR;
-       retVal = Fr_StartCommunication(0);
-       if (retVal & E_OK) {
+       int8_t retVal = SUCCESS;
+       uint32_t error = ERR_PARAM_NO_ERROR;
+
+       retVal = rpp_fr_start_communication(0, &error);
+       if (retVal == SUCCESS) {
                rpp_sci_printf("FlexRay communication is running.\r\n");
        }
        else {
-               if (retVal & FR_STARTUP_ERR_SW_STUP_FOLLOW) {
+               if (error & FR_STARTUP_ERR_SW_STUP_FOLLOW) {
                        rpp_sci_printf("Can not switch POC to RUN state.\r\n");
                }
-               else if (retVal & FR_STARTUP_ERR_CSINH_DIS) {
+               else if (error & FR_STARTUP_ERR_CSINH_DIS) {
                        rpp_sci_printf("Cold start inhibit disabled error.\r\n");
                }
-               else if (retVal & FR_STARTUP_ERR_SW_STUP_READY) {
+               else if (error & FR_STARTUP_ERR_SW_STUP_READY) {
                        rpp_sci_printf("Can not switch back to READY from STARTUP.\r\n");
                }
-               else if (retVal & FR_STARTUP_ERR_SW_STUP_AS_NCOLD) {
+               else if (error & FR_STARTUP_ERR_SW_STUP_AS_NCOLD) {
                        rpp_sci_printf("Can not switch to STARTUP as non-coldstarter.\r\n");
                }
                else {
@@ -604,9 +612,9 @@ int cmd_do_fr_start(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[])
  * @return     0 when OK or error code
  */
 int cmd_do_fr_allslots(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[]) {
-       Std_ReturnType retVal = ERR_PARAM_NO_ERROR;
-       retVal = Fr_AllSlots(0);
-       if (retVal & E_OK) {
+       int8_t retVal = ERR_PARAM_NO_ERROR;
+       retVal = rpp_fr_all_slots(0);
+       if (retVal == SUCCESS) {
                rpp_sci_printf("FlexRay node is communicating in all slots.\r\n");
        }
        else {
@@ -625,9 +633,9 @@ int cmd_do_fr_allslots(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[
  * @return     0 when OK or error code
  */
 int cmd_do_fr_halt(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[]) {
-       Std_ReturnType retVal = ERR_PARAM_NO_ERROR;
-       retVal = Fr_HaltCommunication(0);
-       if (retVal & E_OK) {
+       int8_t retVal = ERR_PARAM_NO_ERROR;
+       retVal = rpp_fr_halt_communication(0);
+       if (retVal == SUCCESS) {
                rpp_sci_printf("FlexRay node communication halted.\r\n");
        }
        else {
@@ -646,9 +654,9 @@ int cmd_do_fr_halt(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[]) {
  * @return     0 when OK or error code
  */
 int cmd_do_fr_abort(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[]) {
-       Std_ReturnType retVal = ERR_PARAM_NO_ERROR;
-       retVal = Fr_AbortCommunication(0);
-       if (retVal & E_OK) {
+       int8_t retVal = ERR_PARAM_NO_ERROR;
+       retVal = rpp_fr_abort_communication(0);
+       if (retVal == SUCCESS) {
                rpp_sci_printf("FlexRay node communication aborted.\r\n");
        }
        else {
@@ -667,9 +675,9 @@ int cmd_do_fr_abort(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[])
  * @return     0 when OK or error code
  */
 int cmd_do_fr_sendwup(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[]) {
-       Std_ReturnType retVal = ERR_PARAM_NO_ERROR;
-       retVal = Fr_SendWUP(0);
-       if (retVal & E_OK) {
+       int8_t retVal = ERR_PARAM_NO_ERROR;
+       retVal = rpp_fr_send_wup(0);
+       if (retVal == SUCCESS) {
                rpp_sci_printf("Wake up pattern has been sent.\r\n");
        }
        else {
@@ -688,7 +696,7 @@ int cmd_do_fr_sendwup(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[]
  * @return     0 when OK or error code
  */
 int cmd_do_fr_setwuchannel(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[]) {
-       Std_ReturnType retVal = ERR_PARAM_NO_ERROR;
+       int8_t retVal = ERR_PARAM_NO_ERROR;
        Fr_ChannelType channel = FR_CHANNEL_A;
 
        if (*param[1] == 'A') {
@@ -700,8 +708,8 @@ int cmd_do_fr_setwuchannel(cmd_io_t *cmd_io, const struct cmd_des *des, char *pa
        else {
                return -CMDERR_BADPAR;
        }
-       retVal = Fr_SetWakeupChannel(0, channel);
-       if (retVal & E_OK) {
+       retVal = rpp_fr_set_wu_channel(0, channel);
+       if (retVal == SUCCESS) {
                rpp_sci_printf("Wake up channel has been set.\r\n");
        }
        else {
@@ -720,7 +728,7 @@ int cmd_do_fr_setwuchannel(cmd_io_t *cmd_io, const struct cmd_des *des, char *pa
  * @return     0 when OK or error code
  */
 int cmd_do_fr_getpocstatus(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[]) {
-       Std_ReturnType retVal = ERR_PARAM_NO_ERROR;
+       int8_t retVal = ERR_PARAM_NO_ERROR;
        Fr_POCStatusType status;
        char* ErrorModeStrings[] = {"ACTIVE", "HALT", "PASSIVE"};
        char* SlotModeStrings[]  = {"KEYSLOT", "ALL_PENDING", "ALL"};
@@ -740,8 +748,8 @@ int cmd_do_fr_getpocstatus(cmd_io_t *cmd_io, const struct cmd_des *des, char *pa
                        "COLLISION_WUP", "COLLISION_UNKNOWN", "TRANSMITTED"
        };
 
-       retVal = Fr_GetPOCStatus(0, &status);
-       if (retVal & E_OK) {
+       retVal = rpp_fr_get_poc_status(0, &status);
+       if (retVal == SUCCESS) {
                rpp_sci_printf("POC status:\r\n");
                rpp_sci_printf("CHIHaltRequest: %s\r\n", (status.CHIHaltRequest == TRUE) ? "TRUE" : "FALSE");
                rpp_sci_printf("CHIReadyRequest: %s\r\n", (status.CHIReadyRequest == TRUE) ? "TRUE" : "FALSE");
@@ -769,7 +777,7 @@ int cmd_do_fr_getpocstatus(cmd_io_t *cmd_io, const struct cmd_des *des, char *pa
  * @return     0 when OK or error code
  */
 int cmd_do_fr_transmittxlpdu(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[]) {
-       Std_ReturnType retVal = ERR_PARAM_NO_ERROR;
+       int8_t retVal = ERR_PARAM_NO_ERROR;
        uint32_t slotID;
        uint8_t dataLength;
        int values[MAX_PARAM_VALUES_NUM];
@@ -795,8 +803,8 @@ int cmd_do_fr_transmittxlpdu(cmd_io_t *cmd_io, const struct cmd_des *des, char *
                dataLength++;
        }
 
-       retVal = Fr_TransmitTxLPdu(0, slotID, data, dataLength);
-       if (retVal & E_OK) {
+       retVal = rpp_fr_transmit_lpdu(0, slotID, data, dataLength);
+       if (retVal == SUCCESS) {
                rpp_sci_printf("Data were sent.\r\n");
        }
        else {
@@ -815,7 +823,7 @@ int cmd_do_fr_transmittxlpdu(cmd_io_t *cmd_io, const struct cmd_des *des, char *
  * @return     0 when OK or error code
  */
 int cmd_do_fr_canceltxlpdu(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[]) {
-       Std_ReturnType retVal = ERR_PARAM_NO_ERROR;
+       int8_t retVal = ERR_PARAM_NO_ERROR;
        uint32_t slotID;
 
        if (sscanf(param[1], "%d", &slotID) != 1) {
@@ -825,8 +833,8 @@ int cmd_do_fr_canceltxlpdu(cmd_io_t *cmd_io, const struct cmd_des *des, char *pa
                return -CMDERR_BADPAR;
        }
 
-       retVal = Fr_CancelTxLPdu(0, slotID);
-       if (retVal & E_OK) {
+       retVal = rpp_fr_cancel_transmit_lpdu(0, slotID);
+       if (retVal == SUCCESS) {
                rpp_sci_printf("Transmission canceled.\r\n");
        }
        else {
@@ -845,7 +853,7 @@ int cmd_do_fr_canceltxlpdu(cmd_io_t *cmd_io, const struct cmd_des *des, char *pa
  * @return     0 when OK or error code
  */
 int cmd_do_fr_receiverxlpdu(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[]) {
-       Std_ReturnType retVal = ERR_PARAM_NO_ERROR;
+       int8_t retVal = ERR_PARAM_NO_ERROR;
        uint32_t slotID;
        uint8_t data[cPayloadLengthMax];
        Fr_RxLPduStatusType status;
@@ -859,8 +867,8 @@ int cmd_do_fr_receiverxlpdu(cmd_io_t *cmd_io, const struct cmd_des *des, char *p
                return -CMDERR_BADPAR;
        }
 
-       retVal = Fr_ReceiveRxLPdu(0, slotID, data, &status, &receivedLength);
-       if (retVal & E_OK) {
+       retVal = rpp_fr_receive_lpdu(0, slotID, data, &status, &receivedLength);
+       if (retVal == SUCCESS) {
                switch (status) {
                case FR_RECEIVED_MORE_DATA_AVAILABLE:
                        rpp_sci_printf("More messages are still in FIFO:\r\n");
@@ -892,7 +900,7 @@ int cmd_do_fr_receiverxlpdu(cmd_io_t *cmd_io, const struct cmd_des *des, char *p
  * @return     0 when OK or error code
  */
 int cmd_do_fr_checktxlpdustatus(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[]) {
-       Std_ReturnType retVal = ERR_PARAM_NO_ERROR;
+       int8_t retVal = ERR_PARAM_NO_ERROR;
        uint32_t slotID;
        Fr_TxLPduStatusType status;
        char* statusStrings[] = {"is not", "is"};
@@ -904,8 +912,8 @@ int cmd_do_fr_checktxlpdustatus(cmd_io_t *cmd_io, const struct cmd_des *des, cha
                return -CMDERR_BADPAR;
        }
 
-       retVal = Fr_CheckTxLPduStatus(0, slotID, &status);
-       if (retVal & E_OK) {
+       retVal = rpp_fr_check_tx_lpdu_status(0, slotID, &status);
+       if (retVal == SUCCESS) {
                rpp_sci_printf("Message transmission %s pending.\r\n", statusStrings[status]);
        }
        else {
@@ -924,7 +932,7 @@ int cmd_do_fr_checktxlpdustatus(cmd_io_t *cmd_io, const struct cmd_des *des, cha
  * @return     0 when OK or error code
  */
 int cmd_do_fr_disablelpdu(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[]) {
-       Std_ReturnType retVal = ERR_PARAM_NO_ERROR;
+       int8_t retVal = ERR_PARAM_NO_ERROR;
        uint32_t slotID;
 
        if (sscanf(param[1], "%d", &slotID) != 1) {
@@ -934,8 +942,8 @@ int cmd_do_fr_disablelpdu(cmd_io_t *cmd_io, const struct cmd_des *des, char *par
                return -CMDERR_BADPAR;
        }
 
-       retVal = Fr_DisableLPdu(0, slotID);
-       if (retVal & E_OK) {
+       retVal = rpp_fr_disable_lpdu(0, slotID);
+       if (retVal == SUCCESS) {
                rpp_sci_printf("Buffer disabled.\r\n");
        }
        else {
@@ -954,12 +962,12 @@ int cmd_do_fr_disablelpdu(cmd_io_t *cmd_io, const struct cmd_des *des, char *par
  * @return     0 when OK or error code
  */
 int cmd_do_fr_getglobaltime(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[]) {
-       Std_ReturnType retVal = ERR_PARAM_NO_ERROR;
+       int8_t retVal = ERR_PARAM_NO_ERROR;
        uint8_t cycle = 0;
        uint16_t macroTick = 0;
 
-       retVal = Fr_GetGlobalTime(0, &cycle, &macroTick);
-       if (retVal & E_OK) {
+       retVal = rpp_fr_get_global_time(0, &cycle, &macroTick);
+       if (retVal == SUCCESS) {
                rpp_sci_printf("Cycle number: %d\r\nMacrotick number: %d\r\n", cycle, macroTick);
        }
        else {
@@ -978,12 +986,12 @@ int cmd_do_fr_getglobaltime(cmd_io_t *cmd_io, const struct cmd_des *des, char *p
  * @return     0 when OK or error code
  */
 int cmd_do_fr_getnmvector(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[]) {
-       Std_ReturnType retVal = ERR_PARAM_NO_ERROR;
+       int8_t retVal = ERR_PARAM_NO_ERROR;
        uint8_t nmVector[12];
        uint8_t i;
 
-       retVal = Fr_GetNmVector(0, nmVector);
-       if (retVal & E_OK) {
+       retVal = rpp_fr_get_network_management_vector(0, nmVector);
+       if (retVal == SUCCESS) {
                rpp_sci_printf("Network management vector:");
                for (i = 0; i < Fr_cluster_config.gNetworkManagementVectorLength; i++) {
                        rpp_sci_printf(" %x", nmVector[i]);
@@ -1006,7 +1014,7 @@ int cmd_do_fr_getnmvector(cmd_io_t *cmd_io, const struct cmd_des *des, char *par
  * @return     0 when OK or error code
  */
 int cmd_do_fr_getchannelstatus(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[]) {
-       Std_ReturnType retVal = ERR_PARAM_NO_ERROR;
+       int8_t retVal = ERR_PARAM_NO_ERROR;
        uint8_t index;
        uint8_t channel;
        char* decodeStrings[] = {
@@ -1031,8 +1039,8 @@ int cmd_do_fr_getchannelstatus(cmd_io_t *cmd_io, const struct cmd_des *des, char
        char* boolStrings[] = {"FALSE", "TRUE"};
        uint16_t channelStatuses[2];
 
-       retVal = Fr_GetChannelStatus(0, &channelStatuses[0], &channelStatuses[1]);
-       if (retVal & E_OK) {
+       retVal = rpp_fr_get_channel_status(0, &channelStatuses[0], &channelStatuses[1]);
+       if (retVal == SUCCESS) {
                for (channel = 0; channel < 2; channel++) {
                        rpp_sci_printf("Channel %s status:\r\n", channelNames[channel]);
                        for (index = 0; index < 16; index++) {
@@ -1056,12 +1064,12 @@ int cmd_do_fr_getchannelstatus(cmd_io_t *cmd_io, const struct cmd_des *des, char
  * @return     0 when OK or error code
  */
 int cmd_do_fr_getclockcorrection(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[]) {
-       Std_ReturnType retVal = ERR_PARAM_NO_ERROR;
+       int8_t retVal = ERR_PARAM_NO_ERROR;
        int16_t rateCorrection;
        int32_t offsetCorrection;
 
-       retVal = Fr_GetClockCorrection(0, &rateCorrection, &offsetCorrection);
-       if (retVal & E_OK) {
+       retVal = rpp_fr_get_clock_correction(0, &rateCorrection, &offsetCorrection);
+       if (retVal == SUCCESS) {
                rpp_sci_printf("Rate correction: %d\r\nOffset correction: %d\r\n", rateCorrection, offsetCorrection);
        }
        else {
@@ -1080,7 +1088,7 @@ int cmd_do_fr_getclockcorrection(cmd_io_t *cmd_io, const struct cmd_des *des, ch
  * @return     0 when OK or error code
  */
 int cmd_do_fr_getsyncframelist(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[]) {
-       Std_ReturnType retVal = ERR_PARAM_NO_ERROR;
+       int8_t retVal = ERR_PARAM_NO_ERROR;
        uint16_t channelAEvenList[FR_MAX_SYNC_FRAME_LIST_SIZE];
        uint16_t channelBEvenList[FR_MAX_SYNC_FRAME_LIST_SIZE];
        uint16_t channelAOddList[FR_MAX_SYNC_FRAME_LIST_SIZE];
@@ -1098,8 +1106,8 @@ int cmd_do_fr_getsyncframelist(cmd_io_t *cmd_io, const struct cmd_des *des, char
                return -CMDERR_BADPAR;
        }
 
-       retVal = Fr_GetSyncFrameList(0, listSize, channelAEvenList, channelBEvenList, channelAOddList, channelBOddList);
-       if (retVal & E_OK) {
+       retVal = rpp_fr_get_sync_frame_list(0, listSize, channelAEvenList, channelBEvenList, channelAOddList, channelBOddList);
+       if (retVal == SUCCESS) {
                rpp_sci_printf("| Channel A even | channel B even | channel A odd  | channel B odd  |\r\n");
                rpp_sci_printf("|----------------|----------------|----------------|----------------|\r\n");
                for (i = 0; i < listSize; i++) {
@@ -1124,14 +1132,14 @@ int cmd_do_fr_getsyncframelist(cmd_io_t *cmd_io, const struct cmd_des *des, char
  * @return     0 when OK or error code
  */
 int cmd_do_fr_getwakeuprxstatus(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[]) {
-       Std_ReturnType retVal = ERR_PARAM_NO_ERROR;
+       int8_t retVal = ERR_PARAM_NO_ERROR;
        uint8_t status = 0;
        char* statusStrings[] = {"was not yet", "was"};
        char* channelNames[] = {"A", "B"};
        uint8_t i;
 
-       retVal = Fr_GetWakeupRxStatus(0, &status);
-       if (retVal & E_OK) {
+       retVal = rpp_fr_get_wakeup_rx_status(0, &status);
+       if (retVal == SUCCESS) {
                for (i = 0; i < 2; i++) {
                        rpp_sci_printf("Wake up pattern %s received on channel %s.\r\n", statusStrings[(status >> i) & 0x1], channelNames[i]);
                }
@@ -1152,7 +1160,7 @@ int cmd_do_fr_getwakeuprxstatus(cmd_io_t *cmd_io, const struct cmd_des *des, cha
  * @return     0 when OK or error code
  */
 int cmd_do_fr_settimer(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[]) {
-       Std_ReturnType retVal = ERR_PARAM_NO_ERROR;
+       int8_t retVal = ERR_PARAM_NO_ERROR;
        int timer = 0;
        int cycle = 0;
        int offset = 0;
@@ -1177,8 +1185,8 @@ int cmd_do_fr_settimer(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[
                return -CMDERR_BADPAR;
        }
 
-       retVal = Fr_SetAbsoluteTimer(0, timer, cycle, offset);
-       if (retVal & E_OK) {
+       retVal = rpp_fr_set_timer(0, timer, cycle, offset);
+       if (retVal == SUCCESS) {
                rpp_sci_printf("Timer was set.\r\n");
        }
        else {
@@ -1197,7 +1205,7 @@ int cmd_do_fr_settimer(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[
  * @return     0 when OK or error code
  */
 int cmd_do_fr_canceltimer(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[]) {
-       Std_ReturnType retVal = ERR_PARAM_NO_ERROR;
+       int8_t retVal = ERR_PARAM_NO_ERROR;
        int timer = 0;
 
        if (sscanf(param[1], "%d", &timer) != 1) {
@@ -1208,8 +1216,8 @@ int cmd_do_fr_canceltimer(cmd_io_t *cmd_io, const struct cmd_des *des, char *par
                return -CMDERR_BADPAR;
        }
 
-       retVal = Fr_CancelAbsoluteTimer(0, timer);
-       if (retVal & E_OK) {
+       retVal = rpp_fr_cancel_timer(0, timer);
+       if (retVal == SUCCESS) {
                rpp_sci_printf("Timer was canceled.\r\n");
        }
        else {
@@ -1228,7 +1236,7 @@ int cmd_do_fr_canceltimer(cmd_io_t *cmd_io, const struct cmd_des *des, char *par
  * @return     0 when OK or error code
  */
 int cmd_do_fr_timerirq(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[]) {
-       Std_ReturnType retVal = ERR_PARAM_NO_ERROR;
+       int8_t retVal = ERR_PARAM_NO_ERROR;
        int timer = 0;
        char str[4];
        boolean_t status = FALSE;
@@ -1240,8 +1248,8 @@ int cmd_do_fr_timerirq(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[
        }
 
        if (param[2] == NULL) {         // Get timer IRQ
-               retVal = Fr_GetAbsoluteTimerIRQStatus(0, timer, &status);
-               if (retVal & E_OK) {
+               retVal = rpp_fr_get_timer_irq_status(0, timer, &status);
+               if (retVal == SUCCESS) {
                        rpp_sci_printf("IRQ = %s\r\n", boolStrings[status]);
                }
                else {
@@ -1254,19 +1262,19 @@ int cmd_do_fr_timerirq(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[
                        return -CMDERR_BADPAR;
                }
                if (strcmp(str, "EN") == 0) { // Enable IRQ
-                       retVal = Fr_EnableAbsoluteTimerIRQ(0, timer);
+                       retVal = SUCCESS;       // No interrupts imlemented
                }
                else if (strcmp(str, "DIS") == 0) { // Disable IRQ
-                       retVal = Fr_DisableAbsoluteTimerIRQ(0, timer);
+                       retVal = SUCCESS;       // No interrupts implemented
                }
                else if  (strcmp(str, "ACK") == 0) { // Clear IRQ
-                       retVal = Fr_AckAbsoluteTimerIRQ(0, timer);
+                       retVal = rpp_fr_clear_timer_irq(0, timer);
                }
                else {  // Bad argument
                        return -CMDERR_BADPAR;
                }
 
-               if (retVal & E_OK) {
+               if (retVal == SUCCESS) {
                        rpp_sci_printf("OK\r\n");
                }
                else {
@@ -1288,7 +1296,7 @@ int cmd_do_fr_timerirq(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[
 int cmd_do_fr_getversioninfo(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[]) {
        Std_VersionInfoType versionInfo;
 
-       Fr_GetVersionInfo(&versionInfo);
+       rpp_fr_get_driver_version(&versionInfo);
        rpp_sci_printf("vendorID: %#x\r\n", versionInfo.vendorID);
        rpp_sci_printf("moduleID: %#x\r\n", versionInfo.moduleID);
        rpp_sci_printf("sw_major_version: %#x\r\n", versionInfo.sw_major_version);
@@ -1307,7 +1315,7 @@ int cmd_do_fr_getversioninfo(cmd_io_t *cmd_io, const struct cmd_des *des, char *
  * @return     0 when OK or error code
  */
 int cmd_do_fr_readcconfig(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[]) {
-       Std_ReturnType retVal = ERR_PARAM_NO_ERROR;
+       int8_t retVal = ERR_PARAM_NO_ERROR;
        int index = 0;
        uint32_t value = 0;
 
@@ -1319,8 +1327,8 @@ int cmd_do_fr_readcconfig(cmd_io_t *cmd_io, const struct cmd_des *des, char *par
                return -CMDERR_BADPAR;
        }
 
-       retVal = Fr_ReadCCConfig(0, index, &value);
-       if (retVal & E_OK) {
+       retVal = rpp_fr_read_com_ctrl_config(0, index, &value);
+       if (retVal == SUCCESS) {
                rpp_sci_printf("Value = %#x\r\n", value);
        }
        else {
@@ -1807,7 +1815,7 @@ cmd_des_t const cmd_des_fr_getclockcorrection={
 /** Command descriptor for FlexRay get sync frame list command */
 cmd_des_t const cmd_des_fr_getsyncframelist={
        0, 0,
-       "frbtgetsyncfrlist*","Prints list of sync frames transmitted on both channels via the odd and even communication cycle.\n",
+       "frbtgetsyncfrlist*","Prints list of sync frames transmitted on both channels via the odd and even communication cycle",
        "=== Command syntax ===\n"
        "\n"
        "   frbtgetsyncfrlist<LENGTH>\n"
diff --git a/rpp-lib b/rpp-lib
index 335ca6d6296e8517d11f2e6c2152cce869a673f8..d9115ab7fd6d434ec2b6f0edfd1c851d7bd10c90 160000 (submodule)
--- a/rpp-lib
+++ b/rpp-lib
@@ -1 +1 @@
-Subproject commit 335ca6d6296e8517d11f2e6c2152cce869a673f8
+Subproject commit d9115ab7fd6d434ec2b6f0edfd1c851d7bd10c90