#ifndef __SERIAL_H__
#define __SERIAL_H__

#include "kp_utils.h"



typedef enum
{
    READ_DEV_INFO   = 0X01,
    READ_WRITE_PARA = 0X05,
    FLASH_OPERATION = 0X08
} server_t;

typedef enum
{
    READ_PARAM      = 0X00,
    READ_DEF        = 0X01,
    WRITE_PARAM     = 0X20
} subs_05_t;

typedef enum
{

    FLASH_ERASE     = 0X2f,
    FLASH_WRITE     = 0X20,
    FLASH_READ      = 0X00,
    FLASH_CAL_CRC   = 0X10
} subs_08_t;


void serial_task(void);
bool serial_relase_bus(void);
void serial_init(void);

void uart1_init(void);

#endif
