Initial import of NFC GNSS SDK project
This commit is contained in:
@@ -0,0 +1,135 @@
|
||||
/**
|
||||
@file
|
||||
quec_wifi_spi.h
|
||||
|
||||
@brief
|
||||
Quectel wifi spi api header.
|
||||
|
||||
*/
|
||||
/*============================================================================
|
||||
Copyright (c) 2020 Quectel Wireless Solution, Co., Ltd. All Rights Reserved.
|
||||
Quectel Wireless Solution Proprietary and Confidential.
|
||||
=============================================================================*/
|
||||
/*===========================================================================
|
||||
|
||||
EDIT HISTORY FOR MODULE
|
||||
|
||||
This section contains comments describing changes made to the module.
|
||||
Notice that changes are listed in reverse chronological order.
|
||||
|
||||
|
||||
WHEN WHO WHAT, WHERE, WHY
|
||||
---------- ------------ ----------------------------------------------------
|
||||
|
||||
=============================================================================*/
|
||||
|
||||
#ifndef QUEC_WIFI_SPI_H
|
||||
#define QUEC_WIFI_SPI_H
|
||||
|
||||
#include "quec_gpio.h"
|
||||
#include "quec_spi.h"
|
||||
#include "quec_api_wifi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
/*========================================================================
|
||||
* Macro Definition
|
||||
*========================================================================*/
|
||||
|
||||
/*========================================================================
|
||||
* Enumeration Definition
|
||||
*========================================================================*/
|
||||
typedef enum
|
||||
{
|
||||
QUEC_WIFI_SPI_SUCCESS = 0,
|
||||
QUEC_WIFI_SPI_EXECUTE_ERR = 1,
|
||||
QUEC_WIFI_SPI_INVALID_PARAM_ERR,
|
||||
QUEC_WIFI_SPI_TASK_CREATE_ERR,
|
||||
} quec_wifi_spi_errcode_e;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
SPI_PORT_E port;
|
||||
SPI_CLK_E clk;
|
||||
SPI_MODE_E mode;
|
||||
GPIO_PIN_NUMBER_E cs;
|
||||
GPIO_PIN_NUMBER_E slave_rdy;//When the host is about to send data, use this gpio to detect whether the slave is in the ready state
|
||||
GPIO_PIN_NUMBER_E slave_cts;//The slave uses this gpio to notify the host to read spi data.
|
||||
} quec_wifi_spi_cfg_t;/*must be the same as ql_wifi_spi_config_t*/
|
||||
|
||||
|
||||
/*========================================================================
|
||||
* Type Definition
|
||||
*========================================================================*/
|
||||
|
||||
/*========================================================================
|
||||
* function Definition
|
||||
*========================================================================*/
|
||||
|
||||
/*****************************************************************
|
||||
* Function: quec_wifi_spi_output_cmd
|
||||
*
|
||||
* Description: Wi-Fi cmd output function.
|
||||
*
|
||||
* Parameters:
|
||||
* ctx [in] See quec_wifi_msg_output_data_info_s in quec_wifi_msg.h
|
||||
*
|
||||
* Return:
|
||||
* 0 success
|
||||
* other error code
|
||||
*
|
||||
*****************************************************************/
|
||||
int quec_wifi_spi_output_cmd(void *ctx);
|
||||
|
||||
|
||||
/*****************************************************************
|
||||
* Function: quec_wifi_spi_output_data_msg
|
||||
*
|
||||
* Description: Wi-Fi 802.3 data streams output function.Use this function to send data streams.
|
||||
*
|
||||
* Parameters:
|
||||
* ctx [in] See quec_wifi_data_info_s in ql_api_wifi.h
|
||||
*
|
||||
* Return:
|
||||
* 0 success
|
||||
* other error code
|
||||
*
|
||||
*****************************************************************/
|
||||
int quec_wifi_spi_output_data_msg(void *ctx, quec_wifi_mode_e mode);
|
||||
|
||||
/*****************************************************************
|
||||
* Function: quec_wifi_spi_init
|
||||
*
|
||||
* Description: Initialize Wi-Fi spi engine.
|
||||
*
|
||||
* Parameters:
|
||||
* argv [in] No defined yet.
|
||||
*
|
||||
* Return:
|
||||
* 0 success
|
||||
* other error code
|
||||
*
|
||||
*****************************************************************/
|
||||
quec_wifi_spi_errcode_e quec_wifi_spi_init(void *argv);
|
||||
|
||||
/*****************************************************************
|
||||
* Function: quec_wifi_spi_deinit
|
||||
*
|
||||
* Description: Deinitialize Wi-Fi spi engine.
|
||||
*
|
||||
* Parameters:
|
||||
* argv [in] No defined yet.
|
||||
*
|
||||
* Return:
|
||||
* 0 success
|
||||
* other error code
|
||||
*
|
||||
*****************************************************************/
|
||||
quec_wifi_spi_errcode_e quec_wifi_spi_deinit(void *argv);
|
||||
#ifdef __cplusplus
|
||||
} /*"C" */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user