From cd37b0cf8e0be356705b7c17c0871c8f3acc03fa Mon Sep 17 00:00:00 2001 From: PARKJIHOON Date: Mon, 6 Jan 2020 20:38:28 +0900 Subject: [PATCH] tidy up PR comments #2 Signed-off-by: PARKJIHOON --- .../device/s5js100_systemreset.c | 9 +--- .../TARGET_SIDK_S5JS100/mbed_sdk_init.c | 2 - .../TARGET_SIDK_S5JS100/port_api.c | 41 +------------------ 3 files changed, 3 insertions(+), 49 deletions(-) diff --git a/targets/TARGET_Samsung/TARGET_SIDK_S5JS100/device/s5js100_systemreset.c b/targets/TARGET_Samsung/TARGET_SIDK_S5JS100/device/s5js100_systemreset.c index aebd097bc50..8e7c2ec07be 100644 --- a/targets/TARGET_Samsung/TARGET_SIDK_S5JS100/device/s5js100_systemreset.c +++ b/targets/TARGET_Samsung/TARGET_SIDK_S5JS100/device/s5js100_systemreset.c @@ -39,7 +39,6 @@ * */ - /**************************************************************************** Included Files ****************************************************************************/ @@ -58,19 +57,13 @@ #include "rtx_os.h" #include #include + #ifndef NDEBUG #define ERROR_REPORT(ctx, error_msg, error_filename, error_line) print_error_report(ctx, error_msg, error_filename, error_line) static void print_error_report(const mbed_error_ctx *ctx, const char *, const char *error_filename, int error_line); #else #define ERROR_REPORT(ctx, error_msg, error_filename, error_line) ((void) 0) #endif -#if MBED_CONF_PLATFORM_CRASH_CAPTURE_ENABLED -//Global for populating the context in exception handler -//mbed_fault_context_t *const mbed_fault_context = (mbed_fault_context_t *)(FAULT_CONTEXT_LOCATION); -#else -//mbed_fault_context_t fault_context; -//mbed_fault_context_t *const mbed_fault_context = (mbed_fault_context_t *) &fault_context; -#endif extern mbed_fault_context_t *mbed_fault_context; static int error_count = 0; diff --git a/targets/TARGET_Samsung/TARGET_SIDK_S5JS100/mbed_sdk_init.c b/targets/TARGET_Samsung/TARGET_SIDK_S5JS100/mbed_sdk_init.c index e6a247f7e72..0037515fcd4 100755 --- a/targets/TARGET_Samsung/TARGET_SIDK_S5JS100/mbed_sdk_init.c +++ b/targets/TARGET_Samsung/TARGET_SIDK_S5JS100/mbed_sdk_init.c @@ -31,14 +31,12 @@ void mbed_sdk_init(void) modifyreg32(0x85026100, 0x3, 0x1); modifyreg32(0x85026000, 0x3, 0x0); - /* Beetle System Power Config */ SystemPowerConfig(); s5js100_pmip_initialize(); /* Config EFlash Controller Clock */ SFlash_DriverInitialize(); -// EFlash_ClockConfig(); sflash_os_env_parser(); } diff --git a/targets/TARGET_Samsung/TARGET_SIDK_S5JS100/port_api.c b/targets/TARGET_Samsung/TARGET_SIDK_S5JS100/port_api.c index f80143d5546..173d9fba281 100644 --- a/targets/TARGET_Samsung/TARGET_SIDK_S5JS100/port_api.c +++ b/targets/TARGET_Samsung/TARGET_SIDK_S5JS100/port_api.c @@ -49,54 +49,17 @@ PinName port_pin(PortName port, int pin_n) void port_init(port_t *obj, PortName port, int mask, PinDirection dir) { -#if 0//revise me - obj->port = port; - obj->mask = mask; - CMSDK_GPIO_TypeDef *port_reg = - (CMSDK_GPIO_TypeDef *)(CMSDK_GPIO0_BASE + ((int)port * 0x10)); - - obj->reg_in = &port_reg->DATAOUT; - obj->reg_dir = &port_reg->OUTENABLESET; - obj->reg_dirclr = &port_reg->OUTENABLECLR; - - uint32_t i; - // The function is set per pin: reuse gpio logic - for (i = 0; i < 16; i++) { - if (obj->mask & (1 << i)) { - gpio_set(port_pin(obj->port, i)); - } - } - - port_dir(obj, dir); -#endif } void port_mode(port_t *obj, PinMode mode) { -#if 0//revise me - uint32_t i; - // The mode is set per pin: reuse pinmap logic - for (i = 0; i < 32; i++) { - if (obj->mask & (1 << i)) { - pin_mode(port_pin(obj->port, i), mode); - } - } -#endif + } void port_dir(port_t *obj, PinDirection dir) { -#if 0//revise me - switch (dir) { - case PIN_INPUT : - *obj->reg_dir &= ~obj->mask; - break; - case PIN_OUTPUT: - *obj->reg_dir |= obj->mask; - break; - } -#endif + } void port_write(port_t *obj, int value)