tidy up PR comments #2

Signed-off-by: PARKJIHOON <jh6186.park@samsung.com>
pull/12106/head
PARKJIHOON 2020-01-06 20:38:28 +09:00 committed by Andrew Chong
parent d8dca5b4ab
commit 60dffda783
3 changed files with 3 additions and 49 deletions

View File

@ -39,7 +39,6 @@
*
*/
/****************************************************************************
Included Files
****************************************************************************/
@ -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;

View File

@ -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();
}

View File

@ -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)