Skip to content

Commit

Permalink
tidy up PR comments ARMmbed#2
Browse files Browse the repository at this point in the history
Signed-off-by: PARKJIHOON <jh6186.park@samsung.com>
  • Loading branch information
jh6186 authored and andrewc-arm committed Jan 22, 2020
1 parent d8dca5b commit 60dffda
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 49 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
*
*/


/****************************************************************************
Included Files
****************************************************************************/
Expand All @@ -58,19 +57,13 @@
#include "rtx_os.h"
#include <inttypes.h>
#include <string.h>

#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;
Expand Down
2 changes: 0 additions & 2 deletions targets/TARGET_Samsung/TARGET_SIDK_S5JS100/mbed_sdk_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
41 changes: 2 additions & 39 deletions targets/TARGET_Samsung/TARGET_SIDK_S5JS100/port_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 60dffda

Please sign in to comment.