nt9856x/code/lib/source/sifar/code/include/sf_hal_ttyusb.h.bak
2023-05-17 15:33:39 +08:00

91 lines
2.3 KiB
C

/**************************************************************************
*
* Copyright (c) 2015-2020 by WuYuan Technology, Inc.
*
* This software is copyrighted by and is the property of SiFar
* Technology, Inc.. All rights are reserved by SiFar Technology, Inc..
* This software may only be used in accordance with the corresponding
* license agreement. Any unauthorized use, duplication, distribution,
* or disclosure of this software is expressly forbidden.
*
* This Copyright notice MUST not be removed or modified without prior
* written consent of SiFar Technology, Inc..
*
* SiFar Technology, Inc. reserves the right to modify this software without notice.
*
* Author: jiamin
* Ver: 1.0.0 2020.09.17
* Description: creat
**************************************************************************/
#ifndef _SF_TTYAPI_H_
#define _SF_TTYAPI_H_
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif
#endif
#include <sf_type.h>
#if 0
#define SF_TTY_ERROR_OPEN SF_ERR_ID(SF_MOD_TTY, ERROR_AT_OPEN)
#define SF_TTY_ERROR_WRITE SF_ERR_ID(SF_MOD_TTY, ERROR_AT_WRITE)
#define SF_TTY_ERROR_READ SF_ERR_ID(SF_MOD_TTY, ERROR_AT_READ)
#define GPRS_MODULE_TYPE_EG91 "EG91"
#define GPRS_MODULE_TYPE_EG95 "EG95"
#define GPRS_MODULE_TYPE_EG91_V "EG91VX"
#define GPRS_MODULE_TYPE_EG95_V "EG95VX"
#define GPRS_MODULE_TYPE_EG91_NAXD "EG91NAXD"
#define GPRS_MODULE_TYPE_EG95_NAXD "EG95NAXD"
#define A_MODULE_APN "nxtgenphone"
#define V_MODULE_APN "vzwinternet"
#define E_PDP_INDEX 7
#define V_PDP_INDEX 3
#define A_PDP_INDEX 1
typedef struct sf_SERIAL_DATA_FRAME_TYPE_S {
SF_CHAR parity;
SF_CHAR flow_ctrl;
SINT8 databits;
SINT8 stopbits;
SINT32 speed;
}SF_SERIAL_DATA_FRAME_TYPE_S;
SINT32 sf_hal_ttyusb2_init(void);
SINT32 sf_hal_ttyusb2_write(SF_CHAR *sendBuf, SINT32 dataLen);
SINT32 sf_hal_ttyusb2_read(SF_CHAR *recvBuf, SINT32 dataLen);
SINT32 sf_hal_ttyusb2_deinit(void);
SINT32 sf_hal_uart_init(void);
SINT32 sf_hal_uart_write(SF_CHAR *sendBuf, SINT32 dataLen);
SINT32 sf_hal_uart_read(SF_CHAR *recvBuf, SINT32 dataLen);
SINT32 sf_hal_uart_deinit(void);
#endif
#ifdef __cplusplus
#if __cplusplus
}
#endif
#endif
#endif