/**
 * @file shell_port.c
 * @author Letter (NevermindZZT@gmail.com)
 * @brief shell extensions
 * @version 1.0.0
 * @date 2019-01-05
 *
 * @Copyright (c) 2019 Letter
 *
 */

#include "hv_comm_shell.h"
#include "hv_comm_shell_port.h"
#include "hv_chip_Config.h"


signed char userShellRead(char *ch)
{
    return Hv_Chip_DebugUartGetc(ch);
}

void userShellWrite(const char ch)
{
    Hv_Chip_DebugUartPutc(ch);
}

void userShellInit(void)
{
    /* Init shell */
    SHELL_TypeDef* pstShellObj =  GetShellObject();
    pstShellObj->read  = userShellRead;
    pstShellObj->write = userShellWrite;
    shellInit(pstShellObj);
}

