From da253ce5d5c896daf7f03937ce78bdabc576b50d Mon Sep 17 00:00:00 2001 From: "Ille, Ondrej, Ing" Date: Sat, 19 Jan 2019 17:45:08 +0100 Subject: [PATCH] test/driver/design: Add CTU_CAN_ prefix --- driver/ctu_can_fd_hw.c | 2 +- driver/ctu_can_fd_hw.h | 2 +- src/bus_sampling/bus_sampling.vhd | 4 ++-- src/can_core/operation_control/operation_control.vhd | 6 +++--- src/can_core/protocol_control/protocol_control.vhd | 2 +- test/lib/CANtestLib.vhd | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/driver/ctu_can_fd_hw.c b/driver/ctu_can_fd_hw.c index b09d7f5d..5877b07e 100644 --- a/driver/ctu_can_fd_hw.c +++ b/driver/ctu_can_fd_hw.c @@ -142,7 +142,7 @@ void ctu_can_fd_enable(struct ctucanfd_priv *priv, bool enable) union ctu_can_fd_mode_command_status_settings reg; reg.u32 = priv->read_reg(priv, CTU_CAN_FD_MODE); - reg.s.ena = enable ? ENABLED : DISABLED; + reg.s.ena = enable ? CTU_CAN_ENABLED : CTU_CAN_DISABLED; priv->write_reg(priv, CTU_CAN_FD_MODE, reg.u32); } diff --git a/driver/ctu_can_fd_hw.h b/driver/ctu_can_fd_hw.h index 2006cc1c..cf94916c 100644 --- a/driver/ctu_can_fd_hw.h +++ b/driver/ctu_can_fd_hw.h @@ -316,7 +316,7 @@ static inline bool ctu_can_fd_is_enabled(struct ctucanfd_priv *priv) union ctu_can_fd_mode_command_status_settings reg; reg.u32 = priv->read_reg(priv, CTU_CAN_FD_MODE); - return reg.s.ena == ENABLED; + return reg.s.ena == CTU_CAN_ENABLED; } diff --git a/src/bus_sampling/bus_sampling.vhd b/src/bus_sampling/bus_sampling.vhd index 71b211af..e2b94bdc 100644 --- a/src/bus_sampling/bus_sampling.vhd +++ b/src/bus_sampling/bus_sampling.vhd @@ -548,7 +548,7 @@ begin elsif rising_edge(clk_sys) then - if (drv_ena = ENABLED) then + if (drv_ena = CTU_CAN_ENABLED) then case sp_control is ---------------------------------------------------------------- @@ -599,7 +599,7 @@ begin elsif rising_edge(clk_sys) then - if (drv_ena = ENABLED and bit_err_enable = '1') then + if (drv_ena = CTU_CAN_ENABLED and bit_err_enable = '1') then case sp_control is ---------------------------------------------------------------- diff --git a/src/can_core/operation_control/operation_control.vhd b/src/can_core/operation_control/operation_control.vhd index 56fc6125..c2cce4d1 100644 --- a/src/can_core/operation_control/operation_control.vhd +++ b/src/can_core/operation_control/operation_control.vhd @@ -142,7 +142,7 @@ begin unknown_OP_state <= '0'; - if (drv_ena /= ENABLED) then + if (drv_ena /= CTU_CAN_ENABLED) then OP_State_r <= integrating; elsif (set_transciever = '1') then OP_State_r <= transciever; @@ -156,7 +156,7 @@ begin -- Waiting for 11 consecutive recessive bits ---------------------------------------------------------------- when integrating => - if (drv_ena = ENABLED) then + if (drv_ena = CTU_CAN_ENABLED) then if (rec_trig = '1') then -- Counting up the integration period if (integ_counter = INTEGRATING_DURATION) then @@ -214,4 +214,4 @@ begin end if; end process; -end architecture; +end architecture; \ No newline at end of file diff --git a/src/can_core/protocol_control/protocol_control.vhd b/src/can_core/protocol_control/protocol_control.vhd index 1f9b39aa..43d31779 100644 --- a/src/can_core/protocol_control/protocol_control.vhd +++ b/src/can_core/protocol_control/protocol_control.vhd @@ -3214,7 +3214,7 @@ begin ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- when off => - if (drv_ena = ENABLED) then + if (drv_ena = CTU_CAN_ENABLED) then if (error_state /= bus_off and OP_State /= integrating) then -- Note that here we don't want to execute FSM_Preset! We want diff --git a/test/lib/CANtestLib.vhd b/test/lib/CANtestLib.vhd index 0ec55de9..b0f89a5d 100644 --- a/test/lib/CANtestLib.vhd +++ b/test/lib/CANtestLib.vhd @@ -2786,9 +2786,9 @@ package body CANtestLib is begin CAN_read(data, MODE_ADR, ID, mem_bus); if turn_on then - data(ENA_IND) := ENABLED; + data(ENA_IND) := CTU_CAN_ENABLED; else - data(ENA_IND) := DISABLED; + data(ENA_IND) := CTU_CAN_DISABLED; end if; CAN_write(data, MODE_ADR, ID, mem_bus); CAN_read(readback, MODE_ADR, ID, mem_bus); -- GitLab