Skip to content

Commit

Permalink
removed default enum and selection code
Browse files Browse the repository at this point in the history
  • Loading branch information
EricB-ADI committed Jun 12, 2024
1 parent 07cd904 commit c6eb053
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 9 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,3 @@ node_modules
package-lock.json
package.json
.python-version
mxc_version.h
mxc_version.mk
24 changes: 24 additions & 0 deletions Libraries/CMSIS/Device/Maxim/GCC/mxc_version.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
###############################################################################
#
# Copyright (C) 2024 Analog Devices, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
# Autogenerated version info for build system.
MSDK_VERSION_STRING := v2023_10-172-gd3f8669fd6
MSDK_VERSION_YEAR := 2023
MSDK_VERSION_MONTH := 10

# Add root MAXIM_PATH to IPATH so compiler can locate msdk_version.h
IPATH += $(MAXIM_PATH)
1 change: 0 additions & 1 deletion Libraries/SDHC/Include/sdhc_lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
typedef enum {
MXC_SDHC_LIB_SINGLE_DATA = 1,
MXC_SDHC_LIB_QUAD_DATA,
MXC_SDHC_LIB_DEFAULT_DATA,
} mxc_sdhc_data_width;

typedef enum {
Expand Down
11 changes: 5 additions & 6 deletions Libraries/SDHC/Source/sdhc_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ int MXC_SDHC_Lib_SetBusWidth(mxc_sdhc_data_width bus_width)
uint32_t card_status;
int result;

bus_width = bus_width == MXC_SDHC_LIB_DEFAULT_DATA ? MXC_SDHC_Get_Default_DataWidth() : bus_width;


cmd_cfg.direction = MXC_SDHC_DIRECTION_CFG;
cmd_cfg.callback = NULL;
Expand Down Expand Up @@ -448,7 +448,7 @@ int MXC_SDHC_Lib_Prepare_Trans(mxc_sdhc_data_width width)
mxc_sdhc_cmd_cfg_t cmd_cfg;
int result;

width = width == MXC_SDHC_LIB_DEFAULT_DATA ? MXC_SDHC_Get_Default_DataWidth() : width;



cmd_cfg.direction = MXC_SDHC_DIRECTION_CFG;
Expand Down Expand Up @@ -505,7 +505,7 @@ int MXC_SDHC_Lib_Write(unsigned int dst_addr, void *src_addr, unsigned int cnt,
int result;
mxc_sdhc_cmd_cfg_t cmd_cfg;

width = width == MXC_SDHC_LIB_DEFAULT_DATA ? MXC_SDHC_Get_Default_DataWidth() : width;


result = MXC_SDHC_Lib_Prepare_Trans(width);
if (result != E_NO_ERROR) {
Expand Down Expand Up @@ -535,7 +535,7 @@ int MXC_SDHC_Lib_Read(void *dst_addr, unsigned int src_addr, unsigned int cnt, m
int result;
mxc_sdhc_cmd_cfg_t cmd_cfg;

width = width == MXC_SDHC_LIB_DEFAULT_DATA ? MXC_SDHC_Get_Default_DataWidth() : width;



result = MXC_SDHC_Lib_Prepare_Trans(width);
Expand Down Expand Up @@ -566,7 +566,6 @@ int MXC_SDHC_Lib_WriteAsync(unsigned int dst_addr, void *src_addr, unsigned int
int data;
mxc_sdhc_cmd_cfg_t cmd_cfg;

width = width == MXC_SDHC_LIB_DEFAULT_DATA ? MXC_SDHC_Get_Default_DataWidth() : width;

data = MXC_SDHC_Lib_Prepare_Trans(width);
if (data == E_BUSY) {
Expand Down Expand Up @@ -599,7 +598,7 @@ int MXC_SDHC_Lib_ReadAsync(void *dst_addr, unsigned int src_addr, unsigned int c
int data;
mxc_sdhc_cmd_cfg_t cmd_cfg;

width = width == MXC_SDHC_LIB_DEFAULT_DATA ? MXC_SDHC_Get_Default_DataWidth() : width;


data = MXC_SDHC_Lib_Prepare_Trans(width);
if (data == E_BUSY) {
Expand Down

0 comments on commit c6eb053

Please sign in to comment.