W800 SDK APIs: WinnerMicro SDK

W800 SDK APIs v0.00.07
WinnerMicro SDK

Quick Start of WinnerMicro SDK.

HOW TO CODE ?

Function UserMain(void) is the entrance function of the application:

void UserMain(void)
{
printf("\n user task\n");
#if DEMO_CONSOLE
CreateDemoTask();
#endif
//user's task
}

HOW TO COMPILE ?

To build with the SDK you can use the CDS or Make. Please refer to the CDS and script compilation documentation for details.

HOW TO DOWNLOAD THE FIRMWARE ?

Download the "w800.fls" image

This will download image which includes secboot & user application image into flash by ROM using xmodem-protocol for factory burning.

Pulling down the bootmode pin(PA0) and reset the device. Then UART0 will output:
CCC...
For details,please refer to the sdk manual.

Download the "w800.img" image

This will download image which only includes user application using xmodem-protocol.

Press "ESC" and then reset the device. Then UART0 will output:
CCC...
For details,please refer to the sdk manual.

Generated by doxygen 1.8.14


W800 SDK APIs: Modules

Modules
Here is a list of all modules:
[detail level 12]
▼ APP APIs | APP APIs
AT_RI APIs | AT_RI command APIs
DHCPS APIs | DHCP server APIs
DNSS APIs | DNS server APIs
HTTPC APIs | HTTP client APIs
NETIF APIs | Network interface APIs
NTP APIs | NTP APIs
SSL SERVER APIs | SSL Server APIs
WEB APIs | WEB server APIs
Oneshot APIs | Wi-Fi oneshot APIs
▼ Bluetooth APIs | Bluetooth related APIs
BLE APIs | BLE APIs
BLE GATT Client APIs | BLE GATT Client APIs
BLE GATT Server APIs | BLE GATT Server APIs
BT Host APIs | BT Host APIs
BT Controller APIs | BT Controller APIs
BT_AV_APIs | BT_AV APIs
BT_HF_CLIENT_APIs | BT_HF_CLIENT APIs
BT_SPP_APIs | BT_SPP APIs
▼ Driver APIs | Driver APIs
7816 Driver APIs | 7816 driver APIs
ADC Driver APIs | ADC driver APIs
CPU CLOCK Driver APIs | CPU CLOCK driver APIs
DMA Driver APIs | DMA driver APIs
EFUSE Driver APIs | EFUSE driver APIs
SPI FLASH Driver APIs | SPI FLASH driver APIs
GPIO Driver APIs | GPIO driver APIs
IOMUX Driver APIs | IO Multiplex driver APIs
MASTER SPI Driver APIs | MASTERSPI driver APIs
HSPI Driver APIs | HSPI driver APIs
I2C Driver APIs | I2C driver APIs
I2S Driver APIs | I2S driver APIs
INNER FLASH Driver APIs | INNER FLASH driver APIs
IRQ Driver APIs | IRQ driver APIs
LCD Driver APIs | LCD driver APIs
PMU Driver APIs | PMU driver APIs
PSRAM Driver APIs | PSRAM driver APIs
PWM Driver APIs | PWM driver APIs
RTC Driver APIs | RTC driver APIs
SASC Driver APIs | SASC driver APIs
SDIO HOST Driver APIs | SDIO HOST driver APIs
TIMER Driver APIs | TIMER driver APIs
TIPC Driver APIs | TIPC driver APIs
UART Driver APIs | UART driver APIs
WDG Driver APIs | WDG driver APIs
▼ System APIs | System APIs
DLIST APIs | Double listed APIs
OS APIs | Operate system APIs
HARD CRYPTO APIs | Hard crypto APIs
FWUP APIs | Firmware upgrade APIs
MEM APIs | Memory manager APIs
Param APIs | Param manager APIs
DEBUG APIs | DEBUG APIs
REG APIs | Register operate APIs
Wi-Fi APIs | Wi-Fi related APIs


W800 SDK APIs: APP APIs

Modules
APP APIs

APP APIs. More...

Modules

AT_RI APIs
AT_RI command APIs.
DHCPS APIs
DHCP server APIs.
DNSS APIs
DNS server APIs.
HTTPC APIs
HTTP client APIs.
NETIF APIs
network interface APIs
NTP APIs
NTP APIs.
SSL SERVER APIs
SSL Server APIs.
WEB APIs
WEB server APIs.
Oneshot APIs
Wi-Fi oneshot APIs.

Detailed Description

APP APIs.


W800 SDK APIs: AT_RI APIs

Functions
AT_RI APIs
APP APIs

AT_RI command APIs. More...

Functions

int tls_hostif_init (void)
This function is used to initialize hostif task used by AT&RI Command. More...

Detailed Description

AT_RI command APIs.

Function Documentation

◆ tls_hostif_init()

int tls_hostif_init ( void )

This function is used to initialize hostif task used by AT&RI Command.

Parameters
None
Return values
0 | success
other | failed
Note
Usually the system will call this api at power on.


W800 SDK APIs: DHCPS APIs

Functions
DHCPS APIs
APP APIs

DHCP server APIs. More...

Functions

s8 | tls_dhcps_start (void)
This function is used to start DHCP Server for a network interface. More...
void | tls_dhcps_stop (void)
This function is used to stop DHCP server. More...
ip_addr_t * | tls_dhcps_getip (const u8 *mac)
This function is used to get station's IP address by MAC address. More...
void | tls_dhcps_setdns (u8 numdns)
This function is used to set DHCP server's DNS address. More...

Detailed Description

DHCP server APIs.

Function Documentation

◆ tls_dhcps_getip()

ip_addr_t* tls_dhcps_getip ( const u8 * mac )

This function is used to get station's IP address by MAC address.

Parameters
[in] *mac STA's MAC address
Return values
ip_addr | STA's IP address
NULL | Not found match IP with MAC address
Note
None

◆ tls_dhcps_setdns()

void tls_dhcps_setdns ( u8 numdns )

This function is used to set DHCP server's DNS address.

Parameters
[in] numdns the index of the DNS server to set must be 0 or 1
Returns
None
Note
None

◆ tls_dhcps_start()

s8 tls_dhcps_start ( void )

This function is used to start DHCP Server for a network interface.

Parameters
None
Return values
WM_SUCCESS | success
WM_FAILED | failed
Note
None

◆ tls_dhcps_stop()

void tls_dhcps_stop ( void )

This function is used to stop DHCP server.

Parameters
[in] None
Returns
None
Note
None


W800 SDK APIs: DNSS APIs

Functions
DNSS APIs
APP APIs

DNS server APIs. More...

Functions

s8 | tls_dnss_start (u8 *dnsname)
This function is used to start DNS service. More...
void | tls_dnss_stop (void)
This function is used to stop DNS service. More...

Detailed Description

DNS server APIs.

Function Documentation

◆ tls_dnss_start()

s8 tls_dnss_start ( u8 * dnsname )

This function is used to start DNS service.

Parameters
[in] *dnsname Specify the server's dns name
Return values
WM_SUCCESS | success
WM_FAILED | failed
Note
None

◆ tls_dnss_stop()

void tls_dnss_stop ( void )

This function is used to stop DNS service.

Parameters
[in] None
Returns
None
Note
None


W800 SDK APIs: HTTPC APIs

Functions
HTTPC APIs
APP APIs

HTTP client APIs. More...

Functions

HTTP_SESSION_HANDLE | HTTPClientOpenRequest (HTTP_CLIENT_SESSION_FLAGS Flags)
Allocate memory for a new HTTP Session. More...
UINT32 | HTTPClientCloseRequest (HTTP_SESSION_HANDLE *pSession)
Closes the active connection and free the corresponding memory. More...
UINT32 | HTTPClientSetAuth (HTTP_SESSION_HANDLE pSession, HTTP_AUTH_SCHEMA AuthSchema, void *pReserved)
Sets the HTTP authentication schema. More...
UINT32 | HTTPClientSetCredentials (HTTP_SESSION_HANDLE pSession, CHAR *pUserName, CHAR *pPassword)
Sets credentials for the target host. More...
UINT32 | HTTPClientSetProxy (HTTP_SESSION_HANDLE pSession, CHAR *pProxyName, UINT16 nPort, CHAR *pUserName, CHAR *pPassword)
Sets all the proxy related parameters. More...
UINT32 | HTTPClientSetVerb (HTTP_SESSION_HANDLE pSession, HTTP_VERB HttpVerb)
Sets the HTTP verb for the outgoing request. More...
UINT32 | HTTPClientAddRequestHeaders (HTTP_SESSION_HANDLE pSession, CHAR *pHeaderName, CHAR *pHeaderData, BOOL nInsert)
Add headers into the outgoing request. More...
UINT32 | HTTPClientSendRequest (HTTP_SESSION_HANDLE pSession, CHAR *pUrl, VOID *pData, UINT32 nDataLength, BOOL TotalLength, UINT32 nTimeout, UINT32 nClientPort)
This function builds the request headers, performs a DNS resolution, opens the connection (if it was not opened yet by a previous request or if it has closed) and sends the request headers. More...
UINT32 | HTTPClientWriteData (HTTP_SESSION_HANDLE pSession, VOID *pBuffer, UINT32 nBufferLength, UINT32 nTimeout)
Write data to the remote server. More...
UINT32 | HTTPClientRecvResponse (HTTP_SESSION_HANDLE pSession, UINT32 nTimeout)
Receives the response header on the connection and parses it. Performs any required authentication. More...
UINT32 | HTTPClientReadData (HTTP_SESSION_HANDLE pSession, VOID *pBuffer, UINT32 nBytesToRead, UINT32 nTimeout, UINT32 *nBytesRecived)
Read data from the server. Parse out the chunks data. More...
UINT32 | HTTPClientGetInfo (HTTP_SESSION_HANDLE pSession, HTTP_CLIENT *HTTPClient)
Fill the users structure with the session information. More...
UINT32 | HTTPClientFindFirstHeader (HTTP_SESSION_HANDLE pSession, CHAR *pSearchClue, CHAR *pHeaderBuffer, UINT32 *nLength)
Initiate the headr searching functions and find the first header. More...
UINT32 | HTTPClientGetNextHeader (HTTP_SESSION_HANDLE pSession, CHAR *pHeaderBuffer, UINT32 *nLength)
Find the next header. More...
UINT32 | HTTPClientFindCloseHeader (HTTP_SESSION_HANDLE pSession)
Terminate a headers search session. More...

Detailed Description

HTTP client APIs.

Function Documentation

◆ HTTPClientAddRequestHeaders()

UINT32 HTTPClientAddRequestHeaders | ( | HTTP_SESSION_HANDLE | pSession,
 |  | CHAR * | pHeaderName,
 |  | CHAR * | pHeaderData,
 |  | BOOL | nInsert
 | ) |  |

Add headers into the outgoing request.

Parameters
[in] | pSession | HTTP Session
[in] | *pHeaderName | The Header name
[in] | *pHeaderData | The header data
[in] | nInsert | Reserved, could be any
Return values
HTTP_CLIENT_SUCCESS | success
other | failed
Note
None

◆ HTTPClientCloseRequest()

UINT32 HTTPClientCloseRequest ( HTTP_SESSION_HANDLE * pSession )

Closes the active connection and free the corresponding memory.

Parameters
[in] *pSession HTTP Session handle
Return values
HTTP_CLIENT_SUCCESS | success
other | failed
Note
None

◆ HTTPClientFindCloseHeader()

UINT32 HTTPClientFindCloseHeader ( HTTP_SESSION_HANDLE pSession )

Terminate a headers search session.

Parameters
[in] pSession HTTP Session handle
Return values
HTTP_CLIENT_SUCCESS | success
other | failed
Note
None

◆ HTTPClientFindFirstHeader()

UINT32 HTTPClientFindFirstHeader | ( | HTTP_SESSION_HANDLE | pSession,
 |  | CHAR * | pSearchClue,
 |  | CHAR * | pHeaderBuffer,
 |  | UINT32 * | nLength
 | ) |  |

Initiate the headr searching functions and find the first header.

Parameters
[in] | pSession | HTTP Session handle
[in] | *pSearchClue | Search clue
[out] | *pHeaderBuffer | A pointer to a buffer that will be filled with the header name and value
[out] | *nLength | Count of the bytes that were received in this operation
Return values
HTTP_CLIENT_SUCCESS | success
other | failed
Note
None

◆ HTTPClientGetInfo()

UINT32 HTTPClientGetInfo | ( | HTTP_SESSION_HANDLE | pSession,
 |  | HTTP_CLIENT * | HTTPClient
 | ) |  |

Fill the users structure with the session information.

Parameters
[in] | pSession | HTTP Session handle
[out] | *HTTPClient | The session information
Return values
HTTP_CLIENT_SUCCESS | success
other | failed
Note
None

◆ HTTPClientGetNextHeader()

UINT32 HTTPClientGetNextHeader | ( | HTTP_SESSION_HANDLE | pSession,
 |  | CHAR * | pHeaderBuffer,
 |  | UINT32 * | nLength
 | ) |  |

Find the next header.

Parameters
[in] | pSession | HTTP Session handle
[out] | *pHeaderBuffer | A pointer to a buffer that will be filled with the header name and value
[out] | *nLength | Count of the bytes that were received in this operation
Return values
HTTP_CLIENT_SUCCESS | success
other | failed
Note
None

◆ HTTPClientOpenRequest()

HTTP_SESSION_HANDLE HTTPClientOpenRequest ( HTTP_CLIENT_SESSION_FLAGS Flags )

Allocate memory for a new HTTP Session.

Parameters
[in] Flags HTTP Session internal API flags, 0 should be passed here
Return values
0 | failed
other | HTTP Session handle
Note
None

◆ HTTPClientReadData()

UINT32 HTTPClientReadData | ( | HTTP_SESSION_HANDLE | pSession,
 |  | VOID * | pBuffer,
 |  | UINT32 | nBytesToRead,
 |  | UINT32 | nTimeout,
 |  | UINT32 * | nBytesRecived
 | ) |  |

Read data from the server. Parse out the chunks data.

Parameters
[in] | pSession | HTTP Session handle
[out] | *pBuffer | A pointer to a buffer that will be filled with the servers response
[in] | nBytesToRead | The size of the buffer (numbers of bytes to read)
[in] | nTimeout | Operation timeout in seconds
[out] | *nBytesRecived | Count of the bytes that were received in this operation
Return values
HTTP_CLIENT_SUCCESS | success
other | failed
Note
None

◆ HTTPClientRecvResponse()

UINT32 HTTPClientRecvResponse | ( | HTTP_SESSION_HANDLE | pSession,
 |  | UINT32 | nTimeout
 | ) |  |

Receives the response header on the connection and parses it. Performs any required authentication.

Parameters
[in] | pSession | HTTP Session handle
[in] | nTimeout | Timeout for the operation
Return values
HTTP_CLIENT_SUCCESS | success
other | failed
Note
None

◆ HTTPClientSendRequest()

UINT32 HTTPClientSendRequest | ( | HTTP_SESSION_HANDLE | pSession,
 |  | CHAR * | pUrl,
 |  | VOID * | pData,
 |  | UINT32 | nDataLength,
 |  | BOOL | TotalLength,
 |  | UINT32 | nTimeout,
 |  | UINT32 | nClientPort
 | ) |  |

This function builds the request headers, performs a DNS resolution, opens the connection (if it was not opened yet by a previous request or if it has closed) and sends the request headers.

Parameters
[in] | pSession | HTTP Session handle
[in] | *pUrl | The requested URL
[in] | *pData | Data to post to the server
[in] | nDataLength | Length of posted data
[in] | TotalLength | Valid only when http method is post TRUE: Post data to http server. FALSE: In a post request without knowing the total length in advance so return error or use chunking.
[in] | nTimeout | Operation timeout
[in] | nClientPort | Client side port 0 for none
Return values
HTTP_CLIENT_SUCCESS | success
other | failed
Note
None

◆ HTTPClientSetAuth()

UINT32 HTTPClientSetAuth | ( | HTTP_SESSION_HANDLE | pSession,
 |  | HTTP_AUTH_SCHEMA | AuthSchema,
 |  | void * | pReserved
 | ) |  |

Sets the HTTP authentication schema.

Parameters
[in] | pSession | HTTP Session handle
[in] | AuthSchema | HTTP Supported authentication methods
[in] | *pReserved | Reserved parameter
Return values
HTTP_CLIENT_SUCCESS | success
other | failed
Note
None

◆ HTTPClientSetCredentials()

UINT32 HTTPClientSetCredentials | ( | HTTP_SESSION_HANDLE | pSession,
 |  | CHAR * | pUserName,
 |  | CHAR * | pPassword
 | ) |  |

Sets credentials for the target host.

Parameters
[in] | pSession | HTTP Session handle
[in] | *pUserName | User name
[in] | *pPassword | Password
Return values
HTTP_CLIENT_SUCCESS | success
other | failed
Note
None

◆ HTTPClientSetProxy()

UINT32 HTTPClientSetProxy | ( | HTTP_SESSION_HANDLE | pSession,
 |  | CHAR * | pProxyName,
 |  | UINT16 | nPort,
 |  | CHAR * | pUserName,
 |  | CHAR * | pPassword
 | ) |  |

Sets all the proxy related parameters.

Parameters
[in] | pSession | HTTP Session handle
[in] | *pProxyName | The host name
[in] | nPort | The proxy port number
[in] | *pUserName | User name for proxy authentication (can be null)
[in] | *pPassword | User password for proxy authentication (can be null)
Return values
HTTP_CLIENT_SUCCESS | success
other | failed
Note
None

◆ HTTPClientSetVerb()

UINT32 HTTPClientSetVerb | ( | HTTP_SESSION_HANDLE | pSession,
 |  | HTTP_VERB | HttpVerb
 | ) |  |

Sets the HTTP verb for the outgoing request.

Parameters
[in] | pSession | HTTP Session handle
[in] | HttpVerb | HTTP supported verbs
Return values
HTTP_CLIENT_SUCCESS | success
other | failed
Note
None

◆ HTTPClientWriteData()

UINT32 HTTPClientWriteData | ( | HTTP_SESSION_HANDLE | pSession,
 |  | VOID * | pBuffer,
 |  | UINT32 | nBufferLength,
 |  | UINT32 | nTimeout
 | ) |  |

Write data to the remote server.

Parameters
[in] | pSession | HTTP Session handle
[in] | *pBuffer | Data to write to the server
[in] | nBufferLength | Length of wtitten data
[in] | nTimeout | Timeout for the operation
Return values
HTTP_CLIENT_SUCCESS | success
other | failed
Note
None


W800 SDK APIs: NETIF APIs

Functions
NETIF APIs
APP APIs

network interface APIs More...

Functions

int | tls_ethernet_init (void)
This function is used to initialize TCP/IP Stack. More...
struct tls_ethif * | tls_netif_get_ethif (void)
This function is used to get IP information stored in tls_ethif struct. More...
void | tls_netif_set_status (u8 status)
This function is used to set tls_ethif status. More...
err_t | tls_dhcp_start (void)
This function is used to start DHCP Client. More...
err_t | tls_dhcp_stop (void)
This function is used to stop DHCP client. More...
err_t | tls_netif_set_addr (ip_addr_t *ipaddr, ip_addr_t *netmask, ip_addr_t *gw)
This function is used to change IP information. More...
void | tls_netif_dns_setserver (u8 numdns, ip_addr_t *dnsserver)
This function is used to set dns servers. More...
err_t | tls_netif_set_up (void)
This function is used to bring up an interface,available for processing traffic. More...
err_t | tls_netif_set_down (void)
This function is used to bring down an interface,disabling any traffic processing. More...
err_t | tls_netif_add_status_event (tls_netif_status_event_fn event_fn)
This function is used to add netif status changed callback to event list,if exists, do nothing. More...
err_t | tls_netif_remove_status_event (tls_netif_status_event_fn event_fn)
This function is used to remove netif status changed callback function from event list,if not exists, do nothing. More...
struct netif * | tls_get_netif (void)
This function is used to get pointer of netif. More...

Detailed Description

network interface APIs

Function Documentation

◆ tls_dhcp_start()

err_t tls_dhcp_start ( void )

This function is used to start DHCP Client.

Parameters
[in] None
Return values
0 | success
Minus | failed
Note
None

◆ tls_dhcp_stop()

err_t tls_dhcp_stop ( void )

This function is used to stop DHCP client.

Parameters
[in] None
Return values
0 | success
Minus | failed
Note
None

◆ tls_ethernet_init()

int tls_ethernet_init ( void )

This function is used to initialize TCP/IP Stack.

Parameters
[in] None
Return values
0 | success
other | failed
Note
None

◆ tls_get_netif()

struct netif* tls_get_netif ( void )

This function is used to get pointer of netif.

Parameters
[in] None
Return values
pointer of netif
Note
None

◆ tls_netif_add_status_event()

err_t tls_netif_add_status_event ( tls_netif_status_event_fn event_fn )

This function is used to add netif status changed callback to event list,if exists, do nothing.

Parameters
[in] event_fn pointer to tls_netif_status_event_fn
Return values
0 | success
Minus | failed
Note
None

◆ tls_netif_dns_setserver()

void tls_netif_dns_setserver | ( | u8 | numdns,
 |  | ip_addr_t * | dnsserver
 | ) |  |

This function is used to set dns servers.

Parameters
[in] | numdns | index of the DNS server to set must be < DNS_MAX_SERVERS
[in] | *dnsserver | IP address of the DNS server to set
Returns
None
Note
None

◆ tls_netif_get_ethif()

struct tls_ethif* tls_netif_get_ethif ( void )

This function is used to get IP information stored in tls_ethif struct.

Parameters
[in] None
Return values
tls_ethif * Pointer to struct tls_ethif
Note
None

◆ tls_netif_remove_status_event()

err_t tls_netif_remove_status_event ( tls_netif_status_event_fn event_fn )

This function is used to remove netif status changed callback function from event list,if not exists, do nothing.

Parameters
[in] event_fn pointer to tls_netif_status_event_fn
Return values
0 | success
Minus | failed
Note
None

◆ tls_netif_set_addr()

err_t tls_netif_set_addr | ( | ip_addr_t * | ipaddr,
 |  | ip_addr_t * | netmask,
 |  | ip_addr_t * | gw
 | ) |  |

This function is used to change IP information.

Parameters
[in] | *ipaddr | IP address
[in] | *netmask | netmask
[in] | *gw | default gateway
Return values
0 | success
Minus | failed
Note
None

◆ tls_netif_set_down()

err_t tls_netif_set_down ( void )

This function is used to bring down an interface,disabling any traffic processing.

Parameters
[in] None
Return values
0 | success
Minus | failed
Note
None

◆ tls_netif_set_status()

void tls_netif_set_status ( u8 status )

This function is used to set tls_ethif status.

Parameters
[in] status net status, 0-up, 1-down
Returns
None
Note
None

◆ tls_netif_set_up()

err_t tls_netif_set_up ( void )

This function is used to bring up an interface,available for processing traffic.

Parameters
[in] None
Return values
0 | success
Minus | failed
Note
None


W800 SDK APIs: NTP APIs

Functions
NTP APIs
APP APIs

NTP APIs. More...

Functions

u32 | tls_ntp_client (void)
This function is used to get network time. More...
int | tls_ntp_set_server (char *ipaddr, int server_no)
This function is used to set ntp servers. More...
int | tls_ntp_query_sntpcfg (void)
This function is used to query params of the ntp servers. More...

Detailed Description

NTP APIs.

Function Documentation

◆ tls_ntp_client()

u32 tls_ntp_client ( void )

This function is used to get network time.

Parameters
None
Return values
time value
Note
None

◆ tls_ntp_query_sntpcfg()

int tls_ntp_query_sntpcfg ( void )

This function is used to query params of the ntp servers.

Return values
WM_SUCCESS | success
WM_FAILED | failed
Note
None

◆ tls_ntp_set_server()

int tls_ntp_set_server | ( | char * | ipaddr,
 |  | int | server_no
 | ) |  |

This function is used to set ntp servers.

Parameters
[in] | *ipaddr | xxx.xxx.xxx.xxx
[in] | server_no | max num is three
Return values
WM_SUCCESS | success
WM_FAILED | failed
Note
None


W800 SDK APIs: SSL SERVER APIs

Functions
SSL SERVER APIs
APP APIs

SSL Server APIs. More...

Functions

int | tls_ssl_server_init (void *arg)
This function is used to initialize SSL Server. More...
int | tls_ssl_server_load_keys (tls_ssl_key_t **keys, unsigned char *certBuf, int32 certLen, unsigned char *privBuf, int32 privLen, unsigned char *CAbuf, int32 CAlen, int keyType)
This function is used to set SSL keys. More...
int | tls_ssl_server_handshake (tls_ssl_t **ssl_p, int fd, tls_ssl_key_t *keys)
This function is used to set SSL Server working. More...
int | tls_ssl_server_send (tls_ssl_t *ssl, int s, char *sndbuf, int len, int flags)
This function is used to send data. More...
int | tls_ssl_server_recv (tls_ssl_t *ssl, int s, char *buf, int len, int flags)
This function is used to receive data. More...
void | tls_ssl_server_close_conn (tls_ssl_t *ssl, int s)
This function is used to close connection. More...
int | tls_ssl_server_close (tls_ssl_key_t *keys)
This function is used to close SSL Server. More...

Detailed Description

SSL Server APIs.

Function Documentation

◆ tls_ssl_server_close()

int tls_ssl_server_close ( tls_ssl_key_t * keys )

This function is used to close SSL Server.

Parameters
[in] *keys SSL keys
Return values
0 | success
other | failed
Note
None

◆ tls_ssl_server_close_conn()

void tls_ssl_server_close_conn | ( | tls_ssl_t * | ssl,
 |  | int | s
 | ) |  |

This function is used to close connection.

Parameters
[in] | *ssl | SSL hanlde
[in] | s | socket number
Returns
None
Note
None

◆ tls_ssl_server_handshake()

int tls_ssl_server_handshake | ( | tls_ssl_t ** | ssl_p,
 |  | int | fd,
 |  | tls_ssl_key_t * | keys
 | ) |  |

This function is used to set SSL Server working.

Parameters
[in] | **ssl_p | SSL hanlde
[in] | fd | socket number
[in] | *keys | SSL keys
Return values
0 | success
other | failed
Note
None

◆ tls_ssl_server_init()

int tls_ssl_server_init ( void * arg )

This function is used to initialize SSL Server.

Parameters
[in] *arg proto version: 0 - sslv3 1 - tls1.0 2 - tls1.1 3 - tls1.2
Return values
0 | success
other | failed
Note
None

◆ tls_ssl_server_load_keys()

int tls_ssl_server_load_keys | ( | tls_ssl_key_t ** | keys,
 |  | unsigned char * | certBuf,
 |  | int32 | certLen,
 |  | unsigned char * | privBuf,
 |  | int32 | privLen,
 |  | unsigned char * | CAbuf,
 |  | int32 | CAlen,
 |  | int | keyType
 | ) |  |

This function is used to set SSL keys.

Parameters
[in] | **keys | SSL key pointer
[in] | *certBuf | SSL certificate
[in] | certLen | SSL certificate length
[in] | *privBuf | SSL private key
[in] | privLen | SSL private key length
[in] | *CAbuf | CA certificate
[in] | CAlen | CA certificate length
[in] | keyType | key type: KEY_RSA,KEY_ECC,KEY_DH
Return values
0 | success
other | failed
Note
None

◆ tls_ssl_server_recv()

int tls_ssl_server_recv | ( | tls_ssl_t * | ssl,
 |  | int | s,
 |  | char * | buf,
 |  | int | len,
 |  | int | flags
 | ) |  |

This function is used to receive data.

Parameters
[in] | *ssl | SSL hanlde
[in] | s | socket number
[in] | *buf | receive buffer
[in] | len | receive buffer length
[in] | flags | some flags
Return values
> 0 success
<=0 failed
Note
None

◆ tls_ssl_server_send()

int tls_ssl_server_send | ( | tls_ssl_t * | ssl,
 |  | int | s,
 |  | char * | sndbuf,
 |  | int | len,
 |  | int | flags
 | ) |  |

This function is used to send data.

Parameters
[in] | *ssl | SSL hanlde
[in] | s | socket number
[in] | *sndbuf | send buffer
[in] | len | send length
[in] | flags | some flags
Return values
> 0 success
<=0 failed
Note
None


W800 SDK APIs: WEB APIs

Functions
WEB APIs
APP APIs

WEB server APIs. More...

Functions

void | tls_webserver_init (void)
This function is used to start WEB SERVER service. More...
void | tls_webserver_deinit (void)
This function is used to deinit WEB SERVER service. More...

Detailed Description

WEB server APIs.

Function Documentation

◆ tls_webserver_deinit()

void tls_webserver_deinit ( void )

This function is used to deinit WEB SERVER service.

Parameters
[in] None
Returns
None
Note
None

◆ tls_webserver_init()

void tls_webserver_init ( void )

This function is used to start WEB SERVER service.

Parameters
[in] None
Returns
None
Note
None


W800 SDK APIs: Oneshot APIs

Functions
Oneshot APIs
APP APIs

Wi-Fi oneshot APIs. More...

Functions

int | tls_wifi_set_oneshot_flag (u8 flag)
This function is used to set oneshot flag. More...
int | tls_wifi_get_oneshot_flag (void)
This function is used to get oneshot flag. More...

Detailed Description

Wi-Fi oneshot APIs.

Function Documentation

◆ tls_wifi_get_oneshot_flag()

int tls_wifi_get_oneshot_flag ( void )

This function is used to get oneshot flag.

Parameters
[in] | None
[out] | None
Return values
0 one shot closed 1: one shot open 2: AP+socket 3: AP+WEBSERVER 4: bt
Note
None

◆ tls_wifi_set_oneshot_flag()

int tls_wifi_set_oneshot_flag ( u8 flag )

This function is used to set oneshot flag.

Parameters
[in] | flag,0 | one shot closed 1: one shot open 2: AP+socket 3: AP+WEBSERVER 4: bt
[out] | None
Return values
0 success -1: failed
Note
None


W800 SDK APIs: Bluetooth APIs

Modules
Bluetooth APIs

Bluetooth related APIs. More...

Modules

BLE APIs
BLE APIs.
BLE GATT Client APIs
BLE GATT Client APIs.
BLE GATT Server APIs
BLE GATT Server APIs.
BT Host APIs
BT Host APIs.
BT Controller APIs
BT Controller APIs.
BT_AV_APIs
BT_AV APIs.
BT_HF_CLIENT_APIs
BT_HF_CLIENT APIs.
BT_SPP_APIs
BT_SPP APIs.

Detailed Description

Bluetooth related APIs.


W800 SDK APIs: BLE APIs

Functions
BLE APIs
Bluetooth APIs

BLE APIs. More...

Functions

tls_bt_status_t | tls_ble_dm_init (tls_ble_dm_callback_t callback)
initialize the application callback function More...
tls_bt_status_t | tls_ble_adv (uint8_t adv_state)
start/stop ble advertisement More...
tls_bt_status_t | tls_ble_set_adv_data (tls_ble_dm_adv_data_t *data)
configure the advertisment content More...
tls_bt_status_t | tls_ble_set_adv_param (tls_ble_dm_adv_param_t *param)
configure the advertisment parameters More...
tls_bt_status_t | tls_ble_set_adv_ext_param (tls_ble_dm_adv_ext_param_t *param)
configure the advertisment extented parameters More...
tls_bt_status_t | tls_ble_scan (bool start)
start/stop ble scan More...
tls_bt_status_t | tls_ble_set_scan_param (int window, int interval, uint8_t scan_mode)
configure the scan parameters More...
tls_bt_status_t | tls_dm_evt_triger (int id, tls_ble_dm_triger_callback_t callback)
enable a async process evt More...
tls_bt_status_t | tls_dm_set_data_length (tls_bt_addr_t *bd_addr, uint16_t length)
configure the max transmit unit More...
tls_bt_status_t | tls_dm_set_privacy (uint8_t enable)
configure the ble privacy More...
tls_bt_status_t | tls_ble_conn_parameter_update (const tls_bt_addr_t *bd_addr, int min_interval, int max_interval, int latency, int timeout)
update the connection parameters More...
tls_bt_status_t | tls_dm_read_remote_rssi (const tls_bt_addr_t *bd_addr)
read the remote device signal strength connected More...
tls_bt_status_t | tls_ble_set_sec_io_cap (uint8_t io_cap)
config the io capabilities of local device More...
tls_bt_status_t | tls_ble_set_sec_auth_req (uint8_t auth_req)
config the auth requirement of local device More...
tls_bt_status_t | tls_ble_set_sec (const tls_bt_addr_t *bd_addr, uint8_t sec_act)
This function is called to ensure that connection is encrypted. Should be called only on an open connection. Typically only needed for connections that first want to bring up unencrypted links, then later encrypt them. More...
tls_bt_status_t | tls_ble_gap_adv (uint8_t start, int duration)
only used to start/stop ble advertisement More...

Detailed Description

BLE APIs.

Function Documentation

◆ tls_ble_adv()

tls_bt_status_t tls_ble_adv ( uint8_t adv_state )

start/stop ble advertisement

Parameters
[in] start 1 connectable and discoverable; 2 disconnectable and discoverable; 0 stop
Returns
tls_bt_status_t
Note
None

◆ tls_ble_conn_parameter_update()

tls_bt_status_t tls_ble_conn_parameter_update | ( | const tls_bt_addr_t * | bd_addr,
 |  | int | min_interval,
 |  | int | max_interval,
 |  | int | latency,
 |  | int | timeout
 | ) |  |

update the connection parameters

Parameters
[in] | *bd_addr | remote device address
[in] | min_interval
[in] | max_interval
[in] | latency
[in] | timeout
Returns
tls_bt_status_t
Note
None

◆ tls_ble_dm_init()

tls_bt_status_t tls_ble_dm_init ( tls_ble_dm_callback_t callback )

initialize the application callback function

Parameters
[in] *p_callback pointer on callback function
Returns
tls_bt_status_t
Note
None

◆ tls_ble_gap_adv()

tls_bt_status_t tls_ble_gap_adv | ( | uint8_t | start,
 |  | int | duration
 | ) |  |

only used to start/stop ble advertisement

Parameters
[in] | start | 1 start advertisement; 0 stop advertisement;
[in] | duration | valid for start advertisement. 0 for forever, otherwise the last seconds of advertisement
Returns
tls_bt_status_t
Note
None

◆ tls_ble_scan()

tls_bt_status_t tls_ble_scan ( bool start )

start/stop ble scan

Parameters
[in] start TRUE enable; FALSE disable
Return values

◆ tls_ble_set_adv_data()

tls_bt_status_t tls_ble_set_adv_data ( tls_ble_dm_adv_data_t * data )

configure the advertisment content

Parameters
[in] *data btif_dm_adv_data_t
Return values

◆ tls_ble_set_adv_ext_param()

tls_bt_status_t tls_ble_set_adv_ext_param ( tls_ble_dm_adv_ext_param_t * param )

configure the advertisment extented parameters

Parameters
[in] *param tls_ble_dm_adv_ext_param_t
Return values

◆ tls_ble_set_adv_param()

tls_bt_status_t tls_ble_set_adv_param ( tls_ble_dm_adv_param_t * param )

configure the advertisment parameters

Parameters
[in] *param btif_dm_adv_param_t
Return values

◆ tls_ble_set_scan_param()

tls_bt_status_t tls_ble_set_scan_param | ( | int | window,
 |  | int | interval,
 |  | uint8_t | scan_mode
 | ) |  |

configure the scan parameters

Parameters
[in] | window | scan window size
[in] | interval | scan interval length
[in] | scan | mode 0 passive scan; 1 active scan;
Return values

◆ tls_ble_set_sec()

tls_bt_status_t tls_ble_set_sec | ( | const tls_bt_addr_t * | bd_addr,
 |  | uint8_t | sec_act
 | ) |  |

This function is called to ensure that connection is encrypted. Should be called only on an open connection. Typically only needed for connections that first want to bring up unencrypted links, then later encrypt them.

Parameters
[in]

◆ tls_ble_set_sec_auth_req()

tls_bt_status_t tls_ble_set_sec_auth_req ( uint8_t auth_req )

config the auth requirement of local device

Parameters
[in] auth_req
Returns
tls_bt_status_t
Note
None

◆ tls_ble_set_sec_io_cap()

tls_bt_status_t tls_ble_set_sec_io_cap ( uint8_t io_cap )

config the io capabilities of local device

Parameters
[in] io_cap
Returns
tls_bt_status_t
Note
None

◆ tls_dm_evt_triger()

tls_bt_status_t tls_dm_evt_triger | ( | int | id,
 |  | tls_ble_dm_triger_callback_t | callback
 | ) |  |

enable a async process evt

Parameters
[in] | id | user specific definition
[in] | *p_callback | callback function
Returns
tls_bt_status_t
Note
None

◆ tls_dm_read_remote_rssi()

tls_bt_status_t tls_dm_read_remote_rssi ( const tls_bt_addr_t * bd_addr )

read the remote device signal strength connected

Parameters
[in] *bd_addr remote device address
Returns
tls_bt_status_t
Note
None

◆ tls_dm_set_data_length()

tls_bt_status_t tls_dm_set_data_length | ( | tls_bt_addr_t * | bd_addr,
 |  | uint16_t | length
 | ) |  |

configure the max transmit unit

Parameters
[in] | *bd_addr | the remote device address
[in] | length | range [27 - 251]
Returns
tls_bt_status_t
Note
None

◆ tls_dm_set_privacy()

tls_bt_status_t tls_dm_set_privacy ( uint8_t enable )

configure the ble privacy

Parameters
[in] enable TRUE: using rpa/random address, updated every 15 mins FALSE: public address
Returns
tls_bt_status_t
Note
None


W800 SDK APIs: BLE GATT Client APIs

Functions
BLE GATT Client APIs
Bluetooth APIs

BLE GATT Client APIs. More...

Functions

tls_bt_status_t | tls_ble_client_app_init (tls_ble_callback_t callback)
initialize the btif_gatt_client callback function More...
tls_bt_status_t | tls_ble_client_app_deinit (void)
free the tls_ble_callback_t pointer More...
tls_bt_status_t | tls_ble_client_app_register (tls_bt_uuid_t *uuid)
this function is called to register client application More...
tls_bt_status_t | tls_ble_client_app_unregister (uint8_t client_if)
this function is called to unregister client application More...
tls_bt_status_t | tls_ble_client_connect (uint8_t client_if, const tls_bt_addr_t *bd_addr, uint8_t is_direct, int transport)
this function is called to open an BLE connection to a remote device or add a background auto connection More...
tls_bt_status_t | tls_ble_client_disconnect (uint8_t client_if, const tls_bt_addr_t *bd_addr, int conn_id)
this function is called to disconnect with gatt server connection More...
tls_bt_status_t | tls_ble_client_listen (uint8_t client_if, uint8_t start)
start or stop advertisements to listen for incoming connections More...
tls_bt_status_t | tls_ble_client_refresh (uint8_t client_if, const tls_bt_addr_t *bd_addr)
clear the attribute cache for a given device More...
tls_bt_status_t | tls_ble_client_search_service (uint16_t conn_id, tls_bt_uuid_t *filter_uuid)
enumerate all GATT services on a connected device More...
tls_bt_status_t | tls_ble_client_write_characteristic (uint16_t conn_id, uint16_t handle, int write_type, int len, int auth_req, char *p_value)
write a remote characteristic More...
tls_bt_status_t | tls_ble_client_read_characteristic (uint16_t conn_id, uint16_t handle, int auth_req)
read a characteristic on a remote device More...
tls_bt_status_t | tls_ble_client_read_descriptor (uint16_t conn_id, uint16_t handle, int auth_req)
read the descriptor for a given characteristic More...
tls_bt_status_t | tls_ble_client_write_descriptor (uint16_t conn_id, uint16_t handle, int write_type, int len, int auth_req, char *p_value)
write a remote descriptor for a given characteristic More...
tls_bt_status_t | tls_ble_client_execute_write (uint16_t conn_id, int execute)
execute a prepared write operation More...
tls_bt_status_t | tls_ble_client_register_for_notification (int client_if, const tls_bt_addr_t *bd_addr, uint16_t handle, uint16_t conn_id)
Register to receive notifications or indications for a given characteristic. More...
tls_bt_status_t | tls_ble_client_deregister_for_notification (int client_if, const tls_bt_addr_t *bd_addr, uint16_t handle, uint16_t conn_id)
deregister a previous request for notifications/indications More...
tls_bt_status_t | tls_ble_client_configure_mtu (uint16_t conn_id, uint16_t mtu)
configure the MTU for a given connection More...
tls_bt_status_t | tls_ble_client_get_gatt_db (uint16_t conn_id)
get gatt db content More...

Detailed Description

BLE GATT Client APIs.

Function Documentation

◆ tls_ble_client_app_deinit()

tls_bt_status_t tls_ble_client_app_deinit ( void )

free the tls_ble_callback_t pointer

Parameters
None
Return values

◆ tls_ble_client_app_init()

tls_bt_status_t tls_ble_client_app_init ( tls_ble_callback_t callback )

initialize the btif_gatt_client callback function

Parameters
[in] *p_callback pointer on callback function
Return values

◆ tls_ble_client_app_register()

tls_bt_status_t tls_ble_client_app_register ( tls_bt_uuid_t * uuid )

this function is called to register client application

Parameters
[in] *uuid pointer on uuid
Return values

◆ tls_ble_client_app_unregister()

tls_bt_status_t tls_ble_client_app_unregister ( uint8_t client_if )

this function is called to unregister client application

Parameters
[in] client_if gatt client access interface
Return values

◆ tls_ble_client_configure_mtu()

tls_bt_status_t tls_ble_client_configure_mtu | ( | uint16_t | conn_id,
 |  | uint16_t | mtu
 | ) |  |

configure the MTU for a given connection

Parameters
[in] | conn_id | connection indicator return value when connected
[in] | mtu | the max transmit unit of this connection
Return values

◆ tls_ble_client_connect()

tls_bt_status_t tls_ble_client_connect | ( | uint8_t | client_if,
 |  | const tls_bt_addr_t * | bd_addr,
 |  | uint8_t | is_direct,
 |  | int | transport
 | ) |  |

this function is called to open an BLE connection to a remote device or add a background auto connection

Parameters
[in] | client_if | gatt client access interface
[in] | *bd_addr | remote device bluetooth device address
[in] | is_direct | direct connection or background auto connection
[in] | transport | specific BLE/BR-EDR/mixed
Return values

◆ tls_ble_client_deregister_for_notification()

tls_bt_status_t tls_ble_client_deregister_for_notification | ( | int | client_if,
 |  | const tls_bt_addr_t * | bd_addr,
 |  | uint16_t | handle,
 |  | uint16_t | conn_id
 | ) |  |

deregister a previous request for notifications/indications

Parameters
[in] | client_if | gatt client access interface
[in] | *bd_addr | the target server address
[in] | handle | the attribute handle of characteristic
Return values

◆ tls_ble_client_disconnect()

tls_bt_status_t tls_ble_client_disconnect | ( | uint8_t | client_if,
 |  | const tls_bt_addr_t * | bd_addr,
 |  | int | conn_id
 | ) |  |

this function is called to disconnect with gatt server connection

Parameters
[in] | client_if | gatt client access interface
[in] | *bd_addr | remote device bluetooth device address
[in] | conn_id | connection ID to be closed
Return values

◆ tls_ble_client_execute_write()

tls_bt_status_t tls_ble_client_execute_write | ( | uint16_t | conn_id,
 |  | int | execute
 | ) |  |

execute a prepared write operation

Parameters
[in] | conn_id | connection indicator return value when connected
[in] | execute | execute or cancel
Return values

◆ tls_ble_client_get_gatt_db()

tls_bt_status_t tls_ble_client_get_gatt_db ( uint16_t conn_id )

get gatt db content

Parameters
[in] conn_id connection indicator return value when connected
Return values

◆ tls_ble_client_listen()

tls_bt_status_t tls_ble_client_listen | ( | uint8_t | client_if,
 |  | uint8_t | start
 | ) |  |

start or stop advertisements to listen for incoming connections

Parameters
[in] | client_if | gatt client access interface
[in] | start | start: 1; stop 0
Return values

◆ tls_ble_client_read_characteristic()

tls_bt_status_t tls_ble_client_read_characteristic | ( | uint16_t | conn_id,
 |  | uint16_t | handle,
 |  | int | auth_req
 | ) |  |

read a characteristic on a remote device

Parameters
[in] | conn_id | connection indicator return value when connected
[in] | handle | the character attribute handle
[in] | auth_req | authentication request
Return values

◆ tls_ble_client_read_descriptor()

tls_bt_status_t tls_ble_client_read_descriptor | ( | uint16_t | conn_id,
 |  | uint16_t | handle,
 |  | int | auth_req
 | ) |  |

read the descriptor for a given characteristic

Parameters
[in] | conn_id | connection indicator return value when connected
[in] | handle | the character attribute handle
[in] | auth_req | authentication request
Return values

◆ tls_ble_client_refresh()

tls_bt_status_t tls_ble_client_refresh | ( | uint8_t | client_if,
 |  | const tls_bt_addr_t * | bd_addr
 | ) |  |

clear the attribute cache for a given device

Parameters
[in] | client_if | gatt client access interface
[in] | *bd_addr | remote device address
Return values

◆ tls_ble_client_register_for_notification()

tls_bt_status_t tls_ble_client_register_for_notification | ( | int | client_if,
 |  | const tls_bt_addr_t * | bd_addr,
 |  | uint16_t | handle,
 |  | uint16_t | conn_id
 | ) |  |

Register to receive notifications or indications for a given characteristic.

Parameters
[in] | client_if | gatt client access interface
[in] | *bd_addr | the target server address
[in] | handle | the attribute handle of characteristic
[in] | conn_id | the connection id
Return values

◆ tls_ble_client_search_service()

tls_bt_status_t tls_ble_client_search_service | ( | uint16_t | conn_id,
 |  | tls_bt_uuid_t * | filter_uuid
 | ) |  |

enumerate all GATT services on a connected device

Parameters
[in] | conn_id | connection indicator return value when connected
[in] | *filter_uuid | filter this uuid
Return values

◆ tls_ble_client_write_characteristic()

tls_bt_status_t tls_ble_client_write_characteristic | ( | uint16_t | conn_id,
 |  | uint16_t | handle,
 |  | int | write_type,
 |  | int | len,
 |  | int | auth_req,
 |  | char * | p_value
 | ) |  |

write a remote characteristic

Parameters
[in] | conn_id | connection indicator return value when connected
[in] | handle | the character attribute handle
[in] | write_type | the type of attribute write operation
[in] | len | length of the value to be written
[in] | auth_req | authentication request
[in] | *p_value | the value to be written
Return values

◆ tls_ble_client_write_descriptor()

tls_bt_status_t tls_ble_client_write_descriptor | ( | uint16_t | conn_id,
 |  | uint16_t | handle,
 |  | int | write_type,
 |  | int | len,
 |  | int | auth_req,
 |  | char * | p_value
 | ) |  |

write a remote descriptor for a given characteristic

Parameters
[in] | conn_id | connection indicator return value when connected
[in] | handle | the character attribute handle
[in] | write_type | the type of attribute write operation
[in] | len | length of the value to be written
[in] | auth_req | authentication request
[in] | *p_value | the value to be written
Return values


W800 SDK APIs: BLE GATT Server APIs

Functions
BLE GATT Server APIs
Bluetooth APIs

BLE GATT Server APIs. More...

Functions

tls_bt_status_t | tls_ble_server_app_init (tls_ble_callback_t callback)
initialize the btif_gatt_server callback function More...
tls_bt_status_t | tls_ble_server_app_deinit ()
tls_bt_status_t | tls_ble_server_app_register (tls_bt_uuid_t *uuid)
this function is called to register server application More...
tls_bt_status_t | tls_ble_server_app_unregister (uint8_t server_if)
this function is called to unregister server application More...
tls_bt_status_t | tls_ble_server_add_service (uint8_t server_if, int inst_id, int primay, tls_bt_uuid_t *uuid, int num_handles)
create a new service More...
tls_bt_status_t | tls_ble_server_add_characteristic (uint8_t server_if, uint16_t service_handle, tls_bt_uuid_t *uuid, int properties, int permission)
add a characteristic to a service More...
tls_bt_status_t | tls_ble_server_add_descriptor (uint8_t server_if, uint16_t service_handle, tls_bt_uuid_t *uuid, int permissions)
add a descriptor to a given service More...
tls_bt_status_t | tls_ble_server_start_service (uint8_t server_if, uint16_t service_handle, int transport)
starts a local service More...
tls_bt_status_t | tls_ble_server_stop_service (uint8_t server_if, uint16_t service_handle)
stop a local service More...
tls_bt_status_t | tls_ble_server_delete_service (uint8_t server_if, uint16_t service_handle)
delete a local service More...
tls_bt_status_t | tls_ble_server_connect (uint8_t server_if, const tls_bt_addr_t *bd_addr, uint8_t is_direct, int transport)
create a connection to a remote peripheral More...
tls_bt_status_t | tls_ble_server_disconnect (uint8_t server_if, const tls_bt_addr_t *bd_addr, uint16_t conn_id)
disconnect an established connection or cancel a pending one More...
tls_bt_status_t | tls_ble_server_send_indication (uint8_t server_if, uint16_t attribute_handle, uint16_t conn_id, int len, int confirm, char *p_value)
send value indication to a remote device More...
tls_bt_status_t | tls_ble_server_send_response (uint16_t conn_id, uint32_t trans_id, uint8_t status, int offset, uint16_t attr_handle, int auth_req, uint8_t *p_value, int len)
send a response to a read/write operation More...

Detailed Description

BLE GATT Server APIs.

Function Documentation

◆ tls_ble_server_add_characteristic()

tls_bt_status_t tls_ble_server_add_characteristic | ( | uint8_t | server_if,
 |  | uint16_t | service_handle,
 |  | tls_bt_uuid_t * | uuid,
 |  | int | properties,
 |  | int | permission
 | ) |  |

add a characteristic to a service

Parameters
[in] | server_if | the gatt server access interface created by app register
[in] | service_handle | the handle of this service assigned when creating a service
[in] | *uuid | the id property of this characteristic
[in] | properties | access properties
[in] | permission | access permission
Return values

◆ tls_ble_server_add_descriptor()

tls_bt_status_t tls_ble_server_add_descriptor | ( | uint8_t | server_if,
 |  | uint16_t | service_handle,
 |  | tls_bt_uuid_t * | uuid,
 |  | int | permissions
 | ) |  |

add a descriptor to a given service

Parameters
[in] | server_if | the gatt server access interface created by app register
[in] | service_handle | the handle of this service assigned when creating a service
[in] | *uuid | the id property of this characteristic
[in] | permission | access permission
Return values

◆ tls_ble_server_add_service()

tls_bt_status_t tls_ble_server_add_service | ( | uint8_t | server_if,
 |  | int | inst_id,
 |  | int | primay,
 |  | tls_bt_uuid_t * | uuid,
 |  | int | num_handles
 | ) |  |

create a new service

Parameters
[in] | server_if | the gatt server access interface created by app register
[in] | inst_id | instance identifier of this service
[in] | primay | is primary or not service
[in] | *uuid | the id property of this service
[in] | num_handles | number of handle requested for this service
Return values

◆ tls_ble_server_app_init()

tls_bt_status_t tls_ble_server_app_init ( tls_ble_callback_t callback )

initialize the btif_gatt_server callback function

Parameters
[in] *p_callback pointer on callback function
Return values

◆ tls_ble_server_app_register()

tls_bt_status_t tls_ble_server_app_register ( tls_bt_uuid_t * uuid )

this function is called to register server application

Parameters
[in] *uuid pointer on uuid
Return values

◆ tls_ble_server_app_unregister()

tls_bt_status_t tls_ble_server_app_unregister ( uint8_t server_if )

this function is called to unregister server application

Parameters
[in] server_if assigned after app registering
Return values

◆ tls_ble_server_connect()

tls_bt_status_t tls_ble_server_connect | ( | uint8_t | server_if,
 |  | const tls_bt_addr_t * | bd_addr,
 |  | uint8_t | is_direct,
 |  | int | transport
 | ) |  |

create a connection to a remote peripheral

Parameters
[in] | server_if | the gatt server access interface created by app register
[in] | *bd_addr | the remote device address
[in] | is_direct | true direct connection; false: background auto connection
[in] | transport | tranport type, BLE/BR-EDR/MIXED
Return values

◆ tls_ble_server_delete_service()

tls_bt_status_t tls_ble_server_delete_service | ( | uint8_t | server_if,
 |  | uint16_t | service_handle
 | ) |  |

delete a local service

Parameters
[in] | server_if | the gatt server access interface created by app register
[in] | service_handle | the handle of this service assigned when creating a service
Return values

◆ tls_ble_server_disconnect()

tls_bt_status_t tls_ble_server_disconnect | ( | uint8_t | server_if,
 |  | const tls_bt_addr_t * | bd_addr,
 |  | uint16_t | conn_id
 | ) |  |

disconnect an established connection or cancel a pending one

Parameters
[in] | server_if | the gatt server access interface created by app register
[in] | *bd_addr | the remote device address
[in] | conn_id | connection id create when connection established
Return values

◆ tls_ble_server_send_indication()

tls_bt_status_t tls_ble_server_send_indication | ( | uint8_t | server_if,
 |  | uint16_t | attribute_handle,
 |  | uint16_t | conn_id,
 |  | int | len,
 |  | int | confirm,
 |  | char * | p_value
 | ) |  |

send value indication to a remote device

Parameters
[in] | server_if | the gatt server access interface created by app register
[in] | attribute_handle | the handle of characteristic
[in] | conn_id | connection id create when connection established
[in] | len | the length of value to be sent
[in] | confirm | need the remote device acked after receive the message , normally Whether a confirmation is required. FALSE sends a GATT notification, TRUE sends a GATT indication
[in] | *p_value | the value to be written
Return values

◆ tls_ble_server_send_response()

tls_bt_status_t tls_ble_server_send_response | ( | uint16_t | conn_id,
 |  | uint32_t | trans_id,
 |  | uint8_t | status,
 |  | int | offset,
 |  | uint16_t | attr_handle,
 |  | int | auth_req,
 |  | uint8_t * | p_value,
 |  | int | len
 | ) |  |

send a response to a read/write operation

Parameters
[in] | conn_id | connection id create when connection established
[in] | trans_id | the transation identifier
[in] | status | TODO:
[in] | offset | the offset the fragmented value
[in] | attr_handle | the attribute handle
[in] | auth_req | access properties
[in] | *p_value | the value to be written
[in] | len | the length of value to be written
Return values

◆ tls_ble_server_start_service()

tls_bt_status_t tls_ble_server_start_service | ( | uint8_t | server_if,
 |  | uint16_t | service_handle,
 |  | int | transport
 | ) |  |

starts a local service

Parameters
[in] | server_if | the gatt server access interface created by app register
[in] | service_handle | the handle of this service assigned when creating a service
[in] | transport | tranport type, BLE/BR-EDR/MIXED
Return values

◆ tls_ble_server_stop_service()

tls_bt_status_t tls_ble_server_stop_service | ( | uint8_t | server_if,
 |  | uint16_t | service_handle
 | ) |  |

stop a local service

Parameters
[in] | server_if | the gatt server access interface created by app register
[in] | service_handle | the handle of this service assigned when creating a service
Return values


W800 SDK APIs: BT Host APIs

Functions
BT Host APIs
Bluetooth APIs

BT Host APIs. More...

Functions

tls_bt_status_t | tls_bt_pin_reply (const tls_bt_addr_t *bd_addr, uint8_t accept, uint8_t pin_len, tls_bt_pin_code_t *pin_code)
reply the pin request More...
tls_bt_status_t | tls_bt_ssp_reply (const tls_bt_addr_t *bd_addr, tls_bt_ssp_variant_t variant, uint8_t accept, uint32_t passkey)
reply the ssp request More...
tls_bt_status_t | tls_bt_set_adapter_property (const tls_bt_property_t *property, uint8_t update_to_flash)
set the adapter property More...
tls_bt_status_t | tls_bt_get_adapter_property (tls_bt_property_type_t type)
get the adapter property More...
tls_bt_status_t | tls_bt_start_discovery (void)
tls_bt_status_t | tls_bt_cancel_discovery (void)
tls_bt_status_t | tls_bt_create_bond (const tls_bt_addr_t *bd_addr, int transport)
tls_bt_status_t | tls_bt_cancel_bond (const tls_bt_addr_t *bd_addr)
tls_bt_status_t | tls_bt_remove_bond (const tls_bt_addr_t *bd_addr)
tls_bt_status_t | tls_bt_host_cleanup (void)
tls_bt_status_t | tls_bt_enable (tls_bt_host_callback_t callback, tls_bt_hci_if_t *p_hci_if, tls_bt_log_level_t log_level)
tls_bt_status_t tls_bt_disable ()

Detailed Description

BT Host APIs.

Function Documentation

◆ tls_bt_cancel_bond()

tls_bt_status_t tls_bt_cancel_bond ( const tls_bt_addr_t * bd_addr )
Parameters
[in] *bd_addr
Returns
tls_bt_status_t
Note
None

◆ tls_bt_cancel_discovery()

tls_bt_status_t tls_bt_cancel_discovery ( void )
Parameters
None
Returns
tls_bt_status_t
Note
None

◆ tls_bt_create_bond()

tls_bt_status_t tls_bt_create_bond | ( | const tls_bt_addr_t * | bd_addr,
 |  | int | transport
 | ) |  |
Parameters
[in] | *bd_addr
[in] | transport
Returns
tls_bt_status_t
Note
None

◆ tls_bt_disable()

tls_bt_status_t tls_bt_disable ( )
Parameters
None
Returns
tls_bt_status_t
Note
None

◆ tls_bt_enable()

tls_bt_status_t tls_bt_enable | ( | tls_bt_host_callback_t | callback,
 |  | tls_bt_hci_if_t * | p_hci_if,
 |  | tls_bt_log_level_t | log_level
 | ) |  |
Parameters
[in] | callback
[in] | *p_hci_if
[in] | log_level
Returns
tls_bt_status_t
Note
None

◆ tls_bt_get_adapter_property()

tls_bt_status_t tls_bt_get_adapter_property ( tls_bt_property_type_t type )

get the adapter property

Parameters
[in] type tls_bt_property_type_t
Returns
tls_bt_status_t
Note
None

◆ tls_bt_host_cleanup()

tls_bt_status_t tls_bt_host_cleanup ( void )
Parameters
None
Returns
tls_bt_status_t
Note
None

◆ tls_bt_pin_reply()

tls_bt_status_t tls_bt_pin_reply | ( | const tls_bt_addr_t * | bd_addr,
 |  | uint8_t | accept,
 |  | uint8_t | pin_len,
 |  | tls_bt_pin_code_t * | pin_code
 | ) |  |

reply the pin request

Parameters
[in] | *bd_addr | remote device address
[in] | accept
[in] | pin_len
[in] | *pin_code
Returns
tls_bt_status_t
Note
None

◆ tls_bt_remove_bond()

tls_bt_status_t tls_bt_remove_bond ( const tls_bt_addr_t * bd_addr )
Parameters
[in] *bd_addr
Returns
tls_bt_status_t
Note
None

◆ tls_bt_set_adapter_property()

tls_bt_status_t tls_bt_set_adapter_property | ( | const tls_bt_property_t * | property,
 |  | uint8_t | update_to_flash
 | ) |  |

set the adapter property

Parameters
[in] | *property | remote device address
[in] | update_to_flash | save the property to flash or not
Returns
tls_bt_status_t
Note
None

◆ tls_bt_ssp_reply()

tls_bt_status_t tls_bt_ssp_reply | ( | const tls_bt_addr_t * | bd_addr,
 |  | tls_bt_ssp_variant_t | variant,
 |  | uint8_t | accept,
 |  | uint32_t | passkey
 | ) |  |

reply the ssp request

Parameters
[in] | *bd_addr | remote device address
[in] | variant | tls_bt_ssp_variant_t
[in] | accept
[in] | passkey
Returns
tls_bt_status_t
Note
None

◆ tls_bt_start_discovery()

tls_bt_status_t tls_bt_start_discovery ( void )
Parameters
None
Returns
tls_bt_status_t
Note
None


W800 SDK APIs: BT Controller APIs

Functions
BT Controller APIs
Bluetooth APIs

BT Controller APIs. More...

Functions

tls_bt_status_t | tls_bt_ctrl_enable (tls_bt_hci_if_t *p_hci_if, tls_bt_log_level_t log_level)
enable the bluetooth controller stack More...
tls_bt_status_t | tls_bt_ctrl_disable (void)
disable the bluetooth controller stack More...
tls_bt_status_t | tls_ble_set_tx_power (tls_ble_power_type_t power_type, int8_t power_level_index)
configure the ble emit power of different ble handle type More...
int8_t | tls_ble_get_tx_power (tls_ble_power_type_t power_type)
get the ble emit power of different ble handle type More...
tls_bt_status_t | tls_bredr_set_tx_power (int8_t min_power_level, int8_t max_power_level)
configure the classic/enhanced bluetooth transmit power More...
tls_bt_status_t | tls_bredr_get_tx_power (int8_t *min_power_level, int8_t *max_power_level)
get the classic/enhanced bluetooth transmit power level More...
tls_bt_status_t | tls_bredr_sco_datapath_set (tls_sco_data_path_t data_path)
configure the voice output path More...
tls_bt_ctrl_status_t | tls_bt_controller_get_status (void)
get controller stack status More...
tls_bt_status_t | tls_bt_vuart_host_send_packet (uint8_t *data, uint16_t len)
this function receive the hci message from host hci_h4 inteface More...
tls_bt_status_t | tls_bt_ctrl_if_register (const tls_bt_host_if_t *p_host_if)
this function register the host stack receive message function and indication the controller receive hci command avaiable More...
tls_bt_status_t tls_bt_ctrl_if_unregister ()
this function unregister the host stack receive message function and indication the controller receive hci command avaiable More...
tls_bt_status_t | tls_bt_ctrl_sleep (bool enable)
this function configure the controller enter into sleep mode when controller is in idle mode More...
bool | tls_bt_ctrl_is_sleep (void)
this function look up the controller is in sleep mode or not More...
tls_bt_status_t | tls_bt_ctrl_wakeup (void)
this function wake up the controller, in other words exit sleep mode More...
bool | tls_bt_vuart_host_check_send_available ()
this function check controller can handle hci commands yes or no More...
tls_bt_status_t exit_bt_test_mode ()
this function exit bluetooth test mode More...
tls_bt_status_t | enable_bt_test_mode (tls_bt_hci_if_t *p_hci_if)
this function enable bluetooth test mode More...
void | tls_rf_bt_mode (uint8_t enable)
this function enable rf to bluetooth mode More...
tls_bt_status_t | tls_bt_set_mesh_mode (uint8_t enable)
this function enable controller to running in mesh mode or not More...
tls_bt_status_t | tls_bt_register_sleep_callback (tls_bt_controller_sleep_enter_func_ptr sleep_enter, tls_bt_controller_sleep_exit_func_ptr sleep_exit)
this function register callback function when controller entering or exiting sleep mode More...
tls_bt_status_t | tls_bt_register_pending_process_callback (tls_bt_app_pending_process_func_ptr process_ptr)
this function register blocking operation function(eg. flash read/write). More...

Detailed Description

BT Controller APIs.

Function Documentation

◆ enable_bt_test_mode()

tls_bt_status_t enable_bt_test_mode ( tls_bt_hci_if_t * p_hci_if )

this function enable bluetooth test mode

Parameters
[in] p_hci_if,specific the uart port property
Return values

◆ exit_bt_test_mode()

tls_bt_status_t exit_bt_test_mode ( )

this function exit bluetooth test mode

Parameters
None
Return values

◆ tls_ble_get_tx_power()

int8_t tls_ble_get_tx_power ( tls_ble_power_type_t power_type )

get the ble emit power of different ble handle type

Parameters
[in] power_type tls_ble_power_type_t
Return values
power value db
Note
power_type, supports TLS_BLE_PWR_TYPE_DEFAULT only.

◆ tls_ble_set_tx_power()

tls_bt_status_t tls_ble_set_tx_power | ( | tls_ble_power_type_t | power_type,
 |  | int8_t | power_level_index
 | ) |  |

configure the ble emit power of different ble handle type

Parameters
[in] | power_type | tls_ble_power_type_t
[in] | power_level_index | [1,2,3,4,5] map to[1,4,7,10,13]dBm
Return values

◆ tls_bredr_get_tx_power()

tls_bt_status_t tls_bredr_get_tx_power | ( | int8_t * | min_power_level,
 |  | int8_t * | max_power_level
 | ) |  |

get the classic/enhanced bluetooth transmit power level

Parameters
[in] | *min_power_level | pointer on min_power_level
[in] | *max_power_level | pointer on max_power_level
Return values

◆ tls_bredr_sco_datapath_set()

tls_bt_status_t tls_bredr_sco_datapath_set ( tls_sco_data_path_t data_path )

configure the voice output path

Parameters
[in] data_path tls_sco_data_path_t
Return values

◆ tls_bredr_set_tx_power()

tls_bt_status_t tls_bredr_set_tx_power | ( | int8_t | min_power_level,
 |  | int8_t | max_power_level
 | ) |  |

configure the classic/enhanced bluetooth transmit power

Parameters
[in] | min_power_level | power level[1,13]dBm
[in] | max_power_level | power level[1,13]dBm
Return values

◆ tls_bt_controller_get_status()

tls_bt_ctrl_status_t tls_bt_controller_get_status ( void )

get controller stack status

Parameters
None
Return values

◆ tls_bt_ctrl_disable()

tls_bt_status_t tls_bt_ctrl_disable ( void )

disable the bluetooth controller stack

Parameters
None
Returns
tls_bt_status_t
Note
None

◆ tls_bt_ctrl_enable()

tls_bt_status_t tls_bt_ctrl_enable | ( | tls_bt_hci_if_t * | p_hci_if,
 |  | tls_bt_log_level_t | log_level
 | ) |  |

enable the bluetooth controller stack

Parameters
[in] | *p_hci_if | pointer on uart property
[in] | log_level | tls_bt_log_level_t
Return values

◆ tls_bt_ctrl_if_register()

tls_bt_status_t tls_bt_ctrl_if_register ( const tls_bt_host_if_t * p_host_if )

this function register the host stack receive message function and indication the controller receive hci command avaiable

Parameters
[in] *p_host_if tls_bt_host_if_t
Return values

◆ tls_bt_ctrl_if_unregister()

tls_bt_status_t tls_bt_ctrl_if_unregister ( )

this function unregister the host stack receive message function and indication the controller receive hci command avaiable

Parameters
None
Return values

◆ tls_bt_ctrl_is_sleep()

bool tls_bt_ctrl_is_sleep ( void )

this function look up the controller is in sleep mode or not

Parameters
None
Return values
TRUE sleep mode FALSE: not sleep mode
Note
None

◆ tls_bt_ctrl_sleep()

tls_bt_status_t tls_bt_ctrl_sleep ( bool enable )

this function configure the controller enter into sleep mode when controller is in idle mode

Parameters
[in] enable TRUE: enable FALSE: didsable
Return values

◆ tls_bt_ctrl_wakeup()

tls_bt_status_t tls_bt_ctrl_wakeup ( void )

this function wake up the controller, in other words exit sleep mode

Parameters
None
Return values

◆ tls_bt_register_pending_process_callback()

tls_bt_status_t tls_bt_register_pending_process_callback ( tls_bt_app_pending_process_func_ptr process_ptr )

this function register blocking operation function(eg. flash read/write).

Parameters
[in] process_ptr blocking operation function pointer
Return values
always TLS_BT_STATUS_SUCCESS;
Note
if the function is running, the system interrupt will be holded. so we have to do ti when bt is in idle state

◆ tls_bt_register_sleep_callback()

tls_bt_status_t tls_bt_register_sleep_callback | ( | tls_bt_controller_sleep_enter_func_ptr | sleep_enter,
 |  | tls_bt_controller_sleep_exit_func_ptr | sleep_exit
 | ) |  |

this function register callback function when controller entering or exiting sleep mode

Parameters
[in] sleep_enter,sleep starting callback;sleep_exit, sleep exiting callback
Return values
TLS_BT_STATUS_SUCCESS or TLS_BT_STATUS_UNSUPPORTED;
Note
None

◆ tls_bt_set_mesh_mode()

tls_bt_status_t tls_bt_set_mesh_mode ( uint8_t enable )

this function enable controller to running in mesh mode or not

Parameters
[in] 1,mesh mode, 0 normal mode
Return values
None
Note
None

◆ tls_bt_vuart_host_check_send_available()

bool tls_bt_vuart_host_check_send_available ( )

this function check controller can handle hci commands yes or no

Parameters
None
Return values

◆ tls_bt_vuart_host_send_packet()

tls_bt_status_t tls_bt_vuart_host_send_packet | ( | uint8_t * | data,
 |  | uint16_t | len
 | ) |  |

this function receive the hci message from host hci_h4 inteface

Parameters
[in] | *data | hci formated message
[in] | len | command length
Return values

◆ tls_rf_bt_mode()

void tls_rf_bt_mode ( uint8_t enable )

this function enable rf to bluetooth mode

Parameters
[in] 1,bluetooth mode, 0 wifi/bluetooth mode
Return values
None
Note
None


W800 SDK APIs: BT_AV_APIs

Functions
BT_AV_APIs
Bluetooth APIs

BT_AV APIs. More...

Functions

tls_bt_status_t | tls_bt_av_sink_init (tls_bt_a2dp_sink_callback_t callback)
Initializes the AV interface for sink mode. More...
tls_bt_status_t | tls_bt_av_sink_deinit (void)
Shuts down the AV sink interface and does the cleanup. More...
tls_bt_status_t | tls_bt_av_sink_connect_src (tls_bt_addr_t *bd_addr)
Establishes the AV signalling channel with the source. More...
tls_bt_status_t | tls_bt_av_sink_disconnect (tls_bt_addr_t *bd_addr)
Tears down the AV signalling channel with the source side. More...
tls_bt_status_t | tls_bt_av_src_init (tls_bt_a2dp_src_callback_t callback)
Initializes the AV interface for source mode. More...
tls_bt_status_t | tls_bt_av_src_deinit (void)
Shuts down the AV source interface and does the cleanup. More...
tls_bt_status_t | tls_bt_av_src_connect_sink (tls_bt_addr_t *bd_addr)
Establishes the AV signalling channel with the sink. More...
tls_bt_status_t | tls_bt_av_src_disconnect (tls_bt_addr_t *bd_addr)
Tears down the AV signalling channel with the sink side. More...
tls_bt_status_t | tls_btrc_init (tls_btrc_callback_t callback)
Initializes the AVRC interface. More...
tls_bt_status_t | tls_btrc_deinit (void)
Closes the AVRC interface. More...
tls_bt_status_t | tls_btrc_get_play_status_rsp (tls_btrc_play_status_t play_status, uint32_t song_len, uint32_t song_pos)
Returns the current play status. More...
tls_bt_status_t | tls_btrc_get_element_attr_rsp (uint8_t num_attr, tls_btrc_element_attr_val_t *p_attrs)
Returns the current songs' element attributes in text. More...
tls_bt_status_t | tls_btrc_register_notification_rsp (tls_btrc_event_id_t event_id, tls_btrc_notification_type_t type, tls_btrc_register_notification_t *p_param)
Response to the register notification request in text. More...
tls_bt_status_t | tls_btrc_set_volume (uint8_t volume)
Send current volume setting to remote side. More...
tls_bt_status_t | tls_btrc_ctrl_init (tls_btrc_ctrl_callback_t callback)
Initializes the AVRC ctrl interface. More...
tls_bt_status_t | tls_btrc_ctrl_deinit (void)
Closes the AVRC ctrl interface. More...
tls_bt_status_t | tls_btrc_ctrl_send_passthrough_cmd (tls_bt_addr_t *bd_addr, uint8_t key_code, uint8_t key_state)
Send Pass-Through command. More...
tls_bt_status_t | tls_btrc_ctrl_send_groupnavigation_cmd (tls_bt_addr_t *bd_addr, uint8_t key_code, uint8_t key_state)
Send group navigation command. More...
tls_bt_status_t | tls_btrc_ctrl_change_player_app_setting (tls_bt_addr_t *bd_addr, uint8_t num_attrib, uint8_t *attrib_ids, uint8_t *attrib_vals)
Set current values of Player Attributes. More...
tls_bt_status_t | tls_btrc_ctrl_set_volume_rsp (tls_bt_addr_t *bd_addr, uint8_t abs_vol, uint8_t label)
Rsp for SetAbsoluteVolume Command. More...
tls_bt_status_t | tls_btrc_ctrl_volume_change_notification_rsp (tls_bt_addr_t *bd_addr, tls_btrc_notification_type_t rsp_type, uint8_t abs_vol, uint8_t label)
Rsp for Notification of Absolute Volume. More...

Detailed Description

BT_AV APIs.

Function Documentation

◆ tls_bt_av_sink_connect_src()

tls_bt_status_t tls_bt_av_sink_connect_src ( tls_bt_addr_t * bd_addr )

Establishes the AV signalling channel with the source.

Parameters
[in] *bd_addr remote device bluetooth device address
Return values

◆ tls_bt_av_sink_deinit()

tls_bt_status_t tls_bt_av_sink_deinit ( void )

Shuts down the AV sink interface and does the cleanup.

Parameters
None
Return values

◆ tls_bt_av_sink_disconnect()

tls_bt_status_t tls_bt_av_sink_disconnect ( tls_bt_addr_t * bd_addr )

Tears down the AV signalling channel with the source side.

Parameters
[in] *bd_addr remote device bluetooth device address
Return values

◆ tls_bt_av_sink_init()

tls_bt_status_t tls_bt_av_sink_init ( tls_bt_a2dp_sink_callback_t callback )

Initializes the AV interface for sink mode.

sink realed api

Parameters
[in] callback pointer on callback function
Return values

◆ tls_bt_av_src_connect_sink()

tls_bt_status_t tls_bt_av_src_connect_sink ( tls_bt_addr_t * bd_addr )

Establishes the AV signalling channel with the sink.

Parameters
[in] *bd_addr remote device bluetooth device address
Return values

◆ tls_bt_av_src_deinit()

tls_bt_status_t tls_bt_av_src_deinit ( void )

Shuts down the AV source interface and does the cleanup.

Parameters
None
Return values

◆ tls_bt_av_src_disconnect()

tls_bt_status_t tls_bt_av_src_disconnect ( tls_bt_addr_t * bd_addr )

Tears down the AV signalling channel with the sink side.

Parameters
[in] *bd_addr remote device bluetooth device address
Return values

◆ tls_bt_av_src_init()

tls_bt_status_t tls_bt_av_src_init ( tls_bt_a2dp_src_callback_t callback )

Initializes the AV interface for source mode.

src realed api

Parameters
[in] callback pointer on callback function
Return values

◆ tls_btrc_ctrl_change_player_app_setting()

tls_bt_status_t tls_btrc_ctrl_change_player_app_setting | ( | tls_bt_addr_t * | bd_addr,
 |  | uint8_t | num_attrib,
 |  | uint8_t * | attrib_ids,
 |  | uint8_t * | attrib_vals
 | ) |  |

Set current values of Player Attributes.

Parameters
[in] | bd_addr | remote device bluetooth device address
[in] | num_attrib | couner of attributes
[in] | attrib_ids | atrribute of index indicator
[in] | attrib_vals | attribute of values
Return values

◆ tls_btrc_ctrl_deinit()

tls_bt_status_t tls_btrc_ctrl_deinit ( void )

Closes the AVRC ctrl interface.

Parameters
None
Return values

◆ tls_btrc_ctrl_init()

tls_bt_status_t tls_btrc_ctrl_init ( tls_btrc_ctrl_callback_t callback )

Initializes the AVRC ctrl interface.

btrc ctrl related api supported by now

Parameters
[in] callback pointer on callback function
Return values

◆ tls_btrc_ctrl_send_groupnavigation_cmd()

tls_bt_status_t tls_btrc_ctrl_send_groupnavigation_cmd | ( | tls_bt_addr_t * | bd_addr,
 |  | uint8_t | key_code,
 |  | uint8_t | key_state
 | ) |  |

Send group navigation command.

Parameters
[in] | bd_addr | remote device bluetooth device address
[in] | key_code | code definition of the key
[in] | key_state | key stae
Return values

◆ tls_btrc_ctrl_send_passthrough_cmd()

tls_bt_status_t tls_btrc_ctrl_send_passthrough_cmd | ( | tls_bt_addr_t * | bd_addr,
 |  | uint8_t | key_code,
 |  | uint8_t | key_state
 | ) |  |

Send Pass-Through command.

Parameters
[in] | bd_addr | remote device bluetooth device address
[in] | key_code | code definition of the key
[in] | key_state | key stae
Return values

◆ tls_btrc_ctrl_set_volume_rsp()

tls_bt_status_t tls_btrc_ctrl_set_volume_rsp | ( | tls_bt_addr_t * | bd_addr,
 |  | uint8_t | abs_vol,
 |  | uint8_t | label
 | ) |  |

Rsp for SetAbsoluteVolume Command.

Parameters
[in] | bd_addr | remote device bluetooth device address
[in] | abs_vol | the absolute volume
[in] | label | label indicator
Return values

◆ tls_btrc_ctrl_volume_change_notification_rsp()

tls_bt_status_t tls_btrc_ctrl_volume_change_notification_rsp | ( | tls_bt_addr_t * | bd_addr,
 |  | tls_btrc_notification_type_t | rsp_type,
 |  | uint8_t | abs_vol,
 |  | uint8_t | label
 | ) |  |

Rsp for Notification of Absolute Volume.

Parameters
[in] | bd_addr | remote device bluetooth device address
[in] | rsp_type | interim or changed
[in] | abs_vol | the absolute volume value
[in] | label | label indicator
Return values

◆ tls_btrc_deinit()

tls_bt_status_t tls_btrc_deinit ( void )

Closes the AVRC interface.

Parameters
None
Return values

◆ tls_btrc_get_element_attr_rsp()

tls_bt_status_t tls_btrc_get_element_attr_rsp | ( | uint8_t | num_attr,
 |  | tls_btrc_element_attr_val_t * | p_attrs
 | ) |  |

Returns the current songs' element attributes in text.

Parameters
[in] | num_attr | counter of song`s element attributes
[in] | p_attrs | pointer of element attributes
Return values

◆ tls_btrc_get_play_status_rsp()

tls_bt_status_t tls_btrc_get_play_status_rsp | ( | tls_btrc_play_status_t | play_status,
 |  | uint32_t | song_len,
 |  | uint32_t | song_pos
 | ) |  |

Returns the current play status.

Parameters
[in] | tls_btrc_play_status_t | stopped, playing, paused...
[in] | song_len | seconds of the song
[in] | song_pos | played seconds of the song
Return values

◆ tls_btrc_init()

tls_bt_status_t tls_btrc_init ( tls_btrc_callback_t callback )

Initializes the AVRC interface.

btrc related api supported by now

Parameters
[in] callback pointer on callback function
Return values

◆ tls_btrc_register_notification_rsp()

tls_bt_status_t tls_btrc_register_notification_rsp | ( | tls_btrc_event_id_t | event_id,
 |  | tls_btrc_notification_type_t | type,
 |  | tls_btrc_register_notification_t * | p_param
 | ) |  |

Response to the register notification request in text.

Parameters
[in] | event_id | play_status, track or play_pos changed
[in] | type | notification type
[in] | p_param | pointer to details of notification structer
Return values

◆ tls_btrc_set_volume()

tls_bt_status_t tls_btrc_set_volume ( uint8_t volume )

Send current volume setting to remote side.

Parameters
[in] volue Should be in the range 0-127. bit7 is reseved and cannot be set
Return values


W800 SDK APIs: BT_HF_CLIENT_APIs

Functions
BT_HF_CLIENT_APIs
Bluetooth APIs

BT_HF_CLIENT APIs. More...

Functions

tls_bt_status_t | tls_bt_hf_client_init (tls_bthf_client_callback_t callback)
initializes the hf client interface More...
tls_bt_status_t | tls_bt_hf_client_deinit (void)
Closes the HF client interface. More...
tls_bt_status_t | tls_bt_hf_client_connect (tls_bt_addr_t *bd_addr)
connect to audio gateway More...
tls_bt_status_t | tls_bt_hf_client_disconnect (tls_bt_addr_t *bd_addr)
disconnect from audio gateway More...
tls_bt_status_t | tls_bt_hf_client_connect_audio (tls_bt_addr_t *bd_addr)
create an audio connection More...
tls_bt_status_t | tls_bt_hf_client_disconnect_audio (tls_bt_addr_t *bd_addr)
close the audio connection More...
tls_bt_status_t | tls_bt_hf_client_start_voice_recognition (void)
start voice recognition More...
tls_bt_status_t | tls_bt_hf_client_stop_voice_recognition (void)
stop voice recognition More...
tls_bt_status_t | tls_bt_hf_client_volume_control (tls_bthf_client_volume_type_t type, int volume)
volume control More...
tls_bt_status_t | tls_bt_hf_client_dial (const char *number)
place a call More...
tls_bt_status_t | tls_bt_hf_client_dial_memory (int location)
place a call with number specified by location (speed dial) More...
tls_bt_status_t | tls_bt_hf_client_handle_call_action (tls_bthf_client_call_action_t action, int idx)
handle specified call related action More...
tls_bt_status_t | tls_bt_hf_client_query_current_calls (void)
query list of current calls More...
tls_bt_status_t | tls_bt_hf_client_query_current_operator_name (void)
query current selected operator name More...
tls_bt_status_t | tls_bt_hf_client_retrieve_subscriber_info (void)
retrieve subscriber number information More...
tls_bt_status_t | tls_bt_hf_client_send_dtmf (char code)
send dtmf More...
tls_bt_status_t | tls_bt_hf_client_request_last_voice_tag_number (void)
Request number from AG for VR purposes. More...
tls_bt_status_t | tls_bt_hf_client_send_at_cmd (int cmd, int val1, int val2, const char *arg)
Send requested AT command to remote device. More...
tls_bt_status_t | tls_bt_hf_client_send_audio (tls_bt_addr_t *bd_addr, uint8_t *p_data, uint16_t length)
Send audio to audio gateway. More...

Detailed Description

BT_HF_CLIENT APIs.

Function Documentation

◆ tls_bt_hf_client_connect()

tls_bt_status_t tls_bt_hf_client_connect ( tls_bt_addr_t * bd_addr )

connect to audio gateway

Parameters
[in] *bd_addr remote device bluetooth device address
Return values

◆ tls_bt_hf_client_connect_audio()

tls_bt_status_t tls_bt_hf_client_connect_audio ( tls_bt_addr_t * bd_addr )

create an audio connection

Parameters
[in] *bd_addr remote device bluetooth device address
Return values

◆ tls_bt_hf_client_deinit()

tls_bt_status_t tls_bt_hf_client_deinit ( void )

Closes the HF client interface.

Parameters
None
Return values

◆ tls_bt_hf_client_dial()

tls_bt_status_t tls_bt_hf_client_dial ( const char * number )

place a call

Parameters
[in] number phone number to be called
Return values

◆ tls_bt_hf_client_dial_memory()

tls_bt_status_t tls_bt_hf_client_dial_memory ( int location )

place a call with number specified by location (speed dial)

Parameters
[in] location
Return values

◆ tls_bt_hf_client_disconnect()

tls_bt_status_t tls_bt_hf_client_disconnect ( tls_bt_addr_t * bd_addr )

disconnect from audio gateway

Parameters
[in] *bd_addr remote device bluetooth device address
Return values

◆ tls_bt_hf_client_disconnect_audio()

tls_bt_status_t tls_bt_hf_client_disconnect_audio ( tls_bt_addr_t * bd_addr )

close the audio connection

Parameters
[in] *bd_addr remote device bluetooth device address
Return values

◆ tls_bt_hf_client_handle_call_action()

tls_bt_status_t tls_bt_hf_client_handle_call_action | ( | tls_bthf_client_call_action_t | action,
 |  | int | idx
 | ) |  |

handle specified call related action

Parameters
[in] | action | call action
[in] | idx | index indicator
Return values

◆ tls_bt_hf_client_init()

tls_bt_status_t tls_bt_hf_client_init ( tls_bthf_client_callback_t callback )

initializes the hf client interface

Parameters
[in] callback pointer on callback function
Return values

◆ tls_bt_hf_client_query_current_calls()

tls_bt_status_t tls_bt_hf_client_query_current_calls ( void )

query list of current calls

Parameters
[in] None
Return values

◆ tls_bt_hf_client_query_current_operator_name()

tls_bt_status_t tls_bt_hf_client_query_current_operator_name ( void )

query current selected operator name

Parameters
[in] None
Return values

◆ tls_bt_hf_client_request_last_voice_tag_number()

tls_bt_status_t tls_bt_hf_client_request_last_voice_tag_number ( void )

Request number from AG for VR purposes.

Parameters
[in] None
Return values

◆ tls_bt_hf_client_retrieve_subscriber_info()

tls_bt_status_t tls_bt_hf_client_retrieve_subscriber_info ( void )

retrieve subscriber number information

Parameters
[in] None
Return values

◆ tls_bt_hf_client_send_at_cmd()

tls_bt_status_t tls_bt_hf_client_send_at_cmd | ( | int | cmd,
 |  | int | val1,
 |  | int | val2,
 |  | const char * | arg
 | ) |  |

Send requested AT command to remote device.

Parameters
[in] | cmd
[in] | val1
[in] | val2
[in] | arg
Return values

◆ tls_bt_hf_client_send_audio()

tls_bt_status_t tls_bt_hf_client_send_audio | ( | tls_bt_addr_t * | bd_addr,
 |  | uint8_t * | p_data,
 |  | uint16_t | length
 | ) |  |

Send audio to audio gateway.

Parameters
[in] | bd_addr | bluetooth address of audio gateway
[in] | p_data | audio data
[in] | length | audio length
Return values

◆ tls_bt_hf_client_send_dtmf()

tls_bt_status_t tls_bt_hf_client_send_dtmf ( char code )

send dtmf

Parameters
[in] code number code
Return values

◆ tls_bt_hf_client_start_voice_recognition()

tls_bt_status_t tls_bt_hf_client_start_voice_recognition ( void )

start voice recognition

Parameters
[in] None
Return values

◆ tls_bt_hf_client_stop_voice_recognition()

tls_bt_status_t tls_bt_hf_client_stop_voice_recognition ( void )

stop voice recognition

Parameters
[in] None
Return values

◆ tls_bt_hf_client_volume_control()

tls_bt_status_t tls_bt_hf_client_volume_control | ( | tls_bthf_client_volume_type_t | type,
 |  | int | volume
 | ) |  |

volume control

Parameters
[in] | type | Mic or speaker
[in] | volume | index value
Return values


W800 SDK APIs: BT_SPP_APIs

Functions
BT_SPP_APIs
Bluetooth APIs

BT_SPP APIs. More...

Functions

tls_bt_status_t | tls_bt_spp_init (tls_bt_spp_callback_t callback)
Initializes the SPP interface. More...
tls_bt_status_t | tls_bt_spp_deinit (void)
Shuts down the SPP interface and does the cleanup. More...
tls_bt_status_t | tls_bt_spp_enable (void)
Enable the bta jv interface. More...
tls_bt_status_t | tls_bt_spp_disable (void)
Disable the bta jv interface and cleanup internal resource. More...
tls_bt_status_t | tls_bt_spp_start_discovery (tls_bt_addr_t *bd_addr, tls_bt_uuid_t *uuid)
Discovery the spp service by the given peer device. More...
tls_bt_status_t | tls_bt_spp_connect (wm_spp_sec_t sec_mask, tls_spp_role_t role, uint8_t remote_scn, tls_bt_addr_t *bd_addr)
Create a spp connection to the remote device. More...
tls_bt_status_t | tls_bt_spp_disconnect (uint32_t handle)
Close a spp connection. More...
tls_bt_status_t | tls_bt_spp_start_server (wm_spp_sec_t sec_mask, tls_spp_role_t role, uint8_t local_scn, const char *name)
This function create a SPP server and starts listening for an SPP connection request from a remote Bluetooth device. More...
tls_bt_status_t | tls_bt_spp_write (uint32_t handle, uint8_t *p_data, int length)
This function is used to write data. More...

Detailed Description

BT_SPP APIs.

Function Documentation

◆ tls_bt_spp_connect()

tls_bt_status_t tls_bt_spp_connect | ( | wm_spp_sec_t | sec_mask,
 |  | tls_spp_role_t | role,
 |  | uint8_t | remote_scn,
 |  | tls_bt_addr_t * | bd_addr
 | ) |  |

Create a spp connection to the remote device.

Parameters
[in] | sec_mask | Security Setting Mask
[in] | role | Server or client
[in] | remote_scn | Remote device bluetooth device SCN
[in] | *bd_addr | remote device bluetooth device address
Return values

◆ tls_bt_spp_deinit()

tls_bt_status_t tls_bt_spp_deinit ( void )

Shuts down the SPP interface and does the cleanup.

Parameters
None
Return values

◆ tls_bt_spp_disable()

tls_bt_status_t tls_bt_spp_disable ( void )

Disable the bta jv interface and cleanup internal resource.

Parameters
[in] None
Return values

◆ tls_bt_spp_disconnect()

tls_bt_status_t tls_bt_spp_disconnect ( uint32_t handle )

Close a spp connection.

Parameters
[in] handle The connection handle
Return values

◆ tls_bt_spp_enable()

tls_bt_status_t tls_bt_spp_enable ( void )

Enable the bta jv interface.

Parameters
[in] None
Return values

◆ tls_bt_spp_init()

tls_bt_status_t tls_bt_spp_init ( tls_bt_spp_callback_t callback )

Initializes the SPP interface.

spp realed api

Parameters
[in] callback pointer on callback function
Return values

◆ tls_bt_spp_start_discovery()

tls_bt_status_t tls_bt_spp_start_discovery | ( | tls_bt_addr_t * | bd_addr,
 |  | tls_bt_uuid_t * | uuid
 | ) |  |

Discovery the spp service by the given peer device.

Parameters
[in] *bd_addr remote device bluetooth device address
Return values

◆ tls_bt_spp_start_server()

tls_bt_status_t tls_bt_spp_start_server | ( | wm_spp_sec_t | sec_mask,
 |  | tls_spp_role_t | role,
 |  | uint8_t | local_scn,
 |  | const char * | name
 | ) |  |

This function create a SPP server and starts listening for an SPP connection request from a remote Bluetooth device.

Parameters
[in] | sec_mask | Security Setting Mask .
[in] | role | Server or client.
[in] | local_scn | The specific channel you want to get. If channel is 0, means get any channel.
[in] | name | Server's name.
Return values

◆ tls_bt_spp_write()

tls_bt_status_t tls_bt_spp_write | ( | uint32_t | handle,
 |  | uint8_t * | p_data,
 |  | int | length
 | ) |  |

This function is used to write data.

Parameters
[in] | handle | The connection handle.
[in] | len | The length of the data written.
[in] | p_data | The data written.
Return values


W800 SDK APIs: Driver APIs

Modules
Driver APIs

Driver APIs. More...

Modules

7816 Driver APIs
7816 driver APIs
ADC Driver APIs
ADC driver APIs.
CPU CLOCK Driver APIs
CPU CLOCK driver APIs.
DMA Driver APIs
DMA driver APIs.
EFUSE Driver APIs
EFUSE driver APIs.
SPI FLASH Driver APIs
SPI FLASH driver APIs.
GPIO Driver APIs
GPIO driver APIs.
IOMUX Driver APIs
IO Multiplex driver APIs.
MASTER SPI Driver APIs
MASTERSPI driver APIs.
HSPI Driver APIs
HSPI driver APIs.
I2C Driver APIs
I2C driver APIs.
I2S Driver APIs
I2S driver APIs.
INNER FLASH Driver APIs
INNER FLASH driver APIs.
IRQ Driver APIs
IRQ driver APIs.
LCD Driver APIs
LCD driver APIs.
PMU Driver APIs
PMU driver APIs.
PSRAM Driver APIs
PSRAM driver APIs.
PWM Driver APIs
PWM driver APIs.
RTC Driver APIs
RTC driver APIs.
SASC Driver APIs
SASC driver APIs.
SDIO HOST Driver APIs
SDIO HOST driver APIs.
TIMER Driver APIs
TIMER driver APIs.
TIPC Driver APIs
TIPC driver APIs.
UART Driver APIs
UART driver APIs.
WDG Driver APIs
WDG driver APIs.

Detailed Description

Driver APIs.


W800 SDK APIs: 7816 Driver APIs

Functions
7816 Driver APIs
Driver APIs

7816 driver APIs More...

Functions

void | wm_sc_io_clk_config (uint8_t mode)
This function is used to config the pin in gpio or 7816 mode for the 7816 power on timing. More...
void | wm_sc_powerInit (void)
close af to use as gpio More...
void | wm_sc_poweron (void)
power on the 7816 device if power is controled by GPIO More...
void | wm_sc_poweroff (void)
power off the 7816 device if power is controled by GPIO More...
void | wm_sc_rst_low (void)
driver the reset gpio in low level More...
void | wm_sc_rst_high (void)
driver the reset gpio in high level More...
void | wm_sc_hotreset (void)
hotrest the 7816 device obey the 7816-3 timing More...
void | wm_sc_colreset (void)
colreset the 7816 device obey the 7816-3 timing More...
void | wm_sc_deactive (void)
deactive the 7816 device obey the 7816-3 timing More...
void | wm_sc_set_bgt (uint8_t bgt)
This function is used to config the block guard time param in 7816 mode. More...
void | wm_sc_tx_retry_times (uint8_t count)
This function is used to config the tx retry count when detect err signal. More...
void | wm_sc_rx_retry_times (uint8_t count)
This function is used to config the rx retry count when detect parity error. More...
void | wm_sc_set_etu (uint16_t etu)
This function is used to config the etu param. More...
void | wm_sc_set_frequency (uint32_t freq)
This function config the module clock freq. More...
static void | wm_sc_parity_recv (bool bl)
config recv or not when parity error More...
static void | wm_sc_7816_mode (bool bl)
select the model in 7816 or uart function More...
static void | wm_sc_set_guardtime (uint8_t gt)
This function is used to config the guard time param. More...
static void | wm_sc_set_bcwt (uint32_t bwt)
This function is used to config the CWT or BWT param. More...
static void | wm_sc_tx_errsignal_mask (bool bl)
module errsignal int enable or disable More...
static void | wm_sc_set_protocol (bool bl)
config the module protol More...
static uint8_t | wm_sc_get_protocol ()
get the module protol More...
static void | wm_sc_clk_enable (bool bl)
smart card clock output enable or disable More...

Detailed Description

7816 driver APIs

Function Documentation

◆ wm_sc_7816_mode()

static void wm_sc_7816_mode ( bool bl )
inlinestatic

select the model in 7816 or uart function

Parameters
[in] bl : 1—7816 mode 0—uart mode
Return values

◆ wm_sc_clk_enable()

static void wm_sc_clk_enable ( bool bl )
inlinestatic

smart card clock output enable or disable

Parameters
[in] bl : 0—enable; 1—disable;
Return values

◆ wm_sc_colreset()

void wm_sc_colreset ( void )

colreset the 7816 device obey the 7816-3 timing

Return values

◆ wm_sc_deactive()

void wm_sc_deactive ( void )

deactive the 7816 device obey the 7816-3 timing

Return values

◆ wm_sc_get_protocol()

static uint8_t wm_sc_get_protocol ( )
inlinestatic

get the module protol

Return values
1&mdash; T1 protocol 0— T0 protocol

◆ wm_sc_hotreset()

void wm_sc_hotreset ( void )

hotrest the 7816 device obey the 7816-3 timing

Return values

◆ wm_sc_io_clk_config()

void wm_sc_io_clk_config ( uint8_t mode )

This function is used to config the pin in gpio or 7816 mode for the 7816 power on timing.

Parameters
[in] mode : 1–gpio mode ; 0–7816 mode
Return values

◆ wm_sc_parity_recv()

static void wm_sc_parity_recv ( bool bl )
inlinestatic

config recv or not when parity error

Parameters
[in] bl : 1— recv 0— don't recv
Return values

◆ wm_sc_powerInit()

void wm_sc_powerInit ( void )

close af to use as gpio

Return values

◆ wm_sc_poweroff()

void wm_sc_poweroff ( void )

power off the 7816 device if power is controled by GPIO

Return values

◆ wm_sc_poweron()

void wm_sc_poweron ( void )

power on the 7816 device if power is controled by GPIO

Return values

◆ wm_sc_rst_high()

void wm_sc_rst_high ( void )

driver the reset gpio in high level

Return values

◆ wm_sc_rst_low()

void wm_sc_rst_low ( void )

driver the reset gpio in low level

Return values

◆ wm_sc_rx_retry_times()

void wm_sc_rx_retry_times ( uint8_t count )

This function is used to config the rx retry count when detect parity error.

Parameters
[in] count : the value of retry time will be set 7 for max
Return values

◆ wm_sc_set_bcwt()

static void wm_sc_set_bcwt ( uint32_t bwt )
inlinestatic

This function is used to config the CWT or BWT param.

Parameters
[in] bwt : the value of CWT or BWT will be set
Return values

◆ wm_sc_set_bgt()

void wm_sc_set_bgt ( uint8_t bgt )

This function is used to config the block guard time param in 7816 mode.

Parameters
[in] bgt : the value of blcok guard time will be set
Return values

◆ wm_sc_set_etu()

void wm_sc_set_etu ( uint16_t etu )

This function is used to config the etu param.

Parameters
[in] etu : the value of etu will be set
Return values

◆ wm_sc_set_frequency()

void wm_sc_set_frequency ( uint32_t freq )

This function config the module clock freq.

Parameters
[in] freq : the value of clock freq
Return values

◆ wm_sc_set_guardtime()

static void wm_sc_set_guardtime ( uint8_t gt )
inlinestatic

This function is used to config the guard time param.

Parameters
[in] bwt : the value of the guard time will be set
Return values

◆ wm_sc_set_protocol()

static void wm_sc_set_protocol ( bool bl )
inlinestatic

config the module protol

Parameters
[in] bl : 1— T1 protocol 0— T0 protocol
Return values

◆ wm_sc_tx_errsignal_mask()

static void wm_sc_tx_errsignal_mask ( bool bl )
inlinestatic

module errsignal int enable or disable

Parameters
[in] bl : 1—enable 0—disable
Return values

◆ wm_sc_tx_retry_times()

void wm_sc_tx_retry_times ( uint8_t count )

This function is used to config the tx retry count when detect err signal.

Parameters
[in] count : the value of retry time will be set 7 for max
Return values


W800 SDK APIs: ADC Driver APIs

Functions
ADC Driver APIs
Driver APIs

ADC driver APIs. More...

Functions

void | tls_adc_init (u8 ifusedma, u8 dmachannel)
This function is used to init adc. More...
void | tls_adc_irq_register (int inttype, void(*callback)(int *buf, u16 len))
This function is used to register interrupt callback function. More...
void | tls_adc_clear_irq (int inttype)
This function is used to clear the interrupt source. More...
void | tls_adc_start_with_dma (int Channel, int Length)
This function is used to register interrupt callback function. More...
void | tls_adc_start_with_cpu (int Channel)
This function is used to start adc. More...
u32 | tls_read_adc_result (void)
This function is used to read adc result. More...
void | tls_adc_stop (int ifusedma)
This function is used to stop the adc. More...
void | tls_adc_config_cmp_reg (int cmp_data, int cmp_pol)
This function is used to config adc bigger register. More...
void | tls_adc_reference_sel (int ref)
This function is used to set adc reference source. More...
int | adc_get_interTemp (void)
This function is used to read internal temperature. More...
int | adc_get_inputVolt (u8 channel)
This function is used to read input voltage. More...
u32 | adc_get_interVolt (void)
This function is used to read internal voltage. More...
int | adc_temp (void)
This function is used to read temperature. More...
int | adc_offset_calibration (int chan, int refvoltage)
This function is used to calibrate adc single-end voltage. offset after FT or multipoint calibration. More...
int | adc_multipoint_calibration (int chanused, int refvoltage[])
This function can used to calibrate adc coefficient if not calibrated, or adc offset after FT or multipoint calibration. More...

Detailed Description

ADC driver APIs.

Function Documentation

◆ adc_get_inputVolt()

int adc_get_inputVolt ( u8 channel )

This function is used to read input voltage.

Parameters
[in] channel adc channel,from 0 to 3 is single input;8 and 9 is differential input.
Return values
voltage unit:mV
Note
None

◆ adc_get_interTemp()

int adc_get_interTemp ( void )

This function is used to read internal temperature.

Parameters
[in] None
Return values
temperature
Note
None

◆ adc_get_interVolt()

u32 adc_get_interVolt ( void )

This function is used to read internal voltage.

Parameters
[in] None
Return values
voltage (mV)
Note
None

◆ adc_multipoint_calibration()

int adc_multipoint_calibration | ( | int | chanused,
 |  | int | refvoltage[]
 | ) |  |

This function can used to calibrate adc coefficient if not calibrated, or adc offset after FT or multipoint calibration.

Parameters
[in] | chanused | bitmap, specified calibration channel,only bit0-3 can be used
[in] | refvoltage[] | array, calibration reference voltage to be used, unit:mV refvoltage keep the same position with chan bitmap input range[100,2300)mV, suggest reference voltage[500,2000]mV
Returns
0: success, < 0: failure
Note
1)Adc curve is y=ax+b,y is real voltage(unit:mV), x is adc sample data. After calibration, we can get a and b, or only update b. 2) Only used single-end adc 3) For example, use chan 0,1,3, and refvoltage 500,1000,2000, then chanused is 0xB, refvoltage[] value is {500,1000,0, 2000};

◆ adc_offset_calibration()

int adc_offset_calibration | ( | int | chan,
 |  | int | refvoltage
 | ) |  |

This function is used to calibrate adc single-end voltage. offset after FT or multipoint calibration.

Parameters
[in] | chan | adc calibration channel to be used, ADC channel 0,1,2,3
[in] | refvoltage | calibration reference voltage to be used, unit:mV input range[100,2300)mV, suggest reference voltage[500,2000]mV
Returns
0: success, < 0: failure
Note
After FT calibration or mulitpoint calibration, adc curve is y=ax+b, y is real voltage(unit:mV), x is adc sample data a and b is the coefficient. This fuction only used to revise b value.

◆ adc_temp()

int adc_temp ( void )

This function is used to read temperature.

Parameters
[in] None
Return values
temperature
Note
None

◆ tls_adc_clear_irq()

void tls_adc_clear_irq ( int inttype )

This function is used to clear the interrupt source.

Parameters
[in] inttype interrupt type: ADC_INT_TYPE_ADC adc interrupt,user get adc result from the callback function. ADC_INT_TYPE_DMA dma interrupt,dma transfer the adc result to the user's buffer.
Returns
None
Note
None

◆ tls_adc_config_cmp_reg()

void tls_adc_config_cmp_reg | ( | int | cmp_data,
 |  | int | cmp_pol
 | ) |  |

This function is used to config adc bigger register.

Parameters
[in] | cmp_data | compare data
[in] | cmp_pol | compare pol
Returns
None
Note
None

◆ tls_adc_init()

void tls_adc_init | ( | u8 | ifusedma,
 |  | u8 | dmachannel
 | ) |  |

This function is used to init adc.

Parameters
[in] | ifusedma | if use dma
[in] | dmachannel | dma channel
Returns
None
Note
None

◆ tls_adc_irq_register()

void tls_adc_irq_register | ( | int | inttype,
 |  | void(*)(int *buf, u16 len) | callback
 | ) |  |

This function is used to register interrupt callback function.

Parameters
[in] | inttype | interrupt type: ADC_INT_TYPE_ADC adc interrupt,user get adc result from the callback function. ADC_INT_TYPE_DMA dma interrupt,dma transfer the adc result to the user's buffer.
[in] | callback | interrupt callback function.
Returns
None
Note
None

◆ tls_adc_reference_sel()

void tls_adc_reference_sel ( int ref )

This function is used to set adc reference source.

Parameters
[in] ref ADC_REFERENCE_EXTERNAL,ADC_REFERENCE_INTERNAL
Returns
None
Note
None

◆ tls_adc_start_with_cpu()

void tls_adc_start_with_cpu ( int Channel )

This function is used to start adc.

Parameters
[in] Channel adc channel,from 0 to 3 is single input;4 and 5 is differential input.
Returns
None
Note
None

◆ tls_adc_start_with_dma()

void tls_adc_start_with_dma | ( | int | Channel,
 |  | int | Length
 | ) |  |

This function is used to register interrupt callback function.

Parameters
[in] | Channel | adc channel,from 0 to 3 is single input;4 and 5 is differential input.
[in] | Length | byte data length,is an integer multiple of half word,need <= 0x500
Returns
None
Note
None

◆ tls_adc_stop()

void tls_adc_stop ( int ifusedma )

This function is used to stop the adc.

Parameters
[in] ifusedma if use dma
Returns
None
Note
None

◆ tls_read_adc_result()

u32 tls_read_adc_result ( void )

This function is used to read adc result.

Parameters
[in] None
Return values
adc result
Note
None


W800 SDK APIs: CPU CLOCK Driver APIs

Functions
CPU CLOCK Driver APIs
Driver APIs

CPU CLOCK driver APIs. More...

Functions

void | tls_sys_clk_set (u32 clk)
This function is used to set cpu clock. More...
void | tls_sys_clk_get (tls_sys_clk *sysclk)
This function is used to get cpu clock. More...

Detailed Description

CPU CLOCK driver APIs.

Function Documentation

◆ tls_sys_clk_get()

void tls_sys_clk_get ( tls_sys_clk * sysclk )

This function is used to get cpu clock.

Parameters
[out] *sysclk point to the addr for system clk output
Returns
None
Note
None

◆ tls_sys_clk_set()

void tls_sys_clk_set ( u32 clk )

This function is used to set cpu clock.

Parameters
[in] clk select cpu clock clk == CPU_CLK_80M 80M clk == CPU_CLK_40M 40M
Returns
None
Note
None


W800 SDK APIs: DMA Driver APIs

Functions
DMA Driver APIs
Driver APIs

DMA driver APIs. More...

Functions

void | tls_dma_irq_clr (unsigned char ch, unsigned char flags)
This function is used to clear dma interrupt flag. More...
void | tls_dma_irq_register (unsigned char ch, void(*callback)(void *p), void *arg, unsigned char flags)
This function is used to register dma interrupt callback function. More...
int | tls_dma_wait_complt (unsigned char ch)
This function is used to register dma interrupt. More...
unsigned char | tls_dma_start_by_wrap (unsigned char ch, struct tls_dma_descriptor *dma_desc, unsigned char auto_reload, unsigned short src_zize, unsigned short dest_zize)
This function is used to Start the DMA controller by Wrap. More...
unsigned char | tls_dma_start (unsigned char ch, struct tls_dma_descriptor *dma_desc, unsigned char auto_reload)
This function is used to Wait until DMA operation completes. More...
unsigned char | tls_dma_stop (unsigned char ch)
This function is used to To stop current DMA channel transfer. More...
unsigned char | tls_dma_request (unsigned char ch, unsigned char flags)
This function is used to Request a free dma channel If ch is out of range [0,7] or valid but used, the function will select another free channel. else return the selected channel no. More...
void | tls_dma_free (unsigned char ch)
This function is used to Free the DMA channel when not use. More...
void | tls_dma_init (void)
This function is used to Initialize DMA Control. More...

Detailed Description

DMA driver APIs.

Function Documentation

◆ tls_dma_free()

void tls_dma_free ( unsigned char ch )

This function is used to Free the DMA channel when not use.

Parameters
[in] ch channel no. that is ready to free
Returns
None
Note
None

◆ tls_dma_init()

void tls_dma_init ( void )

This function is used to Initialize DMA Control.

Parameters
[in] None
Returns
None
Note
None

◆ tls_dma_irq_clr()

void tls_dma_irq_clr | ( | unsigned char | ch,
 |  | unsigned char | flags
 | ) |  |

This function is used to clear dma interrupt flag.

Parameters
[in] | ch | Channel no.[0~7]
[in] | flags | Flags setted to TLS_DMA_IRQ_BURST_DONE, TLS_DMA_IRQ_TRANSFER_DONE, TLS_DMA_IRQ_BOTH_DONE.
Returns
None
Note
None

◆ tls_dma_irq_register()

void tls_dma_irq_register | ( | unsigned char | ch,
 |  | void(*)(void *p) | callback,
 |  | void * | arg,
 |  | unsigned char | flags
 | ) |  |

This function is used to register dma interrupt callback function.

Parameters
[in] | ch | Channel no.[0~7]
[in] | callback | is the dma interrupt call back function.
[in] | arg | the param of the callback function.
[in] | flags | Flags setted to TLS_DMA_IRQ_BURST_DONE, TLS_DMA_IRQ_TRANSFER_DONE, TLS_DMA_IRQ_BOTH_DONE.
Returns
None
Note
None

◆ tls_dma_request()

unsigned char tls_dma_request | ( | unsigned char | ch,
 |  | unsigned char | flags
 | ) |  |

This function is used to Request a free dma channel If ch is out of range [0,7] or valid but used, the function will select another free channel. else return the selected channel no.

Parameters
[in] | ch | specified channel when ch is valid and not used.
[in] | flags | flags setted to selected channel
Returns
Real DMA Channel No: if there is free dma channel. 0xFF: when DMA channels are all used.
Note
If ch is invalid or valid but used, the function will select another free channel. else return the selected channel no.

◆ tls_dma_start()

unsigned char tls_dma_start | ( | unsigned char | ch,
 |  | struct tls_dma_descriptor * | dma_desc,
 |  | unsigned char | auto_reload
 | ) |  |

This function is used to Wait until DMA operation completes.

Parameters
[in] autoReload Does restart when current transfer complete?
[in] | ch | Channel no.[0~7]
[in] | pDmaDesc | Pointer to DMA channel descriptor structure.
Return values
Always STATUS_SUCCESS.
Note
DMA Descriptor: +-----------------------------------------------------------—+ |Vld[31] | RSV | +-----------------------------------------------------------—+ | RSV | Dma_Ctrl[16:0] | +-----------------------------------------------------------—+ | Src_Addr[31:0] | +-----------------------------------------------------------—+ | Dest_Addr[31:0] | +-----------------------------------------------------------—+ | Next_Desc_Add[31:0] | +-----------------------------------------------------------—+

◆ tls_dma_start_by_wrap()

unsigned char tls_dma_start_by_wrap | ( | unsigned char | ch,
 |  | struct tls_dma_descriptor * | dma_desc,
 |  | unsigned char | auto_reload,
 |  | unsigned short | src_zize,
 |  | unsigned short | dest_zize
 | ) |  |

This function is used to Start the DMA controller by Wrap.

Parameters
[in] autoReload Does restart when current transfer complete?
[in] | ch | Channel no.[0~7]
[in] | pDmaDesc | Pointer to DMA channel descriptor structure.
Return values
Always STATUS_SUCCESS.
Note
DMA Descriptor: +-----------------------------------------------------------—+ |Vld[31] | RSV | +-----------------------------------------------------------—+ | RSV | Dma_Ctrl[16:0] | +-----------------------------------------------------------—+ | Src_Addr[31:0] | +-----------------------------------------------------------—+ | Dest_Addr[31:0] | +-----------------------------------------------------------—+ | Next_Desc_Add[31:0] | +-----------------------------------------------------------—+

◆ tls_dma_stop()

unsigned char tls_dma_stop ( unsigned char ch )

This function is used to To stop current DMA channel transfer.

Parameters
[in] ch channel no. to be stopped
Return values
Always STATUS_SUCCESS
Note
If channel stop, DMA_CHNL_CTRL_CHNL_ON bit in DMA_CHNLCTRL_REG is cleared.

◆ tls_dma_wait_complt()

int tls_dma_wait_complt ( unsigned char ch )

This function is used to register dma interrupt.

Parameters
[in] ch DMA channel no.[0~7]
Returns
None
Note
None


W800 SDK APIs: EFUSE Driver APIs

Functions
EFUSE Driver APIs
Driver APIs

EFUSE driver APIs. More...

Functions

int | tls_ft_param_init (void)
This function is used to init ft param. More...
int | tls_ft_param_set (unsigned int opnum, void *data, unsigned int len)
This function is used to write ft_param. More...
int | tls_ft_param_get (unsigned int opnum, void *data, unsigned int rdlen)
This function is used to read ft_param. More...
int | tls_get_mac_addr (u8 *mac)
This function is used to get mac addr. More...
int | tls_set_mac_addr (u8 *mac)
This function is used to set mac addr. More...
int | tls_get_bt_mac_addr (u8 *mac)
This function is used to get bluetooth mac addr. More...
int | tls_set_bt_mac_addr (u8 *mac)
This function is used to set bluetooth mac addr. More...
int | tls_get_tx_gain (u8 *txgain)
This function is used to get tx gain. More...
int | tls_set_tx_gain (u8 *txgain)
This function is used to set tx gain. More...
int | tls_get_tx_lo (u8 *txlo)
This function is used to get tx lod. More...
int | tls_set_tx_lo (u8 *txlo)
This function is used to set tx lod. More...
int | tls_get_tx_iq_gain (u8 *txGain)
This function is used to get tx iq gain. More...
int | tls_set_tx_iq_gain (u8 *txGain)
This function is used to set tx iq gain. More...
int | tls_get_rx_iq_gain (u8 *rxGain)
This function is used to get rx iq gain. More...
int | tls_set_rx_iq_gain (u8 *rxGain)
This function is used to get rx iq gain. More...
int | tls_get_tx_iq_phase (u8 *txPhase)
This function is used to get tx iq phase. More...
int | tls_set_tx_iq_phase (u8 *txPhase)
This function is used to set tx iq phase. More...
int | tls_get_rx_iq_phase (u8 *rxPhase)
This function is used to get rx iq phase. More...
int | tls_set_rx_iq_phase (u8 *rxPhase)
This function is used to set rx iq phase. More...
int | tls_freq_err_op (u8 *freqerr, u8 flag)
This function is used to set/get freq err. More...
int | tls_rf_cal_finish_op (u8 *calflag, u8 flag)
This function is used to set/get cal finish flag. More...
int | tls_get_adc_cal_param (FT_ADC_CAL_ST *adc_cal)
This function is used to get adc cal param. More...
int | tls_set_adc_cal_param (FT_ADC_CAL_ST *adc_cal)
This function is used to set adc cal param. More...

Detailed Description

EFUSE driver APIs.

Function Documentation

◆ tls_freq_err_op()

int tls_freq_err_op | ( | u8 * | freqerr,
 |  | u8 | flag
 | ) |  |

This function is used to set/get freq err.

Parameters
[in] | freqerr | (Unit:Hz),relative to base frequency(chan 1,2,3,4,5......13,14)
[in] | flag | 1-set 0-get
Return values
TLS_EFUSE_STATUS_OK | set/get success
TLS_EFUSE_STATUS_EIO | set/get failed

◆ tls_ft_param_get()

int tls_ft_param_get | ( | unsigned int | opnum,
 |  | void * | data,
 |  | unsigned int | rdlen
 | ) |  |

This function is used to read ft_param.

Parameters
[in] | opnum | ft cmd
[in] | data | data pointer
[in] | len | len to read data
Return values
TLS_EFUSE_STATUS_OK | get success
TLS_EFUSE_STATUS_EIO | get failed

◆ tls_ft_param_init()

int tls_ft_param_init ( void )

This function is used to init ft param.

Parameters
[in] None
Return values
TRUE | init success
FALSE | init failed

◆ tls_ft_param_set()

int tls_ft_param_set | ( | unsigned int | opnum,
 |  | void * | data,
 |  | unsigned int | len
 | ) |  |

This function is used to write ft_param.

Parameters
[in] | opnum | ft cmd
[in] | data | data pointer
[in] | len | len to write data
Return values
TLS_EFUSE_STATUS_OK | set success
TLS_EFUSE_STATUS_EIO | set failed

◆ tls_get_adc_cal_param()

int tls_get_adc_cal_param ( FT_ADC_CAL_ST * adc_cal )

This function is used to get adc cal param.

Parameters
[out] adc_cal adc cal param
Return values
TLS_EFUSE_STATUS_OK | get success
TLS_EFUSE_STATUS_EIO | get failed

◆ tls_get_bt_mac_addr()

int tls_get_bt_mac_addr ( u8 * mac )

This function is used to get bluetooth mac addr.

Parameters
[in] mac mac addr,6 byte
Return values
TLS_EFUSE_STATUS_OK | get success
TLS_EFUSE_STATUS_EIO | get failed

◆ tls_get_mac_addr()

int tls_get_mac_addr ( u8 * mac )

This function is used to get mac addr.

Parameters
[in] mac mac addr,6 byte
Return values
TLS_EFUSE_STATUS_OK | get success
TLS_EFUSE_STATUS_EIO | get failed

◆ tls_get_rx_iq_gain()

int tls_get_rx_iq_gain ( u8 * rxGain )

This function is used to get rx iq gain.

Parameters
[in] rxGain
Return values
TLS_EFUSE_STATUS_OK | get success
TLS_EFUSE_STATUS_EIO | get failed

◆ tls_get_rx_iq_phase()

int tls_get_rx_iq_phase ( u8 * rxPhase )

This function is used to get rx iq phase.

Parameters
[in] rxPhase
Return values
TLS_EFUSE_STATUS_OK | get success
TLS_EFUSE_STATUS_EIO | get failed

◆ tls_get_tx_gain()

int tls_get_tx_gain ( u8 * txgain )

This function is used to get tx gain.

Parameters
[in] txgain tx gain,12 byte
Return values
TLS_EFUSE_STATUS_OK | get success
TLS_EFUSE_STATUS_EIO | get failed

◆ tls_get_tx_iq_gain()

int tls_get_tx_iq_gain ( u8 * txGain )

This function is used to get tx iq gain.

Parameters
[in] txGain
Return values
TLS_EFUSE_STATUS_OK | get success
TLS_EFUSE_STATUS_EIO | get failed

◆ tls_get_tx_iq_phase()

int tls_get_tx_iq_phase ( u8 * txPhase )

This function is used to get tx iq phase.

Parameters
[in] txPhase
Return values
TLS_EFUSE_STATUS_OK | get success
TLS_EFUSE_STATUS_EIO | get failed

◆ tls_get_tx_lo()

int tls_get_tx_lo ( u8 * txlo )

This function is used to get tx lod.

Parameters
[in] txlo tx lod
Return values
TLS_EFUSE_STATUS_OK | get success
TLS_EFUSE_STATUS_EIO | get failed

◆ tls_rf_cal_finish_op()

int tls_rf_cal_finish_op | ( | u8 * | calflag,
 |  | u8 | flag
 | ) |  |

This function is used to set/get cal finish flag.

Parameters
[in] | calflag | 1- finish calibration, non-1-do not calibration
[in] | flag | 1-set 0-get
Return values
TLS_EFUSE_STATUS_OK | set/get success
TLS_EFUSE_STATUS_EIO | set/get failed

◆ tls_set_adc_cal_param()

int tls_set_adc_cal_param ( FT_ADC_CAL_ST * adc_cal )

This function is used to set adc cal param.

Parameters
[out] adc_cal adc cal param
Return values
TLS_EFUSE_STATUS_OK | get success
TLS_EFUSE_STATUS_EIO | get failed

◆ tls_set_bt_mac_addr()

int tls_set_bt_mac_addr ( u8 * mac )

This function is used to set bluetooth mac addr.

Parameters
[in] mac mac addr,6 byte
Return values
TLS_EFUSE_STATUS_OK | set success
TLS_EFUSE_STATUS_EIO | set failed

◆ tls_set_mac_addr()

int tls_set_mac_addr ( u8 * mac )

This function is used to set mac addr.

Parameters
[in] mac mac addr,6 byte
Return values
TLS_EFUSE_STATUS_OK | set success
TLS_EFUSE_STATUS_EIO | set failed

◆ tls_set_rx_iq_gain()

int tls_set_rx_iq_gain ( u8 * rxGain )

This function is used to get rx iq gain.

Parameters
[in] rxGain
Return values
TLS_EFUSE_STATUS_OK | set success
TLS_EFUSE_STATUS_EIO | set failed

◆ tls_set_rx_iq_phase()

int tls_set_rx_iq_phase ( u8 * rxPhase )

This function is used to set rx iq phase.

Parameters
[in] rxPhase
Return values
TLS_EFUSE_STATUS_OK | set success
TLS_EFUSE_STATUS_EIO | set failed

◆ tls_set_tx_gain()

int tls_set_tx_gain ( u8 * txgain )

This function is used to set tx gain.

Parameters
[in] txgain tx gain,12 byte
Return values
TLS_EFUSE_STATUS_OK | set success
TLS_EFUSE_STATUS_EIO | set failed

◆ tls_set_tx_iq_gain()

int tls_set_tx_iq_gain ( u8 * txGain )

This function is used to set tx iq gain.

Parameters
[in] txGain
Return values
TLS_EFUSE_STATUS_OK | set success
TLS_EFUSE_STATUS_EIO | set failed

◆ tls_set_tx_iq_phase()

int tls_set_tx_iq_phase ( u8 * txPhase )

This function is used to set tx iq phase.

Parameters
[in] txPhase
Return values
TLS_EFUSE_STATUS_OK | set success
TLS_EFUSE_STATUS_EIO | set failed

◆ tls_set_tx_lo()

int tls_set_tx_lo ( u8 * txlo )

This function is used to set tx lod.

Parameters
[in] txlo tx lod
Return values
TLS_EFUSE_STATUS_OK | set success
TLS_EFUSE_STATUS_EIO | set failed


W800 SDK APIs: SPI FLASH Driver APIs

Functions
SPI FLASH Driver APIs
Driver APIs

SPI FLASH driver APIs. More...

Functions

int | tls_spifls_init (void)
This function is used to initial flash module structer. More...
int | tls_spifls_read (u32 addr, u8 *buf, u32 len)
This function is used to read data from the flash. More...
int | tls_spifls_write (u32 addr, u8 *buf, u32 len)
This function is used to write data into the flash. More...

Detailed Description

SPI FLASH driver APIs.

Function Documentation

◆ tls_spifls_init()

int tls_spifls_init ( void )

This function is used to initial flash module structer.

Parameters
[in] None
Return values
TLS_FLS_STATUS_OK | if init sucsess
TLS_FLS_STATUS_EBUSY | already inited
TLS_FLS_STATUS_ENOMEM | memory error
Note
None

◆ tls_spifls_read()

int tls_spifls_read | ( | u32 | addr,
 |  | u8 * | buf,
 |  | u32 | len
 | ) |  |

This function is used to read data from the flash.

Parameters
[in] | addr | Specifies the starting address to read from
[in] | buf | Pointer to a byte array that is to be written.
[in] | len | length to read.
Return values
TLS_FLS_STATUS_OK | if read sucsess
TLS_FLS_STATUS_EIO | if read fail
Note
None

◆ tls_spifls_write()

int tls_spifls_write | ( | u32 | addr,
 |  | u8 * | buf,
 |  | u32 | len
 | ) |  |

This function is used to write data into the flash.

Parameters
[in] | addr | Specifies the starting address to write to.
[in] | buf | Pointer to a byte array that holds the data to be written.
[in] | len | length to write.
Return values
TLS_FLS_STATUS_OK | if write flash success
TLS_FLS_STATUS_EPERM | if flash struct point is null
TLS_FLS_STATUS_ENODRV | if flash driver is not installed
TLS_FLS_STATUS_EINVAL | if argument is invalid
TLS_FLS_STATUS_EIO | if io error
Note
None


W800 SDK APIs: GPIO Driver APIs

Functions
GPIO Driver APIs
Driver APIs

GPIO driver APIs. More...

Functions

void | tls_gpio_cfg (enum tls_io_name gpio_pin, enum tls_gpio_dir dir, enum tls_gpio_attr attr)
This function is used to config gpio function. More...
u8 | tls_gpio_read (enum tls_io_name gpio_pin)
This function is used to read gpio status. More...
void | tls_gpio_write (enum tls_io_name gpio_pin, u8 value)
This function is used to modify gpio status. More...
void | tls_gpio_irq_enable (enum tls_io_name gpio_pin, enum tls_gpio_irq_trig mode)
This function is used to config gpio interrupt. More...
void | tls_gpio_irq_disable (enum tls_io_name gpio_pin)
This function is used to disable gpio interrupt. More...
u8 | tls_get_gpio_irq_status (enum tls_io_name gpio_pin)
This function is used to get gpio interrupt status. More...
void | tls_clr_gpio_irq_status (enum tls_io_name gpio_pin)
This function is used to clear gpio interrupt flag. More...
void | tls_gpio_isr_register (enum tls_io_name gpio_pin, tls_gpio_irq_callback callback, void *arg)
This function is used to register gpio interrupt. More...

Detailed Description

GPIO driver APIs.

Function Documentation

◆ tls_clr_gpio_irq_status()

void tls_clr_gpio_irq_status ( enum tls_io_name gpio_pin )

This function is used to clear gpio interrupt flag.

Parameters
[in] gpio_pin gpio pin num
Returns
None
Note
None

◆ tls_get_gpio_irq_status()

u8 tls_get_gpio_irq_status ( enum tls_io_name gpio_pin )

This function is used to get gpio interrupt status.

Parameters
[in] gpio_pin gpio pin num
Return values
0 | no interrupt happened
1 | interrupt happened
Note
None

◆ tls_gpio_cfg()

void tls_gpio_cfg | ( | enum tls_io_name | gpio_pin,
 |  | enum tls_gpio_dir | dir,
 |  | enum tls_gpio_attr | attr
 | ) |  |

This function is used to config gpio function.

Parameters
[in] | gpio_pin | gpio pin num
[in] | dir | gpio direction
[in] | attr | gpio attribute
Returns
None
Note
None

◆ tls_gpio_irq_disable()

void tls_gpio_irq_disable ( enum tls_io_name gpio_pin )

This function is used to disable gpio interrupt.

Parameters
[in] gpio_pin gpio pin num
Returns
None
Note
None

◆ tls_gpio_irq_enable()

void tls_gpio_irq_enable | ( | enum tls_io_name | gpio_pin,
 |  | enum tls_gpio_irq_trig | mode
 | ) |  |

This function is used to config gpio interrupt.

Parameters
[in] | gpio_pin | gpio pin num
[in] | mode | interrupt trigger type
Returns
None
Note
None

◆ tls_gpio_isr_register()

void tls_gpio_isr_register | ( | enum tls_io_name | gpio_pin,
 |  | tls_gpio_irq_callback | callback,
 |  | void * | arg
 | ) |  |

This function is used to register gpio interrupt.

Parameters
[in] | gpio_pin | gpio pin num
[in] | callback | the gpio interrupt call back function
[in] | arg | parammeter for the callback
Returns
None
Note
gpio callback function is called in interrupt, so can not operate the critical data in the callback fuuction, recommendation to send messages to other tasks to operate it.

◆ tls_gpio_read()

u8 tls_gpio_read ( enum tls_io_name gpio_pin )

This function is used to read gpio status.

Parameters
[in] gpio_pin gpio pin num
Return values
0 | power level is low
1 | power level is high
Note
None

◆ tls_gpio_write()

void tls_gpio_write | ( | enum tls_io_name | gpio_pin,
 |  | u8 | value
 | ) |  |

This function is used to modify gpio status.

Parameters
[in] | gpio_pin | gpio pin num
[in] | value | power level 0: low power level 1: high power level
Returns
None
Note
None


W800 SDK APIs: IOMUX Driver APIs

Functions
IOMUX Driver APIs
Driver APIs

IO Multiplex driver APIs. More...

Functions

void | wm_hspi_gpio_config (uint8_t numsel)
config the pins used for highspeed spi More...
void | wm_spi_ck_config (enum tls_io_name io_name)
config the pins used for spi ck More...
void | wm_spi_cs_config (enum tls_io_name io_name)
config the pins used for spi cs More...
void | wm_spi_di_config (enum tls_io_name io_name)
config the pins used for spi di More...
void | wm_spi_do_config (enum tls_io_name io_name)
config the pins used for spi do More...
void | wm_sdio_host_config (uint8_t numsel)
config the pins used for sdio host ck dat0 dat1 dat2 dat3 More...
void | wm_sdio_slave_config (uint8_t numsel)
config the pins used for sdio slave ck dat0 dat1 dat2 dat3 More...
void | wm_psram_config (uint8_t numsel)
config the pins used for psram ck cs dat0 dat1 dat2 dat3 More...
void | wm_uart0_tx_config (enum tls_io_name io_name)
config the pins used for uart0 tx More...
void | wm_uart0_rx_config (enum tls_io_name io_name)
config the pins used for uart0 rx More...
void | wm_uart1_tx_config (enum tls_io_name io_name)
config the pins used for uart1 tx More...
void | wm_uart1_rx_config (enum tls_io_name io_name)
config the pins used for uart1 rx More...
void | wm_uart1_rts_config (enum tls_io_name io_name)
config the pins used for uart1 rts More...
void | wm_uart1_cts_config (enum tls_io_name io_name)
config the pins used for uart1 cts More...
void | wm_uart2_tx_scio_config (enum tls_io_name io_name)
config the pins used for uart2 tx or 7816-io More...
void | wm_uart2_rx_config (enum tls_io_name io_name)
config the pins used for uart2 rx More...
void | wm_uart2_rts_scclk_config (enum tls_io_name io_name)
config the pins used for uart2 rts or 7816-clk More...
void | wm_uart2_cts_config (enum tls_io_name io_name)
config the pins used for uart2 cts More...
void | wm_uart3_tx_config (enum tls_io_name io_name)
config the pins used for uart3 tx More...
void | wm_uart3_rx_config (enum tls_io_name io_name)
config the pins used for uart3 rx More...
void | wm_uart3_rts_config (enum tls_io_name io_name)
config the pins used for uart3 rts More...
void | wm_uart3_cts_config (enum tls_io_name io_name)
config the pins used for uart3 cts More...
void | wm_uart4_tx_config (enum tls_io_name io_name)
config the pins used for uart4 tx More...
void | wm_uart4_rx_config (enum tls_io_name io_name)
config the pins used for uart4 rx More...
void | wm_uart4_rts_config (enum tls_io_name io_name)
config the pins used for uart4 rts More...
void | wm_uart4_cts_config (enum tls_io_name io_name)
config the pins used for uart4 cts More...
void | wm_uart5_tx_config (enum tls_io_name io_name)
config the pins used for uart4 tx More...
void | wm_uart5_rx_config (enum tls_io_name io_name)
config the pins used for uart4 rx More...
void | wm_uart5_rts_config (enum tls_io_name io_name)
config the pins used for uart4 rts More...
void | wm_uart5_cts_config (enum tls_io_name io_name)
config the pins used for uart4 cts More...
void | wm_i2s_ck_config (enum tls_io_name io_name)
config the pins used for i2s ck More...
void | wm_i2s_ws_config (enum tls_io_name io_name)
config the pins used for i2s ws More...
void | wm_i2s_do_config (enum tls_io_name io_name)
config the pins used for i2s do More...
void | wm_i2s_di_config (enum tls_io_name io_name)
config the pins used for i2s di More...
void | wm_i2s_mclk_config (enum tls_io_name io_name)
config the pins used for i2s mclk More...
void | wm_i2s_extclk_config (enum tls_io_name io_name)
config the pins used for i2s extclk More...
void | wm_i2c_scl_config (enum tls_io_name io_name)
config the pins used for i2c scl More...
void | wm_i2c_sda_config (enum tls_io_name io_name)
config the pins used for i2c sda More...
void | wm_pwm0_config (enum tls_io_name io_name)
config the pins used for pwm0 More...
void | wm_pwm1_config (enum tls_io_name io_name)
config the pins used for pwm1 More...
void | wm_pwm2_config (enum tls_io_name io_name)
config the pins used for pwm2 More...
void | wm_pwm3_config (enum tls_io_name io_name)
config the pins used for pwm3 More...
void | wm_pwm4_config (enum tls_io_name io_name)
config the pins used for pwm4 More...
void | wm_pwmbrk_config (enum tls_io_name io_name)
config the pins used for pwm break More...
void | wm_swd_config (bool enable)
config the pins used for swd More...
void | wm_adc_config (u8 Channel)
config the pins used for adc More...
void | wm_touch_sensor_config (enum tls_io_name io_name)
config the pins used for touch sensor More...
void | wm_gpio_af_disable (void)
disable all the gpio af More...

Detailed Description

IO Multiplex driver APIs.

Function Documentation

◆ wm_adc_config()

void wm_adc_config ( u8 Channel )

config the pins used for adc

Parameters
Channel the channel that shall be used 0~1: single-ended input 2~3: single-ended input only for 56pin 0 and 1 can be used differential input 2 and 3 can be used differential input only for 56pin
Returns
None

◆ wm_gpio_af_disable()

void wm_gpio_af_disable ( void )

disable all the gpio af

Returns
None
Note
This function must call before any others for configure gpio Alternate functions

◆ wm_hspi_gpio_config()

void wm_hspi_gpio_config ( uint8_t numsel )

config the pins used for highspeed spi

Parameters
numsel config highspeed spi pins multiplex relation,valid para 0,1 0: hspi0 1: hspi1 only for 56pin hspi_ck PB06 hspi_ck PB12 hspi_int PB07 hspi_int PB13 hspi_cs PB09 hspi_cs PB14 hspi_di PB10 hspi_di PB15 hspi_do PB11 hspi_do PB16
Returns
None

◆ wm_i2c_scl_config()

void wm_i2c_scl_config ( enum tls_io_name io_name )

config the pins used for i2c scl

Parameters
io_name config i2c scl pins name WM_IO_PA_01 WM_IO_PB_20
Returns
None

◆ wm_i2c_sda_config()

void wm_i2c_sda_config ( enum tls_io_name io_name )

config the pins used for i2c sda

Parameters
io_name config i2c sda pins name WM_IO_PA_04 WM_IO_PB_19
Returns
None

◆ wm_i2s_ck_config()

void wm_i2s_ck_config ( enum tls_io_name io_name )

config the pins used for i2s ck

Parameters
io_name config i2s master ck pins name WM_IO_PA_04
WM_IO_PB_08 WM_IO_PA_08 only for 56pin WM_IO_PB_12 only for 56pin
Returns
None

◆ wm_i2s_di_config()

void wm_i2s_di_config ( enum tls_io_name io_name )

config the pins used for i2s di

Parameters
io_name config i2s slave di pins name WM_IO_PA_07 WM_IO_PB_10 WM_IO_PA_11 only for 56pin WM_IO_PB_15 only for 56pin
Returns
None

◆ wm_i2s_do_config()

void wm_i2s_do_config ( enum tls_io_name io_name )

config the pins used for i2s do

Parameters
io_name config i2s master do pins name WM_IO_PA_00 WM_IO_PB_11 WM_IO_PA_10 only for 56pin WM_IO_PB_14 only for 56pin
Returns
None

◆ wm_i2s_extclk_config()

void wm_i2s_extclk_config ( enum tls_io_name io_name )

config the pins used for i2s extclk

Parameters
io_name config i2s extclk pins name WM_IO_PA_07
Returns
None

◆ wm_i2s_mclk_config()

void wm_i2s_mclk_config ( enum tls_io_name io_name )

config the pins used for i2s mclk

Parameters
io_name config i2s mclk pins name WM_IO_PA_00
Returns
None

◆ wm_i2s_ws_config()

void wm_i2s_ws_config ( enum tls_io_name io_name )

config the pins used for i2s ws

Parameters
io_name config i2s master ws pins name WM_IO_PA_01 WM_IO_PB_09 WM_IO_PA_09 only for 56pin WM_IO_PB_13 only for 56pin
Returns
None

◆ wm_psram_config()

void wm_psram_config ( uint8_t numsel )

config the pins used for psram ck cs dat0 dat1 dat2 dat3

Parameters
numsel config psram ck cs dat0 dat1 dat2 dat3 pins multiplex relation,valid para 0,1 0: 1: only for 56pin psram_ck PB00 psram_ck PA15 psram_cs PB01 psram_cs PB27 psram_dat0 PB02 psram_dat0 PB02 psram_dat1 PB03 psram_dat1 PB03 psram_dat2 PB04 psram_dat2 PB04 psram_dat3 PB05 psram_dat3 PB05
Returns
None

◆ wm_pwm0_config()

void wm_pwm0_config ( enum tls_io_name io_name )

config the pins used for pwm0

Parameters
io_name config pwm1 pins name WM_IO_PB_00 WM_IO_PB_19 WM_IO_PA_02 only for 56pin WM_IO_PA_10 only for 56pin
WM_IO_PB_12 only for 56pin
Returns
None

◆ wm_pwm1_config()

void wm_pwm1_config ( enum tls_io_name io_name )

config the pins used for pwm1

Parameters
io_name config pwm1 pins name WM_IO_PB_01 WM_IO_PB_20 WM_IO_PA_03 only for 56pin WM_IO_PA_11 only for 56pin
WM_IO_PB_13 only for 56pin
Returns
None

◆ wm_pwm2_config()

void wm_pwm2_config ( enum tls_io_name io_name )

config the pins used for pwm2

Parameters
io_name config pwm3 pins name WM_IO_PA_00 WM_IO_PB_02 WM_IO_PA_12 only for 56pin WM_IO_PB_14 only for 56pin
WM_IO_PB_24 only for 56pin
Returns
None

◆ wm_pwm3_config()

void wm_pwm3_config ( enum tls_io_name io_name )

config the pins used for pwm3

Parameters
io_name config pwm4 pins name WM_IO_PA_01 WM_IO_PB_03 WM_IO_PA_13 only for 56pin WM_IO_PB_15 only for 56pin
WM_IO_PB_25 only for 56pin
Returns
None

◆ wm_pwm4_config()

void wm_pwm4_config ( enum tls_io_name io_name )

config the pins used for pwm4

Parameters
io_name config pwm5 pins name WM_IO_PA_04 WM_IO_PA_07 WM_IO_PA_14 only for 56pin WM_IO_PB_16 only for 56pin
WM_IO_PB_26 only for 56pin
Returns
None

◆ wm_pwmbrk_config()

void wm_pwmbrk_config ( enum tls_io_name io_name )

config the pins used for pwm break

Parameters
io_name config pwm break pins name WM_IO_PB_08 WM_IO_PA_05 only for 56pin WM_IO_PA_08 only for 56pin
WM_IO_PA_15 only for 56pin WM_IO_PB_17 only for 56pin
Returns
None

◆ wm_sdio_host_config()

void wm_sdio_host_config ( uint8_t numsel )

config the pins used for sdio host ck dat0 dat1 dat2 dat3

Parameters
numsel config sdio ck cmd dat0 dat1 dat2 dat3 pins multiplex relation,valid para 0,1 0: 1: only for 56pin sdio_ck PB06 sdio_ck PA09 sdio_cmd PB07 sdio_cmd PA10 sdio_dat0 PB08 sdio_dat0 PA11 sdio_dat1 PB09 sdio_dat1 PA12 sdio_dat2 PB10 sdio_dat2 PA13 sdio_dat3 PB11 sdio_dat3 PA14
Returns
None

◆ wm_sdio_slave_config()

void wm_sdio_slave_config ( uint8_t numsel )

config the pins used for sdio slave ck dat0 dat1 dat2 dat3

Parameters
numsel config sdio ck cmd dat0 dat1 dat2 dat3 pins multiplex relation,valid para 0 0: sdio_ck PB06 sdio_cmd PB07 sdio_dat0 PB08 sdio_dat1 PB09 sdio_dat2 PB10 sdio_dat3 PB11
Returns
None

◆ wm_spi_ck_config()

void wm_spi_ck_config ( enum tls_io_name io_name )

config the pins used for spi ck

Parameters
io_name config spi ck pins name WM_IO_PB_01 WM_IO_PB_02 WM_IO_PB_15 only for 56pin WM_IO_PB_24 only for 56pin
Returns
None

◆ wm_spi_cs_config()

void wm_spi_cs_config ( enum tls_io_name io_name )

config the pins used for spi cs

Parameters
io_name config spi cs pins name WM_IO_PA_00 WM_IO_PB_04 WM_IO_PB_14 only for 56pin WM_IO_PB_23 only for 56pin
Returns
None

◆ wm_spi_di_config()

void wm_spi_di_config ( enum tls_io_name io_name )

config the pins used for spi di

Parameters
io_name config spi di pins name WM_IO_PB_00 WM_IO_PB_03 WM_IO_PB_16 only for 56pin WM_IO_PB_25 only for 56pin
Returns
None

◆ wm_spi_do_config()

void wm_spi_do_config ( enum tls_io_name io_name )

config the pins used for spi do

Parameters
io_name config spi do pins name WM_IO_PA_07 WM_IO_PB_05 WM_IO_PB_17 only for 56pin WM_IO_PB_26 only for 56pin
Returns
None

◆ wm_swd_config()

void wm_swd_config ( bool enable )

config the pins used for swd

Parameters
enable enable or disable chip swd function 1: enable 0: disable
Returns
None

◆ wm_touch_sensor_config()

void wm_touch_sensor_config ( enum tls_io_name io_name )

config the pins used for touch sensor

Parameters
io_name config touch sensor pins name WM_IO_PA_07 WM_IO_PB_00 WM_IO_PB_01 WM_IO_PB_02 WM_IO_PB_03 WM_IO_PB_04 WM_IO_PB_05 WM_IO_PB_06 WM_IO_PB_07 WM_IO_PB_08 WM_IO_PB_09 WM_IO_PA_09 only for 56pin WM_IO_PA_10 only for 56pin WM_IO_PA_12 only for 56pin WM_IO_PA_14 only for 56pin
Returns
None
Note
If user use touch sensor function, firstly consider using WM_IO_PA_07 as TOUCH SENSOR pin.

◆ wm_uart0_rx_config()

void wm_uart0_rx_config ( enum tls_io_name io_name )

config the pins used for uart0 rx

Parameters
io_name config uart0 rx pins name WM_IO_PB_20
Returns
None

◆ wm_uart0_tx_config()

void wm_uart0_tx_config ( enum tls_io_name io_name )

config the pins used for uart0 tx

Parameters
io_name config uart0 tx pins name WM_IO_PB_19 WM_IO_PB_27 only for 56pin
Returns
None

◆ wm_uart1_cts_config()

void wm_uart1_cts_config ( enum tls_io_name io_name )

config the pins used for uart1 cts

Parameters
io_name config uart1 cts pins name WM_IO_PB_20 WM_IO_PA_03 only for 56pin
Returns
None

◆ wm_uart1_rts_config()

void wm_uart1_rts_config ( enum tls_io_name io_name )

config the pins used for uart1 rts

Parameters
io_name config uart1 rts pins name WM_IO_PB_19 WM_IO_PA_02 only for 56pin
Returns
None

◆ wm_uart1_rx_config()

void wm_uart1_rx_config ( enum tls_io_name io_name )

config the pins used for uart1 rx

Parameters
io_name config uart1 rx pins name WM_IO_PB_07 WM_IO_PB_16 only for 56pin
Returns
None

◆ wm_uart1_tx_config()

void wm_uart1_tx_config ( enum tls_io_name io_name )

config the pins used for uart1 tx

Parameters
io_name config uart1 tx pins name WM_IO_PB_06
Returns
None

◆ wm_uart2_cts_config()

void wm_uart2_cts_config ( enum tls_io_name io_name )

config the pins used for uart2 cts

Parameters
io_name config uart2 cts pins name WM_IO_PB_05 WM_IO_PA_06 only for 56pin
Returns
None

◆ wm_uart2_rts_scclk_config()

void wm_uart2_rts_scclk_config ( enum tls_io_name io_name )

config the pins used for uart2 rts or 7816-clk

Parameters
io_name config uart2 rts or 7816-clk pins name WM_IO_PB_04 WM_IO_PA_05 only for 56pin
Returns
None

◆ wm_uart2_rx_config()

void wm_uart2_rx_config ( enum tls_io_name io_name )

config the pins used for uart2 rx

Parameters
io_name config uart2 rx pins name WM_IO_PB_03 WM_IO_PA_03 only for 56pin
Returns
None

◆ wm_uart2_tx_scio_config()

void wm_uart2_tx_scio_config ( enum tls_io_name io_name )

config the pins used for uart2 tx or 7816-io

Parameters
io_name config uart2 tx or 7816-io pins name WM_IO_PB_02 WM_IO_PA_02 only for 56pin
Returns
None

◆ wm_uart3_cts_config()

void wm_uart3_cts_config ( enum tls_io_name io_name )

config the pins used for uart3 cts

Parameters
io_name config uart3 cts pins name WM_IO_PA_03
Returns
None

◆ wm_uart3_rts_config()

void wm_uart3_rts_config ( enum tls_io_name io_name )

config the pins used for uart3 rts

Parameters
io_name config uart3 rts pins name WM_IO_PA_02
Returns
None

◆ wm_uart3_rx_config()

void wm_uart3_rx_config ( enum tls_io_name io_name )

config the pins used for uart3 rx

Parameters
io_name config uart1 rx pins name WM_IO_PB_01 WM_IO_PA_06 only for 56pin
Returns
None

◆ wm_uart3_tx_config()

void wm_uart3_tx_config ( enum tls_io_name io_name )

config the pins used for uart3 tx

Parameters
io_name config uart1 tx pins name WM_IO_PB_00 WM_IO_PA_05 only for 56pin
Returns
None

◆ wm_uart4_cts_config()

void wm_uart4_cts_config ( enum tls_io_name io_name )

config the pins used for uart4 cts

Parameters
io_name config uart4 cts pins name WM_IO_PA_06 only for 56pin WM_IO_PA_11 only for 56pin
Returns
None

◆ wm_uart4_rts_config()

void wm_uart4_rts_config ( enum tls_io_name io_name )

config the pins used for uart4 rts

Parameters
io_name config uart4 rts pins name WM_IO_PA_05 only for 56pin WM_IO_PA_10 only for 56pin
Returns
None

◆ wm_uart4_rx_config()

void wm_uart4_rx_config ( enum tls_io_name io_name )

config the pins used for uart4 rx

Parameters
io_name config uart1 rx pins name WM_IO_PB_05 WM_IO_PA_09 only for 56pin
Returns
None

◆ wm_uart4_tx_config()

void wm_uart4_tx_config ( enum tls_io_name io_name )

config the pins used for uart4 tx

Parameters
io_name config uart1 tx pins name WM_IO_PB_04 WM_IO_PA_08 only for 56pin
Returns
None

◆ wm_uart5_cts_config()

void wm_uart5_cts_config ( enum tls_io_name io_name )

config the pins used for uart4 cts

Parameters
io_name config uart4 cts pins name WM_IO_PA_15 only for 56pin WM_IO_PB_13 only for 56pin
Returns
None

◆ wm_uart5_rts_config()

void wm_uart5_rts_config ( enum tls_io_name io_name )

config the pins used for uart4 rts

Parameters
io_name config uart4 rts pins name WM_IO_PA_14 only for 56pin WM_IO_PB_12 only for 56pin
Returns
None

◆ wm_uart5_rx_config()

void wm_uart5_rx_config ( enum tls_io_name io_name )

config the pins used for uart4 rx

Parameters
io_name config uart1 rx pins name WM_IO_PA_09 only for 56pin WM_IO_PA_13 only for 56pin WM_IO_PB_17 only for 56pin
Returns
None

◆ wm_uart5_tx_config()

void wm_uart5_tx_config ( enum tls_io_name io_name )

config the pins used for uart4 tx

Parameters
io_name config uart1 tx pins name WM_IO_PA_08 only for 56pin WM_IO_PA_12 only for 56pin WM_IO_PB_18 only for 56pin
Returns
None


W800 SDK APIs: MASTER SPI Driver APIs

Functions
MASTER SPI Driver APIs
Driver APIs

MASTERSPI driver APIs. More...

Functions

int | tls_spi_init (void)
This function is used to initialize the SPI master driver. More...
int | tls_spi_setup (u8 mode, u8 cs_active, u32 fclk)
This function is used to setup the spi controller. More...
int | tls_spi_write (const u8 *buf, u32 len)
This function is used to synchronous write data by SPI. More...
int | tls_spi_read (u8 *buf, u32 len)
This function is used to synchronously read data from SPI. More...
int | tls_spi_read_with_cmd (const u8 *txbuf, u32 n_tx, u8 *rxbuf, u32 n_rx)
This function is used to synchronously write command and then read data from SPI. More...
int | tls_spi_write_with_cmd (const u8 *cmd, u32 n_cmd, const u8 *txbuf, u32 n_tx)
This function is used to synchronous write 32bit command then write data from SPI. More...
void | tls_spi_trans_type (u8 type)
This function is used to set SPI transfer mode. More...

Detailed Description

MASTERSPI driver APIs.

Function Documentation

◆ tls_spi_init()

int tls_spi_init ( void )

This function is used to initialize the SPI master driver.

Parameters
[in] None
Return values
TLS_SPI_STATUS_OK | if initialize success
TLS_SPI_STATUS_EBUSY | if SPI is already initialized
TLS_SPI_STATUS_ENOMEM | if malloc SPI memory fail
Note
None

◆ tls_spi_read()

int tls_spi_read | ( | u8 * | buf,
 |  | u32 | len
 | ) |  |

This function is used to synchronously read data from SPI.

Parameters
[in] | buf | is the buffer for saving SPI data.
[in] | len | is the data length.
Return values
TLS_SPI_STATUS_OK | if write success.
TLS_SPI_STATUS_EINVAL | if argument is invalid.
TLS_SPI_STATUS_ENOMEM | if there is no enough memory.
TLS_SPI_STATUS_ESHUTDOWN | if SPI driver does not installed.
Note
None

◆ tls_spi_read_with_cmd()

int tls_spi_read_with_cmd | ( | const u8 * | txbuf,
 |  | u32 | n_tx,
 |  | u8 * | rxbuf,
 |  | u32 | n_rx
 | ) |  |

This function is used to synchronously write command and then read data from SPI.

Parameters
[in] | txbuf | is the write data buffer.
[in] | n_tx | is the write data length.
[in] | rxbuf | is the read data buffer.
[in] | n_rx | is the read data length.
Return values
TLS_SPI_STATUS_OK | if write success.
TLS_SPI_STATUS_EINVAL | if argument is invalid.
TLS_SPI_STATUS_ENOMEM | if there is no enough memory.
TLS_SPI_STATUS_ESHUTDOWN | if SPI driver has not been installed.
Note
None

◆ tls_spi_setup()

int tls_spi_setup | ( | u8 | mode,
 |  | u8 | cs_active,
 |  | u32 | fclk
 | ) |  |

This function is used to setup the spi controller.

Parameters
[in] | mode | is CPOL and CPHA type defined in TLS_SPI_MODE_0 to TLS_SPI_MODE_3
[in] | cs_active | is cs mode, defined as TLS_SPI_CS_LOW or TLS_SPI_CS_HIGH
[in] | fclk | is spi clock,the unit is HZ.
Return values
TLS_SPI_STATUS_OK | if setup success
TLS_SPI_STATUS_EMODENOSUPPORT | if mode is not support
TLS_SPI_STATUS_EINVAL | if cs_active is not support
TLS_SPI_STATUS_ECLKNOSUPPORT | if fclk is not support
Note
None

◆ tls_spi_trans_type()

void tls_spi_trans_type ( u8 type )

This function is used to set SPI transfer mode.

Parameters
[in] type is the transfer type. SPI_BYTE_TRANSFER ->byte transfer; SPI_WORD_TRANSFER ->word transfer; SPI_DMA_TRANSFER ->DMA transfer;
Returns
None
Note
None

◆ tls_spi_write()

int tls_spi_write | ( | const u8 * | buf,
 |  | u32 | len
 | ) |  |

This function is used to synchronous write data by SPI.

Parameters
[in] | buf | data to be sent.
[in] | len | data length.
Return values
TLS_SPI_STATUS_OK | if write success.
TLS_SPI_STATUS_EINVAL | if argument is invalid.
TLS_SPI_STATUS_ENOMEM | if there is no enough memory.
TLS_SPI_STATUS_ESHUTDOWN | if SPI driver does not installed.
Note
None

◆ tls_spi_write_with_cmd()

int tls_spi_write_with_cmd | ( | const u8 * | cmd,
 |  | u32 | n_cmd,
 |  | const u8 * | txbuf,
 |  | u32 | n_tx
 | ) |  |

This function is used to synchronous write 32bit command then write data from SPI.

Parameters
[in] | cmd | is the command data.
[in] | n_cmd | is the command len,can not bigger than four
[in] | txbuf | is the write data buffer.
[in] | n_tx | is the write data length.
Return values
TLS_SPI_STATUS_OK | if write success.
TLS_SPI_STATUS_EINVAL | if argument is invalid.
TLS_SPI_STATUS_ENOMEM | if there is no enough memory.
TLS_SPI_STATUS_ESHUTDOWN | if SPI driver does not installed.
Note
None


W800 SDK APIs: HSPI Driver APIs

Functions
HSPI Driver APIs
Driver APIs

HSPI driver APIs. More...

Functions

int | tls_slave_spi_init (void)
This function is used to initial HSPI register. More...
void | tls_set_hspi_user_mode (u8 ifenable)
This function is used to enable or disable user mode. More...
void | tls_set_high_speed_interface_type (int type)
This function is used to set high speed interface type. More...
void | tls_hspi_rx_cmd_callback_register (s16(*rx_cmd_callback)(char *buf))
This function is used to register hspi rx command interrupt. More...
void | tls_hspi_rx_data_callback_register (s16(*rx_data_callback)(char *buf))
This function is used to register hspi rx data interrupt. More...
void | tls_hspi_tx_data_callback_register (s16(*tx_data_callback)(char *buf))
This function is used to register hspi tx data interrupt. More...
int | tls_hspi_tx_data (char *txbuf, int len)
This function is used to transfer data. More...

Detailed Description

HSPI driver APIs.

Function Documentation

◆ tls_hspi_rx_cmd_callback_register()

void tls_hspi_rx_cmd_callback_register ( s16(*)(char *buf) rx_cmd_callback )

This function is used to register hspi rx command interrupt.

Parameters
[in] rx_cmd_callback is the hspi rx interrupt call back function.
Returns
None
Note
None

◆ tls_hspi_rx_data_callback_register()

void tls_hspi_rx_data_callback_register ( s16(*)(char *buf) rx_data_callback )

This function is used to register hspi rx data interrupt.

Parameters
[in] rx_data_callback is the hspi rx interrupt call back function.
Returns
None
Note
None

◆ tls_hspi_tx_data()

int tls_hspi_tx_data | ( | char * | txbuf,
 |  | int | len
 | ) |  |

This function is used to transfer data.

Parameters
[in] | txbuf | is a buf for saving user data.
[in] | len | is the data length.
Return values
transfer | data len success
0 | failed
Note
None

◆ tls_hspi_tx_data_callback_register()

void tls_hspi_tx_data_callback_register ( s16(*)(char *buf) tx_data_callback )

This function is used to register hspi tx data interrupt.

Parameters
[in] tx_data_callback is the hspi tx interrupt call back function.
Returns
None
Note
None

◆ tls_set_high_speed_interface_type()

void tls_set_high_speed_interface_type ( int type )

This function is used to set high speed interface type.

Parameters
[in] type is the interface type. HSPI_INTERFACE_SPI or HSPI_INTERFACE_SDIO
Returns
None
Note
None

◆ tls_set_hspi_user_mode()

void tls_set_hspi_user_mode ( u8 ifenable )

This function is used to enable or disable user mode.

Parameters
[in] ifenable TRUE or FALSE
Returns
None
Note
If the user enables the user mode, RICM instruction in the system will not be used by SPI. If the user wants to use the SPI interface as other use, need to enable the user mode. This function must be called before the register function.

◆ tls_slave_spi_init()

int tls_slave_spi_init ( void )

This function is used to initial HSPI register.

Parameters
[in] None
Return values
0 | success
other | failed
Note
When the system is initialized, the function has been called, so users can not call this function.


W800 SDK APIs: I2C Driver APIs

Macros | Functions
I2C Driver APIs
Driver APIs

I2C driver APIs. More...

Macros

#define wm_i2c_int_mask(bl) do { tls_bitband_write(HR_I2C_CTRL, 6, bl);}while(0);

Functions

void | tls_i2c_init (u32 freq)
Init the I2C module. More...
void | tls_i2c_stop (void)
send stop signal
int | tls_i2c_wait_ack (void)
Waiting for ack signal. More...
void | tls_i2c_write_byte (u8 data, u8 ifstart)
Writes the data to data register of I2C module when ifstart one the start signal will be sent followed by the data when ifstart zero only the data will be send. More...
u8 | tls_i2c_read_byte (u8 ifack, u8 ifstop)
Get the data stored in data register of I2C module. More...
void | wm_i2c_transfer_done_register (void(*done)(void))
This function is used to register i2c transfer done callback function. More...
int | wm_i2c_start_write_it (uint8_t devaddr, uint8_t wordaddr, uint8_t *buf, uint16_t len)
Start writing through int mode. More...
int | wm_i2c_start_read_it (uint8_t devaddr, uint8_t wordaddr, uint8_t *buf, uint16_t len)
Get the data stored in data register of I2C module. More...

Detailed Description

I2C driver APIs.

Macro Definition Documentation

◆ wm_i2c_int_mask

#define wm_i2c_int_mask ( bl ) do { tls_bitband_write(HR_I2C_CTRL, 6, bl);}while(0);

I2C initialization mask

Function Documentation

◆ tls_i2c_init()

void tls_i2c_init ( u32 freq )

Init the I2C module.

Parameters
freq I2C reference clock frequency in Hz that will be used
Note
the value must be between 100k and 400k

◆ tls_i2c_read_byte()

u8 tls_i2c_read_byte | ( | u8 | ifack,
 |  | u8 | ifstop
 | ) |  |

Get the data stored in data register of I2C module.

Parameters
[in] | ifack | when one send ack after reading the data register,when zero don't
[in] | ifstop | when one send stop signal after read, when zero do not send stop
Return values
the received data

◆ tls_i2c_wait_ack()

int tls_i2c_wait_ack ( void )

Waiting for ack signal.

Return values
- WM_FAILED
  • WM_SUCCESS

◆ tls_i2c_write_byte()

void tls_i2c_write_byte | ( | u8 | data,
 |  | u8 | ifstart
 | ) |  |

Writes the data to data register of I2C module when ifstart one the start signal will be sent followed by the data when ifstart zero only the data will be send.

Parameters
[in] | data | the data will be write to the data register of I2C module
[in] | ifstart | when one send start signal, when zero don't
Return values

◆ wm_i2c_start_read_it()

int wm_i2c_start_read_it | ( | uint8_t | devaddr,
 |  | uint8_t | wordaddr,
 |  | uint8_t * | buf,
 |  | uint16_t | len
 | ) |  |

Get the data stored in data register of I2C module.

Parameters
[in] | ifack | when one send ack after reading the data register,when zero don't
[in] | ifstop | when one send stop signal after read, when zero do not send stop
Return values
the received data

◆ wm_i2c_start_write_it()

int wm_i2c_start_write_it | ( | uint8_t | devaddr,
 |  | uint8_t | wordaddr,
 |  | uint8_t * | buf,
 |  | uint16_t | len
 | ) |  |

Start writing through int mode.

Parameters
[in] | devaddr | the device address
[in] | wordaddr | when one send stop signal after read, when zero do not send stop
[in] | buf | the address point where data shoule be stored
[in] | len | the length of data will be received
Return values
- WM_FAILED
  • WM_SUCCESS

◆ wm_i2c_transfer_done_register()

void wm_i2c_transfer_done_register ( void(*)(void) done )

This function is used to register i2c transfer done callback function.

Parameters
[in] done is the i2c transfer done callback function.
Return values
None
Note
None


W800 SDK APIs: I2S Driver APIs

Functions
I2S Driver APIs
Driver APIs

I2S driver APIs. More...

Functions

void | wm_i2s_register_callback (tls_i2s_callback callback)
Register a callback function. More...
int | wm_i2s_port_init (I2S_InitDef *opts)
Initializes the I2S according to the specified parameters in the I2S_InitDef. More...
void | wm_i2s_tx_rx_stop (void)
stop i2s module More...
int | wm_i2s_tx_int (int16_t *data, uint16_t len, int16_t *next_data)
Transmit an amount of data in blocking mode with Interrupt. More...
int | wm_i2s_tx_dma (int16_t *data, uint16_t len, int16_t *next_data)
Transmit an amount of data in blocking mode with DMA's normal mode. More...
int | wm_i2s_tx_dma_link (int16_t *data, uint16_t len, int16_t *next_data)
Transmit an amount of data in blocking mode with DMA's link mode. More...
int | wm_i2s_rx_int (int16_t *data, uint16_t len)
Receive an amount of data in blocking mode with Interrupt. More...
int | wm_i2s_rx_dma (int16_t *data, uint16_t len)
Receive an amount of data in blocking mode with DMA. More...
int | wm_i2s_tx_rx_int (I2S_InitDef *opts, int16_t *data_tx, int16_t *data_rx, uint16_t len)
Full-Duplex Transmit/Receive data in blocking mode using Interrupt. More...
int | wm_i2s_tx_rx_dma (I2S_InitDef *opts, int16_t *data_tx, int16_t *data_rx, uint16_t len)
Full-Duplex Transmit/Receive data in blocking mode using DMA. More...
int | wm_i2s_transmit_dma (wm_dma_handler_type *hdma, uint16_t *data, uint16_t len)
int | wm_i2s_receive_dma (wm_dma_handler_type *hdma, uint16_t *data, uint16_t len)

Detailed Description

I2S driver APIs.

Function Documentation

◆ wm_i2s_port_init()

int wm_i2s_port_init ( I2S_InitDef * opts )

Initializes the I2S according to the specified parameters in the I2S_InitDef.

Parameters
opts pointer to a I2S_InitDef structure that contains the configuration information for I2S module
Return values
status

◆ wm_i2s_register_callback()

void wm_i2s_register_callback ( tls_i2s_callback callback )

Register a callback function.

Parameters
callback | pointer to a callback function in which you can prepare the next buffer
callback->data | pointer to data buffer to be prepared
callback->len | size of the data buffer to be prepared in 32-bit
Note
The registerred callback function will be called as long as the transmission begins
Return values
none

◆ wm_i2s_rx_dma()

int wm_i2s_rx_dma | ( | int16_t * | data,
 |  | uint16_t | len
 | ) |  |

Receive an amount of data in blocking mode with DMA.

Parameters
data | a 16-bit pointer to the Receive data buffer.
len | number of data sample to be received:
Note
the len parameter means the number of 16-bit data length.
The I2S is kept enabled at the end of transaction to avoid the clock de-synchronization between Master and Slave(example: audio streaming).
This function will block its task until the transmission is over,so perpare the next data buffer at another task during this interval.
Return values
status

◆ wm_i2s_rx_int()

int wm_i2s_rx_int | ( | int16_t * | data,
 |  | uint16_t | len
 | ) |  |

Receive an amount of data in blocking mode with Interrupt.

Parameters
data | a 16-bit pointer to the Receive data buffer.
len | number of data sample to be received:
Note
the len parameter means the number of 16-bit data length.
The I2S is kept enabled at the end of transaction to avoid the clock de-synchronization between Master and Slave(example: audio streaming).
This function will block its task until the transmission is over,so perpare the next data buffer at another task during this interval.
Return values
status

◆ wm_i2s_tx_dma()

int wm_i2s_tx_dma | ( | int16_t * | data,
 |  | uint16_t | len,
 |  | int16_t * | next_data
 | ) |  |

Transmit an amount of data in blocking mode with DMA's normal mode.

Parameters
data | a 16-bit pointer to data buffer.
len | number of data sample to be sent:
next_data | a 16-bit pointer to the next data buffer, same size with data; set to NULL if it's not needed
Note
the len parameter means the number of 32-bit data length.
The I2S is kept enabled at the end of transaction to avoid the clock de-synchronization between Master and Slave(example: audio streaming).
This function will block its task until the transmission is over,so perpare the next data buffer at another task during this interval.
This function will call the registerred callback function as long as the transmission begins
Return values
status

◆ wm_i2s_tx_dma_link()

int wm_i2s_tx_dma_link | ( | int16_t * | data,
 |  | uint16_t | len,
 |  | int16_t * | next_data
 | ) |  |

Transmit an amount of data in blocking mode with DMA's link mode.

Parameters
data | a 16-bit pointer to data buffer.
len | number of data sample to be sent:
next_data | a 16-bit pointer to the next data buffer, same size with data:
Note
the len parameter means the number of 32-bit data length.
The I2S is kept enabled at the end of transaction to avoid the clock de-synchronization between Master and Slave(example: audio streaming).
This function will block its task until the transmission is over,so perpare the next data buffer at another task during this interval.Set len to 0xffff will exit this rountine.
This function will call the registerred callback function as long as the data or next_data is sent out.So prepare it in the callback.
See the demo for detail use.
Return values
status

◆ wm_i2s_tx_int()

int wm_i2s_tx_int | ( | int16_t * | data,
 |  | uint16_t | len,
 |  | int16_t * | next_data
 | ) |  |

Transmit an amount of data in blocking mode with Interrupt.

Parameters
data | a 16-bit pointer to data buffer.
len | number of data sample to be sent:
next_data | a 16-bit pointer to the next data buffer, same size with data; set to NULL if it's not needed
Note
the len parameter means the number of 16-bit data length.
The I2S is kept enabled at the end of transaction to avoid the clock de-synchronization between Master and Slave(example: audio streaming).
This function will block its task until the transmission is over,so perpare the next data buffer at another task during this interval.
This function will call the registerred callback function as long as the transmission begins
Return values
status

◆ wm_i2s_tx_rx_dma()

int wm_i2s_tx_rx_dma | ( | I2S_InitDef * | opts,
 |  | int16_t * | data_tx,
 |  | int16_t * | data_rx,
 |  | uint16_t | len
 | ) |  |

Full-Duplex Transmit/Receive data in blocking mode using DMA.

Parameters
opts | pointer to a I2S_InitDef structure that contains the configuration information for I2S module
data_tx | a 16-bit pointer to the Transmit data buffer.
data_rx | a 16-bit pointer to the Receive data buffer.
len | number of data sample to be sent:
Note
the len parameter means the number of 16-bit data length.
The I2S is kept enabled at the end of transaction to avoid the clock de-synchronization between Master and Slave(example: audio streaming).
This function will block its task until the transmission is over,so perpare the next data buffer at another task during this interval.
Return values
status

◆ wm_i2s_tx_rx_int()

int wm_i2s_tx_rx_int | ( | I2S_InitDef * | opts,
 |  | int16_t * | data_tx,
 |  | int16_t * | data_rx,
 |  | uint16_t | len
 | ) |  |

Full-Duplex Transmit/Receive data in blocking mode using Interrupt.

Parameters
opts | pointer to a I2S_InitDef structure that contains the configuration information for I2S module
data_tx | a 16-bit pointer to the Transmit data buffer.
data_rx | a 16-bit pointer to the Receive data buffer.
len | number of data sample to be sent:
Note
the len parameter means the number of 16-bit data length.
The I2S is kept enabled at the end of transaction to avoid the clock de-synchronization between Master and Slave(example: audio streaming).
This function will block its task until the transmission is over,so perpare the next data buffer at another task during this interval.
Return values
status

◆ wm_i2s_tx_rx_stop()

void wm_i2s_tx_rx_stop ( void )

stop i2s module

Return values
none


W800 SDK APIs: INNER FLASH Driver APIs

Enumerator | Functions | Variables
INNER FLASH Driver APIs
Driver APIs

INNER FLASH driver APIs. More...

Functions

int | tls_flash_unlock (void)
This function is used to unlock flash protect area [0x0~0x2000]. More...
int | tls_flash_lock (void)
This function is used to lock flash protect area [0x0~0x2000]. More...
void | tls_fls_sem_lock (void)
This function is used to get the flash semaphore. More...
void | tls_fls_sem_unlock (void)
This function is used to release the flash semaphore. More...
int | tls_fls_read_unique_id (unsigned char *uuid)
This function is used to read the unique id of the internal flash. More...
int | tls_fls_init (void)
This function is used to initial flash module structer. More...
int | tls_fls_read (u32 addr, u8 *buf, u32 len)
This function is used to read data from the flash. More...
int | tls_fls_write (u32 addr, u8 *buf, u32 len)
This function is used to write data into the flash. More...
int | tls_fls_write_without_erase (u32 addr, u8 *buf, u32 len)
This function is used to write data into the flash without erase. More...
int | tls_fls_erase (u32 sector)
This function is used to erase the appointed sector. More...
void | tls_fls_sys_param_postion_init (void)
This function is used to initialize system parameter postion by flash density. More...
int | tls_fls_otp_read (u32 addr, u8 *buf, u32 len)
This function is used to read data from the security registers. More...
int | tls_fls_otp_write (u32 addr, u8 *buf, u32 len)
This function is used to write data into the security registers. More...
int | tls_fls_otp_lock (void)
This function is used to lock the security registers. More...

Variables

uint32_t _reserved0: 1
uint32_t code_decrypt: 1
uint32_t dbus_decrypt: 1
uint32_t data_decrypt: 1
uint32_t prikey_sel: 3
uint32_t decrypt_start: 1
uint32_t _reserved2: 24
struct {
uint32_t _reserved0: 1
uint32_t code_decrypt: 1
uint32_t dbus_decrypt: 1
uint32_t data_decrypt: 1
uint32_t prikey_sel: 3
uint32_t decrypt_start: 1
uint32_t _reserved2: 24
} b
uint32_t | w
vu32 | ACR
vu32 | KEYR
vu32 | SR
vu32 | CR
vu32 | AR
uint16_t | eraseSize
uint16_t | pageSize
tls_os_sem_t * | fls_lock
unsigned char | flashid
unsigned int | density
FLASH_OTP_WR_PARAM_ST | OTPWRParam

Detailed Description

INNER FLASH driver APIs.

Function Documentation

◆ tls_flash_lock()

int tls_flash_lock ( void )

This function is used to lock flash protect area [0x0~0x2000].

Parameters
None
Returns
0-success,non-zero-failure
Note
None

◆ tls_flash_unlock()

int tls_flash_unlock ( void )

This function is used to unlock flash protect area [0x0~0x2000].

Parameters
None
Returns
0-success,non-zero-failure
Note
None

◆ tls_fls_erase()

int tls_fls_erase ( u32 sector )

This function is used to erase the appointed sector.

Parameters
[in] sector sector num of the flash, 4K bytes every sector
Return values
TLS_FLS_STATUS_OK | if read sucsess
other | if read fail
Note
None

◆ tls_fls_init()

int tls_fls_init ( void )

This function is used to initial flash module structer.

Parameters
[in] None
Return values
TLS_FLS_STATUS_OK | if init sucsess
TLS_FLS_STATUS_EBUSY | already inited
TLS_FLS_STATUS_ENOMEM | memory error
Note
None

◆ tls_fls_otp_lock()

int tls_fls_otp_lock ( void )

This function is used to lock the security registers.

Parameters
None
Returns
None
Note
None

◆ tls_fls_otp_read()

int tls_fls_otp_read | ( | u32 | addr,
 |  | u8 * | buf,
 |  | u32 | len
 | ) |  |

This function is used to read data from the security registers.

Parameters
[in] | addr | Specifies the starting address to read from.
[in] | buf | Specified the address to save the readback data.
[in] | len | Specifies the length of the data to read.
Return values
TLS_FLS_STATUS_OK | if read sucsess
TLS_FLS_STATUS_EPERM | if flash struct point is null
Note
None

◆ tls_fls_otp_write()

int tls_fls_otp_write | ( | u32 | addr,
 |  | u8 * | buf,
 |  | u32 | len
 | ) |  |

This function is used to write data into the security registers.

Parameters
[in] | addr | Specifies the starting address to write to
[in] | buf | Pointer to a byte array that is to be written
[in] | len | Specifies the length of the data to be written
Return values
TLS_FLS_STATUS_OK | if write the security registers success
TLS_FLS_STATUS_EPERM | if flash struct point is null
TLS_FLS_STATUS_ENOSUPPORT | if flash is not supported
TLS_FLS_STATUS_EINVAL | if argument is invalid
TLS_FLS_STATUS_ENOMEN | if no memory
Note
None

◆ tls_fls_read()

int tls_fls_read | ( | u32 | addr,
 |  | u8 * | buf,
 |  | u32 | len
 | ) |  |

This function is used to read data from the flash.

Parameters
[in] | addr | Specifies the starting address to read from.
[in] | buf | Specified the address to save the readback data.
[in] | len | Specifies the length of the data to read.
Return values
TLS_FLS_STATUS_OK | if read sucsess
TLS_FLS_STATUS_EIO | if read fail
Note
None

◆ tls_fls_read_unique_id()

int tls_fls_read_unique_id ( unsigned char * uuid )

This function is used to read the unique id of the internal flash.

Parameters
[out] uuid Specified the address to save the uuid, the length must be greater than or equals to 18 bytes.
Return values
TLS_FLS_STATUS_OK | if read sucsess
TLS_FLS_STATUS_EIO | if read fail
Note
The uuid's length must be greater than or equals to 18 bytes.

◆ tls_fls_sem_lock()

void tls_fls_sem_lock ( void )

This function is used to get the flash semaphore.

Parameters
None
Returns
None
Note
None

◆ tls_fls_sem_unlock()

void tls_fls_sem_unlock ( void )

This function is used to release the flash semaphore.

Parameters
None
Returns
None
Note
None

◆ tls_fls_sys_param_postion_init()

void tls_fls_sys_param_postion_init ( void )

This function is used to initialize system parameter postion by flash density.

Parameters
None
Return values
None
Note
must be called before tls_param_init

◆ tls_fls_write()

int tls_fls_write | ( | u32 | addr,
 |  | u8 * | buf,
 |  | u32 | len
 | ) |  |

This function is used to write data into the flash.

Parameters
[in] | addr | Specifies the starting address to write to
[in] | buf | Pointer to a byte array that is to be written
[in] | len | Specifies the length of the data to be written
Return values
TLS_FLS_STATUS_OK | if write flash success
TLS_FLS_STATUS_EPERM | if flash struct point is null
TLS_FLS_STATUS_ENODRV | if flash driver is not installed
TLS_FLS_STATUS_EINVAL | if argument is invalid
TLS_FLS_STATUS_EIO | if io error
Note
None

◆ tls_fls_write_without_erase()

int tls_fls_write_without_erase | ( | u32 | addr,
 |  | u8 * | buf,
 |  | u32 | len
 | ) |  |

This function is used to write data into the flash without erase.

Parameters
[in] | addr | Specifies the starting address to write to
[in] | buf | Pointer to a byte array that is to be written
[in] | len | Specifies the length of the data to be written
Return values
TLS_FLS_STATUS_OK | if write flash success
TLS_FLS_STATUS_EPERM | if flash struct point is null
TLS_FLS_STATUS_ENODRV | if flash driver is not installed
TLS_FLS_STATUS_EINVAL | if argument is invalid
Note
Erase action should be excuted by API tls_fls_erase in user layer.

Variable Documentation

◆ _reserved0 [1/2]

uint32_t _reserved0

bit: 0 Reserved

◆ _reserved0 [2/2]

uint32_t _reserved0

bit: 0 Reserved

◆ _reserved2 [1/2]

uint32_t _reserved2

bit: 8.. 31 Reserved

◆ _reserved2 [2/2]

uint32_t _reserved2

bit: 8.. 31 Reserved

◆ ACR

vu32 ACR

offset 0x000

◆ AR

vu32 AR

offset 0x010

◆ b

struct { ... } b

Structure Access by bit

◆ code_decrypt [1/2]

uint32_t code_decrypt

bit: 1 read code from AHB decrypt flag

◆ code_decrypt [2/2]

uint32_t code_decrypt

bit: 1 read code from AHB decrypt flag

◆ CR

vu32 CR

offset 0x00C

◆ data_decrypt [1/2]

uint32_t data_decrypt

bit: 3 read data from AHB decrypt flag

◆ data_decrypt [2/2]

uint32_t data_decrypt

bit: 3 read data from AHB decrypt flag

◆ dbus_decrypt [1/2]

uint32_t dbus_decrypt

bit: 2 read data from Flash register controller decrypt flag

◆ dbus_decrypt [2/2]

uint32_t dbus_decrypt

bit: 2 read data from Flash register controller decrypt flag

◆ decrypt_start [1/2]

uint32_t decrypt_start

bit: 7 write 1 to start RSA decryption operation

◆ decrypt_start [2/2]

uint32_t decrypt_start

bit: 7 write 1 to start RSA decryption operation

◆ KEYR

vu32 KEYR

offset 0x004

◆ prikey_sel [1/2]

uint32_t prikey_sel

bit: 4.. 6 private key selection: 0 : first one; 1 : second one;

◆ prikey_sel [2/2]

uint32_t prikey_sel

bit: 4.. 6 private key selection: 0 : first one; 1 : second one;

◆ SR

vu32 SR

offset 0x008

◆ w

uint32_t w

Type Access by whole register


W800 SDK APIs: IRQ Driver APIs

Functions
IRQ Driver APIs
Driver APIs

IRQ driver APIs. More...

Functions

void | tls_irq_init (void)
This function is used to initial system interrupt. More...
void | tls_irq_register_handler (u8 vec_no, intr_handler_func handler, void *data)
This function is used to register interrupt handler function. More...
void | tls_irq_enable (u8 vec_no)
This function is used to enable interrupt. More...
void | tls_irq_disable (u8 vec_no)
This function is used to disable interrupt. More...
u8 | tls_get_isr_count (void)
This function is used to get the isr count. More...
int | csi_kernel_intrpt_enter (void)
This function is used to enter interrupt. More...
int | csi_kernel_intrpt_exit (void)
This function is used to exit from interrupt. More...
void | tls_irq_priority (u8 vec_no, u32 prio)

Detailed Description

IRQ driver APIs.

Function Documentation

◆ csi_kernel_intrpt_enter()

int csi_kernel_intrpt_enter ( void )

This function is used to enter interrupt.

Parameters
[in] None
Returns
0:success
Note
None

◆ csi_kernel_intrpt_exit()

int csi_kernel_intrpt_exit ( void )

This function is used to exit from interrupt.

Parameters
[in] None
Returns
0:success
Note
None

◆ tls_get_isr_count()

u8 tls_get_isr_count ( void )

This function is used to get the isr count.

Parameters
[in] None
Return values
count
Note
None

◆ tls_irq_disable()

void tls_irq_disable ( u8 vec_no )

This function is used to disable interrupt.

Parameters
[in] vec_no interrupt NO
Returns
None
Note
None

◆ tls_irq_enable()

void tls_irq_enable ( u8 vec_no )

This function is used to enable interrupt.

Parameters
[in] vec_no interrupt NO
Returns
None
Note
None

◆ tls_irq_init()

void tls_irq_init ( void )

This function is used to initial system interrupt.

Parameters
[in] None
Returns
None
Note
None

◆ tls_irq_register_handler()

void tls_irq_register_handler | ( | u8 | vec_no,
 |  | intr_handler_func | handler,
 |  | void * | data
 | ) |  |

This function is used to register interrupt handler function.

Parameters
[in] | vec_no | interrupt NO
[in] | handler
[in] | *data
Returns
None
Note
None


W800 SDK APIs: LCD Driver APIs

Macros | Functions
LCD Driver APIs
Driver APIs

LCD driver APIs. More...

Macros

#define | TLS_LCD_CLK_ENABLE(enable)
Enable or disable clock of LCD module. More...
#define | TLS_LCD_ENABLE(enable)
Enable or disable the LCD module. More...
#define | TLS_LCD_POWERDOWM(enable)
Enable or disable the LCD module. More...

Functions

void | tls_lcd_fresh_ratio (uint8_t com_num, uint16_t freq)
Initialize LCD Frame Counter. More...
void | tls_lcd_init (tls_lcd_options_t *opts)
initialize the LCD module
void | tls_lcd_fresh_rate (uint16_t freq)
Initialize LCD Frame Counter. More...
void | tls_lcd_seg_set (int com, int bit, int on_off)
Turn on or clear a segment. More...
void | tls_lcd_vlcd_sel (LCD_VlcdDef vlcd)
Select the voltage of LCD module. More...
void | tls_lcd_duty_set (LCD_DutyDef duty)
Set the duty of LCD module. More...
void | tls_lcd_bias_set (LCD_BiasDef bias)
Set the bias of LCD module. More...

Detailed Description

LCD driver APIs.

Macro Definition Documentation

◆ TLS_LCD_CLK_ENABLE

#define TLS_LCD_CLK_ENABLE ( enable )
Value:
do { \
tls_bitband_write(HR_CLK_BASE_ADDR, HR_CLK_LCD_GATE_Pos, enable); \
} while(0)
HR_CLK_LCD_GATE_Pos
#define HR_CLK_LCD_GATE_Pos
Definition: wm_regs.h:707

Enable or disable clock of LCD module.

Parameters
[in] enable When one enable the clock of LCD module, when zero disable

◆ TLS_LCD_ENABLE

#define TLS_LCD_ENABLE ( enable )
Value:
do { \
tls_bitband_write(HR_LCD_CR, LCD_CR_EN_Pos, enable); \
} while(0)

Enable or disable the LCD module.

Parameters
[in] enable When one enable the LCD module, when zero disable

◆ TLS_LCD_POWERDOWM

#define TLS_LCD_POWERDOWM ( enable )
Value:
do { \
tls_bitband_write(HR_LCD_CR, LCD_CR_PD_Pos, enable); \
} while(0)

Enable or disable the LCD module.

Parameters
[in] enable When one close LCD module, when zero open the LCD module

Function Documentation

◆ tls_lcd_bias_set()

void tls_lcd_bias_set ( LCD_BiasDef bias )

Set the bias of LCD module.

Parameters
[in] duty This parameter can be one of the following values:
  • BIAS_STATIC
  • BIAS_ONEHALF
  • BIAS_ONETHIRD
  • BIAS_ONEFOURTH

◆ tls_lcd_duty_set()

void tls_lcd_duty_set ( LCD_DutyDef duty )

Set the duty of LCD module.

Parameters
[in] duty This parameter can be one of the following values:
  • DUTY_STATIC
  • DUTY_ONEHALF
  • DUTY_ONETHIRD
  • DUTY_ONEFOURTH
  • DUTY_ONEFIFTH
  • DUTY_ONESIXTH
  • DUTY_ONESEVENTH
  • DUTY_ONEEIGHTH

◆ tls_lcd_fresh_rate()

void tls_lcd_fresh_rate ( uint16_t freq )

Initialize LCD Frame Counter.

Parameters
[in] freq LCD reference refresh frequency in Hz that will be used

◆ tls_lcd_fresh_ratio()

void tls_lcd_fresh_ratio | ( | uint8_t | com_num,
 |  | uint16_t | freq
 | ) |  |

Initialize LCD Frame Counter.

Parameters
[in] | com_num | Number of the com
[in] | freq | LCD reference refresh frequency in Hz that will be used

◆ tls_lcd_seg_set()

void tls_lcd_seg_set | ( | int | com,
 |  | int | bit,
 |  | int | on_off
 | ) |  |

Turn on or clear a segment.

Parameters
[in] | com | Which COM line to update
[in] | bit | Bit index of which field to change
[in] | enable | When one will set segment, when zero will clear segment
Note
Before this function be called, the module must have been intialized

◆ tls_lcd_vlcd_sel()

void tls_lcd_vlcd_sel ( LCD_VlcdDef vlcd )

Select the voltage of LCD module.

Parameters
[in] vlcd This parameter can be one of the following values:
  • VLCD27
  • VLCD29
  • VLCD31
  • VLCD33


W800 SDK APIs: PMU Driver APIs

Functions
PMU Driver APIs
Driver APIs

PMU driver APIs. More...

Functions

void | tls_pmu_timer1_isr_register (tls_pmu_irq_callback callback, void *arg)
This function is used to register pmu timer1 interrupt. More...
void | tls_pmu_timer0_isr_register (tls_pmu_irq_callback callback, void *arg)
This function is used to register pmu timer0 interrupt. More...
void | tls_pmu_gpio_isr_register (tls_pmu_irq_callback callback, void *arg)
This function is used to register pmu gpio interrupt. More...
void | tls_pmu_sdio_isr_register (tls_pmu_irq_callback callback, void *arg)
This function is used to register pmu sdio interrupt. More...
void | tls_pmu_clk_select (u8 bypass)
This function is used to select pmu clk. More...
void | tls_pmu_timer0_start (u16 second)
This function is used to start pmu timer0. More...
void | tls_pmu_timer0_stop (void)
This function is used to stop pmu timer0. More...
void | tls_pmu_timer1_start (u16 msec)
This function is used to start pmu timer1. More...
void | tls_pmu_timer1_stop (void)
This function is used to stop pmu timer1. More...
void | tls_pmu_standby_start (void)
This function is used to start pmu goto standby. More...
void | tls_pmu_sleep_start (void)
This function is used to start pmu goto sleep. More...
void | tls_close_peripheral_clock (tls_peripheral_type_s devices)
This function is used to close peripheral's clock. More...
void | tls_open_peripheral_clock (tls_peripheral_type_s devices)
This function is used to open peripheral's clock. More...

Detailed Description

PMU driver APIs.

Function Documentation

◆ tls_close_peripheral_clock()

void tls_close_peripheral_clock ( tls_peripheral_type_s devices )

This function is used to close peripheral's clock.

Parameters
[in] devices peripherals
Returns
None
Note
None

◆ tls_open_peripheral_clock()

void tls_open_peripheral_clock ( tls_peripheral_type_s devices )

This function is used to open peripheral's clock.

Parameters
[in] devices peripherals
Returns
None
Note
None

◆ tls_pmu_clk_select()

void tls_pmu_clk_select ( u8 bypass )

This function is used to select pmu clk.

Parameters
[in] bypass pmu clk whether or not use bypass mode 1 pmu clk use 32K by 40MHZ other pmu clk 32K by calibration circuit
Returns
None
Note
None

◆ tls_pmu_gpio_isr_register()

void tls_pmu_gpio_isr_register | ( | tls_pmu_irq_callback | callback,
 |  | void * | arg
 | ) |  |

This function is used to register pmu gpio interrupt.

Parameters
[in] | callback | the pmu gpio interrupt call back function
[in] | arg | parameter of call back function
Returns
None
Note
user not need clear interrupt flag. pmu gpio callback function is called in interrupt, so can not operate the critical data in the callback fuuction, recommendation to send messages to other tasks to operate it.

◆ tls_pmu_sdio_isr_register()

void tls_pmu_sdio_isr_register | ( | tls_pmu_irq_callback | callback,
 |  | void * | arg
 | ) |  |

This function is used to register pmu sdio interrupt.

Parameters
[in] | callback | the pmu sdio interrupt call back function
[in] | arg | parameter of call back function
Returns
None
Note
user not need clear interrupt flag. pmu sdio callback function is called in interrupt, so can not operate the critical data in the callback fuuction, recommendation to send messages to other tasks to operate it.

◆ tls_pmu_sleep_start()

void tls_pmu_sleep_start ( void )

This function is used to start pmu goto sleep.

Parameters
None
Returns
None
Note
None

◆ tls_pmu_standby_start()

void tls_pmu_standby_start ( void )

This function is used to start pmu goto standby.

Parameters
None
Returns
None
Note
None

◆ tls_pmu_timer0_isr_register()

void tls_pmu_timer0_isr_register | ( | tls_pmu_irq_callback | callback,
 |  | void * | arg
 | ) |  |

This function is used to register pmu timer0 interrupt.

Parameters
[in] | callback | the pmu timer0 interrupt call back function
[in] | arg | parameter of call back function
Returns
None
Note
user not need clear interrupt flag. pmu timer0 callback function is called in interrupt, so can not operate the critical data in the callback fuuction, recommendation to send messages to other tasks to operate it.

◆ tls_pmu_timer0_start()

void tls_pmu_timer0_start ( u16 second )

This function is used to start pmu timer0.

Parameters
[in] second vlaue of timer0 count[s]
Returns
None
Note
None

◆ tls_pmu_timer0_stop()

void tls_pmu_timer0_stop ( void )

This function is used to stop pmu timer0.

Parameters
None
Returns
None
Note
None

◆ tls_pmu_timer1_isr_register()

void tls_pmu_timer1_isr_register | ( | tls_pmu_irq_callback | callback,
 |  | void * | arg
 | ) |  |

This function is used to register pmu timer1 interrupt.

Parameters
[in] | callback | the pmu timer1 interrupt call back function
[in] | arg | parameter of call back function
Returns
None
Note
user not need clear interrupt flag. pmu timer1 callback function is called in interrupt, so can not operate the critical data in the callback fuuction, recommendation to send messages to other tasks to operate it.

◆ tls_pmu_timer1_start()

void tls_pmu_timer1_start ( u16 msec )

This function is used to start pmu timer1.

Parameters
[in] second vlaue of timer1 count[ms]
Returns
None
Note
None

◆ tls_pmu_timer1_stop()

void tls_pmu_timer1_stop ( void )

This function is used to stop pmu timer1.

Parameters
None
Returns
None
Note
None


W800 SDK APIs: PSRAM Driver APIs

Functions
PSRAM Driver APIs
Driver APIs

PSRAM driver APIs. More...

Functions

void | psram_init (psram_mode_t mode)
This function is used to init the psram . More...
int | memcpy_dma (unsigned char *dst, unsigned char *src, int num)
This function is used to Copy block of memory in dma mode . More...

Detailed Description

PSRAM driver APIs.

Function Documentation

◆ memcpy_dma()

int memcpy_dma | ( | unsigned char * | dst,
 |  | unsigned char * | src,
 |  | int | num
 | ) |  |

This function is used to Copy block of memory in dma mode .

Parameters
[in] | src | Pointer to the source of data to be copied
[in] | dst | Pointer to the destination array where the content is to be copied
[in] | num | Number of bytes to copy
Return values
num Number of bytes that's been copied
Note
None

◆ psram_init()

void psram_init ( psram_mode_t mode )

This function is used to init the psram .

Parameters
[in] mode is work mode, PSRAM_SPI or PSRAM_QPI
Return values
none
Note
None


W800 SDK APIs: PWM Driver APIs

Functions
PWM Driver APIs
Driver APIs

PWM driver APIs. More...

Functions

void | tls_pwm_isr_register (void(*callback)(void))
This function is used to register the pwm interrupt callback function. More...
int | tls_pwm_duty_config (u8 channel, u8 duty)
This function is used to set duty radio. More...
int | tls_pwm_freq_config (u8 channel, u16 clkdiv, u8 period)
This function is used to set frequency. More...
int | tls_pwm_out_mode_config (u8 channel, enum tls_pwm_out_mode mode)
This function is used to set the output mode. More...
int | tls_pwm_cnt_type_config (u8 channel, enum tls_pwm_cnt_type cnt_type)
This function is used to set the counting mode. More...
int | tls_pwm_loop_mode_config (u8 channel, enum tls_pwm_loop_type loop_mode)
This function is used to set whether to loop. More...
int | tls_pwm_out_inverse_cmd (u8 channel, bool en)
This function is used to set whether to inverse the output. More...
int | tls_pwm_stoptime_by_period_config (u8 channel, u8 pnum)
This function is used to set the number of period to be generated. More...
int | tls_pwm_output_en_cmd (u8 channel, bool en)
This function is used to set output enable. More...
int | tls_pwm_deadzone_config (u8 channel, bool dten, u8 dtclkdiv, u8 dtcnt)
This function is used to set the dead time. More...
int | tls_pwm_capture_inverse_cmd (u8 channel, bool en)
This function is used to set whether to inverse the capture input. More...
int | tls_pwm_brake_mode_config (u8 channel, bool en, enum tls_pwm_brake_out_level brok)
This function is used to set break mode. More...
int | tls_pwm_capture_mode_config (u8 channel)
This function is used to enable the capture mode. More...
int | tls_pwm_stoptime_irq_cmd (u8 channel, bool en)
This function is used to set the interrupt about the number of period. More...
int | tls_pwm_capture_irq_type_config (u8 channel, enum tls_pwm_cap_int_type int_type)
This function is used to set the interrupt about the capture. More...
int | tls_pwm_out_init (pwm_init_param *pwm_param)
This function is used to initial pwm(out mode) More...
int | tls_pwm_cap_init (u8 channel, u16 clkdiv, bool inverse_en, enum tls_pwm_cap_int_type int_type)
This function is used to initial pwm(capture mode) More...
int | tls_pwm_start (u8 channel)
This function is used to start pwm. More...
void | tls_pwm_freq_set (u8 channel, u32 freq)
This function is used to stop pwm. More...
void | tls_pwm_duty_set (u8 channel, u8 duty)
This function is used to set duty radio. More...
int | tls_pwm_init (u8 channel, u32 freq, u8 duty, u8 pnum)
This function is used to initial pwm. More...
int | tls_pwm_stop (u8 channel)
This function is used to stop pwm. More...

Detailed Description

PWM driver APIs.

Function Documentation

◆ tls_pwm_brake_mode_config()

int tls_pwm_brake_mode_config | ( | u8 | channel,
 |  | bool | en,
 |  | enum tls_pwm_brake_out_level | brok
 | ) |  |

This function is used to set break mode.

Parameters
[in] | channel | pwm channel NO.,channel 0 or channel 4
[in] | en | whether enable the break mode,ENABLE or DISABLE
[in] | brok | when break
Return values
WM_SUCCESS | success
WM_FAILED | failed
Note
None

◆ tls_pwm_cap_init()

int tls_pwm_cap_init | ( | u8 | channel,
 |  | u16 | clkdiv,
 |  | bool | inverse_en,
 |  | enum tls_pwm_cap_int_type | int_type
 | ) |  |

This function is used to initial pwm(capture mode)

Parameters
[in] | channel | pwm channel, channel 0 or channel 4
[in] | clkdiv | clock divider, range 0 to 65535
[in] | inverse_en | whether the input signal is reversed
[in] | int_type | interrupt type
Return values
WM_SUCCESS | success
WM_FAILED | failed
Note
None

◆ tls_pwm_capture_inverse_cmd()

int tls_pwm_capture_inverse_cmd | ( | u8 | channel,
 |  | bool | en
 | ) |  |

This function is used to set whether to inverse the capture input.

Parameters
[in] | channel | pwm channel NO.,channel 0 or channel 4
[in] | en | ENABLE or DISABLE
Return values
WM_SUCCESS | success
WM_FAILED | failed
Note
None

◆ tls_pwm_capture_irq_type_config()

int tls_pwm_capture_irq_type_config | ( | u8 | channel,
 |  | enum tls_pwm_cap_int_type | int_type
 | ) |  |

This function is used to set the interrupt about the capture.

Parameters
[in] | channel | pwm channel,channel 0 or channel 4
[in] | int_type | interrupt type
Return values
WM_SUCCESS | success
WM_FAILED | failed
Note
None

◆ tls_pwm_capture_mode_config()

int tls_pwm_capture_mode_config ( u8 channel )

This function is used to enable the capture mode.

Parameters
[in] channel pwm channel NO.,channel 0 or channel 4
Return values
WM_SUCCESS | success
WM_FAILED | failed
Note
None

◆ tls_pwm_cnt_type_config()

int tls_pwm_cnt_type_config | ( | u8 | channel,
 |  | enum tls_pwm_cnt_type | cnt_type
 | ) |  |

This function is used to set the counting mode.

Parameters
[in] | channel | pwm channel NO.,range form 0 to 4
[in] | cnt_type | counting mode
Return values
WM_SUCCESS | success
WM_FAILED | failed
Note
None

◆ tls_pwm_deadzone_config()

int tls_pwm_deadzone_config | ( | u8 | channel,
 |  | bool | dten,
 |  | u8 | dtclkdiv,
 |  | u8 | dtcnt
 | ) |  |

This function is used to set the dead time.

Parameters
[in] | channel | pwm channel NO.,channel 0 or channel 2
[in] | dten | whether enalbe the deat time, ENABLE or DISABLE
[in] | dtclkdiv | dead zone clock divider, range 0 to 3
[in] | dtcnt | the number of the counting clock cycle, range 0 to 255
Return values
WM_SUCCESS | success
WM_FAILED | failed
Note
None

◆ tls_pwm_duty_config()

int tls_pwm_duty_config | ( | u8 | channel,
 |  | u8 | duty
 | ) |  |

This function is used to set duty radio.

Parameters
[in] | channel | pwm channel NO.,range form 0 to 4
[in] | duty | Number of active levels
Return values
WM_SUCCESS | success
WM_FAILED | failed
Note
None

◆ tls_pwm_duty_set()

void tls_pwm_duty_set | ( | u8 | channel,
 |  | u8 | duty
 | ) |  |

This function is used to set duty radio.

Parameters
[in] | channel | pwm channel NO., range form 0 to 4
[in] | duty | duty radio, range from 0 to 255
Returns
None
Note
None

◆ tls_pwm_freq_config()

int tls_pwm_freq_config | ( | u8 | channel,
 |  | u16 | clkdiv,
 |  | u8 | period
 | ) |  |

This function is used to set frequency.

Parameters
[in] | channel | pwm channel NO., range form 0 to 4
[in] | clkdiv | clock divider, range 0 to 65535
[in] | period | the number of the counting clock cycle
Return values
WM_SUCCESS | success
WM_FAILED | failed
Note
None

◆ tls_pwm_freq_set()

void tls_pwm_freq_set | ( | u8 | channel,
 |  | u32 | freq
 | ) |  |

This function is used to stop pwm.

Parameters
[in] | channel | pwm channel no, range form 0 to 4
[in] | freq | frequency, range from 1 to 156250
Returns
None
Note
None

◆ tls_pwm_init()

int tls_pwm_init | ( | u8 | channel,
 |  | u32 | freq,
 |  | u8 | duty,
 |  | u8 | pnum
 | ) |  |

This function is used to initial pwm.

Parameters
[in] | channel | pwm channel, range from 0 to 4
[in] | freq | is a pointer to frequency, freq range from 1 to 156250
[in] | duty | is a pointer to duty radio, duty range from 0 to 255
Return values
WM_SUCCESS | success
WM_FAILED | failed
Note
None

◆ tls_pwm_isr_register()

void tls_pwm_isr_register ( void(*)(void) callback )

This function is used to register the pwm interrupt callback function.

Parameters
[in] callback the pwm interrupt callback function
Returns
None
Note
None

◆ tls_pwm_loop_mode_config()

int tls_pwm_loop_mode_config | ( | u8 | channel,
 |  | enum tls_pwm_loop_type | loop_mode
 | ) |  |

This function is used to set whether to loop.

Parameters
[in] | channel | pwm channel NO.,range form 0 to 4
[in] | loop_mode | whether to loop
Return values
WM_SUCCESS | success
WM_FAILED | failed
Note
None

◆ tls_pwm_out_init()

int tls_pwm_out_init ( pwm_init_param * pwm_param )

This function is used to initial pwm(out mode)

Parameters
[in] pwm_param structure containing the initialization parameters
Return values
WM_SUCCESS | success
WM_FAILED | failed
Note
None

◆ tls_pwm_out_inverse_cmd()

int tls_pwm_out_inverse_cmd | ( | u8 | channel,
 |  | bool | en
 | ) |  |

This function is used to set whether to inverse the output.

Parameters
[in] | channel | pwm channel NO.,range form 0 to 4
[in] | en | ENABLE or DISABLE
Return values
WM_SUCCESS | success
WM_FAILED | failed
Note
None

◆ tls_pwm_out_mode_config()

int tls_pwm_out_mode_config | ( | u8 | channel,
 |  | enum tls_pwm_out_mode | mode
 | ) |  |

This function is used to set the output mode.

Parameters
[in] | channel | pwm channel NO., range form 0 to 4
[in] | mode | pwm work mode for signal generate
Return values
WM_SUCCESS | success
WM_FAILED | failed
Note
None

◆ tls_pwm_output_en_cmd()

int tls_pwm_output_en_cmd | ( | u8 | channel,
 |  | bool | en
 | ) |  |

This function is used to set output enable.

Parameters
[in] | channel | pwm channel NO.,channel 0 or channel 4
[in] | en | ENABLE or DISABLE
Return values
WM_SUCCESS | success
WM_FAILED | failed
Note
None

◆ tls_pwm_start()

int tls_pwm_start ( u8 channel )

This function is used to start pwm.

Parameters
[in] channel pwm channel, range from 0 to 4
Return values
WM_SUCCESS | success
WM_FAILED | failed
Note
None

◆ tls_pwm_stop()

int tls_pwm_stop ( u8 channel )

This function is used to stop pwm.

Parameters
[in] channel pwm channel, range from 0 to 4
Return values
WM_SUCCESS | success
WM_FAILED | failed
Note
None

◆ tls_pwm_stoptime_by_period_config()

int tls_pwm_stoptime_by_period_config | ( | u8 | channel,
 |  | u8 | pnum
 | ) |  |

This function is used to set the number of period to be generated.

Parameters
[in] | channel | pwm channel NO.,range form 0 to 4
[in] | pnum | the number of period to be generated,range from 0 to 255
Return values
WM_SUCCESS | success
WM_FAILED | failed
Note
None

◆ tls_pwm_stoptime_irq_cmd()

int tls_pwm_stoptime_irq_cmd | ( | u8 | channel,
 |  | bool | en
 | ) |  |

This function is used to set the interrupt about the number of period.

Parameters
[in] | channel | pwm channel,range from 0 to 4
[in] | en | enble or disable
Return values
WM_SUCCESS | success
WM_FAILED | failed
Note
None


W800 SDK APIs: RTC Driver APIs

Functions
RTC Driver APIs
Driver APIs

RTC driver APIs. More...

Functions

void | tls_set_rtc (struct tm *tblock)
This function is used to set pmu rtc time. More...
void | tls_get_rtc (struct tm *tblock)
This function is used to get pmu rtc time. More...
void | tls_rtc_isr_register (tls_rtc_irq_callback callback, void *arg)
This function is used to register pmu rtc interrupt. More...
void | tls_rtc_timer_start (struct tm *tblock)
This function is used to start pmu rtc timer. More...
void | tls_rtc_timer_stop (void)
This function is used to stop pmu rtc timer. More...

Detailed Description

RTC driver APIs.

Function Documentation

◆ tls_get_rtc()

void tls_get_rtc ( struct tm * tblock )

This function is used to get pmu rtc time.

Parameters
[out] tblock time value
Returns
None
Note
None

◆ tls_rtc_isr_register()

void tls_rtc_isr_register | ( | tls_rtc_irq_callback | callback,
 |  | void * | arg
 | ) |  |

This function is used to register pmu rtc interrupt.

Parameters
[in] | callback | the rtc interrupt call back function
[in] | arg | parameter of call back function
Returns
None
Note
User does not need to clear the interrupt flag. Rtc callback function is called in interrupt, so do not operate the critical data in the callback fuuction. Sending messages to other tasks to handle is recommended.

◆ tls_rtc_timer_start()

void tls_rtc_timer_start ( struct tm * tblock )

This function is used to start pmu rtc timer.

Parameters
[in] tblock timer value
Returns
None
Note
None

◆ tls_rtc_timer_stop()

void tls_rtc_timer_stop ( void )

This function is used to stop pmu rtc timer.

Parameters
None
Returns
None
Note
This function also is used to clear rtc timer interrupt

◆ tls_set_rtc()

void tls_set_rtc ( struct tm * tblock )

This function is used to set pmu rtc time.

Parameters
[in] tblock time value
Returns
None
Note
None


W800 SDK APIs: SASC Driver APIs

Functions
SASC Driver APIs
Driver APIs

SASC driver APIs. More...

Functions

void | wm_sasc_enable_region (SASC_Type *block, uint32_t idx)
This function is used enable region. More...
void | wm_sasc_disable_region (SASC_Type *block, uint32_t idx)
This function is used disable region. More...
void | set_region_protect (uint32_t base_addr, uint32_t idx, sasc_region_size_e size, sasc_region_attr_t *attr)
This function is used set region protect. More...

Detailed Description

SASC driver APIs.

Function Documentation

◆ set_region_protect()

void set_region_protect | ( | uint32_t | base_addr,
 |  | uint32_t | idx,
 |  | sasc_region_size_e | size,
 |  | sasc_region_attr_t * | attr
 | ) |  |

This function is used set region protect.

Parameters
[in] | base_addr | base address
[in] | idx | index
[in] | size | size
[in] | attr | attribute
Returns
None
Note
None

◆ wm_sasc_disable_region()

void wm_sasc_disable_region | ( | SASC_Type * | block,
 |  | uint32_t | idx
 | ) |  |

This function is used disable region.

Parameters
[in] | block | sasc type
[in] | idx | index
Returns
None
Note
None

◆ wm_sasc_enable_region()

void wm_sasc_enable_region | ( | SASC_Type * | block,
 |  | uint32_t | idx
 | ) |  |

This function is used enable region.

Parameters
[in] | block | sasc type
[in] | idx | index
Returns
None
Note
None


W800 SDK APIs: SDIO HOST Driver APIs

Functions
SDIO HOST Driver APIs
Driver APIs

SDIO HOST driver APIs. More...

Functions

int | sdh_card_init (uint32_t *rca_ref)
This function is used to initial the sd host module . More...
int | wm_sd_card_set_bus_width (uint32_t rca, uint8_t bus_width)
This function is used to set the width of bus . More...
int | wm_sd_card_block_read (uint32_t rca, uint32_t sd_addr, char *buf)
This function is used to read one block data from the sd card with irq mode . More...
int | wm_sd_card_block_write (uint32_t rca, uint32_t sd_addr, char *buf)
This function is used to write one block data into the sd card with irq mode . More...
int | wm_sd_card_blocks_read (uint32_t rca, uint32_t sd_addr, char *buf, uint32_t buflen)
This function is used to read blocks of data from the sd card with dma mode . More...
int | wm_sd_card_blocks_write (uint32_t rca, uint32_t sd_addr, char *buf, uint32_t buflen)
This function is used to write blocks of data into the sd card with dma mode . More...

Detailed Description

SDIO HOST driver APIs.

Function Documentation

◆ sdh_card_init()

int sdh_card_init ( uint32_t * rca_ref )

This function is used to initial the sd host module .

Parameters
[out] rca_ref Pointer to the rca reference
Return values
status 0 if succeed, otherwise fail
Note
None

◆ wm_sd_card_block_read()

int wm_sd_card_block_read | ( | uint32_t | rca,
 |  | uint32_t | sd_addr,
 |  | char * | buf
 | ) |  |

This function is used to read one block data from the sd card with irq mode .

Parameters
[in] | sd_addr | address that to be read from
[in] | buf | Pointer to the buffer that the data shall be read into
Return values
status 0 if succeed, otherwise fail
Note
None

◆ wm_sd_card_block_write()

int wm_sd_card_block_write | ( | uint32_t | rca,
 |  | uint32_t | sd_addr,
 |  | char * | buf
 | ) |  |

This function is used to write one block data into the sd card with irq mode .

Parameters
[in] | sd_addr | address that to be written to
[in] | buf | Pointer to the buffer that holding the data to be written
Return values
status 0 if succeed, otherwise fail
Note
None

◆ wm_sd_card_blocks_read()

int wm_sd_card_blocks_read | ( | uint32_t | rca,
 |  | uint32_t | sd_addr,
 |  | char * | buf,
 |  | uint32_t | buflen
 | ) |  |

This function is used to read blocks of data from the sd card with dma mode .

Parameters
[in] | sd_addr | address that to be read from
[in] | buf | Pointer to the buffer that the data shall be read into
[in] | buflen | buffer size, should be integer multiple of 512
Return values
status 0 if succeed, otherwise fail
Note
None

◆ wm_sd_card_blocks_write()

int wm_sd_card_blocks_write | ( | uint32_t | rca,
 |  | uint32_t | sd_addr,
 |  | char * | buf,
 |  | uint32_t | buflen
 | ) |  |

This function is used to write blocks of data into the sd card with dma mode .

Parameters
[in] | sd_addr | address that to be written to
[in] | buf | Pointer to the buffer that holding the data to be written
[in] | buflen | buffer size, should be integer multiple of 512
Return values
status 0 if succeed, otherwise fail
Note
None

◆ wm_sd_card_set_bus_width()

int wm_sd_card_set_bus_width | ( | uint32_t | rca,
 |  | uint8_t | bus_width
 | ) |  |

This function is used to set the width of bus .

Parameters
[in] | rca | the rca reference
[in] | bus_width | 0:1bit; 2:4bits
Return values
status 0 if succeed, otherwise fail
Note
None


W800 SDK APIs: TIMER Driver APIs

Functions
TIMER Driver APIs
Driver APIs

TIMER driver APIs. More...

Functions

u8 | tls_timer_create (struct tls_timer_cfg *cfg)
This function is used to create a timer. More...
void | tls_timer_start (u8 timer_id)
This function is used to start a timer. More...
void | tls_timer_stop (u8 timer_id)
This function is used to stop a timer. More...
void | tls_timer_change (u8 timer_id, u32 newtime)
This function is used to change a timer wait time. More...
u32 | tls_timer_read (u8 timer_id)
This function is used to read a timer's current value. More...
void | tls_timer_destroy (u8 timer_id)
This function is used to delete a timer. More...

Detailed Description

TIMER driver APIs.

Function Documentation

◆ tls_timer_change()

void tls_timer_change | ( | u8 | timer_id,
 |  | u32 | newtime
 | ) |  |

This function is used to change a timer wait time.

Parameters
[in] | timer_id | timer id[0~5]
[in] | newtime | new wait time
Return values
None
Note
If the timer does not start, this function will start the timer

◆ tls_timer_create()

u8 tls_timer_create ( struct tls_timer_cfg * cfg )

This function is used to create a timer.

Parameters
[in] cfg timer configuration
Return values
WM_TIMER_ID_INVALID | failed
other | timer id
Note
User does not need to clear the interrupt flag. Rtc callback function is called in interrupt, so do not operate the critical data in the callback fuuction. Sending messages to other tasks to handle is recommended.

◆ tls_timer_destroy()

void tls_timer_destroy ( u8 timer_id )

This function is used to delete a timer.

Parameters
[in] timer_id timer id
Returns
None
Note
None

◆ tls_timer_read()

u32 tls_timer_read ( u8 timer_id )

This function is used to read a timer's current value.

Parameters
[in] timer_id timer id[0~5]
Return values
timer's current value
Note
none

◆ tls_timer_start()

void tls_timer_start ( u8 timer_id )

This function is used to start a timer.

Parameters
[in] timer_id timer id
Returns
None
Note
None

◆ tls_timer_stop()

void tls_timer_stop ( u8 timer_id )

This function is used to stop a timer.

Parameters
[in] timer_id timer id
Returns
None
Note
None


W800 SDK APIs: TIPC Driver APIs

Functions
TIPC Driver APIs
Driver APIs

TIPC driver APIs. More...

Functions

__STATIC_INLINE void | wm_tipc_enable_i2c (void)
This function is used enable i2c. More...
__STATIC_INLINE void | wm_tipc_disable_i2c (void)
This function is used disable i2c. More...
__STATIC_INLINE void | wm_tipc_enable_uart0 (void)
This function is used enable uart0. More...
__STATIC_INLINE void | wm_tipc_disable_uart0 (void)
This function is used disable uart0. More...
__STATIC_INLINE void | wm_tipc_enable_sar_adc (void)
This function is used enable sar adc. More...
__STATIC_INLINE void | wm_tipc_disable_sar_adc (void)
This function is used disable sar adc. More...
__STATIC_INLINE void | wm_tipc_enable_lspi (void)
This function is used enable low speed spi. More...
__STATIC_INLINE void | wm_tipc_disable_lspi (void)
This function is used disable low speed spi. More...
__STATIC_INLINE void | wm_tipc_enable_uart1 (void)
This function is used enable uart1. More...
__STATIC_INLINE void | wm_tipc_disable_uart1 (void)
This function is used disable uart1. More...
__STATIC_INLINE void | wm_tipc_enable_uart2 (void)
This function is used enable uart2. More...
__STATIC_INLINE void | wm_tipc_disable_uart2 (void)
This function is used disable uart2. More...
__STATIC_INLINE void | wm_tipc_enable_uart3 (void)
This function is used enable uart3. More...
__STATIC_INLINE void | wm_tipc_disable_uart3 (void)
This function is used disable uart3. More...
__STATIC_INLINE void | wm_tipc_enable_uart4 (void)
This function is used enable uart4. More...
__STATIC_INLINE void | wm_tipc_disable_uart4 (void)
This function is used disable uart4. More...
__STATIC_INLINE void | wm_tipc_enable_uart5 (void)
This function is used enable uart5. More...
__STATIC_INLINE void | wm_tipc_disable_uart5 (void)
This function is used disable uart5. More...
__STATIC_INLINE void | wm_tipc_enable_porta (void)
This function is used enable porta. More...
__STATIC_INLINE void | wm_tipc_disable_porta (void)
This function is used disable porta. More...
__STATIC_INLINE void | wm_tipc_enable_portb (void)
This function is used enable portb. More...
__STATIC_INLINE void | wm_tipc_disable_portb (void)
This function is used disable portb. More...
__STATIC_INLINE void | wm_tipc_enable_watch_dog (void)
This function is used enable watch dog. More...
__STATIC_INLINE void | wm_tipc_disable_watch_dog (void)
This function is used disable watch dog. More...
__STATIC_INLINE void | wm_tipc_enable_timer (void)
This function is used enable timer. More...
__STATIC_INLINE void | wm_tipc_disable_timer (void)
This function is used disable timer. More...
__STATIC_INLINE void | wm_tipc_enable_rf_controler (void)
This function is used enable rf controler. More...
__STATIC_INLINE void | wm_tipc_disable_rf_controler (void)
This function is used disable rf controler. More...
__STATIC_INLINE void | wm_tipc_enable_lcd (void)
This function is used enable lcd. More...
__STATIC_INLINE void | wm_tipc_disable_lcd (void)
This function is used disable lcd. More...
__STATIC_INLINE void | wm_tipc_enable_pwm (void)
This function is used enable pwm. More...
__STATIC_INLINE void | wm_tipc_disable_pwm (void)
This function is used disable pwm. More...
__STATIC_INLINE void | wm_tipc_enable_i2s (void)
This function is used enable i2s. More...
__STATIC_INLINE void | wm_tipc_disable_i2s (void)
This function is used disable i2s. More...
__STATIC_INLINE void | wm_tipc_enable_bt_modem (void)
This function is used enable bt modem. More...
__STATIC_INLINE void | wm_tipc_disable_bt_modem (void)
This function is used disable bt modem. More...
__STATIC_INLINE void | wm_tipc_enable_sdio_host (void)
This function is used enable sdio host. More...
__STATIC_INLINE void | wm_tipc_disable_sdio_host (void)
This function is used disable sdio host. More...
__STATIC_INLINE void | wm_tipc_enable_flash (void)
This function is used enable flash. More...
__STATIC_INLINE void | wm_tipc_disable_flash (void)
This function is used disable flash. More...
__STATIC_INLINE void | wm_tipc_enable_psram (void)
This function is used enable psram. More...
__STATIC_INLINE void | wm_tipc_disable_psram (void)
This function is used disable psram. More...
__STATIC_INLINE void | wm_tipc_enable_rsa (void)
This function is used enable rsa. More...
__STATIC_INLINE void | wm_tipc_disable_rsa (void)
This function is used disable rsa. More...
__STATIC_INLINE void | wm_tipc_enable_dma (void)
This function is used enable dma. More...
__STATIC_INLINE void | wm_tipc_disable_dma (void)
This function is used disable dma. More...
__STATIC_INLINE void | wm_tipc_enable_gpsec (void)
This function is used enable gpsec. More...
__STATIC_INLINE void | wm_tipc_disable_gpsec (void)
This function is used disable gpsec. More...
__STATIC_INLINE void | wm_tipc_enable_bt (void)
This function is used enable bt. More...
__STATIC_INLINE void | wm_tipc_disable_bt (void)
This function is used disable bt. More...
__STATIC_INLINE void | wm_tipc_enable_pmu (void)
This function is used enable pmu. More...
__STATIC_INLINE void | wm_tipc_disable_pmu (void)
This function is used disable pmu. More...
__STATIC_INLINE void | wm_tipc_enable_clk_rst (void)
This function is used enable clock reset. More...
__STATIC_INLINE void | wm_tipc_disable_clk_rst (void)
This function is used disable clock reset. More...
__STATIC_INLINE void | wm_tipc_enable_mmu (void)
This function is used enable mmu. More...
__STATIC_INLINE void | wm_tipc_disable_mmu (void)
This function is used disable mmu. More...
__STATIC_INLINE void | wm_tipc_enable_bbp (void)
This function is used enable bbp. More...
__STATIC_INLINE void | wm_tipc_disable_bbp (void)
This function is used disable bbp. More...
__STATIC_INLINE void | wm_tipc_enable_mac (void)
This function is used enable mac. More...
__STATIC_INLINE void | wm_tipc_disable_mac (void)
This function is used disable mac. More...
__STATIC_INLINE void | wm_tipc_enable_sec (void)
This function is used enable sec. More...
__STATIC_INLINE void | wm_tipc_disable_sec (void)
This function is used disable sec. More...
__STATIC_INLINE void | wm_tipc_enable_sdio_slave (void)
This function is used enable sdio slave. More...
__STATIC_INLINE void | wm_tipc_disable_sdio_slave (void)
This function is used disable sdio slave. More...
__STATIC_INLINE void | wm_tipc_enable_hspi (void)
This function is used enable high speed spi. More...
__STATIC_INLINE void | wm_tipc_disable_hspi (void)
This function is used disable high speed spi. More...
__STATIC_INLINE void | wm_tipc_enable_sdio_wrapper (void)
This function is used enable sdio wrapper. More...
__STATIC_INLINE void | wm_tipc_disable_sdio_wrapper (void)
This function is used disable sdio wrapper. More...
__STATIC_INLINE void | wm_tipc_enable_rf_bist (void)
This function is used enable rf bist. More...
__STATIC_INLINE void | wm_tipc_disable_rf_bist (void)
This function is used disable rf bist. More...

Detailed Description

TIPC driver APIs.

Function Documentation

◆ wm_tipc_disable_bbp()

__STATIC_INLINE void wm_tipc_disable_bbp ( void )

This function is used disable bbp.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_disable_bt()

__STATIC_INLINE void wm_tipc_disable_bt ( void )

This function is used disable bt.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_disable_bt_modem()

__STATIC_INLINE void wm_tipc_disable_bt_modem ( void )

This function is used disable bt modem.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_disable_clk_rst()

__STATIC_INLINE void wm_tipc_disable_clk_rst ( void )

This function is used disable clock reset.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_disable_dma()

__STATIC_INLINE void wm_tipc_disable_dma ( void )

This function is used disable dma.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_disable_flash()

__STATIC_INLINE void wm_tipc_disable_flash ( void )

This function is used disable flash.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_disable_gpsec()

__STATIC_INLINE void wm_tipc_disable_gpsec ( void )

This function is used disable gpsec.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_disable_hspi()

__STATIC_INLINE void wm_tipc_disable_hspi ( void )

This function is used disable high speed spi.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_disable_i2c()

__STATIC_INLINE void wm_tipc_disable_i2c ( void )

This function is used disable i2c.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_disable_i2s()

__STATIC_INLINE void wm_tipc_disable_i2s ( void )

This function is used disable i2s.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_disable_lcd()

__STATIC_INLINE void wm_tipc_disable_lcd ( void )

This function is used disable lcd.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_disable_lspi()

__STATIC_INLINE void wm_tipc_disable_lspi ( void )

This function is used disable low speed spi.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_disable_mac()

__STATIC_INLINE void wm_tipc_disable_mac ( void )

This function is used disable mac.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_disable_mmu()

__STATIC_INLINE void wm_tipc_disable_mmu ( void )

This function is used disable mmu.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_disable_pmu()

__STATIC_INLINE void wm_tipc_disable_pmu ( void )

This function is used disable pmu.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_disable_porta()

__STATIC_INLINE void wm_tipc_disable_porta ( void )

This function is used disable porta.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_disable_portb()

__STATIC_INLINE void wm_tipc_disable_portb ( void )

This function is used disable portb.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_disable_psram()

__STATIC_INLINE void wm_tipc_disable_psram ( void )

This function is used disable psram.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_disable_pwm()

__STATIC_INLINE void wm_tipc_disable_pwm ( void )

This function is used disable pwm.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_disable_rf_bist()

__STATIC_INLINE void wm_tipc_disable_rf_bist ( void )

This function is used disable rf bist.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_disable_rf_controler()

__STATIC_INLINE void wm_tipc_disable_rf_controler ( void )

This function is used disable rf controler.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_disable_rsa()

__STATIC_INLINE void wm_tipc_disable_rsa ( void )

This function is used disable rsa.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_disable_sar_adc()

__STATIC_INLINE void wm_tipc_disable_sar_adc ( void )

This function is used disable sar adc.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_disable_sdio_host()

__STATIC_INLINE void wm_tipc_disable_sdio_host ( void )

This function is used disable sdio host.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_disable_sdio_slave()

__STATIC_INLINE void wm_tipc_disable_sdio_slave ( void )

This function is used disable sdio slave.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_disable_sdio_wrapper()

__STATIC_INLINE void wm_tipc_disable_sdio_wrapper ( void )

This function is used disable sdio wrapper.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_disable_sec()

__STATIC_INLINE void wm_tipc_disable_sec ( void )

This function is used disable sec.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_disable_timer()

__STATIC_INLINE void wm_tipc_disable_timer ( void )

This function is used disable timer.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_disable_uart0()

__STATIC_INLINE void wm_tipc_disable_uart0 ( void )

This function is used disable uart0.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_disable_uart1()

__STATIC_INLINE void wm_tipc_disable_uart1 ( void )

This function is used disable uart1.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_disable_uart2()

__STATIC_INLINE void wm_tipc_disable_uart2 ( void )

This function is used disable uart2.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_disable_uart3()

__STATIC_INLINE void wm_tipc_disable_uart3 ( void )

This function is used disable uart3.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_disable_uart4()

__STATIC_INLINE void wm_tipc_disable_uart4 ( void )

This function is used disable uart4.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_disable_uart5()

__STATIC_INLINE void wm_tipc_disable_uart5 ( void )

This function is used disable uart5.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_disable_watch_dog()

__STATIC_INLINE void wm_tipc_disable_watch_dog ( void )

This function is used disable watch dog.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_enable_bbp()

__STATIC_INLINE void wm_tipc_enable_bbp ( void )

This function is used enable bbp.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_enable_bt()

__STATIC_INLINE void wm_tipc_enable_bt ( void )

This function is used enable bt.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_enable_bt_modem()

__STATIC_INLINE void wm_tipc_enable_bt_modem ( void )

This function is used enable bt modem.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_enable_clk_rst()

__STATIC_INLINE void wm_tipc_enable_clk_rst ( void )

This function is used enable clock reset.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_enable_dma()

__STATIC_INLINE void wm_tipc_enable_dma ( void )

This function is used enable dma.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_enable_flash()

__STATIC_INLINE void wm_tipc_enable_flash ( void )

This function is used enable flash.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_enable_gpsec()

__STATIC_INLINE void wm_tipc_enable_gpsec ( void )

This function is used enable gpsec.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_enable_hspi()

__STATIC_INLINE void wm_tipc_enable_hspi ( void )

This function is used enable high speed spi.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_enable_i2c()

__STATIC_INLINE void wm_tipc_enable_i2c ( void )

This function is used enable i2c.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_enable_i2s()

__STATIC_INLINE void wm_tipc_enable_i2s ( void )

This function is used enable i2s.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_enable_lcd()

__STATIC_INLINE void wm_tipc_enable_lcd ( void )

This function is used enable lcd.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_enable_lspi()

__STATIC_INLINE void wm_tipc_enable_lspi ( void )

This function is used enable low speed spi.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_enable_mac()

__STATIC_INLINE void wm_tipc_enable_mac ( void )

This function is used enable mac.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_enable_mmu()

__STATIC_INLINE void wm_tipc_enable_mmu ( void )

This function is used enable mmu.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_enable_pmu()

__STATIC_INLINE void wm_tipc_enable_pmu ( void )

This function is used enable pmu.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_enable_porta()

__STATIC_INLINE void wm_tipc_enable_porta ( void )

This function is used enable porta.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_enable_portb()

__STATIC_INLINE void wm_tipc_enable_portb ( void )

This function is used enable portb.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_enable_psram()

__STATIC_INLINE void wm_tipc_enable_psram ( void )

This function is used enable psram.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_enable_pwm()

__STATIC_INLINE void wm_tipc_enable_pwm ( void )

This function is used enable pwm.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_enable_rf_bist()

__STATIC_INLINE void wm_tipc_enable_rf_bist ( void )

This function is used enable rf bist.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_enable_rf_controler()

__STATIC_INLINE void wm_tipc_enable_rf_controler ( void )

This function is used enable rf controler.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_enable_rsa()

__STATIC_INLINE void wm_tipc_enable_rsa ( void )

This function is used enable rsa.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_enable_sar_adc()

__STATIC_INLINE void wm_tipc_enable_sar_adc ( void )

This function is used enable sar adc.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_enable_sdio_host()

__STATIC_INLINE void wm_tipc_enable_sdio_host ( void )

This function is used enable sdio host.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_enable_sdio_slave()

__STATIC_INLINE void wm_tipc_enable_sdio_slave ( void )

This function is used enable sdio slave.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_enable_sdio_wrapper()

__STATIC_INLINE void wm_tipc_enable_sdio_wrapper ( void )

This function is used enable sdio wrapper.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_enable_sec()

__STATIC_INLINE void wm_tipc_enable_sec ( void )

This function is used enable sec.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_enable_timer()

__STATIC_INLINE void wm_tipc_enable_timer ( void )

This function is used enable timer.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_enable_uart0()

__STATIC_INLINE void wm_tipc_enable_uart0 ( void )

This function is used enable uart0.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_enable_uart1()

__STATIC_INLINE void wm_tipc_enable_uart1 ( void )

This function is used enable uart1.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_enable_uart2()

__STATIC_INLINE void wm_tipc_enable_uart2 ( void )

This function is used enable uart2.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_enable_uart3()

__STATIC_INLINE void wm_tipc_enable_uart3 ( void )

This function is used enable uart3.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_enable_uart4()

__STATIC_INLINE void wm_tipc_enable_uart4 ( void )

This function is used enable uart4.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_enable_uart5()

__STATIC_INLINE void wm_tipc_enable_uart5 ( void )

This function is used enable uart5.

Parameters
[in] None
Returns
None
Note
None

◆ wm_tipc_enable_watch_dog()

__STATIC_INLINE void wm_tipc_enable_watch_dog ( void )

This function is used enable watch dog.

Parameters
[in] None
Returns
None
Note
None


W800 SDK APIs: UART Driver APIs

Functions
UART Driver APIs
Driver APIs

UART driver APIs. More...

Functions

int | tls_uart_port_init (u16 uart_no, tls_uart_options_t *opts, u8 modeChoose)
This function is used to initial uart port. More...
void | tls_uart_rx_callback_register (u16 uart_no, s16(*rx_callback)(u16 len, void *user_data), void *user_data)
This function is used to register uart rx interrupt. More...
void | tls_uart_rx_byte_callback_flag (u16 uart_no, u8 flag)
void | tls_uart_tx_callback_register (u16 uart_no, s16(*tx_callback)(struct tls_uart_port *port))
This function is used to register uart tx interrupt. More...
int | tls_uart_read (u16 uart_no, u8 *buf, u16 readsize)
This function is used to copy circular buffer data to user buffer. More...
int | tls_uart_try_read (u16 uart_no, int32_t read_size)
This function is used to check the available data in the cache buffer. More...
int | tls_uart_write (u16 uart_no, char *buf, u16 writesize)
This function is used to transfer data synchronously. More...
int | tls_uart_dma_write (char *buf, u16 writesize, void(*cmpl_callback)(void *p), u16 uart_no)
This function is used to transfer data with DMA. More...
int | tls_uart_set_parity (u16 uart_no, TLS_UART_PMODE_T paritytype)
This function is used to set uart parity. More...
int | tls_uart_set_baud_rate (u16 uart_no, u32 baudrate)
This function is used to set uart baudrate. More...
int | tls_uart_set_stop_bits (u16 uart_no, TLS_UART_STOPBITS_T stopbits)
This function is used to set uart stop bits. More...

Detailed Description

UART driver APIs.

Function Documentation

◆ tls_uart_dma_write()

int tls_uart_dma_write | ( | char * | buf,
 |  | u16 | writesize,
 |  | void(*)(void *p) | cmpl_callback,
 |  | u16 | uart_no
 | ) |  |

This function is used to transfer data with DMA.

Parameters
[in] | buf | is a buf for saving user data
[in] | writesize | is the user data length
[in] | cmpl_callback | function point,when the transfer is completed, the function will be called.
Return values
WM_SUCCESS | success
WM_FAILED | failed
Note
Only uart1 support DMA transfer.

◆ tls_uart_port_init()

int tls_uart_port_init | ( | u16 | uart_no,
 |  | tls_uart_options_t * | opts,
 |  | u8 | modeChoose
 | ) |  |

This function is used to initial uart port.

Parameters
[in] uart_no is the uart number.
  • TLS_UART_0 TLS_UART_1 TLS_UART_2 TLS_UART_3 TLS_UART_4 TLS_UART_5
[in] | opts | is the uart setting options,if this param is NULL,this function will use the default options.
[in] | modeChoose:; | choose uart2 mode or 7816 mode when uart_no is TLS_UART_2, 0 for uart2 mode and 1 for 7816 mode.
Return values
- WM_SUCCESS
  • WM_FAILED
Note
When the system is initialized, the function has been called, so users can not call the function.

◆ tls_uart_read()

int tls_uart_read | ( | u16 | uart_no,
 |  | u8 * | buf,
 |  | u16 | readsize
 | ) |  |

This function is used to copy circular buffer data to user buffer.

Parameters
[in] | uart_no | is the uart numer
[in] | buf | is the user buffer
[in] | readsize | is the user read size
Return values
copy data size
Note
None

◆ tls_uart_rx_callback_register()

void tls_uart_rx_callback_register | ( | u16 | uart_no,
 |  | s16(*)(u16 len, void *user_data) | rx_callback,
 |  | void * | user_data
 | ) |  |

This function is used to register uart rx interrupt.

Parameters
[in] | uart_no | TLS_UART_0 or TLS_UART_1
[in] | rx_callback | is the uart rx interrupt call back function.
Returns
None
Note
None

◆ tls_uart_set_baud_rate()

int tls_uart_set_baud_rate | ( | u16 | uart_no,
 |  | u32 | baudrate
 | ) |  |

This function is used to set uart baudrate.

Parameters
[in] | uart_no | is the uart number
[in] | baudrate | is the baudrate user want used,the unit is HZ.
Return values
WM_SUCCESS | if setting success
WM_FAILED | if setting fail
Note
None

◆ tls_uart_set_parity()

int tls_uart_set_parity | ( | u16 | uart_no,
 |  | TLS_UART_PMODE_T | paritytype
 | ) |  |

This function is used to set uart parity.

Parameters
[in] | uart_no | is the uart number
[in] | paritytype | is a parity type defined in TLS_UART_PMODE_T
Return values
WM_SUCCESS | if setting success
WM_FAILED | if setting fail
Note
None

◆ tls_uart_set_stop_bits()

int tls_uart_set_stop_bits | ( | u16 | uart_no,
 |  | TLS_UART_STOPBITS_T | stopbits
 | ) |  |

This function is used to set uart stop bits.

Parameters
[in] | uart_no | is the uart number
[in] | stopbits | is a stop bit type defined in TLS_UART_STOPBITS_T
Return values
WM_SUCCESS | if setting success
WM_FAILED | if setting fail
Note
None

◆ tls_uart_try_read()

int tls_uart_try_read | ( | u16 | uart_no,
 |  | int32_t | read_size
 | ) |  |

This function is used to check the available data in the cache buffer.

Parameters
[in] | uart_no | is the uart numer
[in] | readsize | is the user read size
Return values
if the cache buffer size is greater or equals to readsize , then return readsize; otherwise return 0;
Note
None

◆ tls_uart_tx_callback_register()

void tls_uart_tx_callback_register | ( | u16 | uart_no,
 |  | s16(*)(struct tls_uart_port *port) | tx_callback
 | ) |  |

This function is used to register uart tx interrupt.

Parameters
[in] | uart_no | is the uart numer.
[in] | callback | is the uart tx interrupt call back function.
Return values

◆ tls_uart_write()

int tls_uart_write | ( | u16 | uart_no,
 |  | char * | buf,
 |  | u16 | writesize
 | ) |  |

This function is used to transfer data synchronously.

Parameters
[in] | uart_no | is the uart number
[in] | buf | is a buf for saving user data
[in] | writesize | is the user data length
Return values
WM_SUCCESS | tx success
WM_FAILED | tx failed
Note
None


W800 SDK APIs: WDG Driver APIs

Functions
WDG Driver APIs
Driver APIs

WDG driver APIs. More...

Functions

void | tls_watchdog_clr (void)
This function is used to feed the dog. More...
void | tls_watchdog_init (u32 usec)
This function is used to init and start the watchdog. More...
void | tls_watchdog_deinit (void)
This function is used to deinit watchdog. More...
void | tls_sys_reset (void)
This function is used to reset the system. More...
void | tls_sys_set_reboot_reason (u32 reason)
This function is used to set reboot reason. More...
int | tls_sys_get_reboot_reason (void)
This function is used to get reboot reason. More...

Detailed Description

WDG driver APIs.

Function Documentation

◆ tls_sys_get_reboot_reason()

int tls_sys_get_reboot_reason ( void )

This function is used to get reboot reason.

Parameters
None
Returns
reason (enum SYS_REBOOT_REASON)
Note
None

◆ tls_sys_reset()

void tls_sys_reset ( void )

This function is used to reset the system.

Parameters
None
Returns
None
Note
None

◆ tls_sys_set_reboot_reason()

void tls_sys_set_reboot_reason ( u32 reason )

This function is used to set reboot reason.

Parameters
reason (enum SYS_REBOOT_REASON)
Returns
None
Note
used with tls_sys_reset

◆ tls_watchdog_clr()

void tls_watchdog_clr ( void )

This function is used to feed the dog.

Parameters
None
Returns
None
Note
None

◆ tls_watchdog_deinit()

void tls_watchdog_deinit ( void )

This function is used to deinit watchdog.

Parameters
[in] None
Returns
None
Note
None

◆ tls_watchdog_init()

void tls_watchdog_init ( u32 usec )

This function is used to init and start the watchdog.

Parameters
[in] usec microseconds
Returns
None
Note
None


W800 SDK APIs: System APIs

Modules
System APIs

System APIs. More...

Modules

DLIST APIs
Double listed APIs.
OS APIs
Operate system APIs.
HARD CRYPTO APIs
hard crypto APIs
FWUP APIs
firmware upgrade APIs
MEM APIs
memory manager APIs
Param APIs
Param manager APIs.
DEBUG APIs
DEBUG APIs.
REG APIs
Register operate APIs.

Detailed Description

System APIs.


W800 SDK APIs: DLIST APIs

Functions
DLIST APIs
System APIs

Double listed APIs. More...

Functions

static __inline void | dl_list_init (struct dl_list *list)
reinitialize the list More...
static __inline void | dl_list_add (struct dl_list *list, struct dl_list *item)
Insert a new entry after the specified head. More...
static __inline void | dl_list_add_tail (struct dl_list *list, struct dl_list *item)
Insert a new entry before the specified head. More...
static __inline void | dl_list_del (struct dl_list *item)
deletes entry from list More...
static __inline int | dl_list_empty (struct dl_list *list)
tests whether a list is empty More...
static __inline unsigned int | dl_list_len (struct dl_list *list)
count length of the list More...

Detailed Description

Double listed APIs.

Function Documentation

◆ dl_list_add()

static __inline void dl_list_add | ( | struct dl_list * | list,
 |  | struct dl_list * | item
 | ) |  |
static

Insert a new entry after the specified head.

Parameters
[in] | *list | list head to add it after
[in] | *item | new entry to be added
Returns
None
Note
None

◆ dl_list_add_tail()

static __inline void dl_list_add_tail | ( | struct dl_list * | list,
 |  | struct dl_list * | item
 | ) |  |
static

Insert a new entry before the specified head.

Parameters
[in] | *list | list head to add it after
[in] | *item | new entry to be added
Returns
None
Note
None

◆ dl_list_del()

static __inline void dl_list_del ( struct dl_list * item )
static

deletes entry from list

Parameters
[in] *item the element to delete from the list
Returns
None
Note
None

◆ dl_list_empty()

static __inline int dl_list_empty ( struct dl_list * list )
static

tests whether a list is empty

Parameters
[in] *list the list to test
Return values
0 | not empty
1 | empty
Note
None

◆ dl_list_init()

static __inline void dl_list_init ( struct dl_list * list )
static

reinitialize the list

Parameters
[in] *list the list
Returns
None
Note
None

◆ dl_list_len()

static __inline unsigned int dl_list_len ( struct dl_list * list )
static

count length of the list

Parameters
[in] *list the list to count
Returns
length
Note
None


W800 SDK APIs: OS APIs

Functions
OS APIs
System APIs

Operate system APIs. More...

Functions

void | tls_os_timer_init (void)
This function is used to register OS tick timer irq. More...
void | tls_os_time_tick (void *p)
This function is used to tick handler. More...
void | tls_os_init (void *arg)
This function is used to initialize OS common resource. More...
void | tls_os_start_scheduler (void)
This function is used to start task scheduler. More...
int | tls_os_get_type (void)
This function is used to get OS type. More...
tls_os_status_t | tls_os_task_create (tls_os_task_t *task, const char *name, void(*entry)(void *param), void *param, u8 *stk_start, u32 stk_size, u32 prio, u32 flag)
This function is used to create a task. Tasks can either be created prior to the start of multitasking or by a running task. A task cannot be created in an ISR. More...
tls_os_status_t | tls_os_task_del (u8 prio, void(*freefun)(void))
This function allows you to delete a task. The calling task can delete itself by its own priority number. The deleted task is returned to the dormant state and can be re-activated by creating the deleted task again. More...
tls_os_status_t | tls_os_task_del_by_task_handle (void *handle, void(*freefun)(void))
This function allows you to delete a task. The calling task can delete itself by taks's handler. The deleted task is returned to the dormant state and can be re-activated by creating the deleted task again. More...
tls_os_task_t | tls_os_task_id ()
u8 | tls_os_task_schedule_state ()
tls_os_status_t | tls_os_mutex_create (u8 prio, tls_os_mutex_t **mutex)
This function creates a mutual exclusion semaphore. More...
tls_os_status_t | tls_os_mutex_delete (tls_os_mutex_t *mutex)
This function deletes a mutual exclusion semaphore and readies all tasks pending on the it. More...
tls_os_status_t | tls_os_mutex_acquire (tls_os_mutex_t *mutex, u32 wait_time)
This function waits for a mutual exclusion semaphore. More...
tls_os_status_t | tls_os_mutex_release (tls_os_mutex_t *mutex)
This function releases a mutual exclusion semaphore. More...
tls_os_status_t | tls_os_sem_create (tls_os_sem_t **sem, u32 cnt)
This function creates a semaphore. More...
tls_os_status_t | tls_os_sem_delete (tls_os_sem_t *sem)
This function deletes a semaphore and readies all tasks pending on this semaphore. More...
tls_os_status_t | tls_os_sem_acquire (tls_os_sem_t *sem, u32 wait_time)
This function waits for a semaphore. More...
tls_os_status_t | tls_os_sem_release (tls_os_sem_t *sem)
This function signals a semaphore. More...
tls_os_status_t | tls_os_sem_set (tls_os_sem_t *sem, u16 cnt)
This function sets the semaphore count to the value specified as an argument.Typically,this value would be 0.You would typically use this function when a semaphore is used as a signaling mechanism and, you want to reset the count value. More...
u16 | tls_os_sem_get_count (tls_os_sem_t *sem)
tls_os_status_t | tls_os_queue_create (tls_os_queue_t **queue, u32 queue_size)
This function creates a message queue if free event cont rol blocks are available. More...
tls_os_status_t | tls_os_queue_delete (tls_os_queue_t *queue)
This function deletes a message queue and readies all tasks pending on the queue. More...
tls_os_status_t | tls_os_queue_send (tls_os_queue_t *queue, void *msg, u32 msg_size)
This function sends a message to a queue. More...
tls_os_status_t | tls_os_queue_send_to_front (tls_os_queue_t *queue, void *msg, u32 msg_size)
This function sends a message to a head of the queue. More...
tls_os_status_t | tls_os_queue_send_to_back (tls_os_queue_t *queue, void *msg, u32 msg_size)
This function sends a message to a tail of the queue. More...
tls_os_status_t | tls_os_queue_flush (tls_os_queue_t *queue)
This function is used to flush the contents of the message queue. More...
tls_os_status_t | tls_os_queue_receive (tls_os_queue_t *queue, void **msg, u32 msg_size, u32 wait_time)
This function waits for a message to be sent to a queue. More...
u8 | tls_os_queue_is_empty (tls_os_queue_t *queue)
u32 | tls_os_queue_space_available (tls_os_queue_t *queue)
Return the number of free spaces available in a queue. This is equal to the number of items that can be sent to the queue before the queue becomes full if no items are removed. More...
tls_os_status_t | tls_os_queue_remove (tls_os_queue_t *queue, void *msg, u32 msg_size)
tls_os_status_t | tls_os_mailbox_create (tls_os_mailbox_t **mailbox, u32 mailbox_size)
This function creates a message mailbox if free event control blocks are available. More...
tls_os_status_t | tls_os_mailbox_delete (tls_os_mailbox_t *mailbox)
This function deletes a mailbox and readies all of the tasks pending on the this mailbox. More...
tls_os_status_t | tls_os_mailbox_send (tls_os_mailbox_t *mailbox, void *msg)
This function sends a message to a mailbox. More...
tls_os_status_t | tls_os_mailbox_receive (tls_os_mailbox_t *mailbox, void **msg, u32 wait_time)
This function waits for a message to be sent to a mailbox. More...
u32 | tls_os_get_time (void)
This function is used by your application to obtain the current value of the 32-bit counter which keeps track of the number of clock ticks since the system starts. More...
u32 | tls_os_set_critical (void)
This function is used to disable interrupts by preserving the state of interrupts. More...
void | tls_os_release_critical (u32 cpu_sr)
This function is used to enable interrupts by preserving the state of interrupts. More...
tls_os_status_t | tls_os_timer_create (tls_os_timer_t **timer, TLS_OS_TIMER_CALLBACK callback, void *callback_arg, u32 period, bool repeat, u8 *name)
This function is called by your application code to create a timer. More...
void | tls_os_timer_start (tls_os_timer_t *timer)
This function is called by your application code to start a timer. More...
void | tls_os_timer_change (tls_os_timer_t *timer, u32 ticks)
void | tls_os_timer_stop (tls_os_timer_t *timer)
This function is called by your application code to stop a timer. More...
tls_os_status_t | tls_os_timer_delete (tls_os_timer_t *timer)
This function is called by your application code to delete a timer. More...
void | tls_os_time_delay (u32 ticks)
This function is called to delay execution of the currently running task until the specified number of system ticks expires. This, of course, directly equates to delaying the current task for some time to expire. There will be no delay if the specified delay is 0. If the specified delay is greater than 0 then, a context switch will executed. More...
u8 | tls_os_timer_active (tls_os_timer_t *timer)
u32 | tls_os_timer_expirytime (tls_os_timer_t *timer)
void | tls_os_disp_task_stat_info (void)
This function is used to display all the tasks' detail status. More...
u8 | tls_get_isr_count (void)

Detailed Description

Operate system APIs.

Function Documentation

◆ tls_os_disp_task_stat_info()

void tls_os_disp_task_stat_info ( void )

This function is used to display all the tasks' detail status.

Parameters
[in] None
Returns
None
Note
None

◆ tls_os_get_time()

u32 tls_os_get_time ( void )

This function is used by your application to obtain the current value of the 32-bit counter which keeps track of the number of clock ticks since the system starts.

Parameters
[in] None
Return values
current value of OSTime
Note
None

◆ tls_os_get_type()

int tls_os_get_type ( void )

This function is used to get OS type.

Parameters
[in] None
Return values
0 | OS_UCOSII
1 | OS_FREERTOS
Note
May not be used by now.

◆ tls_os_init()

void tls_os_init ( void * arg )

This function is used to initialize OS common resource.

Parameters
[in] *arg
Returns
None
Note
None

◆ tls_os_mailbox_create()

tls_os_status_t tls_os_mailbox_create | ( | tls_os_mailbox_t ** | mailbox,
 |  | u32 | mailbox_size
 | ) |  |

This function creates a message mailbox if free event control blocks are available.

Parameters
[in] | **mailbox | pointer to the event control clock (OS_EVENT) associated with the created mailbox
[in] | mailbox_size | size
Return values
TLS_OS_SUCCESS | success
TLS_OS_ERROR | failed
Note
None

◆ tls_os_mailbox_delete()

tls_os_status_t tls_os_mailbox_delete ( tls_os_mailbox_t * mailbox )

This function deletes a mailbox and readies all of the tasks pending on the this mailbox.

Parameters
[in] *mailbox pointer to the event control block associated with the desired mailbox.
Return values
TLS_OS_SUCCESS | success
TLS_OS_ERROR | failed
Note
None

◆ tls_os_mailbox_receive()

tls_os_status_t tls_os_mailbox_receive | ( | tls_os_mailbox_t * | mailbox,
 |  | void ** | msg,
 |  | u32 | wait_time
 | ) |  |

This function waits for a message to be sent to a mailbox.

Parameters
[in] | *mailbox | pointer to the event control block associated with the desired mailbox
[in] | **msg | pointer to the message received
[in] | wait_time | an optional timeout period (in clock ticks). If non-zero, your task will wait for a message to arrive at the mailbox up to the amount of time specified by this argument. If you specify 0, however, your task will wait forever at the specified mailbox or, until a message arrives.
Return values
TLS_OS_SUCCESS | success
TLS_OS_ERROR | failed
Note
None

◆ tls_os_mailbox_send()

tls_os_status_t tls_os_mailbox_send | ( | tls_os_mailbox_t * | mailbox,
 |  | void * | msg
 | ) |  |

This function sends a message to a mailbox.

Parameters
[in] | *mailbox | pointer to the event control block associated with the desired mailbox
[in] | *msg | pointer to the message to send. You MUST NOT send a NULL pointer
Return values
TLS_OS_SUCCESS | success
TLS_OS_ERROR | failed
Note
None

◆ tls_os_mutex_acquire()

tls_os_status_t tls_os_mutex_acquire | ( | tls_os_mutex_t * | mutex,
 |  | u32 | wait_time
 | ) |  |

This function waits for a mutual exclusion semaphore.

Parameters
[in] | *mutex | pointer to the event control block associated with the desired mutex
[in] | wait_time | an optional timeout period (in clock ticks). If non-zero, your task will wait for the resource up to the amount of time specified by this argument. If you specify 0, however, your task will wait forever at the specified mutex or, until the resource becomes available.
Return values
TLS_OS_SUCCESS | The call was successful and your task owns the mutex
TLS_OS_ERROR | failed
Note
1) The task that owns the Mutex MUST NOT pend on any other event while it owns the mutex. 2) You MUST NOT change the priority of the task that owns the mutex

◆ tls_os_mutex_create()

tls_os_status_t tls_os_mutex_create | ( | u8 | prio,
 |  | tls_os_mutex_t ** | mutex
 | ) |  |

This function creates a mutual exclusion semaphore.

Parameters
[in] | prio | the priority to use when accessing the mutual exclusion semaphore. In other words, when the semaphore is acquired and a higher priority task attempts to obtain the semaphore then the priority of the task owning the semaphore is raised to this priority. It is assumed that you will specify a priority that is LOWER in value than ANY of the tasks competing for the mutex.
[in] | **mutex | pointer to the event control clock (OS_EVENT) associated with the created mutex.
Return values
TLS_OS_SUCCESS | the call was successful
TLS_OS_ERROR | failed
Note
1) The LEAST significant 8 bits of '.OSEventCnt' are used to hold the priority number of the task owning the mutex or 0xFF if no task owns the mutex. 2) The MOST significant 8 bits of '.OSEventCnt' are used to hold the priority number to use to reduce priority inversion.

◆ tls_os_mutex_delete()

tls_os_status_t tls_os_mutex_delete ( tls_os_mutex_t * mutex )

This function deletes a mutual exclusion semaphore and readies all tasks pending on the it.

Parameters
[in] *mutex pointer to the event control block associated with the desired mutex
Return values
TLS_OS_SUCCESS | The call was successful and the mutex was deleted
TLS_OS_ERROR | failed
Note
1) This function must be used with care. Tasks that would normally expect the presence of the mutex MUST check the return code of OSMutexPend(). 2) This call can potentially disable interrupts for a long time. The interrupt disable time is directly proportional to the number of tasks waiting on the mutex. 3) Because ALL tasks pending on the mutex will be readied, you MUST be careful because the resource(s) will no longer be guarded by the mutex. 4) IMPORTANT: In the 'OS_DEL_ALWAYS' case, we assume that the owner of the Mutex (if there is one) is ready-to-run and is thus NOT pending on another kernel object or has delayed itself.In other words, if a task owns the mutex being deleted,that task will be made ready-to-run at its original priority.

◆ tls_os_mutex_release()

tls_os_status_t tls_os_mutex_release ( tls_os_mutex_t * mutex )

This function releases a mutual exclusion semaphore.

Parameters
[in] *mutex pointer to the event control block associated with the desired mutex
Return values
TLS_OS_SUCCESS | The call was successful and the mutex was signaled.
TLS_OS_ERROR | failed
Note
None

◆ tls_os_queue_create()

tls_os_status_t tls_os_queue_create | ( | tls_os_queue_t ** | queue,
 |  | u32 | queue_size
 | ) |  |

This function creates a message queue if free event cont rol blocks are available.

Parameters
[in] | **queue | pointer to the event control clock (OS_EVENT) associated with the created queue
[in] | queue_size | the number of elements in the storage area
Return values
TLS_OS_SUCCESS | success
TLS_OS_ERROR | failed
Note
None

◆ tls_os_queue_delete()

tls_os_status_t tls_os_queue_delete ( tls_os_queue_t * queue )

This function deletes a message queue and readies all tasks pending on the queue.

Parameters
[in] *queue pointer to the event control block associated with the desired queue
Return values
TLS_OS_SUCCESS | success
TLS_OS_ERROR | failed
Note
None

◆ tls_os_queue_flush()

tls_os_status_t tls_os_queue_flush ( tls_os_queue_t * queue )

This function is used to flush the contents of the message queue.

Parameters
[in] *queue
Return values
TLS_OS_SUCCESS | success
TLS_OS_ERROR | failed
Note
None

◆ tls_os_queue_receive()

tls_os_status_t tls_os_queue_receive | ( | tls_os_queue_t * | queue,
 |  | void ** | msg,
 |  | u32 | msg_size,
 |  | u32 | wait_time
 | ) |  |

This function waits for a message to be sent to a queue.

Parameters
[in] | *queue | pointer to the event control block associated with the desired queue
[in] | **msg | pointer to the message received
[in] | msg_size | message size
[in] | wait_time | an optional timeout period (in clock ticks). If non-zero, your task will wait for a message to arrive at the queue up to the amount of time specified by this argument. If you specify 0, however, your task will wait forever at the specified queue or, until a message arrives.
Return values
TLS_OS_SUCCESS | success
TLS_OS_ERROR | failed
Note
None

◆ tls_os_queue_send()

tls_os_status_t tls_os_queue_send | ( | tls_os_queue_t * | queue,
 |  | void * | msg,
 |  | u32 | msg_size
 | ) |  |

This function sends a message to a queue.

Parameters
[in] | *queue | pointer to the event control block associated with the desired queue
[in] | *msg | pointer to the message to send.
[in] | msg_size | message size
Return values
0 | success
other | failed
Note
None

◆ tls_os_queue_send_to_back()

tls_os_status_t tls_os_queue_send_to_back | ( | tls_os_queue_t * | queue,
 |  | void * | msg,
 |  | u32 | msg_size
 | ) |  |

This function sends a message to a tail of the queue.

Parameters
[in] | *queue | pointer to the event control block associated with the desired queue
[in] | *msg | pointer to the message to send.
[in] | msg_size | message size
Return values
0 | success
other | failed
Note
None

◆ tls_os_queue_send_to_front()

tls_os_status_t tls_os_queue_send_to_front | ( | tls_os_queue_t * | queue,
 |  | void * | msg,
 |  | u32 | msg_size
 | ) |  |

This function sends a message to a head of the queue.

Parameters
[in] | *queue | pointer to the event control block associated with the desired queue
[in] | *msg | pointer to the message to send.
[in] | msg_size | message size
Return values
0 | success
other | failed
Note
None

◆ tls_os_queue_space_available()

u32 tls_os_queue_space_available ( tls_os_queue_t * queue )

Return the number of free spaces available in a queue. This is equal to the number of items that can be sent to the queue before the queue becomes full if no items are removed.

Parameters
*queue pointer to the event control block associated with the desired queue
Returns
The number of spaces available in the queue.
Note
None

◆ tls_os_release_critical()

void tls_os_release_critical ( u32 cpu_sr )

This function is used to enable interrupts by preserving the state of interrupts.

Parameters
[in] cpu_sr
Returns
None
Note
None

◆ tls_os_sem_acquire()

tls_os_status_t tls_os_sem_acquire | ( | tls_os_sem_t * | sem,
 |  | u32 | wait_time
 | ) |  |

This function waits for a semaphore.

Parameters
[in] | *sem | pointer to the event control block associated with the desired semaphore
[in] | wait_time | an optional timeout period (in clock ticks). If non-zero, your task will wait for the resource up to the amount of time specified by this argument.If you specify 0, however, your task will wait forever at the specified semaphore or, until the resource becomes available (or the event occurs).
Return values
TLS_OS_SUCCESS | success
TLS_OS_ERROR | failed
Note
None

◆ tls_os_sem_create()

tls_os_status_t tls_os_sem_create | ( | tls_os_sem_t ** | sem,
 |  | u32 | cnt
 | ) |  |

This function creates a semaphore.

Parameters
[in] | **sem | pointer to the event control block (OS_EVENT) associated with the created semaphore
[in] | cnt | the initial value for the semaphore. If the value is 0, no resource is available (or no event has occurred). You initialize the semaphore to a non-zero value to specify how many resources are available (e.g. if you have 10 resources, you would initialize the semaphore to 10).
Return values
TLS_OS_SUCCESS | success,The call was successful
TLS_OS_ERROR | failed
Note
None

◆ tls_os_sem_delete()

tls_os_status_t tls_os_sem_delete ( tls_os_sem_t * sem )

This function deletes a semaphore and readies all tasks pending on this semaphore.

Parameters
[in] *sem pointer to the event control block associated with the desired semaphore
Return values
TLS_OS_SUCCESS | success
TLS_OS_ERROR | failed
Note
None

◆ tls_os_sem_release()

tls_os_status_t tls_os_sem_release ( tls_os_sem_t * sem )

This function signals a semaphore.

Parameters
[in] *sem pointer to the event control block associated with the desired semaphore
Return values
TLS_OS_SUCCESS | success
TLS_OS_ERROR | failed
Note
None

◆ tls_os_sem_set()

tls_os_status_t tls_os_sem_set | ( | tls_os_sem_t * | sem,
 |  | u16 | cnt
 | ) |  |

This function sets the semaphore count to the value specified as an argument.Typically,this value would be 0.You would typically use this function when a semaphore is used as a signaling mechanism and, you want to reset the count value.

Parameters
[in] | *sem | pointer to the event control block
[in] | cnt | the new value for the semaphore count. You would pass 0 to reset the semaphore count.
Return values
TLS_OS_SUCCESS | success
TLS_OS_ERROR | failed
Note
None

◆ tls_os_set_critical()

u32 tls_os_set_critical ( void )

This function is used to disable interrupts by preserving the state of interrupts.

Parameters
[in] None
Return values
cpu_sr
Note
None

◆ tls_os_start_scheduler()

void tls_os_start_scheduler ( void )

This function is used to start task scheduler.

Parameters
[in] None
Returns
None
Note
None

◆ tls_os_task_create()

tls_os_status_t tls_os_task_create | ( | tls_os_task_t * | task,
 |  | const char * | name,
 |  | void(*)(void *param) | entry,
 |  | void * | param,
 |  | u8 * | stk_start,
 |  | u32 | stk_size,
 |  | u32 | prio,
 |  | u32 | flag
 | ) |  |

This function is used to create a task. Tasks can either be created prior to the start of multitasking or by a running task. A task cannot be created in an ISR.

Parameters
[in] | *task | pointer to the task
[in] | name | the task's name
[in] | entry | the task's entry function
[in] | param | pointer to an optional data area which can be used to pass parameters to the task when the task first executes. Where the task is concerned it thinks it was invoked and passed the argument 'param' as follows: void Task (void *param) { for (;;) { Task code; } }
[in] | *stk_start | pointer to the task's bottom of stack. Address must be between 0x20000000 and 0x20028000
[in] | stk_size | the size of the stack in number of elements. If OS_STK is set to INT8U, 'stk_size' corresponds to the number of bytes available. If OS_STK is set to INT16U, 'stk_size' contains the number of 16-bit entries available. Finally, if OS_STK is set to INT32U, 'stk_size' contains the number of 32-bit entries available on the stack.
[in] | prio | the task's priority. A unique priority MUST be assigned to each task and the lower the number, the higher the priority.
[in] | flag | contains additional information about the behavior of the task
Return values
TLS_OS_SUCCESS | the call was successful.
TLS_OS_ERROR | failed
Note
1) Stack Range: [stk_start, stk_start + stk_size) must be between 0x20000000 and 0x20028000 2) task stack: Using static memory like array, not using dynamic memory. 3) And if you use static memory like array (large size) as data storage in your application, we suggest you change it to dynamic memory by tls_mem_alloc.

◆ tls_os_task_del()

tls_os_status_t tls_os_task_del | ( | u8 | prio,
 |  | void(*)(void) | freefun
 | ) |  |

This function allows you to delete a task. The calling task can delete itself by its own priority number. The deleted task is returned to the dormant state and can be re-activated by creating the deleted task again.

Parameters
[in] | prio | task priority to delete
[in] | (*freefun)(void) | function to free resource
Return values
TLS_OS_SUCCESS | the call is successful
TLS_OS_ERROR | failed
Note
Generally, you do not need to call this function in your application.

◆ tls_os_task_del_by_task_handle()

tls_os_status_t tls_os_task_del_by_task_handle | ( | void * | handle,
 |  | void(*)(void) | freefun
 | ) |  |

This function allows you to delete a task. The calling task can delete itself by taks's handler. The deleted task is returned to the dormant state and can be re-activated by creating the deleted task again.

Parameters
[in] | prio | task handler to delete
[in] | (*freefun)(void) | function to free resource
Return values
TLS_OS_SUCCESS | the call is successful
TLS_OS_ERROR | failed

◆ tls_os_time_delay()

void tls_os_time_delay ( u32 ticks )

This function is called to delay execution of the currently running task until the specified number of system ticks expires. This, of course, directly equates to delaying the current task for some time to expire. There will be no delay if the specified delay is 0. If the specified delay is greater than 0 then, a context switch will executed.

Parameters
[in] ticks the time delay that the task will be suspended in number of clock 'ticks'.Note that by specifying 0, the task will not be delayed.
Returns
None
Note
None

◆ tls_os_time_tick()

void tls_os_time_tick ( void * p )

This function is used to tick handler.

Parameters
[in] *p argument
Returns
None
Note
None

◆ tls_os_timer_create()

tls_os_status_t tls_os_timer_create | ( | tls_os_timer_t ** | timer,
 |  | TLS_OS_TIMER_CALLBACK | callback,
 |  | void * | callback_arg,
 |  | u32 | period,
 |  | bool | repeat,
 |  | u8 * | name
 | ) |  |

This function is called by your application code to create a timer.

Parameters
[in] | **timer | pointer to an OS_TMR data structure. This is the 'handle' that your application will use to reference the timer created
[in] | callback | pointer to a callback function that will be called when the timer expires. The callback function must be declared as follows void MyCallback (OS_TMR *ptmr, void *p_arg);
[in] | *callback_arg | argument (a pointer) that is passed to the callback function when it is called
[in] | period | The 'period' being repeated for the timer. If you specified 'OS_TMR_OPT_PERIODIC' as an option, when the timer expires, it will automatically restart with the same period.
[in] | repeat | if repeat
[in] | *name | pointer to an ASCII string that is used to name the timer. Names are useful for debugging.
Return values
TLS_OS_SUCCESS | success
TLS_OS_ERROR | failed
Note
None

◆ tls_os_timer_delete()

tls_os_status_t tls_os_timer_delete ( tls_os_timer_t * timer )

This function is called by your application code to delete a timer.

Parameters
[in] *timer pointer to the timer to delete
Return values
TLS_OS_SUCCESS | success
TLS_OS_ERROR | failed
Note
None

◆ tls_os_timer_init()

void tls_os_timer_init ( void )

This function is used to register OS tick timer irq.

Parameters
[in] None
Returns
None
Note
None

◆ tls_os_timer_start()

void tls_os_timer_start ( tls_os_timer_t * timer )

This function is called by your application code to start a timer.

Parameters
[in] *timer pointer to an OS_TMR
Returns
None
Note
None

◆ tls_os_timer_stop()

void tls_os_timer_stop ( tls_os_timer_t * timer )

This function is called by your application code to stop a timer.

Parameters
[in] *timer pointer to the timer to stop.
Returns
None
Note
None


W800 SDK APIs: HARD CRYPTO APIs

Functions
HARD CRYPTO APIs
System APIs

hard crypto APIs More...

Functions

int | tls_crypto_random_stop (void)
This function is used to stop random produce. More...
int | tls_crypto_random_init (u32 seed, CRYPTO_RNG_SWITCH rng_switch)
This function initializes random digit seed and BIT number. More...
int | tls_crypto_random_bytes (unsigned char *out, u32 len)
This function is used to get random digit content. More...
int | tls_crypto_trng (unsigned char *out, u32 len)
This function is used to generate true random number. More...
int | tls_crypto_rc4_init (psCipherContext_t *ctx, const unsigned char *key, u32 keylen)
This function initializes a RC4 encryption algorithm,
i.e. fills the psCipherContext_t structure pointed to by ctx with necessary data. More...
int | tls_crypto_rc4 (psCipherContext_t *ctx, unsigned char *in, unsigned char *out, u32 len)
This function encrypts a variable length data stream according to RC4. The RC4 algorithm it generates a "keystream" which is simply XORed with the plaintext to produce the ciphertext stream. Decryption is exactly the same as encryption. This function also decrypts a variable length data stream according to RC4. More...
int | tls_crypto_aes_init (psCipherContext_t *ctx, const unsigned char *IV, const unsigned char *key, u32 keylen, CRYPTO_MODE cbc)
This function initializes a AES encryption algorithm, i.e. fills the psCipherContext_t structure pointed to by ctx with necessary data. More...
int | tls_crypto_aes_encrypt_decrypt (psCipherContext_t *ctx, unsigned char *in, unsigned char *out, u32 len, CRYPTO_WAY dec)
This function encrypts or decrypts a variable length data stream according to AES. More...
int | tls_crypto_3des_init (psCipherContext_t *ctx, const unsigned char *IV, const unsigned char *key, u32 keylen, CRYPTO_MODE cbc)
This function initializes a 3DES encryption algorithm, i.e. fills the psCipherContext_t structure pointed to by ctx with necessary data. More...
int | tls_crypto_3des_encrypt_decrypt (psCipherContext_t *ctx, unsigned char *in, unsigned char *out, u32 len, CRYPTO_WAY dec)
This function encrypts or decrypts a variable length data stream according to 3DES. More...
int | tls_crypto_des_init (psCipherContext_t *ctx, const unsigned char *IV, const unsigned char *key, u32 keylen, CRYPTO_MODE cbc)
This function initializes a DES encryption algorithm, i.e. fills the psCipherContext_t structure pointed to by ctx with necessary data. More...
int | tls_crypto_des_encrypt_decrypt (psCipherContext_t *ctx, unsigned char *in, unsigned char *out, u32 len, CRYPTO_WAY dec)
This function encrypts or decrypts a variable length data stream according to DES. More...
int | tls_crypto_crc_init (psCrcContext_t *ctx, u32 key, CRYPTO_CRC_TYPE crc_type, u8 mode)
This function initializes a CRC algorithm, i.e. fills the psCrcContext_t structure pointed to by ctx with necessary data. More...
int | tls_crypto_crc_update (psCrcContext_t *ctx, unsigned char *in, u32 len)
This function updates the CRC value with a variable length bytes. This function may be called as many times as necessary, so the message may be processed in blocks. More...
int | tls_crypto_crc_final (psCrcContext_t *ctx, u32 *crc_val)
This function ends a CRC operation and produces a CRC value. More...
void | tls_crypto_sha1_init (psDigestContext_t *md)
This function initializes Message-Diggest context for usage in SHA1 algorithm, starts a new SHA1 operation and writes a new Digest Context. More...
void | tls_crypto_sha1_update (psDigestContext_t *md, const unsigned char *buf, u32 len)
Process a message block using SHA1 algorithm. This function performs a SHA1 block update operation. It continues an SHA1 message-digest operation, by processing InputLen-byte length message block pointed to by buf, and by updating the SHA1 context pointed to by md. This function may be called as many times as necessary, so the message may be processed in blocks. More...
int | tls_crypto_sha1_final (psDigestContext_t *md, unsigned char *hash)
This function ends a SHA1 operation and produces a Message-Digest. This function finalizes SHA1 algorithm, i.e. ends an SHA1 Message-Digest operation, writing the Message-Digest in the 20-byte buffer pointed to by hash in according to the information stored in context. More...
void | tls_crypto_md5_init (psDigestContext_t *md)
This function initializes Message-Diggest context for usage in MD5 algorithm, starts a new MD5 operation and writes a new Digest Context. This function begins a MD5 Message-Diggest Algorithm, i.e. fills the psDigestContext_t structure pointed to by md with necessary data. MD5 is the algorithm which takes as input a message of arbitrary length and produces as output a 128-bit "fingerprint" or "message digest" of the input. It is conjectured that it is computationally infeasible to produce two messages having the same message digest, or to produce any message having a given prespecified target message digest. More...
void | tls_crypto_md5_update (psDigestContext_t *md, const unsigned char *buf, u32 len)
Process a message block using MD5 algorithm. This function performs a MD5 block update operation. It continues an MD5 message-digest operation, by processing InputLen-byte length message block pointed to by buf, and by updating the MD5 context pointed to by md. This function may be called as many times as necessary, so the message may be processed in blocks. More...
int | tls_crypto_md5_final (psDigestContext_t *md, unsigned char *hash)
This function ends a MD5 operation and produces a Message-Digest. This function finalizes MD5 algorithm, i.e. ends an MD5 Message-Digest operation, writing the Message-Digest in the 16-byte buffer pointed to by hash in according to the information stored in context. More...
int | tls_crypto_exptmod (hstm_int *a, hstm_int *e, hstm_int *n, hstm_int *res)
This function implements the large module power multiplication algorithm. res = a**e (mod n) More...
int | tls_crypto_init (void)
This function initializes the encryption module. More...

Detailed Description

hard crypto APIs

Function Documentation

◆ tls_crypto_3des_encrypt_decrypt()

int tls_crypto_3des_encrypt_decrypt | ( | psCipherContext_t * | ctx,
 |  | unsigned char * | in,
 |  | unsigned char * | out,
 |  | u32 | len,
 |  | CRYPTO_WAY | dec
 | ) |  |

This function encrypts or decrypts a variable length data stream according to 3DES.

Parameters
[in] | ctx | Pointer to the Cipher Context.
[in] | in | Pointer to the input plaintext data stream(or the encrypted text data stream) of variable length.
[in] | out | Pointer to the resulting ciphertext data stream.
[in] | len | Length of the plaintext data stream in octets.
[in] | dec | The cryption way which indicates encryption or decryption.
Return values
0 success
other failed
Note
None

◆ tls_crypto_3des_init()

int tls_crypto_3des_init | ( | psCipherContext_t * | ctx,
 |  | const unsigned char * | IV,
 |  | const unsigned char * | key,
 |  | u32 | keylen,
 |  | CRYPTO_MODE | cbc
 | ) |  |

This function initializes a 3DES encryption algorithm, i.e. fills the psCipherContext_t structure pointed to by ctx with necessary data.

Parameters
[in] | ctx | Pointer to the Cipher Context.
[in] | IV | Pointer to the Initialization Vector
[in] | key | Pointer to the key.
[in] | keylen | the length of key.
[in] | cbc | the encryption mode, 3DES supports ECB/CBC modes.
Return values
0 success
other failed
Note
None

◆ tls_crypto_aes_encrypt_decrypt()

int tls_crypto_aes_encrypt_decrypt | ( | psCipherContext_t * | ctx,
 |  | unsigned char * | in,
 |  | unsigned char * | out,
 |  | u32 | len,
 |  | CRYPTO_WAY | dec
 | ) |  |

This function encrypts or decrypts a variable length data stream according to AES.

Parameters
[in] | ctx | Pointer to the Cipher Context.
[in] | in | Pointer to the input plaintext data stream(or the encrypted text data stream) of variable length.
[in] | out | Pointer to the resulting ciphertext data stream.
[in] | len | Length of the plaintext data stream in octets.
[in] | dec | The cryption way which indicates encryption or decryption.
Return values
0 success
other failed
Note
None

◆ tls_crypto_aes_init()

int tls_crypto_aes_init | ( | psCipherContext_t * | ctx,
 |  | const unsigned char * | IV,
 |  | const unsigned char * | key,
 |  | u32 | keylen,
 |  | CRYPTO_MODE | cbc
 | ) |  |

This function initializes a AES encryption algorithm, i.e. fills the psCipherContext_t structure pointed to by ctx with necessary data.

Parameters
[in] | ctx | Pointer to the Cipher Context.
[in] | IV | Pointer to the Initialization Vector
[in] | key | Pointer to the key.
[in] | keylen | the length of key.
[in] | cbc | the encryption mode, AES supports ECB/CBC/CTR modes.
Return values
0 success
other failed
Note
None

◆ tls_crypto_crc_final()

int tls_crypto_crc_final | ( | psCrcContext_t * | ctx,
 |  | u32 * | crc_val
 | ) |  |

This function ends a CRC operation and produces a CRC value.

Parameters
[in] | ctx | Pointer to the CRC Context.
[in] | crc_val | Pointer to the CRC value.
Return values
0 success
other failed
Note
None

◆ tls_crypto_crc_init()

int tls_crypto_crc_init | ( | psCrcContext_t * | ctx,
 |  | u32 | key,
 |  | CRYPTO_CRC_TYPE | crc_type,
 |  | u8 | mode
 | ) |  |

This function initializes a CRC algorithm, i.e. fills the psCrcContext_t structure pointed to by ctx with necessary data.

Parameters
[in] | ctx | Pointer to the CRC Context.
[in] | key | The initialization key.
[in] | crc_type | The CRC type, supports CRC8/CRC16 MODBUS/CRC16 CCITT/CRC32
[in] | mode | Set input or outpu reflect.
[in] | dec | The cryption way which indicates encryption or decryption. see OUTPUT_REFLECT see INPUT_REFLECT
Return values
0 success
other failed
Note
None

◆ tls_crypto_crc_update()

int tls_crypto_crc_update | ( | psCrcContext_t * | ctx,
 |  | unsigned char * | in,
 |  | u32 | len
 | ) |  |

This function updates the CRC value with a variable length bytes. This function may be called as many times as necessary, so the message may be processed in blocks.

Parameters
[in] | ctx | Pointer to the CRC Context.
[in] | in | Pointer to a variable length bytes
[in] | len | The bytes 's length
Return values
0 success
other failed
Note
None

◆ tls_crypto_des_encrypt_decrypt()

int tls_crypto_des_encrypt_decrypt | ( | psCipherContext_t * | ctx,
 |  | unsigned char * | in,
 |  | unsigned char * | out,
 |  | u32 | len,
 |  | CRYPTO_WAY | dec
 | ) |  |

This function encrypts or decrypts a variable length data stream according to DES.

Parameters
[in] | ctx | Pointer to the Cipher Context.
[in] | in | Pointer to the input plaintext data stream(or the encrypted text data stream) of variable length.
[in] | out | Pointer to the resulting ciphertext data stream.
[in] | len | Length of the plaintext data stream in octets.
[in] | dec | The cryption way which indicates encryption or decryption.
Return values
0 success
other failed
Note
None

◆ tls_crypto_des_init()

int tls_crypto_des_init | ( | psCipherContext_t * | ctx,
 |  | const unsigned char * | IV,
 |  | const unsigned char * | key,
 |  | u32 | keylen,
 |  | CRYPTO_MODE | cbc
 | ) |  |

This function initializes a DES encryption algorithm, i.e. fills the psCipherContext_t structure pointed to by ctx with necessary data.

Parameters
[in] | ctx | Pointer to the Cipher Context.
[in] | IV | Pointer to the Initialization Vector
[in] | key | Pointer to the key.
[in] | keylen | the length of key.
[in] | cbc | the encryption mode, DES supports ECB/CBC modes.
Return values
0 success
other failed
Note
None

◆ tls_crypto_exptmod()

int tls_crypto_exptmod | ( | hstm_int * | a,
 |  | hstm_int * | e,
 |  | hstm_int * | n,
 |  | hstm_int * | res
 | ) |  |

This function implements the large module power multiplication algorithm. res = a**e (mod n)

Parameters
[in] | a | Pointer to a bignumber.
[in] | e | Pointer to a bignumber.
[in] | n | Pointer to a bignumber.
[out] | res | Pointer to the result bignumber.
Return values
0 success
other failed
Note
None

◆ tls_crypto_init()

int tls_crypto_init ( void )

This function initializes the encryption module.

Parameters
None
Return values
0 success
other failed
Note
None

◆ tls_crypto_md5_final()

int tls_crypto_md5_final | ( | psDigestContext_t * | md,
 |  | unsigned char * | hash
 | ) |  |

This function ends a MD5 operation and produces a Message-Digest. This function finalizes MD5 algorithm, i.e. ends an MD5 Message-Digest operation, writing the Message-Digest in the 16-byte buffer pointed to by hash in according to the information stored in context.

Parameters
[in] | md | MD5 Digest Context.
[in] | hash | the Message-Digest
Return values
16 success, return the hash size.
<0 failed
Note
None

◆ tls_crypto_md5_init()

void tls_crypto_md5_init ( psDigestContext_t * md )

This function initializes Message-Diggest context for usage in MD5 algorithm, starts a new MD5 operation and writes a new Digest Context. This function begins a MD5 Message-Diggest Algorithm, i.e. fills the psDigestContext_t structure pointed to by md with necessary data. MD5 is the algorithm which takes as input a message of arbitrary length and produces as output a 128-bit "fingerprint" or "message digest" of the input. It is conjectured that it is computationally infeasible to produce two messages having the same message digest, or to produce any message having a given prespecified target message digest.

Parameters
[in] md MD5 Digest Context.
Returns
None
Note
None

◆ tls_crypto_md5_update()

void tls_crypto_md5_update | ( | psDigestContext_t * | md,
 |  | const unsigned char * | buf,
 |  | u32 | len
 | ) |  |

Process a message block using MD5 algorithm. This function performs a MD5 block update operation. It continues an MD5 message-digest operation, by processing InputLen-byte length message block pointed to by buf, and by updating the MD5 context pointed to by md. This function may be called as many times as necessary, so the message may be processed in blocks.

Parameters
[in] | md | MD5 Digest Context.
[in] | buf | InputLen-byte length message block
[in] | len | The buf 's length
Returns
None
Note
None

◆ tls_crypto_random_bytes()

int tls_crypto_random_bytes | ( | unsigned char * | out,
 |  | u32 | len
 | ) |  |

This function is used to get random digit content.

Parameters
[in] | out | Pointer to the output of random digit.
[in] | len | The random digit bit number will output.
Return values
0 success
other failed
Note
None

◆ tls_crypto_random_init()

int tls_crypto_random_init | ( | u32 | seed,
 |  | CRYPTO_RNG_SWITCH | rng_switch
 | ) |  |

This function initializes random digit seed and BIT number.

Parameters
[in] seed The random digit seed.
[in] rng_switch The random digit bit number. (0: 16bit 1:32bit)
Return values
0 success
other failed
Note
None

◆ tls_crypto_random_stop()

int tls_crypto_random_stop ( void )

This function is used to stop random produce.

Parameters
[in] None
Return values
0 | success
other | failed
Note
None

◆ tls_crypto_rc4()

int tls_crypto_rc4 | ( | psCipherContext_t * | ctx,
 |  | unsigned char * | in,
 |  | unsigned char * | out,
 |  | u32 | len
 | ) |  |

This function encrypts a variable length data stream according to RC4. The RC4 algorithm it generates a "keystream" which is simply XORed with the plaintext to produce the ciphertext stream. Decryption is exactly the same as encryption. This function also decrypts a variable length data stream according to RC4.

Parameters
[in] | ctx | Pointer to the Cipher Context.
[in] | in | Pointer to the input plaintext data stream(or the encrypted text data stream) of variable length.
[in] | out | Pointer to the resulting ciphertext data stream.
[in] | len | Length of the plaintext data stream in octets.
Return values
0 success
other failed
Note
None

◆ tls_crypto_rc4_init()

int tls_crypto_rc4_init | ( | psCipherContext_t * | ctx,
 |  | const unsigned char * | key,
 |  | u32 | keylen
 | ) |  |

This function initializes a RC4 encryption algorithm,
i.e. fills the psCipherContext_t structure pointed to by ctx with necessary data.

Parameters
[in] | ctx | Pointer to the Cipher Context.
[in] | key | Pointer to the key.
[in] | keylen | the length of key.
Return values
0 success
other failed
Note
The first parameter ctx must be a structure which is allocated externally. And all of Context parameters in the initializing methods should be allocated externally too.

◆ tls_crypto_sha1_final()

int tls_crypto_sha1_final | ( | psDigestContext_t * | md,
 |  | unsigned char * | hash
 | ) |  |

This function ends a SHA1 operation and produces a Message-Digest. This function finalizes SHA1 algorithm, i.e. ends an SHA1 Message-Digest operation, writing the Message-Digest in the 20-byte buffer pointed to by hash in according to the information stored in context.

Parameters
[in] | md | Pointer to the SHA1 Digest Context.
[in] | hash | Pointer to the Message-Digest
Return values
20 success, return the hash size.
<0 failed
Note
None

◆ tls_crypto_sha1_init()

void tls_crypto_sha1_init ( psDigestContext_t * md )

This function initializes Message-Diggest context for usage in SHA1 algorithm, starts a new SHA1 operation and writes a new Digest Context.

Parameters
[in] md Pointer to the SHA1 Digest Context.
Return values
0 success
other failed
Note
None

◆ tls_crypto_sha1_update()

void tls_crypto_sha1_update | ( | psDigestContext_t * | md,
 |  | const unsigned char * | buf,
 |  | u32 | len
 | ) |  |

Process a message block using SHA1 algorithm. This function performs a SHA1 block update operation. It continues an SHA1 message-digest operation, by processing InputLen-byte length message block pointed to by buf, and by updating the SHA1 context pointed to by md. This function may be called as many times as necessary, so the message may be processed in blocks.

Parameters
[in] | md | Pointer to the SHA1 Digest Context.
[in] | buf | InputLen-byte length message block
[in] | len | The buf 's length

None

Note
None

◆ tls_crypto_trng()

int tls_crypto_trng | ( | unsigned char * | out,
 |  | u32 | len
 | ) |  |

This function is used to generate true random number.

Parameters
[in] | out | Pointer to the output of random number.
[in] | len | The random number length.
Return values
0 | success
other | failed
Note
None


W800 SDK APIs: FWUP APIs

Functions
FWUP APIs
System APIs

firmware upgrade APIs More...

Functions

int | tls_fwup_init (void)
This function is used to initialize firmware update task. More...
u32 | tls_fwup_enter (enum tls_fwup_image_src image_src)
This function is used to enter firmware update progress. More...
int | tls_fwup_exit (u32 session_id)
This function is used to exit firmware update progress. More...
int | tls_fwup_request_sync (u32 session_id, u8 *data, u32 data_len)
This function is used to start update progress. More...
u16 | tls_fwup_current_state (u32 session_id)
This function is used to get current update status. More...
int | tls_fwup_reset (u32 session_id)
This function is used to reset the update information. More...
int | tls_fwup_clear_error (u32 session_id)
This function is used to clear error update state. More...
int | tls_fwup_set_crc_error (u32 session_id)
This function is used to set update state to TLS_FWUP_STATE_ERROR_CRC. More...
int | tls_fwup_get_status (void)
This function is used to get progress's status. More...
int | tls_fwup_set_update_numer (int number)
This function is used to set update packet number. More...
int | tls_fwup_get_current_update_numer (void)
This function is used to get received update packet number. More...
int | tls_fwup_get_current_session_id (void)
This function is used to get current session id. More...
int | tls_fwup_img_header_check (IMAGE_HEADER_PARAM_ST *img_param)
This function is used to check image header. More...

Detailed Description

firmware upgrade APIs

Function Documentation

◆ tls_fwup_clear_error()

int tls_fwup_clear_error ( u32 session_id )

This function is used to clear error update state.

Parameters
[in] session_id current sessin id
Return values
TLS_FWUP_STATUS_OK reset success
Note
None

◆ tls_fwup_current_state()

u16 tls_fwup_current_state ( u32 session_id )

This function is used to get current update status.

Parameters
[in] session_id current sessin id
Return values
current state TLS_FWUP_STATUS_OK to TLS_FWUP_STATUS_EUNDEF
Note
None

◆ tls_fwup_enter()

u32 tls_fwup_enter ( enum tls_fwup_image_src image_src )

This function is used to enter firmware update progress.

Parameters
[in] image_src image file's source, from TLS_FWUP_IMAGE_SRC_LUART, TLS_FWUP_IMAGE_SRC_WEB,TLS_FWUP_IMAGE_SRC_HUART, TLS_FWUP_IMAGE_SRC_HSPI
Return values
non-zero | successfully, return session id
0 | failed
Note
None

◆ tls_fwup_exit()

int tls_fwup_exit ( u32 session_id )

This function is used to exit firmware update progress.

Parameters
[in] session_id session identity of firmware update progress
Return values
TLS_FWUP_STATUS_OK | exit success
TLS_FWUP_STATUS_EPERM | globle param is not initialed
TLS_FWUP_STATUS_ESESSIONID | error session id
TLS_FWUP_STATUS_EBUSY | update state is busy
Note
None

◆ tls_fwup_get_current_session_id()

int tls_fwup_get_current_session_id ( void )

This function is used to get current session id.

Parameters
[in] None
Return values
non-zoro | session id
0 | error
Note
None

◆ tls_fwup_get_current_update_numer()

int tls_fwup_get_current_update_numer ( void )

This function is used to get received update packet number.

Parameters
[in] None
Return values
return current packet number
Note
None

◆ tls_fwup_get_status()

int tls_fwup_get_status ( void )

This function is used to get progress's status.

Parameters
[in] None
Return values
TRUE | busy
FALSE | idle
Note
None

◆ tls_fwup_img_header_check()

int tls_fwup_img_header_check ( IMAGE_HEADER_PARAM_ST * img_param )

This function is used to check image header.

Parameters
[in] None
Return values
TRUE | success
FALSE | failure
Note
None

◆ tls_fwup_init()

int tls_fwup_init ( void )

This function is used to initialize firmware update task.

Parameters
[in] None
Return values
TLS_FWUP_STATUS_OK | initial success
TLS_FWUP_STATUS_EBUSY | already initialed
TLS_FWUP_STATUS_EMEM | memory error
Note
None

◆ tls_fwup_request_sync()

int tls_fwup_request_sync | ( | u32 | session_id,
 |  | u8 * | data,
 |  | u32 | data_len
 | ) |  |

This function is used to start update progress.

Parameters
[in] | session_id | current sessin id
[in] | *data | the data want to update
[in] | data_len | data length
Return values
TLS_FWUP_STATUS_OK | updade success
TLS_FWUP_STATUS_EPERM | globle param is not initialed
TLS_FWUP_STATUS_ESESSIONID | error session id
TLS_FWUP_STATUS_EINVALID | invalid param
TLS_FWUP_STATUS_EMEM | memory error
TLS_FWUP_STATUS_EIO | write flash error
TLS_FWUP_STATUS_ECRC | crc error
TLS_FWUP_STATUS_ESIGNATURE | signature error
TLS_FWUP_STATUS_EUNDEF | other error
Note
None

◆ tls_fwup_reset()

int tls_fwup_reset ( u32 session_id )

This function is used to reset the update information.

Parameters
[in] session_id current sessin id
Return values
TLS_FWUP_STATUS_OK | reset success
TLS_FWUP_STATUS_EPERM | globle param is not initialed
TLS_FWUP_STATUS_ESESSIONID | error session id
TLS_FWUP_STATUS_EBUSY | update state is busy
Note
None

◆ tls_fwup_set_crc_error()

int tls_fwup_set_crc_error ( u32 session_id )

This function is used to set update state to TLS_FWUP_STATE_ERROR_CRC.

Parameters
[in] session_id current sessin id
Return values
TLS_FWUP_STATUS_OK | set success
TLS_FWUP_STATUS_EPERM | globle param is not initialed
TLS_FWUP_STATUS_ESESSIONID | error session id
Note
None

◆ tls_fwup_set_update_numer()

int tls_fwup_set_update_numer ( int number )

This function is used to set update packet number.

Parameters
[in] number
Return values
TLS_FWUP_STATUS_OK | success
TLS_FWUP_STATE_UNDEF | failed
Note
None


W800 SDK APIs: MEM APIs

Macros
MEM APIs
System APIs

memory manager APIs More...

Macros

#define | tls_mem_alloc(size) mem_alloc_debug(size)
This function is called by memory allocation. More...
#define | tls_mem_free mem_free_debug
This function is used to free memory. More...
#define | tls_mem_realloc mem_realloc_debug
This function is used to realloc memory. More...
#define | tls_mem_calloc mem_calloc_debug
This function is used to calloc memory. More...
#define | MEMCPY(dst, src, len) memcpy(dst,src,len)
This function is used to copy memory content from one address to another address. More...
#define | SMEMCPY(dst, src, len) memcpy(dst,src,len)
This function is used to copy memory content from one address to another address. More...

Detailed Description

memory manager APIs

Macro Definition Documentation

◆ MEMCPY

#define MEMCPY | ( | dst,
 |  | src,
 |  | len
 | ) | memcpy(dst,src,len)

This function is used to copy memory content from one address to another address.

Parameters
[in] | dst | pointer to destination address
[in] | src | pointer to source address
[in] | len | length to copy
Return values
dst
Note
None

◆ SMEMCPY

#define SMEMCPY | ( | dst,
 |  | src,
 |  | len
 | ) | memcpy(dst,src,len)

This function is used to copy memory content from one address to another address.

Parameters
[in] | dst | pointer to destination address
[in] | src | pointer to source address
[in] | len | length to copy
Return values
dst
Note
None

◆ tls_mem_alloc

#define tls_mem_alloc ( size ) mem_alloc_debug(size)

This function is called by memory allocation.

Parameters
[in] size
Return values
NULL | malloc failed
pointer | pointer to the address of the allocated memory
Note
None

◆ tls_mem_calloc

#define tls_mem_calloc mem_calloc_debug

This function is used to calloc memory.

Parameters
None
Return values
NULL | realloc failed
Pointer | pointer to the address of the allocated memory
Note
None

◆ tls_mem_free

#define tls_mem_free mem_free_debug

This function is used to free memory.

Parameters
None
Returns
None
Note
None

◆ tls_mem_realloc

#define tls_mem_realloc mem_realloc_debug

This function is used to realloc memory.

Parameters
None
Return values
NULL | realloc failed
Pointer | pointer to the address of the allocated memory
Note
None


W800 SDK APIs: Param APIs

Functions
Param APIs
System APIs

Param manager APIs. More...

Functions

int | tls_param_init (void)
This function is used to initialize parameter's manage module. More...
void | tls_param_load_factory_default (void)
This function is used to load the system's default parameters. More...
int | tls_param_set (int id, void *argv, bool to_flash)
This function is used to set one system parameter by its id. More...
int | tls_param_get (int id, void *argv, bool from_flash)
This function is used to get one system parameter by its id. More...
int | tls_param_to_flash (int id)
This function is used to write parameter into flash. More...
void | tls_restore_param_from_backup (void)
This function is used to recovery the parameters from the backup area to the parameter area,and load them into ram. More...
int | tls_param_to_default (void)
This function is used to load default parametes into ram. More...
int | tls_param_save_user_default (void)
This function is used to write user's parameters into the flash. More...
int | tls_param_save_user (struct tls_user_param *user_param)
This function is used to modify user's default parameters, then write them into flash. More...
u8 | tls_param_get_updp_mode (void)
This function is used to get updp mode.(updp:update user default parameters) More...
void | tls_param_set_updp_mode (u8 mode)
This function is used to set updp mode. More...
int | tls_param_get_program_param (u32 *pBase)
This function is used to get program param. More...
int | tls_param_set_program_param (u32 base, u32 totallen, u32 checksum)
This function is used to set program base,image len,and checksum. More...
int | tls_param_get_bt_param_address (int id, int from_flash)
This function is used to get bt param offset located in system param area. More...

Detailed Description

Param manager APIs.

Function Documentation

◆ tls_param_get()

int tls_param_get | ( | int | id,
 |  | void * | argv,
 |  | bool | from_flash
 | ) |  |

This function is used to get one system parameter by its id.

Parameters
[in] | id | param id,from TLS_PARAM_ID_SSID to (TLS_PARAM_ID_MAX - 1)
[in] | *argv | store parameters
[in] | from_flash | whether the parameter is readed from flash, 1 read from flash,0 read from memory
Return values
TLS_PARAM_STATUS_OK | success
TLS_PARAM_STATUS_EINVALID | invalid param
Note
None

◆ tls_param_get_bt_param_address()

int tls_param_get_bt_param_address | ( | int | id,
 |  | int | from_flash
 | ) |  |

This function is used to get bt param offset located in system param area.

Parameters
[in] | id | from TLS_PARAM_ID_BT_REMOTE_DEVICE_1 to TLS_PARAM_ID_BT_REMOTE_DEVICE_5
[in] | from_flash | whether the parameter is readed from flash, 1 read from flash(invalid for now),0 read from memory
Return values
>0 | success
other | failed
Note
None

◆ tls_param_get_program_param()

int tls_param_get_program_param ( u32 * pBase )

This function is used to get program param.

Parameters
[in] *pBase pointer to save base address
Return values
0 | success
other | failed
Note
None

◆ tls_param_get_updp_mode()

u8 tls_param_get_updp_mode ( void )

This function is used to get updp mode.(updp:update user default parameters)

Parameters
[in] None
Return values
update mode
Note
None

◆ tls_param_init()

int tls_param_init ( void )

This function is used to initialize parameter's manage module.

Parameters
[in] None
Return values
TLS_PARAM_STATUS_OK | init success
TLS_PARAM_STATUS_EMEM | memory error
TLS_PARAM_STATUS_EIO | io error
TLS_PARAM_STATUS_EPERM | magic number error
Note
None

◆ tls_param_load_factory_default()

void tls_param_load_factory_default ( void )

This function is used to load the system's default parameters.

Parameters
[in] None
Returns
None
Note
This function read user defined parameters first, if wrong, all the parameters restore factory settings

◆ tls_param_save_user()

int tls_param_save_user ( struct tls_user_param * user_param )

This function is used to modify user's default parameters, then write them into flash.

Parameters
[in] *user_param
Return values
TLS_PARAM_STATUS_OK | success
other | failed
Note
None

◆ tls_param_save_user_default()

int tls_param_save_user_default ( void )

This function is used to write user's parameters into the flash.

Parameters
[in] None
Return values
TLS_PARAM_STATUS_OK | success
other | failed
Note
None

◆ tls_param_set()

int tls_param_set | ( | int | id,
 |  | void * | argv,
 |  | bool | to_flash
 | ) |  |

This function is used to set one system parameter by its id.

Parameters
[in] | id | param id,from TLS_PARAM_ID_SSID to (TLS_PARAM_ID_MAX - 1)
[in] | *argv | store parameters
[in] | to_flash | whether the parameter is written to flash, 1:write to flash,0:only write memory
Return values
TLS_PARAM_STATUS_OK | set success
TLS_PARAM_STATUS_EINVALID | invalid param
Note
None

◆ tls_param_set_program_param()

int tls_param_set_program_param | ( | u32 | base,
 |  | u32 | totallen,
 |  | u32 | checksum
 | ) |  |

This function is used to set program base,image len,and checksum.

Parameters
[in] | base | base address
[in] | totallen | total length of the image
[in] | checksum | checksum value of the image
Return values
0 | success
other | failed
Note
None

◆ tls_param_set_updp_mode()

void tls_param_set_updp_mode ( u8 mode )

This function is used to set updp mode.

Parameters
[in] mode
Returns
None
Note
None

◆ tls_param_to_default()

int tls_param_to_default ( void )

This function is used to load default parametes into ram.

Parameters
[in] None
Return values
TLS_PARAM_STATUS_OK | set success
TLS_PARAM_STATUS_EINVALID | parameter wrong
TLS_PARAM_STATUS_EIO | read or write falsh error
Note
This function read user defined parameters first, if wrong, all the parameters restore factory settings

◆ tls_param_to_flash()

int tls_param_to_flash ( int id )

This function is used to write parameter into flash.

Parameters
[in] id param id,from TLS_PARAM_ID_ALL to (TLS_PARAM_ID_MAX - 1)
Return values
TLS_PARAM_STATUS_OK | success
TLS_PARAM_STATUS_EINVALID | invalid param
TLS_PARAM_STATUS_EIO | read or write flash error
Note
None

◆ tls_restore_param_from_backup()

void tls_restore_param_from_backup ( void )

This function is used to recovery the parameters from the backup area to the parameter area,and load them into ram.

Parameters
[in] None
Returns
None
Note
None


W800 SDK APIs: DEBUG APIs

Macros
DEBUG APIs
System APIs

DEBUG APIs. More...

Macros

#define | TLS_DBGPRT_INFO(f, a...)
#define | TLS_DBGPRT_WARNING(f, a...)
#define | TLS_DBGPRT_ERR(f, a...)
#define | TLS_DBGPRT_DUMP(p, len)

Detailed Description

DEBUG APIs.

Macro Definition Documentation

◆ TLS_DBGPRT_DUMP

#define TLS_DBGPRT_DUMP | ( | p,
 |  | len
 | ) |

Print information of the dump level

◆ TLS_DBGPRT_ERR

#define TLS_DBGPRT_ERR | ( | f,
 |  | a...
 | ) |

Print information of the error level

◆ TLS_DBGPRT_INFO

#define TLS_DBGPRT_INFO | ( | f,
 |  | a...
 | ) |

Print information of the info level

◆ TLS_DBGPRT_WARNING

#define TLS_DBGPRT_WARNING | ( | f,
 |  | a...
 | ) |

Print information of the warning level


W800 SDK APIs: REG APIs

Functions
REG APIs
System APIs

Register operate APIs. More...

Functions

static __inline void | tls_reg_write32 (unsigned int reg, unsigned int val)
This function is used to write value to register or memory. More...
static __inline unsigned int | tls_reg_read32 (unsigned int reg)
This function is used to read value from register or memory. More...
static __inline void | tls_bitband_write (volatile unsigned int addr, unsigned int bit, unsigned int val)
This function is used to write specified bit through bit-band alias region. More...
static __inline unsigned int | tls_bitband_read (volatile unsigned int addr, unsigned int bit)
This function is used to read a single bit from address by bit-band alias region. More...

Detailed Description

Register operate APIs.

Function Documentation

◆ tls_bitband_read()

static __inline unsigned int tls_bitband_read | ( | volatile unsigned int | addr,
 |  | unsigned int | bit
 | ) |  |
static

This function is used to read a single bit from address by bit-band alias region.

Parameters
[in] | addr | 32-bit aligned byte address where the bit exists
[in] | bit | Bit position
Return values
The value of the requested bit
Note
Only when bit-band mechnism is supported, you can use it

◆ tls_bitband_write()

static __inline void tls_bitband_write | ( | volatile unsigned int | addr,
 |  | unsigned int | bit,
 |  | unsigned int | val
 | ) |  |
static

This function is used to write specified bit through bit-band alias region.

Parameters
[in] | addr | 32-bit aligned byte address where the bit exists.
[in] | bit | Bit position.
[in] | val | The value that the bit is set to, 0 or 1.
Returns
None
Note
Only when bit-band mechnism is supported, you can use it

◆ tls_reg_read32()

static __inline unsigned int tls_reg_read32 ( unsigned int reg )
static

This function is used to read value from register or memory.

Parameters
[in] reg address to read
Return values
val read from register or memory
Note
None

◆ tls_reg_write32()

static __inline void tls_reg_write32 | ( | unsigned int | reg,
 |  | unsigned int | val
 | ) |  |
static

This function is used to write value to register or memory.

Parameters
[in] | reg | address to be written
[in] | val | value to write
Returns
None
Note
None


W800 SDK APIs: Wi-Fi APIs

Typedefs | Functions
Wi-Fi APIs

Wi-Fi related APIs. More...

Typedefs

typedef void(* | tls_wifi_oneshot_result_callback) (enum tls_wifi_oneshot_result_type type)
typedef void(* | tls_wifi_client_event_callback) (u8 *mac, enum tls_wifi_client_event_type event)

Functions

void | tls_wifi_set_listen_mode (u8 enable)
This function is used to enable/disable listen mode. More...
u8 | tls_wifi_get_listen_mode (void)
This function is used to get listen mode. More...
u8 | tls_filter_mcast_mac (u8 *mac, u8 receive)
This function is used to filter multicast frames. More...
void | tls_wifi_set_bcast_mac_filter (u8 *mac, u8 receive, u8 clear)
This function is used to set mac filter. More...
void | tls_wifi_restore_bcast_mac_filter (void)
This function is used to restore mac filter to normal mode. More...
void | tls_wifi_data_recv_cb_register (tls_wifi_data_recv_callback callback)
This function is used to register recv wifi data callback function. More...
void | tls_wifi_data_ext_recv_cb_register (tls_wifi_data_ext_recv_callback callback)
This function is used to register recv wifi extended data callback function. More...
void | tls_wifi_mgmt_ext_recv_cb_register (tls_wifi_data_ext_recv_callback callback)
This function is used to register recv wifi management frame callback function. More...
void | tls_wifi_psm_chipsleep_cb_register (tls_wifi_psm_chipsleep_callback sleepcallback, tls_wifi_psm_prechipsleep_callback precallback, tls_wifi_psm_postchipsleep_callback postcallback)
This function is used to register chipsleep callback function when using chip sleep for powersaving. More...
void | tls_wifi_set_psm_chipsleep_flag (u32 flag)
This function is used to set chipsleep valid flag. More...
u32 | tls_wifi_get_psm_chipsleep_flag (void)
This function is used to get chipsleep valid flag. More...
int | tls_wifi_set_oneshot_flag (u8 flag)
This function is used to set oneshot config flag. More...
int | tls_wifi_get_oneshot_flag (void)
This function is used to get one shot flag. More...
void | tls_wifi_oneshot_result_cb_register (tls_wifi_oneshot_result_callback callback)
before calling tls_wifi_get_oneshot_ssidpwd or tls_wifi_get_oneshot_customdata, application should call this function to register the call back function More...
void | tls_wifi_get_oneshot_ssidpwd (u8 *ssid, u8 *pwd)
This function is used to get one shot ssid and password information. More...
void | tls_wifi_get_oneshot_customdata (u8 *data)
This function is used to get one shot custom data. More...
void | tls_wifi_change_chanel (u32 chanid)
This function is used to change channel actively. More...
int | tls_wifi_scan (void)
This function is used to trigger scan AP. More...
int | tls_wifi_passive_scan (void)
This function is used to trigger scan AP. More...
int | tls_wifi_scan_by_param (struct tls_wifi_scan_param_t *scan_param)
scan AP ,user can set channellist,scan times and switch interval per channel More...
void | tls_wifi_scan_result_cb_register (void(*callback)(void))
Before calling tls_wifi_scan() , application should call this function to register the call back function;. More...
int | tls_wifi_get_scan_rslt (u8 *buf, u32 buffer_size)
This function is used to get scan result. More...
int | tls_wifi_get_scan_rslt_format2 (u8 *buf, u32 buffer_size)
int | tls_wifi_softap_create (struct tls_softap_info_t *apinfo, struct tls_ip_info_t *ipinfo)
This function is used to create soft ap. More...
void | tls_wifi_softap_destroy (void)
This function is used to destroy soft ap. More...
enum tls_wifi_states | tls_wifi_softap_get_state (void)
This function is used to get soft ap's state. More...
void | tls_wifi_softap_client_event_register (tls_wifi_client_event_callback callback)
This function is used to register client event. More...
void | tls_wifi_get_authed_sta_info (u32 *sta_num, u8 *buf, u32 buf_size)
This function is used to get the authed sta list. More...
int | tls_wifi_ibss_create (struct tls_ibss_info_t *ibssinfo, struct tls_ibssip_info_t *ipinfo)
This function is used to create or join ibss. More...
void | tls_wifi_disconnect (void)
This function is used to destroy or leave Wi-Fi network. More...
int | tls_wifi_faslink_connect (void *connectinfo)
int | tls_wifi_get_fastlink_info (void *connectinfo)
int | tls_wifi_connect (u8 *ssid, u8 ssid_len, u8 *pwd, u8 pwd_len)
This function is used to connect AP. More...
int | tls_wifi_connect_by_bssid (u8 *bssid, u8 *pwd, u8 pwd_len)
This function is used to connect AP by BSSID. More...
int | tls_wifi_connect_by_ssid_bssid (u8 *ssid, u8 ssid_len, u8 *bssid, u8 *pwd, u8 pwd_len)
This function is used to connect AP by SSID an BSSID. More...
int | tls_wifi_auto_connect_flag (u8 opt, u8 *mode)
Set auto connect mode: Enable/Disable. Get auto connect mode parameter. More...
void | tls_wifi_status_change_cb_register (void(*callback)(u8 status))
This function is used to register wifi status changed callback function. More...
void | tls_wifi_get_current_bss (struct tls_curr_bss_t *bss)
This function is used to get AP's info. More...
void | tls_ethernet_data_rx_callback (net_rx_data_cb callback)
This function is used to register ETHERNET data rx callback function. More...
void | tls_wifi_set_psflag (bool enable, bool alwaysflag)
This function is used to set powersave flag. More...
u32 | tls_wifi_get_psflag (void)
This function is used to get current powersave flag. More...
void | tls_wifi_send_oneshotdata (u8 *dst, const u8 *ssid, u8 ssid_len)
This function is used to send oneshot data to other sta. More...
u8 | tls_wifi_get_tx_gain_max (enum tls_wifi_tx_rate tx_rate)
This function is used to get max gain by rate index. More...
int | tls_wifi_send_mgmt (enum tls_wifi_mgmt_type type, struct tls_wifi_hdr_mac_t *mac, u8 *ie, u16 ie_len, struct tls_wifi_tx_rate_t *tx)
This function is used to send 802.11 management packet. More...
int | tls_wifi_send_data (struct tls_wifi_hdr_mac_t *mac, u8 *data, u16 data_len, struct tls_wifi_tx_rate_t *tx)
This function is used to send an 802.11 frame. More...
enum tls_wifi_states | tls_wifi_get_state (void)
This function is used to get current Wi-Fi State. More...
int | tls_wifi_get_errno (void)
This function is used to get current error number during joining AP. More...
void | tls_wifi_perror (const char *info)
This function is used to print current error during joining AP. More...
const char * | tls_wifi_get_errinfo (int eno)
This function is used to get wifi error. More...
int | tls_wifi_mem_cfg (u32 startmem, u8 txcnt, u8 rxcnt)
This function is used to customize wifi tx&rx memory. More...
int | tls_wifi_softap_set_sta_num (unsigned char ap_sta_num)
This function is used to set max sta num. More...
int | tls_wifi_softap_del_station (unsigned char *hwaddr)
This function is used to deauth sta connected to softap. More...
int | tls_wifi_softap_add_blacksta (unsigned char *hwaddr)
This function used to add sta to black list for softap. More...
int | tls_wifi_softap_del_blacksta (unsigned char *hwaddr)
This function used to accept sta joining softap that sta in balck list. More...
int | tls_wifi_softap_get_blackinfo (u32 *sta_num, u8 *buf, u32 buf_size)
This function used to get stations from blacklist. More...
void | tls_wifi_enable_log (bool enable)
This function is used to set some information display in the process of wifi networking. More...
void | tls_wifi_set_tempcomp_flag (int flag)
This function is used to set temperature compensation flag. More...
u8 | tls_wifi_get_tempcomp_flag (void)
This function is used to get temperature compensation flag. More...
void | tls_wifi_set_fixed_rate (u32 fixrateindex, u32 retrycnt)
This function is used to get temperature compensation flag. More...
int | tls_wifi_cfg_listen_interval (u16 listen_interval)
This function is used to set listen_interval (dummy interface) More...
int | tls_wifi_cfg_connect_timeout (u16 timeout)
This function is used to set connect timeout. More...
int | tls_wifi_cfg_connect_scan_mode (u32 mode)
This function is used to configure scan mode. More...
int | tls_wifi_cfg_connect_pci (u32 pci_en)
This function is used to set pci flag. More...
int | tls_wifi_set_11b_digital_gain (u8 value)
This function is used to set 11b's digital gain. More...
u8 | tls_wifi_get_11b_digital_gain (void)
This function is used to get 11b's gain value. More...
int | tls_wifi_set_11n_digital_gain (u8 value)
This function is used to set 11n's digital gain. More...
u8 | tls_wifi_get_11n_digital_gain (void)
This function is used to get 11n's gain value. More...

Detailed Description

Wi-Fi related APIs.

Typedef Documentation

◆ tls_wifi_client_event_callback

typedef void(* tls_wifi_client_event_callback) (u8 *mac, enum tls_wifi_client_event_type event)

callback function of wifi client event

◆ tls_wifi_oneshot_result_callback

typedef void(* tls_wifi_oneshot_result_callback) (enum tls_wifi_oneshot_result_type type)

callback function of oneshot result

Function Documentation

◆ tls_ethernet_data_rx_callback()

void tls_ethernet_data_rx_callback ( net_rx_data_cb callback )

This function is used to register ETHERNET data rx callback function.

Parameters
[in] callback point to receive ETHERNET data function
Returns
None
Note
None

◆ tls_filter_mcast_mac()

u8 tls_filter_mcast_mac | ( | u8 * | mac,
 |  | u8 | receive
 | ) |  |

This function is used to filter multicast frames.

Parameters
mac | The multicast frame that we want receive or filter.
receive | 1, receive this multicast frame 0, filter this multicast frame
Note
usage: For example: u8 mac[6]={01, 00, 5e, 7f, ff, fa},if receive is set to 0,the 802.11 multicast frames whose hdr->addr1 is [01 00 5e 7f ff fa] will be filtered.

◆ tls_wifi_auto_connect_flag()

int tls_wifi_auto_connect_flag | ( | u8 | opt,
 |  | u8 * | mode
 | ) |  |

Set auto connect mode: Enable/Disable. Get auto connect mode parameter.

Parameters
[in] | opt | WIFI_AUTO_CNT_FLAG_SET or WIFI_AUTO_CNT_FLAG_GET
[in] | mode | WIFI_AUTO_CNT_OFF WIFI_AUTO_CNT_ON or WIFI_AUTO_CNT_TMP_OFF
Return values
WM_SUCCESS | success
WM_FAILED | failed
Note
WIFI_AUTO_CNT_OFF Disable/d; WIFI_AUTO_CNT_ON Enable/d; WIFI_AUTO_CNT_TMP_OFF For user initiated "DISCONNECT", such as AT CMD; In such case, user might expect "disconnect witout reconnection, even in WIFI_AUTO_CNT_ON status; WIFI_AUTO_CNT_TMP_OFF flag just be effective for one time of "DISCONNECT"; After that or reboot, the FLAG will be set to the previous value;

◆ tls_wifi_cfg_connect_pci()

int tls_wifi_cfg_connect_pci ( u32 pci_en )

This function is used to set pci flag.

Parameters
[in] pci flag:0-can join any supported AP(open,wep,wpa,wpa2) 1-only join AP(WPA/WPA2 that supported)
Returns
None
Note
none.

◆ tls_wifi_cfg_connect_scan_mode()

int tls_wifi_cfg_connect_scan_mode ( u32 mode )

This function is used to configure scan mode.

Parameters
[in] mode:0-find max RSSI AP, 1-find AP and immediately stop scan to start join
Returns
None
Note
only used in STA mode.

◆ tls_wifi_cfg_connect_timeout()

int tls_wifi_cfg_connect_timeout ( u16 timeout )

This function is used to set connect timeout.

Parameters
[in] timeout to connect ap's time, >=5s
Returns
None
Note
valid only when scan AP failed.

◆ tls_wifi_cfg_listen_interval()

int tls_wifi_cfg_listen_interval ( u16 listen_interval )

This function is used to set listen_interval (dummy interface)

Parameters
[in] listen_interval >=1
Returns
None
Note
this is dummy interface. this value can used only in sta mode.

◆ tls_wifi_change_chanel()

void tls_wifi_change_chanel ( u32 chanid )

This function is used to change channel actively.

Parameters
[in] chanid
Returns
None
Note
Normally, it is just used in listen mode;

◆ tls_wifi_connect()

int tls_wifi_connect | ( | u8 * | ssid,
 |  | u8 | ssid_len,
 |  | u8 * | pwd,
 |  | u8 | pwd_len
 | ) |  |

This function is used to connect AP.

Parameters
[in] | *ssid | Network Name to connect
[in] | ssid_len | length of SSID
[in] | *pwd | password to connect AP
[in] | pwd_len | length of password
Return values
WM_SUCCESS | config ok, wifi will start to connect AP;
WM_FAILED | parameter wrong
Note
User should register Wi-Fi status callback function to get result; wifi_status_change_cb just return WIFI MAC layer status; User should register netif status callback to get TCP/IP layer status;

◆ tls_wifi_connect_by_bssid()

int tls_wifi_connect_by_bssid | ( | u8 * | bssid,
 |  | u8 * | pwd,
 |  | u8 | pwd_len
 | ) |  |

This function is used to connect AP by BSSID.

Parameters
[in] | *bssid | BSSID to connect
[in] | *pwd | password to connect AP
[in] | pwd_len | length of password
Return values
WM_SUCCESS | success
WM_FAILED | failed
Note
When SSID hided,this function can not be used. User should register Wi-Fi status callback function to get result; wifi_status_change_cb just return WIFI MAC layer status; User should register netif status callback to get TCP/IP layer status;

◆ tls_wifi_connect_by_ssid_bssid()

int tls_wifi_connect_by_ssid_bssid | ( | u8 * | ssid,
 |  | u8 | ssid_len,
 |  | u8 * | bssid,
 |  | u8 * | pwd,
 |  | u8 | pwd_len
 | ) |  |

This function is used to connect AP by SSID an BSSID.

Parameters
[in] | *ssid | Network Name to connect
[in] | ssid_len | length of SSID
[in] | *bssid | BSSID to connect with SSID
[in] | *pwd | password to connect AP
[in] | pwd_len | length of password
Return values
WM_SUCCESS | success
WM_FAILED | failed
Note
When SSID&BSSID is knonw, user can use this function to connect Wi-Fi AP. User should register Wi-Fi status callback function to get result; wifi_status_change_cb just return WIFI MAC layer status; User should register netif status callback to get TCP/IP layer status;

◆ tls_wifi_data_ext_recv_cb_register()

void tls_wifi_data_ext_recv_cb_register ( tls_wifi_data_ext_recv_callback callback )

This function is used to register recv wifi extended data callback function.

Parameters
[in] callback point to receive Wi-Fi extended data function
Returns
None
Note
None

◆ tls_wifi_data_recv_cb_register()

void tls_wifi_data_recv_cb_register ( tls_wifi_data_recv_callback callback )

This function is used to register recv wifi data callback function.

Parameters
[in] callback point to receive Wi-Fi data function
Returns
None
Note
None

◆ tls_wifi_disconnect()

void tls_wifi_disconnect ( void )

This function is used to destroy or leave Wi-Fi network.

Parameters
None
Returns
None
Note
For AP, destroy soft AP For STA, leave the network by AP For IBSS, destroy or leave the IBSS network.

◆ tls_wifi_enable_log()

void tls_wifi_enable_log ( bool enable )

This function is used to set some information display in the process of wifi networking.

Parameters
[in] enable true: enable false: disable
Returns
None
Note
None

◆ tls_wifi_get_11b_digital_gain()

u8 tls_wifi_get_11b_digital_gain ( void )

This function is used to get 11b's gain value.

Parameters
[in] None
Returns
gain value
Note
none.

◆ tls_wifi_get_11n_digital_gain()

u8 tls_wifi_get_11n_digital_gain ( void )

This function is used to get 11n's gain value.

Parameters
[in] None
Returns
gain value
Note
none.

◆ tls_wifi_get_authed_sta_info()

void tls_wifi_get_authed_sta_info | ( | u32 * | sta_num,
 |  | u8 * | buf,
 |  | u32 | buf_size
 | ) |  |

This function is used to get the authed sta list.

Parameters
[out] | sta_num | the authed's station number
[out] | buf | address to store returned station list info(struct tls_sta_info_t[])
[in] | buf_size
Returns
None
Note
None

◆ tls_wifi_get_current_bss()

void tls_wifi_get_current_bss ( struct tls_curr_bss_t * bss )

This function is used to get AP's info.

Parameters
[out] bss address where the network parameters will be write;
Returns
None
Note
None

◆ tls_wifi_get_errinfo()

const char* tls_wifi_get_errinfo ( int eno )

This function is used to get wifi error.

Parameters
[in] eno error number(WM_WIFI_ENOERR,WM_WIFI_ENOAP, WM_WIFI_EKEY,WM_WIFI_ELSI)
Return values
error description
Note
None

◆ tls_wifi_get_errno()

int tls_wifi_get_errno ( void )

This function is used to get current error number during joining AP.

Parameters
None
Return values
Error Number(WM_WIFI_ENOERR,WM_WIFI_ENOAP, WM_WIFI_EKEY,WM_WIFI_ELSI)
Note
None

◆ tls_wifi_get_listen_mode()

u8 tls_wifi_get_listen_mode ( void )

This function is used to get listen mode.

Parameters
None
Return values
0 | normal mode
non-zero | listen mode
Note
None

◆ tls_wifi_get_oneshot_customdata()

void tls_wifi_get_oneshot_customdata ( u8 * data )

This function is used to get one shot custom data.

Parameters
[in] data custom data
Returns
None
Note
None

◆ tls_wifi_get_oneshot_flag()

int tls_wifi_get_oneshot_flag ( void )

This function is used to get one shot flag.

Parameters
None
Return values
0 oneshot closed 1: one shot open 2: AP+socket 3: AP+WEBSERVER 4: bt
Note
None

◆ tls_wifi_get_oneshot_ssidpwd()

void tls_wifi_get_oneshot_ssidpwd | ( | u8 * | ssid,
 |  | u8 * | pwd
 | ) |  |

This function is used to get one shot ssid and password information.

Parameters
[in] | ssid | wifi name
[in] | pwd | pwssword
Returns
None
Note
None

◆ tls_wifi_get_psflag()

u32 tls_wifi_get_psflag ( void )

This function is used to get current powersave flag.

Parameters
None
Return values
0 | power-saving disable
non-zero | power-saving enable
Note
None

◆ tls_wifi_get_psm_chipsleep_flag()

u32 tls_wifi_get_psm_chipsleep_flag ( void )

This function is used to get chipsleep valid flag.

Parameters
[in] None
Returns
None
Note
None

◆ tls_wifi_get_scan_rslt()

int tls_wifi_get_scan_rslt | ( | u8 * | buf,
 |  | u32 | buffer_size
 | ) |  |

This function is used to get scan result.

Parameters
[out] | buf | buf to be used to store returned BSS info
[in] | buffer_size | buf size
Return values
WM_SUCCESS | success
WM_FAILED | failed
Note
User need to alloc buffer in advance. One item of scan result is struct tls_bss_info_t. Size for one item of scan result is 48Bytes; The buffer size depends how many items user wants. Compared with the previous scanning results, max_data_rate and wps_support fields were added, and the meaning of the privacy field was extended.

◆ tls_wifi_get_state()

enum tls_wifi_states tls_wifi_get_state ( void )

This function is used to get current Wi-Fi State.

Parameters
None
Return values
Wi-Fi State, tls_wifi_states
Note
None

◆ tls_wifi_get_tempcomp_flag()

u8 tls_wifi_get_tempcomp_flag ( void )

This function is used to get temperature compensation flag.

Parameters
[in] None
Returns
flag: 0- no temperature compensation. non zero-temperature compensation valid
Note
None

◆ tls_wifi_get_tx_gain_max()

u8 tls_wifi_get_tx_gain_max ( enum tls_wifi_tx_rate tx_rate )

This function is used to get max gain by rate index.

Parameters
[in] tx_rate rate index (enum)
Return values
Max Gain
Note
None

◆ tls_wifi_ibss_create()

int tls_wifi_ibss_create | ( | struct tls_ibss_info_t * | ibssinfo,
 |  | struct tls_ibssip_info_t * | ipinfo
 | ) |  |

This function is used to create or join ibss.

Parameters
[in] | *ibssinfo | ibss Wi-Fi configuration
[in] | *ipinfo | ibss ip address
Return values
WM_SUCCESS | IBSS join or create ok
WM_WIFI_ERR_SSID | SSID is NULL
WM_WIFI_ERR_KEY | key info not correct
Note
Join IBSS if existed Create IBSS by SSID when not existed.

◆ tls_wifi_mem_cfg()

int tls_wifi_mem_cfg | ( | u32 | startmem,
 |  | u8 | txcnt,
 |  | u8 | rxcnt
 | ) |  |

This function is used to customize wifi tx&rx memory.

Parameters
[in] | startmem | memory addr, only used from 0x20028000 to 0x20048000
[in] | txcnt | wifi tx buf cnt, non -zero value
[in] | rxcnt | wifi rx buf cnt, greater than 2 && lower than 30
Return values
0 :successfullly <0:failure
Note
None

◆ tls_wifi_mgmt_ext_recv_cb_register()

void tls_wifi_mgmt_ext_recv_cb_register ( tls_wifi_data_ext_recv_callback callback )

This function is used to register recv wifi management frame callback function.

Parameters
[in] callback point to receive Wi-Fi management frame function
Returns
None
Note
None

◆ tls_wifi_oneshot_result_cb_register()

void tls_wifi_oneshot_result_cb_register ( tls_wifi_oneshot_result_callback callback )

before calling tls_wifi_get_oneshot_ssidpwd or tls_wifi_get_oneshot_customdata, application should call this function to register the call back function

Parameters
[in] callback callback function pointer
Returns
None
Note
None

◆ tls_wifi_passive_scan()

int tls_wifi_passive_scan ( void )

This function is used to trigger scan AP.

Parameters
None
Return values
WM_SUCCESS | start scan
WM_WIFI_SCANNING_BUSY | scanning
WM_FAILED | failed
Note
If not SUCCESS, user needs to call this function again to trigger scan

◆ tls_wifi_perror()

void tls_wifi_perror ( const char * info )

This function is used to print current error during joining AP.

Parameters
[in] *info prefix information
Returns
None
Note
None

◆ tls_wifi_psm_chipsleep_cb_register()

void tls_wifi_psm_chipsleep_cb_register | ( | tls_wifi_psm_chipsleep_callback | sleepcallback,
 |  | tls_wifi_psm_prechipsleep_callback | precallback,
 |  | tls_wifi_psm_postchipsleep_callback | postcallback
 | ) |  |

This function is used to register chipsleep callback function when using chip sleep for powersaving.

Parameters
[in] | sleepcallback | pointer to function when enter to chipsleep
[in] | precallback | pointer to function before enter to chipsleep
[in] | postcallback | pointer to function after leave chipsleep
Returns
None
Note
None

◆ tls_wifi_restore_bcast_mac_filter()

void tls_wifi_restore_bcast_mac_filter ( void )

This function is used to restore mac filter to normal mode.

Parameters
[in] None
Returns
None
Note
Normally, it is used to restore mac filter after oneshot config

◆ tls_wifi_scan()

int tls_wifi_scan ( void )

This function is used to trigger scan AP.

Parameters
None
Return values
WM_SUCCESS | start scan
WM_WIFI_SCANNING_BUSY | scanning
WM_FAILED | failed
Note
If not SUCCESS, user needs to call this function again to trigger scan

◆ tls_wifi_scan_by_param()

int tls_wifi_scan_by_param ( struct tls_wifi_scan_param_t * scan_param )

scan AP ,user can set channellist,scan times and switch interval per channel

Parameters
[in] scan_param scan_param member scan_times: scan times, >=0, if zero, only 1 times scan_chanlist: scan channel list ,[0,3FFF],per bit is one channel,if zero or above 0x3FFF, scan all channel scan_chinterval: scan channel switch time if zero, use default value. when value is non-zero,if input value >=20 use it, else input value <20 use 20, unit:ms
Return values
WM_SUCCESS | will start scan
WM_WIFI_SCANNING_BUSY | wifi module is scanning now
WM_FAILED | other Error
Note
in case not SUCCESS, user need to call this function again to trigger the scan

◆ tls_wifi_scan_result_cb_register()

void tls_wifi_scan_result_cb_register ( void(*)(void) callback )

Before calling tls_wifi_scan() , application should call this function to register the call back function;.

Parameters
[in] callback point to callback function
Returns
None
Note
In callback function, user should send a message and return immediately. After callback called, scan result can be get by calling function tls_wifi_get_scan_rslt

◆ tls_wifi_send_data()

int tls_wifi_send_data | ( | struct tls_wifi_hdr_mac_t * | mac,
 |  | u8 * | data,
 |  | u16 | data_len,
 |  | struct tls_wifi_tx_rate_t * | tx
 | ) |  |

This function is used to send an 802.11 frame.

Parameters
[in] | *mac | mac address, it can be NULL
[in] | *data | data packet buffer
[in] | data_len | data packet length
[in] | *tx | rate and gain, it can be NULL
Return values
0 | success
other | failed
Note
If the @*mac is NULL, @*data should be an entire 802.11 frame. If the @*mac is not NULL, this function will build an 802.11 frame with @*mac as destination mac address and @*data as the data body. If the @*tx is NULL, the packet will be sent at 11B 1Mbps.

◆ tls_wifi_send_mgmt()

int tls_wifi_send_mgmt | ( | enum tls_wifi_mgmt_type | type,
 |  | struct tls_wifi_hdr_mac_t * | mac,
 |  | u8 * | ie,
 |  | u16 | ie_len,
 |  | struct tls_wifi_tx_rate_t * | tx
 | ) |  |

This function is used to send 802.11 management packet.

Parameters
[in] | type | management packet type
[in] | *mac | mac address
[in] | *ie | information elements, if have no ie can fill NULL
[in] | ie_len | information elements length, it's zero if ie is NULL.
[in] | *tx | rate and gain to transfer
Return values
0 | success
other | failed
Note
None

◆ tls_wifi_send_oneshotdata()

void tls_wifi_send_oneshotdata | ( | u8 * | dst,
 |  | const u8 * | ssid,
 |  | u8 | ssid_len
 | ) |  |

This function is used to send oneshot data to other sta.

Parameters
[in] | *dst | NULL , send broadcast info !NULL, send unicast info
[in] | *ssid | SSID to be sent
[in] | ssid_len | SSID length to be sent
Returns
None
Note
None

◆ tls_wifi_set_11b_digital_gain()

int tls_wifi_set_11b_digital_gain ( u8 value )

This function is used to set 11b's digital gain.

Parameters
[in] value:gain value, <0x40
Returns
0:if value is valid,-1:if value is invalid
Note
none.

◆ tls_wifi_set_11n_digital_gain()

int tls_wifi_set_11n_digital_gain ( u8 value )

This function is used to set 11n's digital gain.

Parameters
[in] value:gain value, <0x40
Returns
0:if value is valid,-1:if value is invalid
Note
none.

◆ tls_wifi_set_bcast_mac_filter()

void tls_wifi_set_bcast_mac_filter | ( | u8 * | mac,
 |  | u8 | receive,
 |  | u8 | clear
 | ) |  |

This function is used to set mac filter.

Parameters
[in] | mac | mac: to be filtered or received
[in] | receive | 1:not filter,zero:filter
[in] | clear | 1:clear all, 0:do not clear, only add new filter
Returns
None
Note
usage: normally, it is used to oneshot config

◆ tls_wifi_set_fixed_rate()

void tls_wifi_set_fixed_rate | ( | u32 | fixrateindex,
 |  | u32 | retrycnt
 | ) |  |

This function is used to get temperature compensation flag.

Parameters
[in] | fixrateindex | 11b:0-3, 11g:4-11, 11n-ht20:12-19, 11n-ht40:20-27
[in] | retrycnt | retry count, range[1,15]
Returns
None
Note
When use this function, data to be transfered will use fix rate.

◆ tls_wifi_set_listen_mode()

void tls_wifi_set_listen_mode ( u8 enable )

This function is used to enable/disable listen mode.

Parameters
[in] enable:non-zero,disable 0
Returns
None
Note
This function used when oneshot start.

◆ tls_wifi_set_oneshot_flag()

int tls_wifi_set_oneshot_flag ( u8 flag )

This function is used to set oneshot config flag.

Parameters
[in] flag 0: closed oneshot 1: one shot open 2: AP+socket 3: AP+WEBSERVER 4: bt
Returns
0£ºsuccess -1£ºfailed
Note
None

◆ tls_wifi_set_psflag()

void tls_wifi_set_psflag | ( | bool | enable,
 |  | bool | alwaysflag
 | ) |  |

This function is used to set powersave flag.

Parameters
[in] | enable | non-zero: enable 0: disable
[in] | alwaysflag | 0: only once, lost when restart; !0: always
Returns
None
Note
None

◆ tls_wifi_set_psm_chipsleep_flag()

void tls_wifi_set_psm_chipsleep_flag ( u32 flag )

This function is used to set chipsleep valid flag.

Parameters
[in] flag use chipsleep when psm using.0:using normal wifi sleep, non-zero:using chipsleep
Returns
None
Note
None

◆ tls_wifi_set_tempcomp_flag()

void tls_wifi_set_tempcomp_flag ( int flag )

This function is used to set temperature compensation flag.

Parameters
[in] flag:0- close temperature compensation,non-zero-open temperature compensation
Returns
None
Note
None

◆ tls_wifi_softap_add_blacksta()

int tls_wifi_softap_add_blacksta ( unsigned char * hwaddr )

This function used to add sta to black list for softap.

Parameters
[out] hwaddr sta's mac address to forbid
Returns
None
Note
None

◆ tls_wifi_softap_client_event_register()

void tls_wifi_softap_client_event_register ( tls_wifi_client_event_callback callback )

This function is used to register client event.

Parameters
[in] client event callback
Returns
None
Note
None

◆ tls_wifi_softap_create()

int tls_wifi_softap_create | ( | struct tls_softap_info_t * | apinfo,
 |  | struct tls_ip_info_t * | ipinfo
 | ) |  |

This function is used to create soft ap.

Parameters
[in] | apinfo | softap Wi-Fi configuration
[in] | ipinfo | softap ip address
Return values
WM_WIFI_ERR_SSID | SSID is NULL
WM_WIFI_ERR_KEY | key info not correct
WM_SUCCESS | soft ap create OK
WM_WIFI_STA_BUSY | station is connecting
Note
None

◆ tls_wifi_softap_del_blacksta()

int tls_wifi_softap_del_blacksta ( unsigned char * hwaddr )

This function used to accept sta joining softap that sta in balck list.

Parameters
[out] hwaddr mac address to delete from black list
Returns
None
Note
None

◆ tls_wifi_softap_del_station()

int tls_wifi_softap_del_station ( unsigned char * hwaddr )

This function is used to deauth sta connected to softap.

Parameters
[in] hwaddr sta's mac to deauth
Return values
0 :successfullly <0:failure if hwaddr is null
Note
None

◆ tls_wifi_softap_destroy()

void tls_wifi_softap_destroy ( void )

This function is used to destroy soft ap.

Parameters
None
Returns
None
Note
None

◆ tls_wifi_softap_get_blackinfo()

int tls_wifi_softap_get_blackinfo | ( | u32 * | sta_num,
 |  | u8 * | buf,
 |  | u32 | buf_size
 | ) |  |

This function used to get stations from blacklist.

Parameters
[out] | sta_num | station's number in blacklist
[out] | buf | store stations to get from blacklist
[in] | buf_size | memory size to store stations in blacklist
Returns
None
Note
None

◆ tls_wifi_softap_get_state()

enum tls_wifi_states tls_wifi_softap_get_state ( void )

This function is used to get soft ap's state.

Parameters
None
Returns
softap's state, tls_wifi_states
Note
None

◆ tls_wifi_softap_set_sta_num()

int tls_wifi_softap_set_sta_num ( unsigned char ap_sta_num )

This function is used to set max sta num.

Parameters
[in] ap_sta_num can be accepted num for sta
Return values
0 :successfullly <0:failure if ap_sta_num is 0
Note
max sta num is 8, this function must be called before ap created.

◆ tls_wifi_status_change_cb_register()

void tls_wifi_status_change_cb_register ( void(*)(u8 status) callback )

This function is used to register wifi status changed callback function.

Parameters
[in] callback point to wifi status function
Returns
None
Note
WIFI_JOIN_SUCCESS connect with wifi AP correctly in Wifi layer; No IP address WIFI_JOIN_FAILED did not connect with wifi AP; normally, timeout in 20s after start connection WIFI_DISCONNECTED STA is disconnected with AP for any case, such as wifi AP shut dow, Wi-Fi AP changed password, and so on;


W800 SDK APIs: Data Structures

Data Structures
Here are the data structures with brief descriptions:
C __attribute__ |
C _dma_handler_type |
C _HTTP_CLIENT |
C _HTTPParameters |
C _ltpt_rx_info |
C _ltpt_tx_info |
C _pwm_init_param |
C _wm_dma_desc |
C adc_st |
C bt_adapter_t |
C bt_remote_device_t |
C clk_div_reg |
C dl_list |
C FLASH_ENCRYPT_CTRL_Type |
C FLASH_OTP_WR_PARAM_ST |
C FLASH_TypeDef |
C fls_list |
C FT_ADC_CAL |
C FT_ADC_CAL_UNIT |
C FT_TEMP_CAL |
C hstm_int |
C I2C_T |
C I2S_InitDef |
C I2S_T |
C ieee80211_bar |
C ieee80211_channel_sw_ie |
C ieee80211_country_ie_triplet |
C ieee80211_cts |
C ieee80211_hdr |
C ieee80211_hdr_3addr |
C ieee80211_ht_cap |
C ieee80211_ht_info |
C ieee80211_mcs_info |
C ieee80211_mgmt |
C ieee80211_mmie |
C ieee80211_msrment_ie |
C ieee80211_pspoll |
C ieee80211_qos_hdr |
C ieee80211_quiet_ie |
C ieee80211_rann_ie |
C ieee80211_rts |
C ieee80211_tim_ie |
C ieee802_11_elems |
C IMAGE_HEADER_PARAM |
C Img_Attr_Type |
C LCD_T | LCD Register Declaration
C os_time |
C psAesCbc_t |
C psAesKey_t |
C psArc4_t |
C psCipherContext_t |
C psCrcContext_t |
C psDes3_t |
C psDes3Key_t |
C psDigestContext_t |
C psMd5_t |
C psSha1_t |
C sasc_region_attr_t |
C SASC_Type |
C sc_io_map_ |
C SD_CardInfo_t |
C SDIO_HOST_Type |
C task_msg |
C task_parameter |
C TIPC_Type |
C TIPC_VLD0_Type |
C TIPC_VLD1_Type |
C tls_ble_cl_cfg_mtu_msg_t |
C tls_ble_cl_close_msg_t |
C tls_ble_cl_congest_msg_t |
C tls_ble_cl_exec_cmpl_msg_t |
C tls_ble_cl_gatt_db_msg_t |
C tls_ble_cl_listen_msg_t |
C tls_ble_cl_notify_msg_t |
C tls_ble_cl_open_msg_t |
C tls_ble_cl_read_msg_t |
C tls_ble_cl_reg_notify_msg_t |
C tls_ble_cl_register_msg_t |
C tls_ble_cl_search_cmpl_msg_t |
C tls_ble_cl_search_res_msg_t |
C tls_ble_cl_write_msg_t |
C tls_ble_dm_msg_t |
C tls_ble_dm_scan_res_cmpl_msg_t |
C tls_ble_dm_scan_res_msg_t |
C tls_ble_dm_set_adv_data_cmpl_msg_t |
C tls_ble_dm_set_scan_param_cmpl_msg_t |
C tls_ble_dm_timer_expired_msg_t |
C tls_ble_msg_t |
C tls_ble_report_rssi_msg_t |
C tls_ble_se_add_char_msg_t |
C tls_ble_se_add_incl_srvc_msg_t |
C tls_ble_se_confirm_msg_t |
C tls_ble_se_congest_msg_t |
C tls_ble_se_connect_msg_t |
C tls_ble_se_create_msg_t |
C tls_ble_se_exec_write_msg_t |
C tls_ble_se_mtu_msg_t |
C tls_ble_se_read_msg_t |
C tls_ble_se_register_msg_t |
C tls_ble_se_response_msg_t |
C tls_ble_se_start_msg_t |
C tls_ble_se_write_msg_t |
C tls_ble_sec_msg_t |
C tls_bss_info_format2_t |
C tls_bss_info_t |
C tls_bt_acl_state_chg_msg_t |
C tls_bt_adapter_prop_msg_t |
C tls_bt_adapter_state_change_msg_t |
C tls_bt_av_audio_config_t |
C tls_bt_av_audio_payload_t |
C tls_bt_av_audio_state_t |
C tls_bt_av_connection_state_t |
C tls_bt_av_msg_t |
C tls_bt_ble_test_msg_t |
C tls_bt_bond_state_chg_msg_t |
C tls_bt_device_found_msg_t |
C tls_bt_discovery_state_chg_msg_t |
C tls_bt_energy_info_msg_t |
C tls_bt_hci_if_t |
C tls_bt_host_if_t |
C tls_bt_host_msg_t |
C tls_bt_mesh_cfg_hb_pub |
C tls_bt_mesh_cfg_hb_sub |
C tls_bt_mesh_cfg_mod_pub |
C tls_bt_pin_request_msg_t |
C tls_bt_property_t |
C tls_bt_remote_dev_prop_msg_t |
C tls_bt_ssp_request_msg_t |
C tls_bt_uuid_t |
C tls_btgatt_db_element_t |
C tls_bthf_audio_payload_msg_t |
C tls_bthf_client_audio_state_msg_t |
C tls_bthf_client_battery_level_msg_t |
C tls_bthf_client_call_msg_t |
C tls_bthf_client_call_waiting_msg_t |
C tls_bthf_client_callheld_msg_t |
C tls_bthf_client_callsetup_msg_t |
C tls_bthf_client_clip_msg_t |
C tls_bthf_client_cmd_complete_msg_t |
C tls_bthf_client_connection_state_msg_t |
C tls_bthf_client_current_calls_msg_t |
C tls_bthf_client_current_operator_msg_t |
C tls_bthf_client_in_band_ring_tone_msg_t |
C tls_bthf_client_last_voice_tag_number_msg_t |
C tls_bthf_client_msg_t |
C tls_bthf_client_network_roaming_msg_t |
C tls_bthf_client_network_signal_msg_t |
C tls_bthf_client_network_state_msg_t |
C tls_bthf_client_resp_and_hold_msg_t |
C tls_bthf_client_ring_indication_msg_t |
C tls_bthf_client_subscriber_info_msg_t |
C tls_bthf_client_volume_change_msg_t |
C tls_bthf_client_vr_cmd_msg_t |
C tls_btrc_connection_state_msg_t |
C tls_btrc_ctrl_getrcfeatures_msg_t |
C tls_btrc_ctrl_msg_t |
C tls_btrc_ctrl_play_position_changed_msg_t |
C tls_btrc_ctrl_play_status_changed_msg_t |
C tls_btrc_ctrl_playerapplicationsetting_changed_msg_t |
C tls_btrc_ctrl_playerapplicationsetting_msg_t |
C tls_btrc_ctrl_registernotification_abs_vol_msg_t |
C tls_btrc_ctrl_setabsvol_msg_t |
C tls_btrc_ctrl_setplayerapplicationsetting_rsp_msg_t |
C tls_btrc_ctrl_track_changed_msg_t |
C tls_btrc_element_attr_val_t |
C tls_btrc_get_element_attr_msg_t |
C tls_btrc_get_play_status_msg_t |
C tls_btrc_get_player_app_attrs_text_msg_t |
C tls_btrc_get_player_app_value_msg_t |
C tls_btrc_get_player_app_values_text_msg_t |
C tls_btrc_groupnavigation_rsp_msg_t |
C tls_btrc_list_player_app_attr_msg_t |
C tls_btrc_list_player_app_values_msg_t |
C tls_btrc_msg_t |
C tls_btrc_passthrough_cmd_msg_t |
C tls_btrc_passthrough_rsp_msg_t |
C tls_btrc_player_app_attr_t |
C tls_btrc_player_app_ext_attr_t |
C tls_btrc_player_app_ext_attr_val_t |
C tls_btrc_player_settings_t |
C tls_btrc_register_notification_msg_t |
C tls_btrc_register_notification_t |
C tls_btrc_remote_features_msg_t |
C tls_btrc_set_player_app_value_msg_t |
C tls_btrc_volume_change_msg_t |
C tls_curr_bss_t |
C tls_dma_descriptor |
C tls_ethif |
C tls_fls |
C tls_fls_drv |
C tls_fwup |
C tls_fwup_block |
C tls_fwup_image_hdr |
C tls_fwup_request |
C tls_hspi_rx_desc |
C tls_hspi_tx_desc |
C tls_ibss_info_t |
C tls_ibssip_info_t |
C tls_inside_fls |
C tls_ip_info_t |
C tls_irq_handler |
C tls_key_info_t |
C tls_lcd_options |
C tls_mesh_msg_t |
C tls_mesh_node_added_msg_t |
C tls_mesh_oob_input_msg_t |
C tls_mesh_oob_output_number_msg_t |
C tls_mesh_oob_output_str_msg_t |
C tls_mesh_primary_cfg_t |
C tls_mesh_prov_complete_msg_t |
C tls_mesh_prov_end_msg_t |
C tls_mesh_unprov_msg_t |
C tls_param_bgr |
C tls_param_bssid |
C tls_param_hardware_version |
C tls_param_ip |
C tls_param_key |
C tls_param_oray_client |
C tls_param_original_key |
C tls_param_sha1 |
C tls_param_socket |
C tls_param_ssid |
C tls_param_tem_offset |
C tls_param_uart |
C tls_param_wps |
C tls_scan_bss_format2_t |
C tls_scan_bss_t |
C tls_skt_status_ext_t |
C tls_skt_status_t |
C tls_slave_hspi |
C tls_socket_desc |
C tls_softap_info_t |
C tls_spi_message |
C tls_spi_port |
C tls_spi_transfer |
C tls_spp_cli_init_msg_t |
C tls_spp_close_msg_t |
C tls_spp_cong_msg_t |
C tls_spp_data_ind_msg_t |
C tls_spp_disc_comp_msg_t |
C tls_spp_init_msg_t |
C tls_spp_msg_t |
C tls_spp_open_msg_t |
C tls_spp_srv_open_msg_t |
C tls_spp_start_msg_t |
C tls_spp_write_msg_t |
C tls_sta_info_t |
C tls_sys_clk |
C tls_timer_cfg |
C tls_uart_baud_rate |
C tls_uart_circ_buf |
C tls_uart_icount |
C tls_uart_options |
C tls_uart_port |
C TLS_UART_REGS |
C tls_uart_tx_msg |
C tls_user_param |
C tls_webs_cfg |
C tls_wifi_ext_t |
C tls_wifi_hdr_mac_t |
C tls_wifi_scan_param_t |
C tls_wifi_tx_rate_t |
C wm_crypto_ctx |
C wm_i2s_buf_s |


W800 SDK APIs: __attribute__ Struct Reference

Data Fields
__attribute__ Struct Reference

#include <wm_bt_def.h>

Data Fields

uint8_t | address [6]
uint8_t | name [249]
uint8_t | pin [16]
uint8_t | status
uint8_t | ctrl_state
uint64_t | tx_time
uint64_t | rx_time
uint64_t | idle_time
uint64_t | energy_used
bool | set_scan_rsp
bool | include_name
bool | include_txpower
bool | pure_data
int | min_interval
int | max_interval
int | appearance
uint16_t | manufacturer_len
uint8_t | manufacturer_data [31]
uint16_t | service_data_len
uint8_t | service_data [31]
uint16_t | service_uuid_len
uint8_t | service_uuid [31]
uint16_t | adv_int_min
uint16_t | adv_int_max
tls_bt_addr_t * | dir_addr
uint8_t | adv_type
uint8_t | own_addr_type
uint8_t | chnl_map
uint8_t | afp
uint8_t | peer_addr_type

Detailed Description

Bluetooth Address

Bluetooth Device Name

Bluetooth PinKey Code


W800 SDK APIs: _dma_handler_type Struct Reference

Data Fields
_dma_handler_type Struct Reference

Data Fields

uint8_t | channel
void(* | XferCpltCallback )(struct _dma_handler_type *hdma)
void(* | XferHalfCpltCallback )(struct _dma_handler_type *hdma)

Field Documentation

◆ XferCpltCallback

void(* XferCpltCallback) (struct _dma_handler_type *hdma)

DMA transfer complete callback

◆ XferHalfCpltCallback

void(* XferHalfCpltCallback) (struct _dma_handler_type *hdma)

DMA Half transfer complete callback


W800 SDK APIs: _HTTP_CLIENT Struct Reference

Data Fields
_HTTP_CLIENT Struct Reference

#include <wm_http_client.h>

Data Fields

UINT32 | HTTPStatusCode
UINT32 | RequestBodyLengthSent
UINT32 | ResponseBodyLengthReceived
UINT32 | TotalResponseBodyLength
UINT32 | HttpState

Detailed Description

Data structure that the caller can request at any time that will include some information regarding the session


W800 SDK APIs: _HTTPParameters Struct Reference

Data Fields
_HTTPParameters Struct Reference

#include <wm_http_client.h>

Data Fields

CHAR * | Uri
CHAR * | ProxyHost
UINT32 | UseProxy
UINT32 | ProxyPort
UINT32 | Verbose
CHAR * | UserName
CHAR * | Password
HTTP_AUTH_SCHEMA | AuthType

Detailed Description

HTTP parameters


W800 SDK APIs: _ltpt_rx_info Struct Reference

Data Fields
_ltpt_rx_info Struct Reference

Data Fields

volatile int | cnt_total
volatile int | cnt_good
volatile int | cnt_bad
volatile unsigned char | valid
volatile unsigned char | snr
volatile unsigned char | rcpi
volatile unsigned char | rate
volatile unsigned char | channel
volatile unsigned char | bandwidth
volatile unsigned char | bprocess


W800 SDK APIs: _ltpt_tx_info Struct Reference

Data Fields
_ltpt_tx_info Struct Reference

Data Fields

volatile int | cnt_total
volatile int | packetcount
volatile int | psdulen
volatile unsigned char | txgain
volatile unsigned char | datarate
volatile unsigned char | gimode
volatile unsigned char | greenfield
volatile unsigned char | rifs
volatile unsigned char | bprocess
volatile unsigned char | channel
volatile unsigned char | longpreamble


W800 SDK APIs: _pwm_init_param Struct Reference

Data Fields
_pwm_init_param Struct Reference

#include <wm_pwm.h>

Data Fields

enum tls_pwm_out_mode | mode
u8 | channel
u16 | clkdiv
u8 | period
u8 | duty
bool | dten
u8 | dtclkdiv
u8 | dtcnt
enum tls_pwm_cnt_type | cnt_type
enum tls_pwm_loop_type | loop_type
bool | inverse_en
u8 | pnum
bool | pnum_int

Detailed Description

pwm initial parameters

Field Documentation

◆ channel

u8 channel

channel id 0~4

◆ clkdiv

u16 clkdiv

clock divided value

◆ cnt_type

enum tls_pwm_cnt_type cnt_type

count type

◆ dtclkdiv

u8 dtclkdiv

dead zone clock divided value (0~3)

◆ dtcnt

u8 dtcnt

period number of dead zone time (0~255)

◆ dten

bool dten

enable dead zone time (ENABLE or DISABLE)

◆ duty

u8 duty

duty radio (range 0~255, high level or low level by out_inversion decided

◆ inverse_en

bool inverse_en

output is inverse

◆ loop_type

enum tls_pwm_loop_type loop_type

cycle type

◆ mode

enum tls_pwm_out_mode mode

work mode

◆ period

u8 period

period value(output frequency F = CLK/CLK_DIV/PERIOD)

◆ pnum

u8 pnum

generate interrupt after pnum period

◆ pnum_int

bool pnum_int

period interrupt is enable


W800 SDK APIs: _wm_dma_desc Struct Reference

Data Fields
_wm_dma_desc Struct Reference

Data Fields

unsigned int | valid
unsigned int | dma_ctrl
unsigned int | src_addr
unsigned int | dest_addr
struct _wm_dma_desc * | next


W800 SDK APIs: adc_st Struct Reference

Data Fields
adc_st Struct Reference

Data Fields

u8 | dmachannel
void(* | adc_cb )(int *buf, u16 len)
void(* | adc_bigger_cb )(int *buf, u16 len)
void(* | adc_dma_cb )(int *buf, u16 len)
u16 | valuelen
u16 | offset


W800 SDK APIs: bt_adapter_t Struct Reference

Data Fields
bt_adapter_t Struct Reference

Data Fields

u32 | valid_tag
u32 | valid_bit
u8 | bd_addr [6]
uint8_t | name_len
u8 | name [16]
u32 | class_of_device
u8 | io_cap
u8 | discoverable
u8 | connectable
u8 | bt_auth_req
u8 | mode
u8 | ble_auth_req
u8 | ir [16]
u8 | irk [16]
u8 | dhk [16]
u8 | er [16]


W800 SDK APIs: bt_remote_device_t Struct Reference

Data Fields
bt_remote_device_t Struct Reference

Data Fields

u32 | valid_tag
u8 | in_use
u32 | valid_bit
u8 | bd_addr [6]
u8 | name [16]
u8 | name_len
u32 | class_of_device
u32 | available_service
u8 | link_key [16]
u8 | key_type
u8 | io_cap
u8 | pin_length
u8 | device_type
u8 | reconnect_needed
u8 | ble_addr_type
u8 | key_penc [28]
u8 | key_pid [23]
u8 | key_lid [23]
u8 | key_pcsrk [24]
u8 | key_lcsrk [24]
u8 | key_lenc [20]
u32 | manufacturer
u32 | lmpver
u32 | lmpsubver


W800 SDK APIs: clk_div_reg Union Reference

Data Fields
clk_div_reg Union Reference

Data Fields

struct {
uint32_t CPU: 8
uint32_t WLAN: 8
uint32_t BUS2: 8
uint32_t PD: 4
uint32_t RSV: 3
uint32_t DIV_EN: 1
} b
uint32_t w

Field Documentation

◆ BUS2

uint32_t BUS2

bit: 16.. 23 clock dividing ratio of bus2 & bus1

◆ CPU

uint32_t CPU

bit: 0.. 7 cpu clock divider

◆ DIV_EN

uint32_t DIV_EN

bit: 31 divide frequency enable

◆ PD

uint32_t PD

bit: 24.. 27 peripheral divider

◆ RSV

uint32_t RSV

bit: 28.. 30 Reserved

◆ WLAN

uint32_t WLAN

bit: 8.. 15 Wlan clock divider


W800 SDK APIs: dl_list Struct Reference

Data Fields
dl_list Struct Reference

#include <list.h>

Data Fields

struct dl_list * | next
struct dl_list * | prev

Detailed Description

struct dl_list - Doubly-linked list

Field Documentation

◆ next

struct dl_list* next

pointer to the next

◆ prev

struct dl_list* prev

pointer to the previous


W800 SDK APIs: FLASH_ENCRYPT_CTRL_Type Union Reference

Data Fields
FLASH_ENCRYPT_CTRL_Type Union Reference

Data Fields

struct {
uint32_t _reserved0: 1
uint32_t code_decrypt: 1
uint32_t dbus_decrypt: 1
uint32_t data_decrypt: 1
uint32_t prikey_sel: 3
uint32_t decrypt_start: 1
uint32_t _reserved2: 24
} b
uint32_t w


W800 SDK APIs: FLASH_OTP_WR_PARAM_ST Struct Reference

Data Fields
FLASH_OTP_WR_PARAM_ST Struct Reference

Data Fields

uint16_t | eraseSize
uint16_t | pageSize


W800 SDK APIs: FLASH_TypeDef Struct Reference

Data Fields
FLASH_TypeDef Struct Reference

Data Fields

vu32 | ACR
vu32 | KEYR
vu32 | SR
vu32 | CR
vu32 | AR


W800 SDK APIs: fls_list Struct Reference

Data Fields
fls_list Struct Reference

Data Fields

struct fls_list * | next
struct fls_list * | prev


W800 SDK APIs: FT_ADC_CAL Struct Reference

Data Fields
FT_ADC_CAL Struct Reference

Data Fields

unsigned int | valid_cnt
FT_ADC_CAL_UINT_ST | units [6]
float | a
float | b


W800 SDK APIs: FT_ADC_CAL_UNIT Struct Reference

Data Fields
FT_ADC_CAL_UNIT Struct Reference

Data Fields

unsigned short | ref_val
unsigned short | real_val


W800 SDK APIs: FT_TEMP_CAL Struct Reference

Data Fields
FT_TEMP_CAL Struct Reference

Data Fields

int | ref_val
int | real_val


W800 SDK APIs: hstm_int Struct Reference

Data Fields
hstm_int Struct Reference

Data Fields

int16 | used
int16 | alloc
int16 | sign
hstm_digit * | dp


W800 SDK APIs: I2C_T Struct Reference

Data Fields
I2C_T Struct Reference

Data Fields

__IO uint32_t | PRER_LO
__IO uint32_t | PRER_HI
__IO uint32_t | CTRL
__O uint32_t | TX_RX
__O uint32_t | CR_SR
__I uint32_t | TXR
__I uint32_t | CR


W800 SDK APIs: I2S_InitDef Struct Reference

Data Fields
I2S_InitDef Struct Reference

Data Fields

uint32_t | I2S_Mode_MS
uint32_t | I2S_Mode_SS
uint32_t | I2S_Mode_LR
uint32_t | I2S_Trans_STD
uint32_t | I2S_DataFormat
uint32_t | I2S_AudioFreq
uint32_t | I2S_MclkFreq


W800 SDK APIs: I2S_T Struct Reference

Data Fields
I2S_T Struct Reference

Data Fields

__IO uint32_t | CTRL
__IO uint32_t | INT_MASK
__IO uint32_t | INT_SRC
__I uint32_t | INT_STATUS
__O uint32_t | TX
__I uint32_t | RX


W800 SDK APIs: ieee80211_bar Struct Reference

Data Fields
ieee80211_bar Struct Reference

#include <wm_ieee80211.h>

Data Fields

u16 | frame_control
u16 | duration
u8 | ra [6]
u8 | ta [6]
u16 | control
u16 | start_seq_num

Detailed Description

struct ieee80211_bar - HT Block Ack Request

This structure refers to "HT BlockAckReq" as described in 802.11n draft section 7.2.1.7.1


W800 SDK APIs: ieee80211_channel_sw_ie Struct Reference

Data Fields
ieee80211_channel_sw_ie Struct Reference

#include <wm_ieee80211.h>

Data Fields

u8 | mode
u8 | new_ch_num
u8 | count

Detailed Description

struct ieee80211_channel_sw_ie

This structure refers to "Channel Switch Announcement information element"


W800 SDK APIs: ieee80211_country_ie_triplet Struct Reference

Data Fields
ieee80211_country_ie_triplet Struct Reference

Data Fields

union {
struct {
u8 first_channel
u8 num_channels
s8 max_power
} chans
struct {
u8 reg_extension_id
u8 reg_class
u8 coverage_class
} ext
} u


W800 SDK APIs: ieee80211_cts Struct Reference

Data Fields
ieee80211_cts Struct Reference

Data Fields

u16 | frame_control
u16 | duration
u8 | ra [6]


W800 SDK APIs: ieee80211_hdr Struct Reference

Data Fields
ieee80211_hdr Struct Reference

Data Fields

u16 | frame_control
u16 | duration_id
u8 | addr1 [6]
u8 | addr2 [6]
u8 | addr3 [6]
u16 | seq_ctrl
u8 | addr4 [6]


W800 SDK APIs: ieee80211_hdr_3addr Struct Reference

Data Fields
ieee80211_hdr_3addr Struct Reference

Data Fields

u16 | frame_control
u16 | duration_id
u8 | addr1 [6]
u8 | addr2 [6]
u8 | addr3 [6]
u16 | seq_ctrl


W800 SDK APIs: ieee80211_ht_cap Struct Reference

Data Fields
ieee80211_ht_cap Struct Reference

#include <wm_ieee80211.h>

Data Fields

u16 | cap_info
u8 | ampdu_params_info
struct ieee80211_mcs_info | mcs
u16 | extended_ht_cap_info
u32 | tx_BF_cap_info
u8 | antenna_selection_info

Detailed Description

struct ieee80211_ht_cap - HT capabilities

This structure is the "HT capabilities element" as described in 802.11n D5.0 7.3.2.56


W800 SDK APIs: ieee80211_ht_info Struct Reference

Data Fields
ieee80211_ht_info Struct Reference

#include <wm_ieee80211.h>

Data Fields

u8 | control_chan
u8 | ht_param
u16 | operation_mode
u16 | stbc_param
u8 | basic_set [16]

Detailed Description

struct ieee80211_ht_info - HT information

This structure is the "HT information element" as described in 802.11n D5.0 7.3.2.58


W800 SDK APIs: ieee80211_mcs_info Struct Reference

Data Fields
ieee80211_mcs_info Struct Reference

#include <wm_ieee80211.h>

Data Fields

u8 | rx_mask [IEEE80211_HT_MCS_MASK_LEN]
u16 | rx_highest
u8 | tx_params
u8 | reserved [3]

Detailed Description

struct ieee80211_mcs_info - MCS information : RX mask : highest supported RX rate. If set represents the highest supported RX data rate in units of 1 Mbps. If this field is 0 this value should not be used to consider the highest RX data rate supported. : TX parameters


W800 SDK APIs: ieee80211_mgmt Struct Reference

Data Fields
ieee80211_mgmt Struct Reference

Data Fields

u16 | frame_control
u16 | duration
u8 | da [6]
u8 | sa [6]
u8 | bssid [6]
u16 | seq_ctrl
union {
struct {
u16 capab_info
u16 listen_interval
u8 variable [0]
} assoc_req
struct {
u16 capab_info
u16 status_code
u16 aid
u8 variable [0]
} reassoc_resp
} u
u16 | auth_alg
u16 | auth_transaction
u16 | reason_code
u8 | current_ap [6]
u64 | timestamp
u16 | beacon_int
u8 | category
u8 | action_code
u8 | dialog_token
u8 | status_code
u8 | element_id
u8 | length
struct ieee80211_channel_sw_ie | sw_elem
u8 | channel_width
struct ieee80211_msrment_ie | msr_elem
u16 | capab
u16 | timeout
u16 | start_seq_num
u16 | status
u16 | params
u16 | aux
u8 | action
u8 | trans_id [WLAN_SA_QUERY_TR_ID_LEN]
u8 | smps_control
union {
} u


W800 SDK APIs: ieee80211_mmie Struct Reference

Data Fields
ieee80211_mmie Struct Reference

Data Fields

u8 | element_id
u8 | length
u16 | key_id
u8 | sequence_number [6]
u8 | mic [8]


W800 SDK APIs: ieee80211_msrment_ie Struct Reference

Data Fields
ieee80211_msrment_ie Struct Reference

#include <wm_ieee80211.h>

Data Fields

u8 | token
u8 | mode
u8 | type
u8 | request [1]

Detailed Description

struct ieee80211_msrment_ie

This structure refers to "Measurement Request/Report information element"


W800 SDK APIs: ieee80211_pspoll Struct Reference

Data Fields
ieee80211_pspoll Struct Reference

Data Fields

u16 | frame_control
u16 | aid
u8 | bssid [6]
u8 | ta [6]


W800 SDK APIs: ieee80211_qos_hdr Struct Reference

Data Fields
ieee80211_qos_hdr Struct Reference

Data Fields

u16 | frame_control
u16 | duration_id
u8 | addr1 [6]
u8 | addr2 [6]
u8 | addr3 [6]
u16 | seq_ctrl
u16 | qos_ctrl


W800 SDK APIs: ieee80211_quiet_ie Struct Reference

Data Fields
ieee80211_quiet_ie Struct Reference

#include <wm_ieee80211.h>

Data Fields

u8 | count
u8 | period
u16 | duration
u16 | offset

Detailed Description

struct ieee80211_quiet_ie

This structure refers to "Quiet information element"


W800 SDK APIs: ieee80211_rann_ie Struct Reference

Data Fields
ieee80211_rann_ie Struct Reference

#include <wm_ieee80211.h>

Data Fields

u8 | rann_flags
u8 | rann_hopcount
u8 | rann_ttl
u8 | rann_addr [6]
u32 | rann_seq
u32 | rann_metric

Detailed Description

struct ieee80211_rann_ie

This structure refers to "Root Announcement information element"


W800 SDK APIs: ieee80211_rts Struct Reference

Data Fields
ieee80211_rts Struct Reference

Data Fields

u16 | frame_control
u16 | duration
u8 | ra [6]
u8 | ta [6]


W800 SDK APIs: ieee80211_tim_ie Struct Reference

Data Fields
ieee80211_tim_ie Struct Reference

#include <wm_ieee80211.h>

Data Fields

u8 | dtim_count
u8 | dtim_period
u8 | bitmap_ctrl
u8 | virtual_map [1]

Detailed Description

struct ieee80211_tim

This structure refers to "Traffic Indication Map information element"


W800 SDK APIs: ieee802_11_elems Struct Reference

Data Fields
ieee802_11_elems Struct Reference

Data Fields

u8 * | ie_start
size_t | total_len
u8 * | ssid
u8 * | supp_rates
u8 * | fh_params
u8 * | ds_params
u8 * | cf_params
u8 * | tim
u8 * | ibss_params
u8 * | country_elem
u8 * | challenge
u8 * | erp_info
u8 * | ext_supp_rates
u8 * | wpa_ie
u8 * | rsn_ie
u8 * | wmm
u8 * | wmm_param
struct ieee80211_ht_cap * | ht_cap_elem
struct ieee80211_ht_info * | ht_info_elem
u8 * | wmm_tspec
u8 * | wps_ie
u8 * | power_cap
u8 * | supp_channels
u8 * | mdie
u8 * | ftie
u8 * | timeout_int
u8 * | ch_switch_elem
u8 * | ht_capabilities
u8 * | ht_operation
u8 * | vendor_ht_cap
u8 * | p2p
u8 * | link_id
u8 * | pwr_constr_elem
u8 * | interworking
u8 | ssid_len
u8 | supp_rates_len
u8 | fh_params_len
u8 | ds_params_len
u8 | cf_params_len
u8 | tim_len
u8 | ibss_params_len
u8 | challenge_len
u8 | erp_info_len
u8 | ext_supp_rates_len
u8 | ch_switch_elem_len
u8 | wpa_ie_len
u8 | rsn_ie_len
u8 | wmm_len
u8 | wmm_param_len
u8 | wmm_tspec_len
u8 | wps_ie_len
u8 | power_cap_len
u8 | supp_channels_len
u8 | mdie_len
u8 | ftie_len
u8 | timeout_int_len
u8 | ht_capabilities_len
u8 | pwr_constr_elem_len
u8 | country_elem_len
u8 | ht_operation_len
u8 | vendor_ht_cap_len
u8 | p2p_len
u8 | interworking_len


W800 SDK APIs: IMAGE_HEADER_PARAM Struct Reference

Data Fields
IMAGE_HEADER_PARAM Struct Reference

Data Fields

unsigned int | magic_no
Img_Attr_Type | img_attr
unsigned int | img_addr
unsigned int | img_len
unsigned int | img_header_addr
unsigned int | upgrade_img_addr
unsigned int | org_checksum
unsigned int | upd_no
unsigned char | ver [16]
unsigned int | _reserved0
unsigned int | _reserved1
struct IMAGE_HEADER_PARAM * | next
unsigned int | hd_checksum


W800 SDK APIs: Img_Attr_Type Union Reference

Data Fields
Img_Attr_Type Union Reference

Data Fields

struct {
uint32_t img_type: 4
uint32_t code_encrypt:1
uint32_t prikey_sel:3
uint32_t signature:1
uint32_t _reserved1: 7
uint32_t zip_type: 1
uint32_t psram_io: 1
uint32_t erase_block_en: 1
uint32_t erase_always: 1
uint32_t _reserved2: 12
} b
uint32_t w

Field Documentation

◆ _reserved1

uint32_t _reserved1

bit: 9.. 15 Reserved

◆ _reserved2

uint32_t _reserved2

bit: 20..31 Reserved

◆ b

struct { ... } b

Structure Access by bit

◆ code_encrypt

uint32_t code_encrypt

bit: 4 whether the code in flash encrypted

◆ erase_always

uint32_t erase_always

bit: 19 flash erase always bit

◆ erase_block_en

uint32_t erase_block_en

bit: 18 flash erase block enable bit

◆ img_type

uint32_t img_type

bit: 0.. 3 IMAGE_TYPE_ENUM

◆ prikey_sel

uint32_t prikey_sel

bit: 5.. 7 private key selection

◆ psram_io

uint32_t psram_io

bit: 17 psram_io bit

◆ signature

uint32_t signature

bit: 8 whether signature flag, only indicates if img contains 128bytes signature in the end

◆ w

uint32_t w

Type Access by whole register

◆ zip_type

uint32_t zip_type

bit: 16 zip_type bit


W800 SDK APIs: LCD_T Struct Reference

Data Fields
LCD_T Struct Reference

LCD Register Declaration. More...

#include <wm_lcd.h>

Data Fields

__IO uint32_t | CTRL
__IO uint32_t | FRAMECNT
__IO uint32_t | COM0
__IO uint32_t | COM1
__IO uint32_t | COM2
__IO uint32_t | COM3
__IO uint32_t | COM4
__IO uint32_t | COM5
__IO uint32_t | COM6
__IO uint32_t | COM7
__IO uint32_t | COM_EN
__IO uint32_t | SEG_EN

Detailed Description

LCD Register Declaration.

Field Documentation

◆ COM_EN

__IO uint32_t COM_EN

LCD COM Control Register

◆ CTRL

__IO uint32_t CTRL

Control Register

◆ FRAMECNT

__IO uint32_t FRAMECNT

Refresh Rate Prescaler Register

◆ SEG_EN

__IO uint32_t SEG_EN

LCD SEG Control Register


W800 SDK APIs: os_time Struct Reference

Data Fields
os_time Struct Reference

#include <wm_osal.h>

Data Fields

os_time_t | sec
os_time_t | usec

Detailed Description

Structure definition of os_time


W800 SDK APIs: psAesCbc_t Struct Reference

Data Fields
psAesCbc_t Struct Reference

Data Fields

psAesKey_t | key
unsigned char | IV [AES_BLOCKLEN]


W800 SDK APIs: psAesKey_t Struct Reference

Data Fields
psAesKey_t Struct Reference

Data Fields

uint32_t | skey [64]
uint16_t | rounds
uint16_t | type

Field Documentation

◆ rounds

uint16_t rounds

Number of rounds

◆ skey

uint32_t skey[64]

Key schedule (either encrypt or decrypt)

◆ type

uint16_t type

PS_AES_ENCRYPT or PS_AES_DECRYPT (inverse) key


W800 SDK APIs: psArc4_t Struct Reference

Data Fields
psArc4_t Struct Reference

Data Fields

unsigned char | state [256]
uint32_t | byteCount
unsigned char | x
unsigned char | y


W800 SDK APIs: psCipherContext_t Union Reference

Data Fields
psCipherContext_t Union Reference

Data Fields

psAesCbc_t | aes
psArc4_t | arc4
psDes3_t | des3


W800 SDK APIs: psCrcContext_t Struct Reference

Data Fields
psCrcContext_t Struct Reference

#include <wm_crypto_hard.h>

Data Fields

u32 | state
The initial value input and result value output.
u8 | type
The type of CRC, refernec the CRYPTO_CRC_TYPE enum.
u8 | mode
The mode of CRC, bit0 means output reflection and bit1 means input reflection.

Detailed Description

The struct of the CRC context.


W800 SDK APIs: psDes3_t Struct Reference

Data Fields
psDes3_t Struct Reference

Data Fields

psDes3Key_t | key
unsigned char | IV [DES3_BLOCKLEN]
uint32_t | blocklen


W800 SDK APIs: psDes3Key_t Struct Reference

Data Fields
psDes3Key_t Struct Reference

Data Fields

uint32_t | ek [3][32]
uint32_t | dk [3][32]


W800 SDK APIs: psDigestContext_t Struct Reference

Data Fields
psDigestContext_t Struct Reference

Data Fields

union {
psSha1_t sha1
psMd5_t md5
} u
int32_t hashAlgId


W800 SDK APIs: psMd5_t Struct Reference

Data Fields
psMd5_t Struct Reference

Data Fields

uint32 | lengthHi
uint32 | lengthLo
uint32 | state [4]
uint32 | curlen
unsigned char | buf [64]


W800 SDK APIs: psSha1_t Struct Reference

Data Fields
psSha1_t Struct Reference

Data Fields

uint32 | lengthHi
uint32 | lengthLo
uint32 | state [5]
uint32 | curlen
unsigned char | buf [64]


W800 SDK APIs: sasc_region_attr_t Struct Reference

Data Fields
sasc_region_attr_t Struct Reference

Data Fields

sasc_car_e | car
sasc_ap_e | ap
sasc_cd_e | cd


W800 SDK APIs: SASC_Type Struct Reference

Data Fields
SASC_Type Struct Reference

Data Fields

__IOM uint32_t | CAR
__IOM uint32_t | CR
__IOM uint32_t | AP0
__IOM uint32_t | CD0
__IOM uint32_t | AP1
__IOM uint32_t | CD1
__IOM uint32_t | AP2
__IOM uint32_t | CD2
__IOM uint32_t | REGION [8]


W800 SDK APIs: sc_io_map_ Struct Reference

Data Fields
sc_io_map_ Struct Reference

Data Fields

enum tls_io_name | clk_pin_num
uint32_t | clk_opt
enum tls_io_name | io_pin_num
uint32_t | io_opt
uint8_t | initialed


W800 SDK APIs: SD_CardInfo_t Struct Reference

Data Fields
SD_CardInfo_t Struct Reference

Data Fields

long long | CardCapacity
u32 | CardBlockSize
u16 | RCA
u8 | CSDVer


W800 SDK APIs: SDIO_HOST_Type Struct Reference

Data Fields
SDIO_HOST_Type Struct Reference

Data Fields

__IOM uint32_t | MMC_CTL
__IOM uint32_t | MMC_IO
__IOM uint32_t | MMC_BYTECNTL
__IM uint32_t | MMC_TR_BLOCKCNT
__IOM uint32_t | MMC_CRCCTL
__IM uint32_t | CMD_CRC
__IM uint32_t | DAT_CRCL
__IM uint32_t | DAT_CRCH
__IOM uint32_t | MMC_PORT
__IOM uint32_t | MMC_INT_MASK
__IOM uint32_t | MMC_INT_SRC
__IOM uint32_t | MMC_CARDSEL
__IM uint32_t | MMC_SIG
__IOM uint32_t | MMC_IO_MBCTL
__IOM uint32_t | MMC_BLOCKCNT
__IOM uint32_t | MMC_TIMEOUTCNT
__IOM uint32_t | CMD_BUF [16]
__IOM uint32_t | BUF_CTL
uint32_t | RESERVED3 [31U]
__IOM uint32_t | DATA_BUF [128]

Field Documentation

◆ BUF_CTL

__IOM uint32_t BUF_CTL

Offset: 0x080

◆ CMD_BUF

__IOM uint32_t CMD_BUF[16]

Offset: 0x040

◆ DATA_BUF

__IOM uint32_t DATA_BUF[128]

Offset: 0x100

◆ MMC_CRCCTL

__IOM uint32_t MMC_CRCCTL

Offset: 0x010

◆ MMC_PORT

__IOM uint32_t MMC_PORT

Offset: 0x020

◆ MMC_SIG

__IM uint32_t MMC_SIG

Offset: 0x030


W800 SDK APIs: task_msg Struct Reference

Data Fields
task_msg Struct Reference

#include <wm_wl_task.h>

Data Fields

enum task_msg_type | type
tls_sem_t * | sem
union {
struct {
start_routine function
void * ctx
} cb
struct {
start_routine function
void * ctx
u8 cnt
} cbs
struct {
u32 msecs
tls_timeout_handler h
void * arg
} tmo
} msg

Detailed Description

message of task


W800 SDK APIs: task_parameter Struct Reference

Data Fields
task_parameter Struct Reference

#include <wm_wl_task.h>

Data Fields

u8 | task_id
const char * | name
u8 * | stk_start
u32 | stk_size
u8 | mbox_size
u8 | mbox_id
u8 | timeo_id

Detailed Description

task parameters

Field Documentation

◆ mbox_id

u8 mbox_id

mailbox ID

◆ mbox_size

u8 mbox_size

size of mailbox

◆ name

const char* name

task name

◆ stk_size

u32 stk_size

size of task stack

◆ stk_start

u8* stk_start

start address of task stack

◆ task_id

u8 task_id

task ID

◆ timeo_id

u8 timeo_id

timer ID


W800 SDK APIs: TIPC_Type Struct Reference

Data Fields
TIPC_Type Struct Reference

Data Fields

__IOM uint32_t | VLD0
__IOM uint32_t | VLD1


W800 SDK APIs: TIPC_VLD0_Type Union Reference

Data Fields
TIPC_VLD0_Type Union Reference

Data Fields

struct {
uint32_t I2C: 1
uint32_t SAR_ADC: 1
uint32_t SPI_LS: 1
uint32_t UART0: 1
uint32_t UART1: 1
uint32_t UART2: 1
uint32_t UART3: 1
uint32_t UART4: 1
uint32_t UART5: 1
uint32_t PORTA: 1
uint32_t PORTB: 1
uint32_t WD: 1
uint32_t TIMER: 1
uint32_t RFC: 1
uint32_t LCD: 1
uint32_t PWM: 1
uint32_t I2S: 1
uint32_t BT_MODEM: 1
uint32_t _reserved0: 14
} b
uint32_t w

Field Documentation

◆ BT_MODEM

uint32_t BT_MODEM

bit: 17

◆ I2C

uint32_t I2C

bit: 0

◆ I2S

uint32_t I2S

bit: 16

◆ LCD

uint32_t LCD

bit: 14

◆ PORTA

uint32_t PORTA

bit: 9

◆ PORTB

uint32_t PORTB

bit: 10

◆ PWM

uint32_t PWM

bit: 15

◆ RFC

uint32_t RFC

bit: 13

◆ SAR_ADC

uint32_t SAR_ADC

bit: 1

◆ SPI_LS

uint32_t SPI_LS

bit: 2

◆ TIMER

uint32_t TIMER

bit: 12

◆ UART0

uint32_t UART0

bit: 3

◆ UART1

uint32_t UART1

bit: 4

◆ UART2

uint32_t UART2

bit: 5

◆ UART3

uint32_t UART3

bit: 6

◆ UART4

uint32_t UART4

bit: 7

◆ UART5

uint32_t UART5

bit: 8

◆ WD

uint32_t WD

bit: 11


W800 SDK APIs: TIPC_VLD1_Type Union Reference

Data Fields
TIPC_VLD1_Type Union Reference

Data Fields

struct {
uint32_t SDIO_HOST: 1
uint32_t FLASH: 1
uint32_t PSRAM: 1
uint32_t RSA: 1
uint32_t DMA: 1
uint32_t GPSEC: 1
uint32_t BT: 1
uint32_t PMU: 1
uint32_t CLK_RST: 1
uint32_t MMU: 1
uint32_t BBP: 1
uint32_t MAC: 1
uint32_t SEC: 1
uint32_t _reserved0: 1
uint32_t SDIO_SLAVE: 1
uint32_t SPI_HS: 1
uint32_t SDIO_WRAPPER: 1
uint32_t RF_BIST: 1
uint32_t _reserved1: 14
} b
uint32_t w

Field Documentation

◆ _reserved0

uint32_t _reserved0

bit: 13

◆ BBP

uint32_t BBP

bit: 10

◆ BT

uint32_t BT

bit: 6

◆ CLK_RST

uint32_t CLK_RST

bit: 8

◆ DMA

uint32_t DMA

bit: 4

◆ FLASH

uint32_t FLASH

bit: 1

◆ GPSEC

uint32_t GPSEC

bit: 5

◆ MAC

uint32_t MAC

bit: 11

◆ MMU

uint32_t MMU

bit: 9

◆ PMU

uint32_t PMU

bit: 7

◆ PSRAM

uint32_t PSRAM

bit: 2

◆ RF_BIST

uint32_t RF_BIST

bit: 17

◆ RSA

uint32_t RSA

bit: 3

◆ SDIO_HOST

uint32_t SDIO_HOST

bit: 0

◆ SDIO_SLAVE

uint32_t SDIO_SLAVE

bit: 14

◆ SDIO_WRAPPER

uint32_t SDIO_WRAPPER

bit: 16

◆ SEC

uint32_t SEC

bit: 12

◆ SPI_HS

uint32_t SPI_HS

bit: 15


W800 SDK APIs: tls_ble_cl_cfg_mtu_msg_t Struct Reference

Data Fields
tls_ble_cl_cfg_mtu_msg_t Struct Reference

#include <wm_bt_def.h>

Data Fields

uint16_t | conn_id
uint8_t | status
uint16_t | mtu

Detailed Description

callback event data for WM_BLE_CL_CFG_MTU_EVT event


W800 SDK APIs: tls_ble_cl_close_msg_t Struct Reference

Data Fields
tls_ble_cl_close_msg_t Struct Reference

#include <wm_bt_def.h>

Data Fields

uint16_t | conn_id
uint8_t | status
uint8_t | client_if
uint8_t | remote_bda [6]
uint16_t | reason

Detailed Description

callback event data for WM_BLE_CL_CLOSE_EVT event

Field Documentation

◆ reason

uint16_t reason

disconnect reason code, not useful when connect event is reported


W800 SDK APIs: tls_ble_cl_congest_msg_t Struct Reference

Data Fields
tls_ble_cl_congest_msg_t Struct Reference

Data Fields

uint16_t | conn_id
bool | congested

Field Documentation

◆ congested

bool congested

congestion indicator


W800 SDK APIs: tls_ble_cl_exec_cmpl_msg_t Struct Reference

Data Fields
tls_ble_cl_exec_cmpl_msg_t Struct Reference

#include <wm_bt_def.h>

Data Fields

uint16_t | conn_id
uint8_t | status

Detailed Description

callback event data for WM_BLE_CL_EXEC_CMPL_EVT event


W800 SDK APIs: tls_ble_cl_gatt_db_msg_t Struct Reference

Data Fields
tls_ble_cl_gatt_db_msg_t Struct Reference

Data Fields

uint16_t | conn_id
tls_btgatt_db_element_t * | db
int | count
uint8_t | status


W800 SDK APIs: tls_ble_cl_listen_msg_t Struct Reference

Data Fields
tls_ble_cl_listen_msg_t Struct Reference

#include <wm_bt_def.h>

Data Fields

uint8_t | status
uint8_t | client_if

Detailed Description

callback event data for WM_BLE_CL_LISTEN_EVT event


W800 SDK APIs: tls_ble_cl_notify_msg_t Struct Reference

Data Fields
tls_ble_cl_notify_msg_t Struct Reference

#include <wm_bt_def.h>

Data Fields

uint16_t | conn_id
uint8_t * | value
uint8_t | bda [6]
uint16_t | handle
uint16_t | len
bool | is_notify

Detailed Description

callback event data for WM_BLE_CL_NOTIF_EVT event


W800 SDK APIs: tls_ble_cl_open_msg_t Struct Reference

Data Fields
tls_ble_cl_open_msg_t Struct Reference

#include <wm_bt_def.h>

Data Fields

uint16_t | conn_id
uint8_t | status
uint8_t | client_if
uint8_t | bd_addr [6]

Detailed Description

callback event data for WM_BLE_CL_OPEN_EVT event

Field Documentation

◆ client_if

uint8_t client_if

Client interface ID

◆ status

uint8_t status

operation status


W800 SDK APIs: tls_ble_cl_read_msg_t Struct Reference

Data Fields
tls_ble_cl_read_msg_t Struct Reference

#include <wm_bt_def.h>

Data Fields

uint16_t | conn_id
uint8_t | status
uint16_t | handle
uint16_t | len
uint8_t * | value
uint16_t | value_type

Detailed Description

callback event data for WM_BLE_CL_READ_CHAR_EVT /WM_BLE_CL_READ_CHAR_EVTevent


W800 SDK APIs: tls_ble_cl_reg_notify_msg_t Struct Reference

Data Fields
tls_ble_cl_reg_notify_msg_t Struct Reference

Data Fields

uint16_t | conn_id
uint8_t | status
bool | reg
uint16_t | handle


W800 SDK APIs: tls_ble_cl_register_msg_t Struct Reference

Data Fields
tls_ble_cl_register_msg_t Struct Reference

Data Fields

uint8_t | status
uint8_t | client_if
tls_bt_uuid_t app_uuid

Field Documentation

◆ app_uuid

tls_bt_uuid_t app_uuid

Client uuid

◆ client_if

uint8_t client_if

Client interface ID

◆ status

uint8_t status

operation status


W800 SDK APIs: tls_ble_cl_search_cmpl_msg_t Struct Reference

Data Fields
tls_ble_cl_search_cmpl_msg_t Struct Reference

#include <wm_bt_def.h>

Data Fields

uint16_t | conn_id
uint8_t | status

Detailed Description

callback event data for WM_BLE_CL_SEARCH_CMPL_EVT event

Field Documentation

◆ status

uint8_t status

operation status


W800 SDK APIs: tls_ble_cl_search_res_msg_t Struct Reference

Data Fields
tls_ble_cl_search_res_msg_t Struct Reference

#include <wm_bt_def.h>

Data Fields

uint16_t | conn_id
tls_bt_uuid_t | uuid
uint8_t | inst_id

Detailed Description

callback event data for WM_BLE_CL_SEARCH_RES_EVT event


W800 SDK APIs: tls_ble_cl_write_msg_t Struct Reference

Data Fields
tls_ble_cl_write_msg_t Struct Reference

#include <wm_bt_def.h>

Data Fields

uint16_t | conn_id
uint8_t | status
uint16_t | handle

Detailed Description

callback event data for WM_BLE_CL_WRITE_CHAR_EVT/WM_BLE_CL_PREP_WRITE_EVT/WM_BLE_CL_WRITE_DESCR_EVT event


W800 SDK APIs: tls_ble_dm_msg_t Union Reference

Data Fields
tls_ble_dm_msg_t Union Reference

Data Fields

tls_ble_dm_set_adv_data_cmpl_msg_t | dm_set_adv_data_cmpl
tls_ble_dm_timer_expired_msg_t | dm_timer_expired
tls_ble_dm_evt_triger_msg_t | dm_evt_trigered
tls_ble_dm_scan_res_msg_t | dm_scan_result
tls_ble_dm_set_scan_param_cmpl_msg_t | dm_set_scan_param_cmpl
tls_ble_dm_scan_res_cmpl_msg_t | dm_scan_result_cmpl
tls_ble_report_rssi_msg_t | dm_report_rssi
tls_ble_sec_msg_t | dm_sec_result
tls_ble_dm_adv_cmpl_msg_t | dm_adv_cmpl


W800 SDK APIs: tls_ble_dm_scan_res_cmpl_msg_t Struct Reference

Data Fields
tls_ble_dm_scan_res_cmpl_msg_t Struct Reference

Data Fields

uint16_t num_responses


W800 SDK APIs: tls_ble_dm_scan_res_msg_t Struct Reference

Data Fields
tls_ble_dm_scan_res_msg_t Struct Reference

Data Fields

uint8_t | address [6]
int8_t | rssi
uint8_t * | value

Field Documentation

◆ address

uint8_t address[6]

device address

◆ rssi

int8_t rssi

signal strength

◆ value

uint8_t* value

adv /scan resp value


W800 SDK APIs: tls_ble_dm_set_adv_data_cmpl_msg_t Struct Reference

Data Fields
tls_ble_dm_set_adv_data_cmpl_msg_t Struct Reference

#include <wm_bt_def.h>

Data Fields

uint8_t status

Detailed Description

callback event data for WM_BLE_DM_SET_ADV_DATA

Field Documentation

◆ status

uint8_t status

operation status


W800 SDK APIs: tls_ble_dm_set_scan_param_cmpl_msg_t Struct Reference

Data Fields
tls_ble_dm_set_scan_param_cmpl_msg_t Struct Reference

Data Fields

uint8_t | status
uint8_t | dm_id


W800 SDK APIs: tls_ble_dm_timer_expired_msg_t Struct Reference

Data Fields
tls_ble_dm_timer_expired_msg_t Struct Reference

Data Fields

uint32_t | id
int32_t | func_ptr


W800 SDK APIs: tls_ble_msg_t Union Reference

Data Fields
tls_ble_msg_t Union Reference

#include <wm_bt_def.h>

Data Fields

tls_ble_cl_register_msg_t cli_register
tls_ble_cl_read_msg_t cli_read
tls_ble_cl_write_msg_t cli_write
tls_ble_cl_exec_cmpl_msg_t cli_exec_cmpl
tls_ble_cl_search_cmpl_msg_t cli_search_cmpl
tls_ble_cl_search_res_msg_t cli_search_res
tls_ble_cl_notify_msg_t cli_notif
tls_ble_cl_open_msg_t cli_open
tls_ble_cl_close_msg_t cli_close
tls_ble_cl_listen_msg_t cli_listen
tls_ble_cl_cfg_mtu_msg_t cli_cfg_mtu
tls_ble_cl_congest_msg_t cli_congest
tls_ble_cl_gatt_db_msg_t | cli_db
tls_ble_cl_reg_notify_msg_t | cli_reg_notify
tls_ble_se_register_msg_t ser_register
tls_ble_se_connect_msg_t ser_connect
tls_ble_se_disconnect_msg_t ser_disconnect
tls_ble_se_create_msg_t ser_create
tls_ble_se_add_incl_srvc_msg_t | ser_add_incl_srvc
tls_ble_se_add_char_msg_t ser_add_char
tls_ble_se_add_char_descr_msg_t | ser_add_char_descr
tls_ble_se_start_msg_t ser_start_srvc
tls_ble_se_stop_msg_t ser_stop_srvc
tls_ble_se_delete_msg_t | ser_delete_srvc
tls_ble_se_read_msg_t ser_read
tls_ble_se_write_msg_t ser_write
tls_ble_se_exec_write_msg_t ser_exec_write
tls_ble_se_confirm_msg_t ser_confirm
tls_ble_se_congest_msg_t ser_congest
tls_ble_se_mtu_msg_t | ser_mtu
tls_ble_se_response_msg_t | ser_resp

Detailed Description

Union of data associated with HD callback

Field Documentation

◆ cli_cfg_mtu

tls_ble_cl_cfg_mtu_msg_t cli_cfg_mtu

WM_BLE_CL_CFG_MTU_EVT

◆ cli_close

tls_ble_cl_close_msg_t cli_close

WM_BLE_CL_CLOSE_EVT

◆ cli_congest

tls_ble_cl_congest_msg_t cli_congest

WM_BLE_CL_CONGEST_EVT

◆ cli_exec_cmpl

tls_ble_cl_exec_cmpl_msg_t cli_exec_cmpl

WM_BLE_CL_EXEC_CMPL_EVT

◆ cli_listen

tls_ble_cl_listen_msg_t cli_listen

WM_BLE_CL_LISTEN_EVT

◆ cli_notif

tls_ble_cl_notify_msg_t cli_notif

WM_BLE_CL_NOTIF_EVT

◆ cli_open

tls_ble_cl_open_msg_t cli_open

WM_BLE_CL_OPEN_EVT

◆ cli_read

tls_ble_cl_read_msg_t cli_read

WM_BLE_CL_READ_EVT

◆ cli_register

tls_ble_cl_register_msg_t cli_register

WM_BLE_CL_REGISTER_EVT

◆ cli_search_cmpl

tls_ble_cl_search_cmpl_msg_t cli_search_cmpl

WM_BLE_CL_SEARCH_CMPL_EVT

◆ cli_search_res

tls_ble_cl_search_res_msg_t cli_search_res

WM_BLE_CL_SEARCH_RES_EVT

◆ cli_write

tls_ble_cl_write_msg_t cli_write

WM_BLE_CL_WRITE_EVT

◆ ser_add_char

tls_ble_se_add_char_msg_t ser_add_char

WM_BLE_SE_ADDCHAR_EVT

◆ ser_confirm

tls_ble_se_confirm_msg_t ser_confirm

WM_BLE_SE_CONFIRM_EVT

◆ ser_congest

tls_ble_se_congest_msg_t ser_congest

WM_BLE_CL_CONGEST_EVT

◆ ser_connect

tls_ble_se_connect_msg_t ser_connect

WM_BLE_SE_OPEN_EVT

◆ ser_create

tls_ble_se_create_msg_t ser_create

WM_BLE_SE_CREATE_EVT

◆ ser_disconnect

tls_ble_se_disconnect_msg_t ser_disconnect

WM_BLE_SE_CLOSE_EVT

◆ ser_exec_write

tls_ble_se_exec_write_msg_t ser_exec_write

WM_BLE_SE_EXEC_WRITE_EVT

◆ ser_read

tls_ble_se_read_msg_t ser_read

WM_BLE_SE_READ_EVT

◆ ser_register

tls_ble_se_register_msg_t ser_register

WM_BLE_SE_REGISTER_EVT

◆ ser_start_srvc

tls_ble_se_start_msg_t ser_start_srvc

WM_BLE_SE_START_EVT

◆ ser_stop_srvc

tls_ble_se_stop_msg_t ser_stop_srvc

WM_BLE_SE_STOP_EVT

◆ ser_write

tls_ble_se_write_msg_t ser_write

WM_BLE_SE_WRITE_EVT


W800 SDK APIs: tls_ble_report_rssi_msg_t Struct Reference

Data Fields
tls_ble_report_rssi_msg_t Struct Reference

Data Fields

uint8_t | address [6]
int8_t | rssi
uint8_t | status


W800 SDK APIs: tls_ble_se_add_char_msg_t Struct Reference

Data Fields
tls_ble_se_add_char_msg_t Struct Reference

#include <wm_bt_def.h>

Data Fields

uint8_t | status
uint8_t | server_if
tls_bt_uuid_t | uuid
uint16_t | service_id
uint16_t | attr_id

Detailed Description

callback event data for WM_BLE_SE_ADDCHAR_EVT event

Field Documentation

◆ status

uint8_t status

operation status


W800 SDK APIs: tls_ble_se_add_incl_srvc_msg_t Struct Reference

Data Fields
tls_ble_se_add_incl_srvc_msg_t Struct Reference

#include <wm_bt_def.h>

Data Fields

uint8_t | status
uint8_t | server_if
uint16_t | service_id
uint16_t | attr_id

Detailed Description

callback event data for WM_BLE_SE_ADD_INCL_SRVC_EVT event

Field Documentation

◆ status

uint8_t status

operation status


W800 SDK APIs: tls_ble_se_confirm_msg_t Struct Reference

Data Fields
tls_ble_se_confirm_msg_t Struct Reference

Data Fields

uint16_t | conn_id
uint8_t | status

Field Documentation

◆ status

uint8_t status

operation status


W800 SDK APIs: tls_ble_se_congest_msg_t Struct Reference

Data Fields
tls_ble_se_congest_msg_t Struct Reference

Data Fields

uint16_t | conn_id
bool | congested

Field Documentation

◆ congested

bool congested

congestion indicator


W800 SDK APIs: tls_ble_se_connect_msg_t Struct Reference

Data Fields
tls_ble_se_connect_msg_t Struct Reference

#include <wm_bt_def.h>

Data Fields

uint16_t | conn_id
uint8_t | server_if
bool | connected
uint16_t | reason
uint8_t | addr [6]

Detailed Description

callback event data for WM_BLE_SE_CONNECT_EVT/WM_BLE_SE_DISCONNECT_EVT event

Field Documentation

◆ server_if

uint8_t server_if

Server interface ID


W800 SDK APIs: tls_ble_se_create_msg_t Struct Reference

Data Fields
tls_ble_se_create_msg_t Struct Reference

#include <wm_bt_def.h>

Data Fields

uint8_t | status
uint8_t | server_if
bool | is_primary
uint8_t | inst_id
tls_bt_uuid_t | uuid
uint16_t | service_id

Detailed Description

callback event data for WM_BLE_SE_CREATE_EVT event

Field Documentation

◆ status

uint8_t status

operation status


W800 SDK APIs: tls_ble_se_exec_write_msg_t Struct Reference

Data Fields
tls_ble_se_exec_write_msg_t Struct Reference

Data Fields

uint16_t | conn_id
uint32_t | trans_id
uint8_t | remote_bda [6]
uint8_t | exec_write


W800 SDK APIs: tls_ble_se_mtu_msg_t Struct Reference

Data Fields
tls_ble_se_mtu_msg_t Struct Reference

Data Fields

uint16_t | conn_id
uint16_t | mtu


W800 SDK APIs: tls_ble_se_read_msg_t Struct Reference

Data Fields
tls_ble_se_read_msg_t Struct Reference

Data Fields

uint16_t | conn_id
uint32_t | trans_id
uint8_t | remote_bda [6]
uint16_t | handle
uint16_t | offset
bool | is_long


W800 SDK APIs: tls_ble_se_register_msg_t Struct Reference

Data Fields
tls_ble_se_register_msg_t Struct Reference

#include <wm_bt_def.h>

Data Fields

uint8_t | status
uint8_t | server_if
tls_bt_uuid_t | app_uuid

Detailed Description

callback event data for WM_BLE_SE_REGISTER_EVT/WM_BLE_SE_DEREGISTER_EVT event


W800 SDK APIs: tls_ble_se_response_msg_t Struct Reference

Data Fields
tls_ble_se_response_msg_t Struct Reference

Data Fields

uint8_t | status
uint16_t | conn_id
uint16_t | trans_id


W800 SDK APIs: tls_ble_se_start_msg_t Struct Reference

Data Fields
tls_ble_se_start_msg_t Struct Reference

#include <wm_bt_def.h>

Data Fields

uint8_t | status
uint8_t | server_if
uint16_t | service_id

Detailed Description

callback event data for WM_BLE_SE_START_EVT event

Field Documentation

◆ status

uint8_t status

operation status


W800 SDK APIs: tls_ble_se_write_msg_t Struct Reference

Data Fields
tls_ble_se_write_msg_t Struct Reference

Data Fields

uint16_t | conn_id
uint32_t | trans_id
uint8_t | remote_bda [6]
uint16_t | handle
uint16_t | offset
uint16_t | len
bool | need_rsp
bool | is_prep
uint8_t * | value

Field Documentation

◆ handle

uint16_t handle

attribute handle

◆ is_prep

bool is_prep

is prepare write

◆ len

uint16_t len

length of attribute value

◆ need_rsp

bool need_rsp

need write response

◆ offset

uint16_t offset

attribute value offset, if no offset is needed for the command, ignore it

◆ value

uint8_t* value

the actual attribute value


W800 SDK APIs: tls_ble_sec_msg_t Struct Reference

Data Fields
tls_ble_sec_msg_t Struct Reference

Data Fields

uint8_t | address [6]
int8_t | transport
uint8_t | status


W800 SDK APIs: tls_bss_info_format2_t Struct Reference

Data Fields
tls_bss_info_format2_t Struct Reference

#include <wm_wifi.h>

Data Fields

u8 | ecn
u8 | rssi
u8 | ssid [32]
u8 | ssid_len
u8 | bssid [ETH_ALEN]
u8 | channel
s16 | freq_offset
s16 | freqcal_val
s8 | pairwise_cipher
s8 | group_cipher
u8 | bgn
bool | wps_support

Detailed Description

format2 bss information

Field Documentation

◆ bgn

u8 bgn

bgnmode, bit0:b mode, bit1:g mode, bit2:n mode

◆ bssid

u8 bssid[ETH_ALEN]

MAC address of AP

◆ channel

u8 channel

channel of AP

◆ ecn

u8 ecn

encryption type, enum tls_wifi_encrypt_mode

◆ freq_offset

s16 freq_offset

reserved do not support

◆ freqcal_val

s16 freqcal_val

reserved do not support

◆ group_cipher

s8 group_cipher

group cipher. enum tls_wifi_cipher_mode

◆ pairwise_cipher

s8 pairwise_cipher

pairwise cipher. enum tls_wifi_cipher_mode

◆ rssi

u8 rssi

signal strength of AP, real rssi = (signed char)rssi

◆ ssid

u8 ssid[32]

SSID of AP

◆ ssid_len

u8 ssid_len

SSID length

◆ wps_support

bool wps_support

is support WPS function


W800 SDK APIs: tls_bss_info_t Struct Reference

Data Fields
tls_bss_info_t Struct Reference

#include <wm_wifi.h>

Data Fields

u8 | bssid [ETH_ALEN]
u8 | mode
u8 | channel
u8 | privacy
u8 | ssid_len
u8 | rssi
u8 | ssid [32]
u32 | max_data_rate
bool | wps_support

Detailed Description

bss information

Field Documentation

◆ bssid

u8 bssid[ETH_ALEN]

MAC address of AP

◆ channel

u8 channel

channel of AP

◆ max_data_rate

u32 max_data_rate

maximum rate of AP, the unit is Mbps

◆ mode

u8 mode

AP type, value is: 1-ibss, 2-ess

◆ privacy

u8 privacy

encryption type, enum tls_wifi_auth_mode

◆ rssi

u8 rssi

signal strength of AP, real rssi = (signed char)rssi

◆ ssid

u8 ssid[32]

SSID of AP

◆ ssid_len

u8 ssid_len

SSID length

◆ wps_support

bool wps_support

is support WPS function


W800 SDK APIs: tls_bt_acl_state_chg_msg_t Struct Reference

Data Fields
tls_bt_acl_state_chg_msg_t Struct Reference

Data Fields

tls_bt_status_t | status
tls_bt_addr_t * | remote_address
uint8_t | link_type
tls_bt_acl_state_t | state


W800 SDK APIs: tls_bt_adapter_prop_msg_t Struct Reference

Data Fields
tls_bt_adapter_prop_msg_t Struct Reference

Data Fields

tls_bt_status_t | status
int | num_properties
tls_bt_property_t * properties

Field Documentation

◆ properties

tls_bt_property_t* properties

bluetooth adapter property data


W800 SDK APIs: tls_bt_adapter_state_change_msg_t Struct Reference

Data Fields
tls_bt_adapter_state_change_msg_t Struct Reference

Data Fields

tls_bt_state_t status

Field Documentation

◆ status

tls_bt_state_t status

bluetooth adapter state


W800 SDK APIs: tls_bt_av_audio_config_t Struct Reference

Data Fields
tls_bt_av_audio_config_t Struct Reference

Data Fields

tls_bt_addr_t * | bd_addr
uint32_t | sample_rate
uint8_t | channel_count


W800 SDK APIs: tls_bt_av_audio_payload_t Struct Reference

Data Fields
tls_bt_av_audio_payload_t Struct Reference

Data Fields

tls_bt_addr_t * | bd_addr
uint8_t | audio_format
uint8_t * | payload
uint16_t | payload_length


W800 SDK APIs: tls_bt_av_audio_state_t Struct Reference

Data Fields
tls_bt_av_audio_state_t Struct Reference

Data Fields

tls_btav_audio_state_t | stat
tls_bt_addr_t * | bd_addr


W800 SDK APIs: tls_bt_av_connection_state_t Struct Reference

Data Fields
tls_bt_av_connection_state_t Struct Reference

Data Fields

tls_btav_connection_state_t | stat
tls_bt_addr_t * | bd_addr


W800 SDK APIs: tls_bt_av_msg_t Union Reference

Data Fields
tls_bt_av_msg_t Union Reference

Data Fields

tls_bt_av_connection_state_t | av_connection_state
tls_bt_av_audio_state_t | av_audio_state
tls_bt_av_audio_config_t | av_audio_config
tls_bt_av_audio_payload_t | av_audio_payload


W800 SDK APIs: tls_bt_ble_test_msg_t Struct Reference

Data Fields
tls_bt_ble_test_msg_t Struct Reference

Data Fields

uint8_t | status
uint32_t | count


W800 SDK APIs: tls_bt_bond_state_chg_msg_t Struct Reference

Data Fields
tls_bt_bond_state_chg_msg_t Struct Reference

Data Fields

tls_bt_status_t | status
tls_bt_addr_t * | remote_bd_addr
tls_bt_bond_state_t | state


W800 SDK APIs: tls_bt_device_found_msg_t Struct Reference

Data Fields
tls_bt_device_found_msg_t Struct Reference

Data Fields

int num_properties
tls_bt_property_t * properties

Field Documentation

◆ properties

tls_bt_property_t* properties

bluetooth adapter property data


W800 SDK APIs: tls_bt_discovery_state_chg_msg_t Struct Reference

Data Fields
tls_bt_discovery_state_chg_msg_t Struct Reference

Data Fields

tls_bt_discovery_state_t state


W800 SDK APIs: tls_bt_energy_info_msg_t Struct Reference

Data Fields
tls_bt_energy_info_msg_t Struct Reference

Data Fields

tls_bt_activity_energy_info * energy_info


W800 SDK APIs: tls_bt_hci_if_t Struct Reference

Data Fields
tls_bt_hci_if_t Struct Reference

Data Fields

uint8_t | uart_index
uint32_t | band_rate
uint8_t | data_bit
uint8_t | verify_bit
uint8_t | stop_bit

Field Documentation

◆ band_rate

uint32_t band_rate

band rate: 115200 ~ 2M

◆ data_bit

uint8_t data_bit

data bit:5 ~ 8

◆ stop_bit

uint8_t stop_bit

0:1bit; 1:1.5bit; 2:2bits

◆ uart_index

uint8_t uart_index

uart port index, 1~4

◆ verify_bit

uint8_t verify_bit

0:NONE, 1 ODD, 2 EVEN


W800 SDK APIs: tls_bt_host_if_t Struct Reference

Data Fields
tls_bt_host_if_t Struct Reference

Data Fields

void(* | notify_controller_avaiable_hci_buffer )(int cnt)
void(* | notify_host_recv_h4 )(uint8_t *ptr, uint16_t length)


W800 SDK APIs: tls_bt_host_msg_t Union Reference

Data Fields
tls_bt_host_msg_t Union Reference

Data Fields

tls_bt_adapter_state_change_msg_t | adapter_state_change
tls_bt_adapter_prop_msg_t | adapter_prop
tls_bt_remote_dev_prop_msg_t | remote_device_prop
tls_bt_device_found_msg_t | device_found
tls_bt_discovery_state_chg_msg_t | discovery_state
tls_bt_pin_request_msg_t | pin_request
tls_bt_ssp_request_msg_t | ssp_request
tls_bt_bond_state_chg_msg_t | bond_state
tls_bt_acl_state_chg_msg_t | acl_state
tls_bt_energy_info_msg_t | energy_info
tls_bt_ble_test_msg_t | ble_test


W800 SDK APIs: tls_bt_mesh_cfg_hb_pub Struct Reference

Data Fields
tls_bt_mesh_cfg_hb_pub Struct Reference

Data Fields

uint16_t | dst
uint8_t | count
uint8_t | period
uint8_t | ttl
uint16_t | feat
uint16_t | net_idx


W800 SDK APIs: tls_bt_mesh_cfg_hb_sub Struct Reference

Data Fields
tls_bt_mesh_cfg_hb_sub Struct Reference

Data Fields

uint16_t | src
uint16_t | dst
uint8_t | period
uint8_t | count
uint8_t | min
uint8_t | max


W800 SDK APIs: tls_bt_mesh_cfg_mod_pub Struct Reference

Data Fields
tls_bt_mesh_cfg_mod_pub Struct Reference

Data Fields

uint16_t | addr
uint16_t | app_idx
uint8_t | cred_flag
uint8_t | ttl
uint8_t | period
uint8_t | transmit


W800 SDK APIs: tls_bt_pin_request_msg_t Struct Reference

Data Fields
tls_bt_pin_request_msg_t Struct Reference

Data Fields

tls_bt_addr_t * | remote_bd_addr
tls_bt_bdname_t * | bd_name
uint32_t | cod
uint8_t | min_16_digit


W800 SDK APIs: tls_bt_property_t Struct Reference

Data Fields
tls_bt_property_t Struct Reference

#include <wm_bt_def.h>

Data Fields

tls_bt_property_type_t | type
int | len
void * | val

Detailed Description

Bluetooth Adapter Property data structure


W800 SDK APIs: tls_bt_remote_dev_prop_msg_t Struct Reference

Data Fields
tls_bt_remote_dev_prop_msg_t Struct Reference

Data Fields

tls_bt_status_t | status
tls_bt_addr_t * | address
int | num_properties
tls_bt_property_t * properties

Field Documentation

◆ properties

tls_bt_property_t* properties

bluetooth adapter property data


W800 SDK APIs: tls_bt_ssp_request_msg_t Struct Reference

Data Fields
tls_bt_ssp_request_msg_t Struct Reference

Data Fields

tls_bt_addr_t * | remote_bd_addr
tls_bt_bdname_t * | bd_name
uint32_t | cod
tls_bt_ssp_variant_t | pairing_variant
uint32_t | pass_key


W800 SDK APIs: tls_bt_uuid_t Struct Reference

Data Fields
tls_bt_uuid_t Struct Reference

#include <wm_bt_def.h>

Data Fields

uint8_t uu [16]

Detailed Description

Bluetooth 128-bit UUID


W800 SDK APIs: tls_btgatt_db_element_t Struct Reference

Data Fields
tls_btgatt_db_element_t Struct Reference

Data Fields

uint16_t | id
tls_bt_uuid_t | uuid
tls_bt_gatt_db_attribute_type_t | type
uint16_t | attribute_handle
uint16_t | start_handle
uint16_t | end_handle
uint8_t | properties


W800 SDK APIs: tls_bthf_audio_payload_msg_t Struct Reference

Data Fields
tls_bthf_audio_payload_msg_t Struct Reference

Data Fields

tls_bt_addr_t * | bd_addr
uint8_t | audio_format
uint8_t * | payload
uint16_t | payload_length


W800 SDK APIs: tls_bthf_client_audio_state_msg_t Struct Reference

Data Fields
tls_bthf_client_audio_state_msg_t Struct Reference

Data Fields

tls_bthf_client_audio_state_t | state
tls_bt_addr_t * | bd_addr


W800 SDK APIs: tls_bthf_client_battery_level_msg_t Struct Reference

Data Fields
tls_bthf_client_battery_level_msg_t Struct Reference

Data Fields

int battery_level


W800 SDK APIs: tls_bthf_client_call_msg_t Struct Reference

Data Fields
tls_bthf_client_call_msg_t Struct Reference

Data Fields

tls_bthf_client_call_t call


W800 SDK APIs: tls_bthf_client_call_waiting_msg_t Struct Reference

Data Fields
tls_bthf_client_call_waiting_msg_t Struct Reference

Data Fields

char * number


W800 SDK APIs: tls_bthf_client_callheld_msg_t Struct Reference

Data Fields
tls_bthf_client_callheld_msg_t Struct Reference

Data Fields

tls_bthf_client_callheld_t callheld


W800 SDK APIs: tls_bthf_client_callsetup_msg_t Struct Reference

Data Fields
tls_bthf_client_callsetup_msg_t Struct Reference

Data Fields

tls_bthf_client_callsetup_t callsetup


W800 SDK APIs: tls_bthf_client_clip_msg_t Struct Reference

Data Fields
tls_bthf_client_clip_msg_t Struct Reference

Data Fields

char * number


W800 SDK APIs: tls_bthf_client_cmd_complete_msg_t Struct Reference

Data Fields
tls_bthf_client_cmd_complete_msg_t Struct Reference

Data Fields

tls_bthf_client_cmd_complete_t | type
int | cme


W800 SDK APIs: tls_bthf_client_connection_state_msg_t Struct Reference

Data Fields
tls_bthf_client_connection_state_msg_t Struct Reference

Data Fields

tls_bthf_client_connection_state_t | state
unsigned int | peer_feat
unsigned int | chld_feat
tls_bt_addr_t * | bd_addr


W800 SDK APIs: tls_bthf_client_current_calls_msg_t Struct Reference

Data Fields
tls_bthf_client_current_calls_msg_t Struct Reference

Data Fields

int | index
tls_bthf_client_call_direction_t | dir
tls_bthf_client_call_state_t | state
tls_bthf_client_call_mpty_type_t | mpty
char * | number


W800 SDK APIs: tls_bthf_client_current_operator_msg_t Struct Reference

Data Fields
tls_bthf_client_current_operator_msg_t Struct Reference

Data Fields

char * name


W800 SDK APIs: tls_bthf_client_in_band_ring_tone_msg_t Struct Reference

Data Fields
tls_bthf_client_in_band_ring_tone_msg_t Struct Reference

Data Fields

tls_bthf_client_in_band_ring_state_t state


W800 SDK APIs: tls_bthf_client_last_voice_tag_number_msg_t Struct Reference

Data Fields
tls_bthf_client_last_voice_tag_number_msg_t Struct Reference

Data Fields

char * number


W800 SDK APIs: tls_bthf_client_msg_t Union Reference

Data Fields
tls_bthf_client_msg_t Union Reference

Data Fields

tls_bthf_client_connection_state_msg_t | connection_state_msg
tls_bthf_client_audio_state_msg_t | audio_state_msg
tls_bthf_client_vr_cmd_msg_t | vr_cmd_msg
tls_bthf_client_network_state_msg_t | network_state_msg
tls_bthf_client_network_roaming_msg_t | network_roaming_msg
tls_bthf_client_network_signal_msg_t | network_signal_msg
tls_bthf_client_battery_level_msg_t | battery_level_msg
tls_bthf_client_current_operator_msg_t | current_operator_msg
tls_bthf_client_call_msg_t | call_msg
tls_bthf_client_callsetup_msg_t | callsetup_msg
tls_bthf_client_callheld_msg_t | callheld_msg
tls_bthf_client_resp_and_hold_msg_t | resp_and_hold_msg
tls_bthf_client_clip_msg_t | clip_msg
tls_bthf_client_call_waiting_msg_t | call_waiting_msg
tls_bthf_client_current_calls_msg_t | current_calls_msg
tls_bthf_client_volume_change_msg_t | volume_change_msg
tls_bthf_client_cmd_complete_msg_t | cmd_complete_msg
tls_bthf_client_subscriber_info_msg_t | subscriber_info_msg
tls_bthf_client_in_band_ring_tone_msg_t | in_band_ring_tone_msg
tls_bthf_client_last_voice_tag_number_msg_t | last_voice_tag_number_msg
tls_bthf_client_ring_indication_msg_t | ring_indication_msg
tls_bthf_audio_payload_msg_t | audio_payload_msg


W800 SDK APIs: tls_bthf_client_network_roaming_msg_t Struct Reference

Data Fields
tls_bthf_client_network_roaming_msg_t Struct Reference

Data Fields

tls_bthf_client_service_type_t type


W800 SDK APIs: tls_bthf_client_network_signal_msg_t Struct Reference

Data Fields
tls_bthf_client_network_signal_msg_t Struct Reference

Data Fields

int signal_strength


W800 SDK APIs: tls_bthf_client_network_state_msg_t Struct Reference

Data Fields
tls_bthf_client_network_state_msg_t Struct Reference

Data Fields

tls_bthf_client_network_state_t state


W800 SDK APIs: tls_bthf_client_resp_and_hold_msg_t Struct Reference

Data Fields
tls_bthf_client_resp_and_hold_msg_t Struct Reference

Data Fields

tls_bthf_client_resp_and_hold_t resp_and_hold


W800 SDK APIs: tls_bthf_client_ring_indication_msg_t Struct Reference

Data Fields
tls_bthf_client_ring_indication_msg_t Struct Reference

Data Fields

int ring


W800 SDK APIs: tls_bthf_client_subscriber_info_msg_t Struct Reference

Data Fields
tls_bthf_client_subscriber_info_msg_t Struct Reference

Data Fields

const char * | name
tls_bthf_client_subscriber_service_type_t | type


W800 SDK APIs: tls_bthf_client_volume_change_msg_t Struct Reference

Data Fields
tls_bthf_client_volume_change_msg_t Struct Reference

Data Fields

tls_bthf_client_volume_type_t | type
int | volume


W800 SDK APIs: tls_bthf_client_vr_cmd_msg_t Struct Reference

Data Fields
tls_bthf_client_vr_cmd_msg_t Struct Reference

Data Fields

tls_bthf_client_vr_state_t state


W800 SDK APIs: tls_btrc_connection_state_msg_t Struct Reference

Data Fields
tls_btrc_connection_state_msg_t Struct Reference

Data Fields

uint8_t | state
tls_bt_addr_t * | bd_addr


W800 SDK APIs: tls_btrc_ctrl_getrcfeatures_msg_t Struct Reference

Data Fields
tls_btrc_ctrl_getrcfeatures_msg_t Struct Reference

Data Fields

tls_bt_addr_t * | bd_addr
int | features


W800 SDK APIs: tls_btrc_ctrl_msg_t Union Reference

Data Fields
tls_btrc_ctrl_msg_t Union Reference

Data Fields

tls_btrc_passthrough_rsp_msg_t | passthrough_rsp
tls_btrc_groupnavigation_rsp_msg_t | groupnavigation_rsp
tls_btrc_connection_state_msg_t | connection_state
tls_btrc_ctrl_getrcfeatures_msg_t | getrcfeatures
tls_btrc_ctrl_setabsvol_msg_t | setabsvol
tls_btrc_ctrl_registernotification_abs_vol_msg_t | registernotification_abs_vol
tls_btrc_ctrl_setplayerapplicationsetting_rsp_msg_t | setplayerapplicationsetting_rsp
tls_btrc_ctrl_playerapplicationsetting_msg_t | playerapplicationsetting
tls_btrc_ctrl_playerapplicationsetting_changed_msg_t | playerapplicationsetting_changed
tls_btrc_ctrl_track_changed_msg_t | track_changed
tls_btrc_ctrl_play_position_changed_msg_t | play_position_changed
tls_btrc_ctrl_play_status_changed_msg_t | play_status_changed


W800 SDK APIs: tls_btrc_ctrl_play_position_changed_msg_t Struct Reference

Data Fields
tls_btrc_ctrl_play_position_changed_msg_t Struct Reference

Data Fields

tls_bt_addr_t * | bd_addr
uint32_t | song_len
uint32_t | song_pos


W800 SDK APIs: tls_btrc_ctrl_play_status_changed_msg_t Struct Reference

Data Fields
tls_btrc_ctrl_play_status_changed_msg_t Struct Reference

Data Fields

tls_bt_addr_t * | bd_addr
tls_btrc_play_status_t | play_status


W800 SDK APIs: tls_btrc_ctrl_playerapplicationsetting_changed_msg_t Struct Reference

Data Fields
tls_btrc_ctrl_playerapplicationsetting_changed_msg_t Struct Reference

Data Fields

tls_bt_addr_t * | bd_addr
tls_btrc_player_settings_t * | p_vals


W800 SDK APIs: tls_btrc_ctrl_playerapplicationsetting_msg_t Struct Reference

Data Fields
tls_btrc_ctrl_playerapplicationsetting_msg_t Struct Reference

Data Fields

tls_bt_addr_t * | bd_addr
uint8_t | num_attr
tls_btrc_player_app_attr_t * | app_attrs
uint8_t | num_ext_attr
tls_btrc_player_app_ext_attr_t * | ext_attrs


W800 SDK APIs: tls_btrc_ctrl_registernotification_abs_vol_msg_t Struct Reference

Data Fields
tls_btrc_ctrl_registernotification_abs_vol_msg_t Struct Reference

Data Fields

tls_bt_addr_t * | bd_addr
uint8_t | label


W800 SDK APIs: tls_btrc_ctrl_setabsvol_msg_t Struct Reference

Data Fields
tls_btrc_ctrl_setabsvol_msg_t Struct Reference

Data Fields

tls_bt_addr_t * | bd_addr
uint8_t | abs_vol
uint8_t | label


W800 SDK APIs: tls_btrc_ctrl_setplayerapplicationsetting_rsp_msg_t Struct Reference

Data Fields
tls_btrc_ctrl_setplayerapplicationsetting_rsp_msg_t Struct Reference

Data Fields

tls_bt_addr_t * | bd_addr
uint8_t | accepted


W800 SDK APIs: tls_btrc_ctrl_track_changed_msg_t Struct Reference

Data Fields
tls_btrc_ctrl_track_changed_msg_t Struct Reference

Data Fields

tls_bt_addr_t * | bd_addr
uint8_t | num_attr
tls_btrc_element_attr_val_t * | p_attrs


W800 SDK APIs: tls_btrc_element_attr_val_t Struct Reference

Data Fields
tls_btrc_element_attr_val_t Struct Reference

Data Fields

uint32_t | attr_id
uint8_t | text [WM_BTRC_MAX_ATTR_STR_LEN]


W800 SDK APIs: tls_btrc_get_element_attr_msg_t Struct Reference

Data Fields
tls_btrc_get_element_attr_msg_t Struct Reference

Data Fields

uint8_t | num_attr
tls_btrc_media_attr_t * | p_attrs


W800 SDK APIs: tls_btrc_get_play_status_msg_t Struct Reference

Data Fields
tls_btrc_get_play_status_msg_t Struct Reference

Data Fields

void * reserved


W800 SDK APIs: tls_btrc_get_player_app_attrs_text_msg_t Struct Reference

Data Fields
tls_btrc_get_player_app_attrs_text_msg_t Struct Reference

Data Fields

uint8_t | attr_id
uint8_t | num_val
uint8_t * | p_vals


W800 SDK APIs: tls_btrc_get_player_app_value_msg_t Struct Reference

Data Fields
tls_btrc_get_player_app_value_msg_t Struct Reference

Data Fields

uint8_t | num_attr
tls_btrc_player_attr_t * | p_attrs


W800 SDK APIs: tls_btrc_get_player_app_values_text_msg_t Struct Reference

Data Fields
tls_btrc_get_player_app_values_text_msg_t Struct Reference

Data Fields

uint8_t | num_attr
tls_btrc_player_attr_t * | p_attrs


W800 SDK APIs: tls_btrc_groupnavigation_rsp_msg_t Struct Reference

Data Fields
tls_btrc_groupnavigation_rsp_msg_t Struct Reference

Data Fields

int | id
int | key_state


W800 SDK APIs: tls_btrc_list_player_app_attr_msg_t Struct Reference

Data Fields
tls_btrc_list_player_app_attr_msg_t Struct Reference

Data Fields

void * reserved


W800 SDK APIs: tls_btrc_list_player_app_values_msg_t Struct Reference

Data Fields
tls_btrc_list_player_app_values_msg_t Struct Reference

Data Fields

tls_btrc_player_attr_t attr_id


W800 SDK APIs: tls_btrc_msg_t Union Reference

Data Fields
tls_btrc_msg_t Union Reference

Data Fields

tls_btrc_remote_features_msg_t | remote_features
tls_btrc_get_play_status_msg_t | get_play_status
tls_btrc_list_player_app_attr_msg_t | list_player_app_attr
tls_btrc_list_player_app_values_msg_t | list_player_app_values
tls_btrc_get_player_app_value_msg_t | get_player_app_value
tls_btrc_get_player_app_attrs_text_msg_t | get_player_app_attrs_text
tls_btrc_get_player_app_values_text_msg_t | get_player_app_values_text
tls_btrc_set_player_app_value_msg_t | set_player_app_value
tls_btrc_get_element_attr_msg_t | get_element_attr
tls_btrc_register_notification_msg_t | register_notification
tls_btrc_volume_change_msg_t | volume_change
tls_btrc_passthrough_cmd_msg_t | passthrough_cmd


W800 SDK APIs: tls_btrc_passthrough_cmd_msg_t Struct Reference

Data Fields
tls_btrc_passthrough_cmd_msg_t Struct Reference

Data Fields

int | id
int | key_state


W800 SDK APIs: tls_btrc_passthrough_rsp_msg_t Struct Reference

Data Fields
tls_btrc_passthrough_rsp_msg_t Struct Reference

Data Fields

int | id
int | key_state


W800 SDK APIs: tls_btrc_player_app_attr_t Struct Reference

Data Fields
tls_btrc_player_app_attr_t Struct Reference

Data Fields

uint8_t | attr_id
uint8_t | num_val
uint8_t | attr_val [WM_BTRC_MAX_APP_ATTR_SIZE]


W800 SDK APIs: tls_btrc_player_app_ext_attr_t Struct Reference

Data Fields
tls_btrc_player_app_ext_attr_t Struct Reference

Data Fields

uint8_t | attr_id
uint16_t | charset_id
uint16_t | str_len
uint8_t * | p_str
uint8_t | num_val
tls_btrc_player_app_ext_attr_val_t | ext_attr_val [WM_BTRC_MAX_APP_ATTR_SIZE]


W800 SDK APIs: tls_btrc_player_app_ext_attr_val_t Struct Reference

Data Fields
tls_btrc_player_app_ext_attr_val_t Struct Reference

Data Fields

uint8_t | val
uint16_t | charset_id
uint16_t | str_len
uint8_t * | p_str


W800 SDK APIs: tls_btrc_player_settings_t Struct Reference

Data Fields
tls_btrc_player_settings_t Struct Reference

Data Fields

uint8_t | num_attr
uint8_t | attr_ids [WM_BTRC_MAX_APP_SETTINGS]
uint8_t | attr_values [WM_BTRC_MAX_APP_SETTINGS]


W800 SDK APIs: tls_btrc_register_notification_msg_t Struct Reference

Data Fields
tls_btrc_register_notification_msg_t Struct Reference

Data Fields

tls_btrc_event_id_t | event_id
uint32_t | param


W800 SDK APIs: tls_btrc_register_notification_t Union Reference

Data Fields
tls_btrc_register_notification_t Union Reference

Data Fields

tls_btrc_play_status_t | play_status
tls_btrc_uid_t | track
uint32_t | song_pos
tls_btrc_player_settings_t | player_setting


W800 SDK APIs: tls_btrc_remote_features_msg_t Struct Reference

Data Fields
tls_btrc_remote_features_msg_t Struct Reference

Data Fields

tls_bt_addr_t * | bd_addr
tls_btrc_remote_features_t | features


W800 SDK APIs: tls_btrc_set_player_app_value_msg_t Struct Reference

Data Fields
tls_btrc_set_player_app_value_msg_t Struct Reference

Data Fields

tls_btrc_player_settings_t * p_vals


W800 SDK APIs: tls_btrc_volume_change_msg_t Struct Reference

Data Fields
tls_btrc_volume_change_msg_t Struct Reference

Data Fields

uint8_t | volume
uint8_t | ctype


W800 SDK APIs: tls_curr_bss_t Struct Reference

Data Fields
tls_curr_bss_t Struct Reference

#include <wm_wifi.h>

Data Fields

u8 | bssid [ETH_ALEN]
u8 | ssid [32]
u8 | ssid_len
u8 | channel
u8 | type
u8 | encryptype
u8 | rssi

Detailed Description

current bss information

Field Documentation

◆ bssid

u8 bssid[ETH_ALEN]

BSSID of connected AP

◆ channel

u8 channel

channel of connected AP

◆ encryptype

u8 encryptype

BSS's encryption type of connected AP, value is: IEEE80211_ENCRYT_NONE, IEEE80211_ENCRYT_WEP40, IEEE80211_ENCRYT_WEP104, IEEE80211_ENCRYT_TKIP_WPA, IEEE80211_ENCRYT_CCMP_WPA, IEEE80211_ENCRYT_TKIP_WPA2, IEEE80211_ENCRYT_CCMP_WPA2, IEEE80211_ENCRYT_AUTO_WPA, IEEE80211_ENCRYT_AUTO_WPA2

◆ rssi

u8 rssi

single strength of AP

◆ ssid

u8 ssid[32]

SSID of connected AP

◆ ssid_len

u8 ssid_len

SSID length of connected AP

◆ type

u8 type

BSS's type of connected AP, value is: IEEE80211_MODE_INFRA, IEEE80211_MODE_IBSS, IEEE80211_MODE_AP, IEEE80211_MODE_APSTA


W800 SDK APIs: tls_dma_descriptor Struct Reference

Data Fields
tls_dma_descriptor Struct Reference

Data Fields

unsigned int | valid
unsigned int | dma_ctrl
unsigned int | src_addr
unsigned int | dest_addr
struct tls_dma_descriptor * | next

Field Documentation

◆ next

struct tls_dma_descriptor* next

next dms descriptor


W800 SDK APIs: tls_ethif Struct Reference

Data Fields
tls_ethif Struct Reference

Data Fields

ip_addr_t | ip_addr
ip_addr_t | netmask
ip_addr_t | gw
ip_addr_t | dns1
ip_addr_t | dns2
u8 | status


W800 SDK APIs: tls_fls Struct Reference

Data Fields
tls_fls Struct Reference

Data Fields

struct fls_list | fls_drvs
struct tls_fls_drv * | current_drv
tls_os_sem_t * | fls_lock


W800 SDK APIs: tls_fls_drv Struct Reference

Data Fields
tls_fls_drv Struct Reference

Data Fields

struct fls_list | drv_list
u32 | id
u32 | total_size
u32 | page_size
u32 | program_size
u32 | sector_size
u32 | clock
u8 | mode
u8 | cs_active
u8 | flags
int(* | read )(u32, u8 *, u32)
int(* | fast_read )(u32, u8 *, u32)
int(* | page_write )(u32, u8 *)
int(* | erase )(u32)
int(* | chip_erase )(void)
int(* | probe )(u32 id)
void(* | remove )(void)


W800 SDK APIs: tls_fwup Struct Reference

Data Fields
tls_fwup Struct Reference

#include <wm_fwup.h>

Data Fields

struct dl_list | wait_list
tls_os_sem_t * | list_lock
bool | busy
enum tls_fwup_image_src | current_image_src
u16 | current_state
u32 | current_session_id
u32 | received_len
u32 | total_len
u32 | updated_len
u32 | program_base
u32 | program_offset
s32 | received_number

Detailed Description

Structure for firmware update


W800 SDK APIs: tls_fwup_block Struct Reference

Data Fields
tls_fwup_block Struct Reference

#include <wm_fwup.h>

Data Fields

u16 | number
u16 | sum
u8 | data [TLS_FWUP_BLK_SIZE]
u32 | crc32
u8 | pad [8]

Detailed Description

Structure for one packet data


W800 SDK APIs: tls_fwup_image_hdr Struct Reference

Data Fields
tls_fwup_image_hdr Struct Reference

#include <wm_fwup.h>

Data Fields

u32 | magic
u8 | crc8
u8 | dest_specific
u16 | dest_offset
u32 | file_len
char | time [4]

Detailed Description

Structure for firmware image header


W800 SDK APIs: tls_fwup_request Struct Reference

Data Fields
tls_fwup_request Struct Reference

#include <wm_fwup.h>

Data Fields

struct dl_list | list
u8 * | data
u32 | data_len
int | status
void(* | complete )(struct tls_fwup_request *request, void *arg)
void * | arg

Detailed Description

Structure for firmware update request


W800 SDK APIs: tls_hspi_rx_desc Struct Reference

Data Fields
tls_hspi_rx_desc Struct Reference

#include <wm_hspi.h>

Data Fields

u32 | valid_ctrl
u32 | buf_addr
u32 | next_desc_addr

Detailed Description

Definition of receive data descriptor structure


W800 SDK APIs: tls_hspi_tx_desc Struct Reference

Data Fields
tls_hspi_tx_desc Struct Reference

#include <wm_hspi.h>

Data Fields

volatile u32 | valid_ctrl
u32 | buf_info
u32 | buf_addr [3]
u32 | next_desc_addr

Detailed Description

Definition of send data descriptor structure


W800 SDK APIs: tls_ibss_info_t Struct Reference

Data Fields
tls_ibss_info_t Struct Reference

#include <wm_wifi.h>

Data Fields

u8 | ssid [33]
u8 | encrypt
u8 | channel
struct tls_key_info_t | keyinfo

Detailed Description

Wi-Fi configuration of ibss

Field Documentation

◆ channel

u8 channel

channel of ibss

◆ encrypt

u8 encrypt

encryption mode of ibss, value is: IEEE80211_ENCRYT_NONE, IEEE80211_ENCRYT_WEP40, IEEE80211_ENCRYT_WEP104, IEEE80211_ENCRYT_TKIP_WPA, IEEE80211_ENCRYT_CCMP_WPA, IEEE80211_ENCRYT_TKIP_WPA2, IEEE80211_ENCRYT_CCMP_WPA2, IEEE80211_ENCRYT_AUTO_WPA, IEEE80211_ENCRYT_AUTO_WPA2

◆ keyinfo

struct tls_key_info_t keyinfo

Password (key) of ibss

◆ ssid

u8 ssid[33]

SSID of ibss


W800 SDK APIs: tls_ibssip_info_t Struct Reference

Data Fields
tls_ibssip_info_t Struct Reference

#include <wm_wifi.h>

Data Fields

u8 | ip [4]
u8 | netmask [4]
u8 | gateway [4]
u8 | dns1 [4]
u8 | dns2 [4]

Detailed Description

ip address information of ibss

Field Documentation

◆ dns1

u8 dns1[4]

DNS1 IP address

◆ dns2

u8 dns2[4]

DNS2 IP address

◆ gateway

u8 gateway[4]

gateway

◆ ip

u8 ip[4]

IP address

◆ netmask

u8 netmask[4]

netmask


W800 SDK APIs: tls_inside_fls Struct Reference

Data Fields
tls_inside_fls Struct Reference

Data Fields

tls_os_sem_t * | fls_lock
unsigned char | flashid
unsigned int | density
FLASH_OTP_WR_PARAM_ST | OTPWRParam


W800 SDK APIs: tls_ip_info_t Struct Reference

Data Fields
tls_ip_info_t Struct Reference

#include <wm_wifi.h>

Data Fields

u8 | ip_addr [4]
u8 | netmask [4]
u8 | dnsname [32]

Detailed Description

ip address information

Field Documentation

◆ dnsname

u8 dnsname[32]

DNS server name

◆ ip_addr

u8 ip_addr[4]

IP address

◆ netmask

u8 netmask[4]

netmask


W800 SDK APIs: tls_irq_handler Struct Reference

Data Fields
tls_irq_handler Struct Reference

Data Fields

void(* | handler )(void *)
void * | data
u32 | counter


W800 SDK APIs: tls_key_info_t Struct Reference

Data Fields
tls_key_info_t Struct Reference

#include <wm_wifi.h>

Data Fields

u8 | format
u8 | index
u8 | key_len
u8 | key [64]

Detailed Description

secret key information

Field Documentation

◆ format

u8 format

key format, value is: 0-hex, 1-ascii

◆ index

u8 index

key index, value is: 1-4 (only wep)

◆ key

u8 key[64]

key content

◆ key_len

u8 key_len

key length


W800 SDK APIs: tls_lcd_options Struct Reference

Data Fields
tls_lcd_options Struct Reference

Data Fields

bool | enable
LCD_BiasDef bias
LCD_DutyDef duty
LCD_VlcdDef vlcd
uint8_t | com_number
uint16_t | fresh_rate

Field Documentation

◆ bias

LCD_BiasDef bias

Bias configuration

◆ com_number

uint8_t com_number

com number

◆ duty

LCD_DutyDef duty

Duty configuration

◆ fresh_rate

uint16_t fresh_rate

Fresh rate configuration

◆ vlcd

LCD_VlcdDef vlcd

Vlcd configuration


W800 SDK APIs: tls_mesh_msg_t Union Reference

Data Fields
tls_mesh_msg_t Union Reference

Data Fields

tls_mesh_unprov_msg_t | unprov_msg
tls_mesh_node_added_msg_t | node_added_msg
tls_mesh_oob_output_str_msg_t | oob_output_string_msg
tls_mesh_oob_output_number_msg_t | oob_output_number_msg
tls_mesh_prov_complete_msg_t | prov_cmplt_msg
tls_mesh_oob_input_msg_t | oob_input_msg
tls_mesh_prov_end_msg_t | prov_end_msg


W800 SDK APIs: tls_mesh_node_added_msg_t Struct Reference

Data Fields
tls_mesh_node_added_msg_t Struct Reference

Data Fields

uint16_t | net_idx
uint16_t | addr
uint8_t | num_elem


W800 SDK APIs: tls_mesh_oob_input_msg_t Struct Reference

Data Fields
tls_mesh_oob_input_msg_t Struct Reference

Data Fields

uint32_t act


W800 SDK APIs: tls_mesh_oob_output_number_msg_t Struct Reference

Data Fields
tls_mesh_oob_output_number_msg_t Struct Reference

Data Fields

uint32_t number


W800 SDK APIs: tls_mesh_oob_output_str_msg_t Struct Reference

Data Fields
tls_mesh_oob_output_str_msg_t Struct Reference

Data Fields

char * str


W800 SDK APIs: tls_mesh_primary_cfg_t Struct Reference

Data Fields
tls_mesh_primary_cfg_t Struct Reference

Data Fields

uint8_t | net_transmit_count
uint8_t | net_transmit_intvl
uint8_t | relay
uint8_t | relay_retransmit_count
uint8_t | relay_retransmit_intvl
uint8_t | beacon
uint8_t | gatt_proxy
uint8_t | frnd
uint8_t | default_ttl


W800 SDK APIs: tls_mesh_prov_complete_msg_t Struct Reference

Data Fields
tls_mesh_prov_complete_msg_t Struct Reference

Data Fields

uint16_t | net_idx
uint16_t | addr


W800 SDK APIs: tls_mesh_prov_end_msg_t Struct Reference

Data Fields
tls_mesh_prov_end_msg_t Struct Reference

Data Fields

bool | success
uint16_t | net_idx
uint16_t | addr
uint8_t | num_elem


W800 SDK APIs: tls_mesh_unprov_msg_t Struct Reference

Data Fields
tls_mesh_unprov_msg_t Struct Reference

Data Fields

uint8_t | addr [6]
uint8_t | addr_type
uint8_t | uuid [16]
uint32_t | oob_info
uint32_t | uri_hash


W800 SDK APIs: tls_param_bgr Struct Reference

Data Fields
tls_param_bgr Struct Reference

#include <wm_params.h>

Data Fields

u8 | bg
u8 | max_rate
u8 | res [2]

Detailed Description

Structure of 802.11 bgn rate parameter


W800 SDK APIs: tls_param_bssid Struct Reference

Data Fields
tls_param_bssid Struct Reference

#include <wm_params.h>

Data Fields

u8 | bssid_enable
u8 | res
u8 | bssid [6]

Detailed Description

Structure of specified BSSID parameter


W800 SDK APIs: tls_param_hardware_version Struct Reference

Data Fields
tls_param_hardware_version Struct Reference

#include <wm_params.h>

Data Fields

u8 | mark
u8 | main
u8 | sub
u8 | material
u8 | year
u8 | week
u8 | res [2]

Detailed Description

Structure of hardware parameter


W800 SDK APIs: tls_param_ip Struct Reference

Data Fields
tls_param_ip Struct Reference

#include <wm_params.h>

Data Fields

u8 | dhcp_enable
u8 | res [3]
u8 | ip [4]
u8 | netmask [4]
u8 | gateway [4]
u8 | dns1 [4]
u8 | dns2 [4]

Detailed Description

Structure of IP parameter


W800 SDK APIs: tls_param_key Struct Reference

Data Fields
tls_param_key Struct Reference

#include <wm_params.h>

Data Fields

u8 | psk [64]
u8 | key_length
u8 | key_index
u8 | key_format
u8 | res

Detailed Description

Structure of KEY parameter


W800 SDK APIs: tls_param_oray_client Struct Reference

Data Fields
tls_param_oray_client Struct Reference

#include <wm_params.h>

Data Fields

u32 | oray_client_enable
u8 | oray_client_user [32]
u8 | oray_client_pass [32]

Detailed Description

Structure of oray client


W800 SDK APIs: tls_param_original_key Struct Reference

Data Fields
tls_param_original_key Struct Reference

#include <wm_params.h>

Data Fields

u8 | psk [64]
u32 | key_length

Detailed Description

Structure of original KEY parameter


W800 SDK APIs: tls_param_sha1 Struct Reference

Data Fields
tls_param_sha1 Struct Reference

#include <wm_params.h>

Data Fields

u8 | psk_set
u8 | psk [32]

Detailed Description

Structure of SHA1 KEY parameter


W800 SDK APIs: tls_param_socket Struct Reference

Data Fields
tls_param_socket Struct Reference

#include <wm_params.h>

Data Fields

u8 | protocol
u8 | client_or_server
u16 | port_num
u8 | host [32]

Detailed Description

Structure of socket parameter


W800 SDK APIs: tls_param_ssid Struct Reference

Data Fields
tls_param_ssid Struct Reference

#include <wm_params.h>

Data Fields

u8 | ssid [32]
u32 | ssid_len

Detailed Description

Structure of SSID parameter


W800 SDK APIs: tls_param_tem_offset Struct Reference

Data Fields
tls_param_tem_offset Struct Reference

#include <wm_params.h>

Data Fields

u8 | offset_len
s32 | offset

Detailed Description

Structure of TEM parameter


W800 SDK APIs: tls_param_uart Struct Reference

Data Fields
tls_param_uart Struct Reference

#include <wm_params.h>

Data Fields

u32 | baudrate
u8 | stop_bits
u8 | parity
u8 | flow
u8 | charsize

Detailed Description

Structure of uart parameter


W800 SDK APIs: tls_param_wps Struct Reference

Data Fields
tls_param_wps Struct Reference

Data Fields

u8 | wps_enable
u8 | mode
u8 | flag
u8 | res
u8 | pin [8]


W800 SDK APIs: tls_scan_bss_format2_t Struct Reference

Data Fields
tls_scan_bss_format2_t Struct Reference

#include <wm_wifi.h>

Data Fields

u32 | count
u32 | length
struct tls_bss_info_format2_t | bss [1]

Detailed Description

format2 scan result

Field Documentation

◆ bss

struct tls_bss_info_format2_t bss[1]

list of bss found

◆ count

u32 count

total count

◆ length

u32 length

bss info total length


W800 SDK APIs: tls_scan_bss_t Struct Reference

Data Fields
tls_scan_bss_t Struct Reference

#include <wm_wifi.h>

Data Fields

u32 | count
u32 | length
struct tls_bss_info_t | bss [1]

Detailed Description

scan result

Field Documentation

◆ bss

struct tls_bss_info_t bss[1]

list of bss found

◆ count

u32 count

total count

◆ length

u32 length

bss info total length


W800 SDK APIs: tls_skt_status_ext_t Struct Reference

Data Fields
tls_skt_status_ext_t Struct Reference

Data Fields

u8 | socket
u8 | status
enum tls_socket_protocol | protocol
u8 | host_ipaddr [4]
u16 | remote_port
u16 | local_port


W800 SDK APIs: tls_skt_status_t Struct Reference

Data Fields
tls_skt_status_t Struct Reference

Data Fields

u32 | socket_cnt
struct tls_skt_status_ext_t | skts_ext [1]


W800 SDK APIs: tls_slave_hspi Struct Reference

Data Fields
tls_slave_hspi Struct Reference

#include <wm_hspi.h>

Data Fields

u8 | ifusermode
s16(* | rx_cmd_callback )(char *buf)
s16(* | rx_data_callback )(char *buf)
s16(* | tx_data_callback )(char *buf)
struct tls_hspi_tx_desc * | curr_tx_desc
struct tls_hspi_rx_desc * | curr_rx_desc

Detailed Description

struct tls_slave_hspi

Field Documentation

◆ curr_rx_desc

struct tls_hspi_rx_desc* curr_rx_desc

Downlink data management

◆ curr_tx_desc

struct tls_hspi_tx_desc* curr_tx_desc

Upstream data management


W800 SDK APIs: tls_socket_desc Struct Reference

Data Fields
tls_socket_desc Struct Reference

Data Fields

enum tls_socket_cs_mode | cs_mode
enum tls_socket_protocol | protocol
ip_addr_t | ip_addr
u16 | port
u16 | localport
char | host_name [32]
u8 | host_len
u32 | timeout
socket_err_fn | errf
socket_recv_fn | recvf
socket_connected_fn | connf
socket_poll_fn | pollf
socket_accept_fn | acceptf
socket_state_changed_fn | state_changed
socket_recv_ip_rpt_fn | recvwithipf


W800 SDK APIs: tls_softap_info_t Struct Reference

Data Fields
tls_softap_info_t Struct Reference

#include <wm_wifi.h>

Data Fields

u8 | ssid [33]
u8 | encrypt
u8 | channel
struct tls_key_info_t | keyinfo

Detailed Description

Wi-Fi configuration of softap

Field Documentation

◆ channel

u8 channel

channel of softap

◆ encrypt

u8 encrypt

encryption mode of softap, value is: IEEE80211_ENCRYT_NONE, IEEE80211_ENCRYT_WEP40, IEEE80211_ENCRYT_WEP104, IEEE80211_ENCRYT_TKIP_WPA, IEEE80211_ENCRYT_CCMP_WPA, IEEE80211_ENCRYT_TKIP_WPA2, IEEE80211_ENCRYT_CCMP_WPA2

◆ keyinfo

struct tls_key_info_t keyinfo

Password (key) of softap

◆ ssid

u8 ssid[33]

SSID of softap


W800 SDK APIs: tls_spi_message Struct Reference

Data Fields
tls_spi_message Struct Reference

#include <wm_hostspi.h>

Data Fields

struct dl_list | queue
struct dl_list | transfers
void(* | complete )(void *)
void * | context
u32 | status

Detailed Description

one multi-segment SPI transaction

A struct tls_spi_message is used to execute an atomic sequence of data transfers, each represented by a struct tls_spi_transfer. The sequence is "atomic" in the sense that no other spi_message may use that SPI bus until that sequence completes.

Field Documentation

◆ complete

void(* complete) (void *)

called to report transaction completions.

◆ context

void* context

the argument to complete() when it's called.

◆ queue

struct dl_list queue

transaction messages are sequenced through tls_spi_port.wait_queue.

◆ status

u32 status

transaction message status.

◆ transfers

struct dl_list transfers

list of transfer segments in this transaction.


W800 SDK APIs: tls_spi_port Struct Reference

Data Fields
tls_spi_port Struct Reference

#include <wm_hostspi.h>

Data Fields

u32 | speed_hz
u8 | cs_active
u8 | mode
u8 | reconfig
struct dl_list | wait_queue
tls_os_queue_t * | lock
tls_os_queue_t * msg_queue
struct tls_spi_message * | current_message
u32 | current_remaining_transfer
struct tls_spi_transfer * | current_transfer
u32 | current_remaining_bytes
u8 | transtype

Detailed Description

driver structure to SPI master controller

This data structure presents the SPI master controller's configuration data. The device attached to this SPI master controller share the same transfer mode, chipselect mode and clock rate. And this structure maintains a queue of tls_spi_message transactions and uses this tls_spi_message transaction to access to the SPI device. For each such message it queues, it calls the message's completion function when the transaction completes.

Field Documentation

◆ cs_active

u8 cs_active

chipselect mode, maybe active low or active high.

◆ current_message

struct tls_spi_message* current_message

current transaction message in-progressing.

◆ current_remaining_bytes

u32 current_remaining_bytes

remaining data length in current transfer segment.

◆ current_remaining_transfer

u32 current_remaining_transfer

remaining transfer segments count in current transaction message.

◆ current_transfer

struct tls_spi_transfer* current_transfer

current transfer segment in-progressing.

◆ mode

u8 mode

SPI transfer mode: mode_0(CPHA=0, CHOL=0), mode_1(CPHA=0, CHOL=1), mode_2(CPHA=1, CHOL=0), mode_3(CPHA=1, CHOL=1).

◆ msg_queue

tls_os_queue_t* msg_queue

notify the schedule thread that there's transaction message queued.

◆ speed_hz

u32 speed_hz

clock rate to be used.

◆ transtype

u8 transtype

transfer type

◆ wait_queue

struct dl_list wait_queue

wait list of transaction messages.


W800 SDK APIs: tls_spi_transfer Struct Reference

Data Fields
tls_spi_transfer Struct Reference

#include <wm_hostspi.h>

Data Fields

struct dl_list | transfer_list
const void * | tx_buf
void * | rx_buf
u32 | len
u32 | delay_usecs

Detailed Description

a read/write buffer pair

SPI transfers always write the same number of bytes as they read. If the transmit buffer is null, zeroes will be shifted out while filling rx_buf. If the receive buffer is null, the data shifted in will be discarded.

Field Documentation

◆ delay_usecs

u32 delay_usecs

microseconds to delay after this transfer.

◆ len

u32 len

size of rx and tx buffers (in bytes).

◆ rx_buf

void* rx_buf

data to be read, or NULL.

◆ transfer_list

struct dl_list transfer_list

transfers are sequenced through tls_spi_message.transfers.

◆ tx_buf

const void* tx_buf

data to be written, or NULL.


W800 SDK APIs: tls_spp_cli_init_msg_t Struct Reference

Data Fields
tls_spp_cli_init_msg_t Struct Reference

Data Fields

uint8_t | status
uint32_t | handle
uint8_t | sec_id
bool | use_co_rfc


W800 SDK APIs: tls_spp_close_msg_t Struct Reference

Data Fields
tls_spp_close_msg_t Struct Reference

Data Fields

uint8_t | status
uint32_t | port_status
uint32_t | handle
bool | local


W800 SDK APIs: tls_spp_cong_msg_t Struct Reference

Data Fields
tls_spp_cong_msg_t Struct Reference

Data Fields

uint8_t | status
uint32_t | handle
bool | congest


W800 SDK APIs: tls_spp_data_ind_msg_t Struct Reference

Data Fields
tls_spp_data_ind_msg_t Struct Reference

Data Fields

uint8_t | status
uint32_t | handle
uint16_t | length
uint8_t * | data


W800 SDK APIs: tls_spp_disc_comp_msg_t Struct Reference

Data Fields
tls_spp_disc_comp_msg_t Struct Reference

Data Fields

uint8_t | status
uint8_t | scn_num
uint8_t | scn [WM_SPP_MAX_SCN]


W800 SDK APIs: tls_spp_init_msg_t Struct Reference

Data Fields
tls_spp_init_msg_t Struct Reference

Data Fields

uint8_t status


W800 SDK APIs: tls_spp_msg_t Union Reference

Data Fields
tls_spp_msg_t Union Reference

Data Fields

tls_spp_init_msg_t | init_msg
tls_spp_disc_comp_msg_t | disc_comp_msg
tls_spp_open_msg_t | open_msg
tls_spp_srv_open_msg_t | srv_open_msg
tls_spp_close_msg_t | close_msg
tls_spp_start_msg_t | start_msg
tls_spp_cli_init_msg_t | cli_init_msg
tls_spp_write_msg_t | write_msg
tls_spp_data_ind_msg_t | data_ind_msg
tls_spp_cong_msg_t | congest_msg


W800 SDK APIs: tls_spp_open_msg_t Struct Reference

Data Fields
tls_spp_open_msg_t Struct Reference

Data Fields

uint8_t | status
uint32_t | handle
uint8_t | addr [6]


W800 SDK APIs: tls_spp_srv_open_msg_t Struct Reference

Data Fields
tls_spp_srv_open_msg_t Struct Reference

Data Fields

uint8_t | status
uint32_t | handle
uint32_t | new_listen_handle
uint8_t | addr [6]


W800 SDK APIs: tls_spp_start_msg_t Struct Reference

Data Fields
tls_spp_start_msg_t Struct Reference

Data Fields

uint8_t | status
uint32_t | handle
uint8_t | sec_id
bool | use_co_rfc


W800 SDK APIs: tls_spp_write_msg_t Struct Reference

Data Fields
tls_spp_write_msg_t Struct Reference

Data Fields

uint8_t | status
uint32_t | handle
int | length
bool | congest


W800 SDK APIs: tls_sta_info_t Struct Reference

Data Fields
tls_sta_info_t Struct Reference

#include <wm_wifi.h>

Data Fields

u8 mac_addr [ETH_ALEN]

Detailed Description

station information

Field Documentation

◆ mac_addr

u8 mac_addr[ETH_ALEN]

MAC address of station


W800 SDK APIs: tls_sys_clk Struct Reference

Data Fields
tls_sys_clk Struct Reference

Data Fields

u32 | apbclk
u32 | cpuclk
u32 | wlanclk


W800 SDK APIs: tls_timer_cfg Struct Reference

Data Fields
tls_timer_cfg Struct Reference

#include <wm_timer.h>

Data Fields

enum tls_timer_unit | unit
u32 | timeout
bool | is_repeat
tls_timer_irq_callback callback
void * | arg

Detailed Description

timer configuration

Field Documentation

◆ arg

void* arg

parameter fot the timeout callback function

◆ callback

tls_timer_irq_callback callback

timeout callback function

◆ is_repeat

bool is_repeat

cycle timer

◆ timeout

u32 timeout

timeout period

◆ unit

enum tls_timer_unit unit

timer accuracy


W800 SDK APIs: tls_uart_baud_rate Struct Reference

Data Fields
tls_uart_baud_rate Struct Reference

Data Fields

u32 | baud_rate
u16 | ubdiv
u16 | ubdiv_frac


W800 SDK APIs: tls_uart_circ_buf Struct Reference

Data Fields
tls_uart_circ_buf Struct Reference

Data Fields

volatile u8 * | buf
volatile u32 | head
volatile u32 | tail


W800 SDK APIs: tls_uart_icount Struct Reference

Data Fields
tls_uart_icount Struct Reference

Data Fields

u32 | cts
u32 | dsr
u32 | rng
u32 | dcd
u32 | rx
u32 | tx
u32 | frame
u32 | overrun
u32 | parity
u32 | brk
u32 | buf_overrun


W800 SDK APIs: tls_uart_options Struct Reference

Data Fields
tls_uart_options Struct Reference

Data Fields

u32 | baudrate
TLS_UART_CHSIZE_T | charlength
TLS_UART_PMODE_T | paritytype
TLS_UART_FLOW_CTRL_MODE_T | flow_ctrl
TLS_UART_STOPBITS_T | stopbits

Field Documentation

◆ baudrate

u32 baudrate

Set baud rate of the UART

◆ charlength

TLS_UART_CHSIZE_T charlength

Number of bits to transmit as a character (5 to 8).

◆ flow_ctrl

TLS_UART_FLOW_CTRL_MODE_T flow_ctrl

Flow control type

◆ paritytype

TLS_UART_PMODE_T paritytype

Parity type

◆ stopbits

TLS_UART_STOPBITS_T stopbits

Number of stop bits


W800 SDK APIs: tls_uart_port Struct Reference

Data Fields
tls_uart_port Struct Reference

Data Fields

u32 | uart_no
u32 | uart_irq_no
u32 | plus_char_cnt
TLS_UART_MODE_T | uart_mode
struct tls_uart_options | opts
int | fcStatus
enum TLS_UART_RX_FLOW_CTRL_FLAG | rxstatus
u32 | tx_fifofull
TLS_UART_REGS_T volatile * | regs
struct tls_uart_icount | icount
struct tls_uart_circ_buf | recv
struct dl_list | tx_msg_pending_list
struct dl_list | tx_msg_to_be_freed_list
u8 | hw_stopped
tls_os_sem_t * | tx_sem
char * | buf_ptr
u16 | buf_len
s16(* | rx_callback )(u16 len, void *priv_data)
s16(* | tx_callback )(struct tls_uart_port *port)
s16(* | tx_sent_callback )(struct tls_uart_port *port)
bool | tx_dma_on
bool | rx_dma_on
void * | priv_data

Field Documentation

◆ fcStatus

int fcStatus

flow ctrl status,0 closed ,1 opened

◆ icount

struct tls_uart_icount icount

uart statistics information

◆ opts

struct tls_uart_options opts

uart config parameters

◆ recv

struct tls_uart_circ_buf recv

uart ring buffer

◆ regs

TLS_UART_REGS_T volatile* regs

uart registers struct pointer

◆ tx_fifofull

u32 tx_fifofull

uart tx fifo trigger level

◆ uart_irq_no

u32 uart_irq_no

uart interrupt number

◆ uart_mode

TLS_UART_MODE_T uart_mode

uart work mode: interrupt mode or poll mode

◆ uart_no

u32 uart_no

uart number: 0 or 1


W800 SDK APIs: TLS_UART_REGS Struct Reference

Data Fields
TLS_UART_REGS Struct Reference

Data Fields

u32 | UR_LC
u32 | UR_FC
u32 | UR_DMAC
u32 | UR_FIFOC
u32 | UR_BD
u32 | UR_INTM
u32 | UR_INTS
u32 | UR_FIFOS
u32 | UR_TXW
u32 | UR_RES0
u32 | UR_RES1
u32 | UR_RES2
u32 | UR_RXW

Field Documentation

◆ UR_BD

u32 UR_BD

baud rate register

◆ UR_DMAC

u32 UR_DMAC

dma control register

◆ UR_FC

u32 UR_FC

flow control register

◆ UR_FIFOC

u32 UR_FIFOC

fifo control register

◆ UR_FIFOS

u32 UR_FIFOS

fifo status register

◆ UR_INTM

u32 UR_INTM

interrupt mask register

◆ UR_INTS

u32 UR_INTS

interrupt source register

◆ UR_LC

u32 UR_LC

line control register

◆ UR_RXW

u32 UR_RXW

rx windows register

◆ UR_TXW

u32 UR_TXW

tx windows register


W800 SDK APIs: tls_uart_tx_msg Struct Reference

Data Fields
tls_uart_tx_msg Struct Reference

Data Fields

struct dl_list | list
char * | buf
u16 | buflen
u16 | offset
void(* | finish_callback )(void *arg)
void * | callback_arg


W800 SDK APIs: tls_user_param Struct Reference

Data Fields
tls_user_param Struct Reference

#include <wm_params.h>

Data Fields

u8 | wireless_protocol
u8 | auto_mode
u8 | dhcp_enable
u8 | user_port_mode
u8 | ip [4]
u8 | netmask [4]
u8 | gateway [4]
u8 | dns [4]
u32 | baudrate
u8 | socket_protocol
u8 | socket_client_or_server
u16 | socket_port_num
u8 | socket_host [32]
u8 | auto_powersave
u8 | PassWord [6]

Detailed Description

Structure of user default parameter


W800 SDK APIs: tls_webs_cfg Struct Reference

Data Fields
tls_webs_cfg Struct Reference

#include <wm_params.h>

Data Fields

u8 | AutoRun
u8 | Reserved
u16 | PortNum

Detailed Description

Structure of web server parameter


W800 SDK APIs: tls_wifi_ext_t Struct Reference

Data Fields
tls_wifi_ext_t Struct Reference

#include <wm_wifi.h>

Data Fields

u8 | rssi
u8 | rx_rate

Detailed Description

802.11 packet information from the physical layer

Field Documentation

◆ rssi

u8 rssi

signal strength

◆ rx_rate

u8 rx_rate

Rx_rate


W800 SDK APIs: tls_wifi_hdr_mac_t Struct Reference

Data Fields
tls_wifi_hdr_mac_t Struct Reference

#include <wm_wifi.h>

Data Fields

u8 | da_addr [ETH_ALEN]
u8 | sa_addr [ETH_ALEN]
u8 | bssid [ETH_ALEN]

Detailed Description

802.11 mac address

Field Documentation

◆ bssid

u8 bssid[ETH_ALEN]

MAC address of AP

◆ da_addr

u8 da_addr[ETH_ALEN]

MAC address of destination

◆ sa_addr

u8 sa_addr[ETH_ALEN]

MAC address of source


W800 SDK APIs: tls_wifi_scan_param_t Struct Reference

Data Fields
tls_wifi_scan_param_t Struct Reference

#include <wm_wifi.h>

Data Fields

u16 | scan_type
u16 | scan_times
u16 | scan_chanlist
u16 | scan_chinterval

Detailed Description

scan param

Field Documentation

◆ scan_chanlist

u16 scan_chanlist

Scan channel list ,[0,3FFF],per bit is one channel,if zero or above 0x3FFF, scan all channel

◆ scan_chinterval

u16 scan_chinterval

Scan channel switch time,>=0, if zero, use default value, unit:ms

◆ scan_times

u16 scan_times

Scan times, >=0, if zero, only 1 times


W800 SDK APIs: tls_wifi_tx_rate_t Struct Reference

Data Fields
tls_wifi_tx_rate_t Struct Reference

#include <wm_wifi.h>

Data Fields

enum tls_wifi_tx_rate | tx_rate
u8 | tx_gain
u8 | retry_times

Detailed Description

transport rate and gain

Field Documentation

◆ retry_times

u8 retry_times

Wi-Fi number of retransmissions, ranging from 1 to 15.

◆ tx_gain

u8 tx_gain

Wi-Fi ransport gain, The caller can get the maximum gain by using the tls_wifi_get_tx_gain_max function.

◆ tx_rate

enum tls_wifi_tx_rate tx_rate

Wi-Fi ransport rate


W800 SDK APIs: wm_crypto_ctx Struct Reference

Data Fields
wm_crypto_ctx Struct Reference

Data Fields

volatile u8 | rsa_complete
volatile u8 | gpsec_complete
tls_os_sem_t * | gpsec_lock


W800 SDK APIs: wm_i2s_buf_s Struct Reference

Data Fields
wm_i2s_buf_s Struct Reference

Data Fields

volatile uint32_t * | txbuf
volatile uint32_t | txlen
volatile uint32_t | txtail
volatile uint32_t * | rxbuf
volatile uint32_t | rxlen
volatile uint32_t | int_txlen
volatile uint32_t | rxhead
volatile uint8_t | rxdata_ready
volatile uint8_t | txdata_done
void(* | rx_callback )(void)
void(* | tx_callback )(uint32_t *data, uint16_t *len)

Field Documentation

◆ rx_callback

void(* rx_callback) (void)

function pointer for data receiver

◆ tx_callback

void(* tx_callback) (uint32_t *data, uint16_t *len)

function pointer for data transmit


W800 SDK APIs: Data Structure Index

Data Structure Index
_ | a | b | c | d | f | h | i | l | o | p | s | t | w
_
IMAGE_HEADER_PARAM tls_ble_se_congest_msg_t tls_bthf_client_volume_change_msg_t tls_mesh_prov_end_msg_t
Img_Attr_Type tls_ble_se_connect_msg_t tls_bthf_client_vr_cmd_msg_t tls_mesh_unprov_msg_t
__attribute__
l
tls_ble_se_create_msg_t tls_btrc_connection_state_msg_t tls_param_bgr
_dma_handler_type tls_ble_se_exec_write_msg_t tls_btrc_ctrl_getrcfeatures_msg_t tls_param_bssid
_HTTP_CLIENT LCD_T tls_ble_se_mtu_msg_t tls_btrc_ctrl_msg_t tls_param_hardware_version
_HTTPParameters
o
tls_ble_se_read_msg_t tls_btrc_ctrl_play_position_changed_msg_t tls_param_ip
_ltpt_rx_info tls_ble_se_register_msg_t tls_btrc_ctrl_play_status_changed_msg_t tls_param_key
_ltpt_tx_info os_time tls_ble_se_response_msg_t tls_btrc_ctrl_playerapplicationsetting_changed_msg_t tls_param_oray_client
_pwm_init_param
p
tls_ble_se_start_msg_t tls_btrc_ctrl_playerapplicationsetting_msg_t tls_param_original_key
_wm_dma_desc tls_ble_se_write_msg_t tls_btrc_ctrl_registernotification_abs_vol_msg_t tls_param_sha1
a
psAesCbc_t tls_ble_sec_msg_t tls_btrc_ctrl_setabsvol_msg_t tls_param_socket
psAesKey_t tls_bss_info_format2_t tls_btrc_ctrl_setplayerapplicationsetting_rsp_msg_t tls_param_ssid
adc_st psArc4_t tls_bss_info_t tls_btrc_ctrl_track_changed_msg_t tls_param_tem_offset
b
psCipherContext_t tls_bt_acl_state_chg_msg_t tls_btrc_element_attr_val_t tls_param_uart
psCrcContext_t tls_bt_adapter_prop_msg_t tls_btrc_get_element_attr_msg_t tls_param_wps
bt_adapter_t psDes3_t tls_bt_adapter_state_change_msg_t tls_btrc_get_play_status_msg_t tls_scan_bss_format2_t
bt_remote_device_t psDes3Key_t tls_bt_av_audio_config_t tls_btrc_get_player_app_attrs_text_msg_t tls_scan_bss_t
c
psDigestContext_t tls_bt_av_audio_payload_t tls_btrc_get_player_app_value_msg_t tls_skt_status_ext_t
psMd5_t tls_bt_av_audio_state_t tls_btrc_get_player_app_values_text_msg_t tls_skt_status_t
clk_div_reg psSha1_t tls_bt_av_connection_state_t tls_btrc_groupnavigation_rsp_msg_t tls_slave_hspi
d
s
tls_bt_av_msg_t tls_btrc_list_player_app_attr_msg_t tls_socket_desc
tls_bt_ble_test_msg_t tls_btrc_list_player_app_values_msg_t tls_softap_info_t
dl_list sasc_region_attr_t tls_bt_bond_state_chg_msg_t tls_btrc_msg_t tls_spi_message
f
SASC_Type tls_bt_device_found_msg_t tls_btrc_passthrough_cmd_msg_t tls_spi_port
sc_io_map_ tls_bt_discovery_state_chg_msg_t tls_btrc_passthrough_rsp_msg_t tls_spi_transfer
FLASH_ENCRYPT_CTRL_Type SD_CardInfo_t tls_bt_energy_info_msg_t tls_btrc_player_app_attr_t tls_spp_cli_init_msg_t
FLASH_OTP_WR_PARAM_ST SDIO_HOST_Type tls_bt_hci_if_t tls_btrc_player_app_ext_attr_t tls_spp_close_msg_t
FLASH_TypeDef
t
tls_bt_host_if_t tls_btrc_player_app_ext_attr_val_t tls_spp_cong_msg_t
fls_list tls_bt_host_msg_t tls_btrc_player_settings_t tls_spp_data_ind_msg_t
FT_ADC_CAL task_msg tls_bt_mesh_cfg_hb_pub tls_btrc_register_notification_msg_t tls_spp_disc_comp_msg_t
FT_ADC_CAL_UNIT task_parameter tls_bt_mesh_cfg_hb_sub tls_btrc_register_notification_t tls_spp_init_msg_t
FT_TEMP_CAL TIPC_Type tls_bt_mesh_cfg_mod_pub tls_btrc_remote_features_msg_t tls_spp_msg_t
h
TIPC_VLD0_Type tls_bt_pin_request_msg_t tls_btrc_set_player_app_value_msg_t tls_spp_open_msg_t
TIPC_VLD1_Type tls_bt_property_t tls_btrc_volume_change_msg_t tls_spp_srv_open_msg_t
hstm_int tls_ble_cl_cfg_mtu_msg_t tls_bt_remote_dev_prop_msg_t tls_curr_bss_t tls_spp_start_msg_t
i
tls_ble_cl_close_msg_t tls_bt_ssp_request_msg_t tls_dma_descriptor tls_spp_write_msg_t
tls_ble_cl_congest_msg_t tls_bt_uuid_t tls_ethif tls_sta_info_t
I2C_T tls_ble_cl_exec_cmpl_msg_t tls_btgatt_db_element_t tls_fls tls_sys_clk
I2S_InitDef tls_ble_cl_gatt_db_msg_t tls_bthf_audio_payload_msg_t tls_fls_drv tls_timer_cfg
I2S_T tls_ble_cl_listen_msg_t tls_bthf_client_audio_state_msg_t tls_fwup tls_uart_baud_rate
ieee80211_bar tls_ble_cl_notify_msg_t tls_bthf_client_battery_level_msg_t tls_fwup_block tls_uart_circ_buf
ieee80211_channel_sw_ie tls_ble_cl_open_msg_t tls_bthf_client_call_msg_t tls_fwup_image_hdr tls_uart_icount
ieee80211_country_ie_triplet tls_ble_cl_read_msg_t tls_bthf_client_call_waiting_msg_t tls_fwup_request tls_uart_options
ieee80211_cts tls_ble_cl_reg_notify_msg_t tls_bthf_client_callheld_msg_t tls_hspi_rx_desc tls_uart_port
ieee80211_hdr tls_ble_cl_register_msg_t tls_bthf_client_callsetup_msg_t tls_hspi_tx_desc TLS_UART_REGS
ieee80211_hdr_3addr tls_ble_cl_search_cmpl_msg_t tls_bthf_client_clip_msg_t tls_ibss_info_t tls_uart_tx_msg
ieee80211_ht_cap tls_ble_cl_search_res_msg_t tls_bthf_client_cmd_complete_msg_t tls_ibssip_info_t tls_user_param
ieee80211_ht_info tls_ble_cl_write_msg_t tls_bthf_client_connection_state_msg_t tls_inside_fls tls_webs_cfg
ieee80211_mcs_info tls_ble_dm_msg_t tls_bthf_client_current_calls_msg_t tls_ip_info_t tls_wifi_ext_t
ieee80211_mgmt tls_ble_dm_scan_res_cmpl_msg_t tls_bthf_client_current_operator_msg_t tls_irq_handler tls_wifi_hdr_mac_t
ieee80211_mmie tls_ble_dm_scan_res_msg_t tls_bthf_client_in_band_ring_tone_msg_t tls_key_info_t tls_wifi_scan_param_t
ieee80211_msrment_ie tls_ble_dm_set_adv_data_cmpl_msg_t tls_bthf_client_last_voice_tag_number_msg_t tls_lcd_options tls_wifi_tx_rate_t
ieee80211_pspoll tls_ble_dm_set_scan_param_cmpl_msg_t tls_bthf_client_msg_t tls_mesh_msg_t
w
ieee80211_qos_hdr tls_ble_dm_timer_expired_msg_t tls_bthf_client_network_roaming_msg_t tls_mesh_node_added_msg_t
ieee80211_quiet_ie tls_ble_msg_t tls_bthf_client_network_signal_msg_t tls_mesh_oob_input_msg_t wm_crypto_ctx
ieee80211_rann_ie tls_ble_report_rssi_msg_t tls_bthf_client_network_state_msg_t tls_mesh_oob_output_number_msg_t wm_i2s_buf_s
ieee80211_rts tls_ble_se_add_char_msg_t tls_bthf_client_resp_and_hold_msg_t tls_mesh_oob_output_str_msg_t
ieee80211_tim_ie tls_ble_se_add_incl_srvc_msg_t tls_bthf_client_ring_indication_msg_t tls_mesh_primary_cfg_t
ieee802_11_elems tls_ble_se_confirm_msg_t tls_bthf_client_subscriber_info_msg_t tls_mesh_prov_complete_msg_t
_ | a | b | c | d | f | h | i | l | o | p | s | t | w


W800 SDK APIs: Data Fields

Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- _ -

  • _reserved0 : FLASH_ENCRYPT_CTRL_Type , TIPC_VLD1_Type
  • _reserved1 : Img_Attr_Type
  • _reserved2 : FLASH_ENCRYPT_CTRL_Type , Img_Attr_Type


W800 SDK APIs: Data Fields

Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- a -

  • ACR : FLASH_TypeDef
  • address : tls_ble_dm_scan_res_msg_t
  • app_uuid : tls_ble_cl_register_msg_t
  • AR : FLASH_TypeDef
  • arg : tls_timer_cfg


W800 SDK APIs: Data Fields

Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- b -

  • b : FLASH_ENCRYPT_CTRL_Type , Img_Attr_Type
  • band_rate : tls_bt_hci_if_t
  • baudrate : tls_uart_options
  • BBP : TIPC_VLD1_Type
  • bgn : tls_bss_info_format2_t
  • bias : tls_lcd_options
  • bss : tls_scan_bss_format2_t , tls_scan_bss_t
  • bssid : tls_bss_info_format2_t , tls_bss_info_t , tls_curr_bss_t , tls_wifi_hdr_mac_t
  • BT : TIPC_VLD1_Type
  • BT_MODEM : TIPC_VLD0_Type
  • BUF_CTL : SDIO_HOST_Type
  • BUS2 : clk_div_reg


W800 SDK APIs: Data Fields

Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- c -

  • callback : tls_timer_cfg
  • channel : _pwm_init_param , tls_bss_info_format2_t , tls_bss_info_t , tls_curr_bss_t , tls_ibss_info_t , tls_softap_info_t
  • charlength : tls_uart_options
  • cli_cfg_mtu : tls_ble_msg_t
  • cli_close : tls_ble_msg_t
  • cli_congest : tls_ble_msg_t
  • cli_exec_cmpl : tls_ble_msg_t
  • cli_listen : tls_ble_msg_t
  • cli_notif : tls_ble_msg_t
  • cli_open : tls_ble_msg_t
  • cli_read : tls_ble_msg_t
  • cli_register : tls_ble_msg_t
  • cli_search_cmpl : tls_ble_msg_t
  • cli_search_res : tls_ble_msg_t
  • cli_write : tls_ble_msg_t
  • client_if : tls_ble_cl_open_msg_t , tls_ble_cl_register_msg_t
  • CLK_RST : TIPC_VLD1_Type
  • clkdiv : _pwm_init_param
  • CMD_BUF : SDIO_HOST_Type
  • cnt_type : _pwm_init_param
  • code_decrypt : FLASH_ENCRYPT_CTRL_Type
  • code_encrypt : Img_Attr_Type
  • COM_EN : LCD_T
  • com_number : tls_lcd_options
  • complete : tls_spi_message
  • congested : tls_ble_cl_congest_msg_t , tls_ble_se_congest_msg_t
  • context : tls_spi_message
  • count : tls_scan_bss_format2_t , tls_scan_bss_t
  • CPU : clk_div_reg
  • CR : FLASH_TypeDef
  • cs_active : tls_spi_port
  • CTRL : LCD_T
  • curr_rx_desc : tls_slave_hspi
  • curr_tx_desc : tls_slave_hspi
  • current_message : tls_spi_port
  • current_remaining_bytes : tls_spi_port
  • current_remaining_transfer : tls_spi_port
  • current_transfer : tls_spi_port


W800 SDK APIs: Data Fields

Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- d -

  • da_addr : tls_wifi_hdr_mac_t
  • data_bit : tls_bt_hci_if_t
  • DATA_BUF : SDIO_HOST_Type
  • data_decrypt : FLASH_ENCRYPT_CTRL_Type
  • dbus_decrypt : FLASH_ENCRYPT_CTRL_Type
  • decrypt_start : FLASH_ENCRYPT_CTRL_Type
  • delay_usecs : tls_spi_transfer
  • DIV_EN : clk_div_reg
  • DMA : TIPC_VLD1_Type
  • dns1 : tls_ibssip_info_t
  • dns2 : tls_ibssip_info_t
  • dnsname : tls_ip_info_t
  • dtclkdiv : _pwm_init_param
  • dtcnt : _pwm_init_param
  • dten : _pwm_init_param
  • duty : _pwm_init_param , tls_lcd_options


W800 SDK APIs: Data Fields

Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- e -

  • ecn : tls_bss_info_format2_t
  • encrypt : tls_ibss_info_t , tls_softap_info_t
  • encryptype : tls_curr_bss_t
  • erase_always : Img_Attr_Type
  • erase_block_en : Img_Attr_Type


W800 SDK APIs: Data Fields

Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- f -

  • fcStatus : tls_uart_port
  • FLASH : TIPC_VLD1_Type
  • flow_ctrl : tls_uart_options
  • format : tls_key_info_t
  • FRAMECNT : LCD_T
  • freq_offset : tls_bss_info_format2_t
  • freqcal_val : tls_bss_info_format2_t
  • fresh_rate : tls_lcd_options


W800 SDK APIs: Data Fields

Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- g -

  • gateway : tls_ibssip_info_t
  • GPSEC : TIPC_VLD1_Type
  • group_cipher : tls_bss_info_format2_t


W800 SDK APIs: Data Fields

Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- h -

  • handle : tls_ble_se_write_msg_t


W800 SDK APIs: Data Fields

Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- i -

  • I2C : TIPC_VLD0_Type
  • I2S : TIPC_VLD0_Type
  • icount : tls_uart_port
  • img_type : Img_Attr_Type
  • index : tls_key_info_t
  • inverse_en : _pwm_init_param
  • ip : tls_ibssip_info_t
  • ip_addr : tls_ip_info_t
  • is_prep : tls_ble_se_write_msg_t
  • is_repeat : tls_timer_cfg


W800 SDK APIs: Data Fields

Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- k -

  • key : tls_key_info_t
  • key_len : tls_key_info_t
  • keyinfo : tls_ibss_info_t , tls_softap_info_t
  • KEYR : FLASH_TypeDef


W800 SDK APIs: Data Fields

Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- l -

  • LCD : TIPC_VLD0_Type
  • len : tls_ble_se_write_msg_t , tls_spi_transfer
  • length : tls_scan_bss_format2_t , tls_scan_bss_t
  • loop_type : _pwm_init_param


W800 SDK APIs: Data Fields

Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- m -

  • MAC : TIPC_VLD1_Type
  • mac_addr : tls_sta_info_t
  • max_data_rate : tls_bss_info_t
  • mbox_id : task_parameter
  • mbox_size : task_parameter
  • MMC_CRCCTL : SDIO_HOST_Type
  • MMC_PORT : SDIO_HOST_Type
  • MMC_SIG : SDIO_HOST_Type
  • MMU : TIPC_VLD1_Type
  • mode : _pwm_init_param , psCrcContext_t , tls_bss_info_t , tls_spi_port
  • msg_queue : tls_spi_port


W800 SDK APIs: Data Fields

Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- n -

  • name : task_parameter
  • need_rsp : tls_ble_se_write_msg_t
  • netmask : tls_ibssip_info_t , tls_ip_info_t
  • next : dl_list , tls_dma_descriptor


W800 SDK APIs: Data Fields

Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- o -

  • offset : tls_ble_se_write_msg_t
  • opts : tls_uart_port


W800 SDK APIs: Data Fields

Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- p -

  • pairwise_cipher : tls_bss_info_format2_t
  • paritytype : tls_uart_options
  • PD : clk_div_reg
  • period : _pwm_init_param
  • PMU : TIPC_VLD1_Type
  • pnum : _pwm_init_param
  • pnum_int : _pwm_init_param
  • PORTA : TIPC_VLD0_Type
  • PORTB : TIPC_VLD0_Type
  • prev : dl_list
  • prikey_sel : FLASH_ENCRYPT_CTRL_Type , Img_Attr_Type
  • privacy : tls_bss_info_t
  • properties : tls_bt_adapter_prop_msg_t , tls_bt_device_found_msg_t , tls_bt_remote_dev_prop_msg_t
  • PSRAM : TIPC_VLD1_Type
  • psram_io : Img_Attr_Type
  • PWM : TIPC_VLD0_Type


W800 SDK APIs: Data Fields

Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- q -

  • queue : tls_spi_message


W800 SDK APIs: Data Fields

Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- r -

  • reason : tls_ble_cl_close_msg_t
  • recv : tls_uart_port
  • regs : tls_uart_port
  • retry_times : tls_wifi_tx_rate_t
  • RF_BIST : TIPC_VLD1_Type
  • RFC : TIPC_VLD0_Type
  • rounds : psAesKey_t
  • RSA : TIPC_VLD1_Type
  • rssi : tls_ble_dm_scan_res_msg_t , tls_bss_info_format2_t , tls_bss_info_t , tls_curr_bss_t , tls_wifi_ext_t
  • RSV : clk_div_reg
  • rx_buf : tls_spi_transfer
  • rx_callback : wm_i2s_buf_s
  • rx_rate : tls_wifi_ext_t


W800 SDK APIs: Data Fields

Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- s -

  • sa_addr : tls_wifi_hdr_mac_t
  • SAR_ADC : TIPC_VLD0_Type
  • scan_chanlist : tls_wifi_scan_param_t
  • scan_chinterval : tls_wifi_scan_param_t
  • scan_times : tls_wifi_scan_param_t
  • SDIO_HOST : TIPC_VLD1_Type
  • SDIO_SLAVE : TIPC_VLD1_Type
  • SDIO_WRAPPER : TIPC_VLD1_Type
  • SEC : TIPC_VLD1_Type
  • SEG_EN : LCD_T
  • ser_add_char : tls_ble_msg_t
  • ser_confirm : tls_ble_msg_t
  • ser_congest : tls_ble_msg_t
  • ser_connect : tls_ble_msg_t
  • ser_create : tls_ble_msg_t
  • ser_disconnect : tls_ble_msg_t
  • ser_exec_write : tls_ble_msg_t
  • ser_read : tls_ble_msg_t
  • ser_register : tls_ble_msg_t
  • ser_start_srvc : tls_ble_msg_t
  • ser_stop_srvc : tls_ble_msg_t
  • ser_write : tls_ble_msg_t
  • server_if : tls_ble_se_connect_msg_t
  • signature : Img_Attr_Type
  • skey : psAesKey_t
  • speed_hz : tls_spi_port
  • SPI_HS : TIPC_VLD1_Type
  • SPI_LS : TIPC_VLD0_Type
  • SR : FLASH_TypeDef
  • ssid : tls_bss_info_format2_t , tls_bss_info_t , tls_curr_bss_t , tls_ibss_info_t , tls_softap_info_t
  • ssid_len : tls_bss_info_format2_t , tls_bss_info_t , tls_curr_bss_t
  • state : psCrcContext_t
  • status : tls_ble_cl_open_msg_t , tls_ble_cl_register_msg_t , tls_ble_cl_search_cmpl_msg_t , tls_ble_dm_set_adv_data_cmpl_msg_t , tls_ble_se_add_char_msg_t , tls_ble_se_add_incl_srvc_msg_t , tls_ble_se_confirm_msg_t , tls_ble_se_create_msg_t , tls_ble_se_start_msg_t , tls_bt_adapter_state_change_msg_t , tls_spi_message
  • stk_size : task_parameter
  • stk_start : task_parameter
  • stop_bit : tls_bt_hci_if_t
  • stopbits : tls_uart_options


W800 SDK APIs: Data Fields

Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- t -

  • task_id : task_parameter
  • timeo_id : task_parameter
  • timeout : tls_timer_cfg
  • TIMER : TIPC_VLD0_Type
  • transfer_list : tls_spi_transfer
  • transfers : tls_spi_message
  • transtype : tls_spi_port
  • tx_buf : tls_spi_transfer
  • tx_callback : wm_i2s_buf_s
  • tx_fifofull : tls_uart_port
  • tx_gain : tls_wifi_tx_rate_t
  • tx_rate : tls_wifi_tx_rate_t
  • type : psAesKey_t , psCrcContext_t , tls_curr_bss_t


W800 SDK APIs: Data Fields

Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- u -

  • UART0 : TIPC_VLD0_Type
  • UART1 : TIPC_VLD0_Type
  • UART2 : TIPC_VLD0_Type
  • UART3 : TIPC_VLD0_Type
  • UART4 : TIPC_VLD0_Type
  • UART5 : TIPC_VLD0_Type
  • uart_index : tls_bt_hci_if_t
  • uart_irq_no : tls_uart_port
  • uart_mode : tls_uart_port
  • uart_no : tls_uart_port
  • unit : tls_timer_cfg
  • UR_BD : TLS_UART_REGS
  • UR_DMAC : TLS_UART_REGS
  • UR_FC : TLS_UART_REGS
  • UR_FIFOC : TLS_UART_REGS
  • UR_FIFOS : TLS_UART_REGS
  • UR_INTM : TLS_UART_REGS
  • UR_INTS : TLS_UART_REGS
  • UR_LC : TLS_UART_REGS
  • UR_RXW : TLS_UART_REGS
  • UR_TXW : TLS_UART_REGS


W800 SDK APIs: Data Fields

Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- v -

  • value : tls_ble_dm_scan_res_msg_t , tls_ble_se_write_msg_t
  • verify_bit : tls_bt_hci_if_t
  • vlcd : tls_lcd_options


W800 SDK APIs: Data Fields

Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- w -

  • w : FLASH_ENCRYPT_CTRL_Type , Img_Attr_Type
  • wait_queue : tls_spi_port
  • WD : TIPC_VLD0_Type
  • WLAN : clk_div_reg
  • wps_support : tls_bss_info_format2_t , tls_bss_info_t


W800 SDK APIs: Data Fields

Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- x -

  • XferCpltCallback : _dma_handler_type
  • XferHalfCpltCallback : _dma_handler_type


W800 SDK APIs: Data Fields

Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- z -

  • zip_type : Img_Attr_Type


W800 SDK APIs: Data Fields - Variables

- _ -

  • _reserved0 : FLASH_ENCRYPT_CTRL_Type , TIPC_VLD1_Type
  • _reserved1 : Img_Attr_Type
  • _reserved2 : FLASH_ENCRYPT_CTRL_Type , Img_Attr_Type


W800 SDK APIs: Data Fields - Variables

- a -

  • ACR : FLASH_TypeDef
  • address : tls_ble_dm_scan_res_msg_t
  • app_uuid : tls_ble_cl_register_msg_t
  • AR : FLASH_TypeDef
  • arg : tls_timer_cfg


W800 SDK APIs: Data Fields - Variables

- b -

  • b : FLASH_ENCRYPT_CTRL_Type , Img_Attr_Type
  • band_rate : tls_bt_hci_if_t
  • baudrate : tls_uart_options
  • BBP : TIPC_VLD1_Type
  • bgn : tls_bss_info_format2_t
  • bias : tls_lcd_options
  • bss : tls_scan_bss_format2_t , tls_scan_bss_t
  • bssid : tls_bss_info_format2_t , tls_bss_info_t , tls_curr_bss_t , tls_wifi_hdr_mac_t
  • BT : TIPC_VLD1_Type
  • BT_MODEM : TIPC_VLD0_Type
  • BUF_CTL : SDIO_HOST_Type
  • BUS2 : clk_div_reg


W800 SDK APIs: Data Fields - Variables

- c -

  • callback : tls_timer_cfg
  • channel : _pwm_init_param , tls_bss_info_format2_t , tls_bss_info_t , tls_curr_bss_t , tls_ibss_info_t , tls_softap_info_t
  • charlength : tls_uart_options
  • cli_cfg_mtu : tls_ble_msg_t
  • cli_close : tls_ble_msg_t
  • cli_congest : tls_ble_msg_t
  • cli_exec_cmpl : tls_ble_msg_t
  • cli_listen : tls_ble_msg_t
  • cli_notif : tls_ble_msg_t
  • cli_open : tls_ble_msg_t
  • cli_read : tls_ble_msg_t
  • cli_register : tls_ble_msg_t
  • cli_search_cmpl : tls_ble_msg_t
  • cli_search_res : tls_ble_msg_t
  • cli_write : tls_ble_msg_t
  • client_if : tls_ble_cl_open_msg_t , tls_ble_cl_register_msg_t
  • CLK_RST : TIPC_VLD1_Type
  • clkdiv : _pwm_init_param
  • CMD_BUF : SDIO_HOST_Type
  • cnt_type : _pwm_init_param
  • code_decrypt : FLASH_ENCRYPT_CTRL_Type
  • code_encrypt : Img_Attr_Type
  • COM_EN : LCD_T
  • com_number : tls_lcd_options
  • complete : tls_spi_message
  • congested : tls_ble_cl_congest_msg_t , tls_ble_se_congest_msg_t
  • context : tls_spi_message
  • count : tls_scan_bss_format2_t , tls_scan_bss_t
  • CPU : clk_div_reg
  • CR : FLASH_TypeDef
  • cs_active : tls_spi_port
  • CTRL : LCD_T
  • curr_rx_desc : tls_slave_hspi
  • curr_tx_desc : tls_slave_hspi
  • current_message : tls_spi_port
  • current_remaining_bytes : tls_spi_port
  • current_remaining_transfer : tls_spi_port
  • current_transfer : tls_spi_port


W800 SDK APIs: Data Fields - Variables

- d -

  • da_addr : tls_wifi_hdr_mac_t
  • data_bit : tls_bt_hci_if_t
  • DATA_BUF : SDIO_HOST_Type
  • data_decrypt : FLASH_ENCRYPT_CTRL_Type
  • dbus_decrypt : FLASH_ENCRYPT_CTRL_Type
  • decrypt_start : FLASH_ENCRYPT_CTRL_Type
  • delay_usecs : tls_spi_transfer
  • DIV_EN : clk_div_reg
  • DMA : TIPC_VLD1_Type
  • dns1 : tls_ibssip_info_t
  • dns2 : tls_ibssip_info_t
  • dnsname : tls_ip_info_t
  • dtclkdiv : _pwm_init_param
  • dtcnt : _pwm_init_param
  • dten : _pwm_init_param
  • duty : _pwm_init_param , tls_lcd_options


W800 SDK APIs: Data Fields - Variables

- e -

  • ecn : tls_bss_info_format2_t
  • encrypt : tls_ibss_info_t , tls_softap_info_t
  • encryptype : tls_curr_bss_t
  • erase_always : Img_Attr_Type
  • erase_block_en : Img_Attr_Type


W800 SDK APIs: Data Fields - Variables

- f -

  • fcStatus : tls_uart_port
  • FLASH : TIPC_VLD1_Type
  • flow_ctrl : tls_uart_options
  • format : tls_key_info_t
  • FRAMECNT : LCD_T
  • freq_offset : tls_bss_info_format2_t
  • freqcal_val : tls_bss_info_format2_t
  • fresh_rate : tls_lcd_options


W800 SDK APIs: Data Fields - Variables

- g -

  • gateway : tls_ibssip_info_t
  • GPSEC : TIPC_VLD1_Type
  • group_cipher : tls_bss_info_format2_t


W800 SDK APIs: Data Fields - Variables

- h -

  • handle : tls_ble_se_write_msg_t


W800 SDK APIs: Data Fields - Variables

- i -

  • I2C : TIPC_VLD0_Type
  • I2S : TIPC_VLD0_Type
  • icount : tls_uart_port
  • img_type : Img_Attr_Type
  • index : tls_key_info_t
  • inverse_en : _pwm_init_param
  • ip : tls_ibssip_info_t
  • ip_addr : tls_ip_info_t
  • is_prep : tls_ble_se_write_msg_t
  • is_repeat : tls_timer_cfg


W800 SDK APIs: Data Fields - Variables

- k -

  • key : tls_key_info_t
  • key_len : tls_key_info_t
  • keyinfo : tls_ibss_info_t , tls_softap_info_t
  • KEYR : FLASH_TypeDef


W800 SDK APIs: Data Fields - Variables

- l -

  • LCD : TIPC_VLD0_Type
  • len : tls_ble_se_write_msg_t , tls_spi_transfer
  • length : tls_scan_bss_format2_t , tls_scan_bss_t
  • loop_type : _pwm_init_param


W800 SDK APIs: Data Fields - Variables

- m -

  • MAC : TIPC_VLD1_Type
  • mac_addr : tls_sta_info_t
  • max_data_rate : tls_bss_info_t
  • mbox_id : task_parameter
  • mbox_size : task_parameter
  • MMC_CRCCTL : SDIO_HOST_Type
  • MMC_PORT : SDIO_HOST_Type
  • MMC_SIG : SDIO_HOST_Type
  • MMU : TIPC_VLD1_Type
  • mode : _pwm_init_param , psCrcContext_t , tls_bss_info_t , tls_spi_port
  • msg_queue : tls_spi_port


W800 SDK APIs: Data Fields - Variables

- n -

  • name : task_parameter
  • need_rsp : tls_ble_se_write_msg_t
  • netmask : tls_ibssip_info_t , tls_ip_info_t
  • next : dl_list , tls_dma_descriptor


W800 SDK APIs: Data Fields - Variables

- o -

  • offset : tls_ble_se_write_msg_t
  • opts : tls_uart_port


W800 SDK APIs: Data Fields - Variables

- p -

  • pairwise_cipher : tls_bss_info_format2_t
  • paritytype : tls_uart_options
  • PD : clk_div_reg
  • period : _pwm_init_param
  • PMU : TIPC_VLD1_Type
  • pnum : _pwm_init_param
  • pnum_int : _pwm_init_param
  • PORTA : TIPC_VLD0_Type
  • PORTB : TIPC_VLD0_Type
  • prev : dl_list
  • prikey_sel : FLASH_ENCRYPT_CTRL_Type , Img_Attr_Type
  • privacy : tls_bss_info_t
  • properties : tls_bt_adapter_prop_msg_t , tls_bt_device_found_msg_t , tls_bt_remote_dev_prop_msg_t
  • PSRAM : TIPC_VLD1_Type
  • psram_io : Img_Attr_Type
  • PWM : TIPC_VLD0_Type


W800 SDK APIs: Data Fields - Variables

- q -

  • queue : tls_spi_message


W800 SDK APIs: Data Fields - Variables

- r -

  • reason : tls_ble_cl_close_msg_t
  • recv : tls_uart_port
  • regs : tls_uart_port
  • retry_times : tls_wifi_tx_rate_t
  • RF_BIST : TIPC_VLD1_Type
  • RFC : TIPC_VLD0_Type
  • rounds : psAesKey_t
  • RSA : TIPC_VLD1_Type
  • rssi : tls_ble_dm_scan_res_msg_t , tls_bss_info_format2_t , tls_bss_info_t , tls_curr_bss_t , tls_wifi_ext_t
  • RSV : clk_div_reg
  • rx_buf : tls_spi_transfer
  • rx_callback : wm_i2s_buf_s
  • rx_rate : tls_wifi_ext_t


W800 SDK APIs: Data Fields - Variables

- s -

  • sa_addr : tls_wifi_hdr_mac_t
  • SAR_ADC : TIPC_VLD0_Type
  • scan_chanlist : tls_wifi_scan_param_t
  • scan_chinterval : tls_wifi_scan_param_t
  • scan_times : tls_wifi_scan_param_t
  • SDIO_HOST : TIPC_VLD1_Type
  • SDIO_SLAVE : TIPC_VLD1_Type
  • SDIO_WRAPPER : TIPC_VLD1_Type
  • SEC : TIPC_VLD1_Type
  • SEG_EN : LCD_T
  • ser_add_char : tls_ble_msg_t
  • ser_confirm : tls_ble_msg_t
  • ser_congest : tls_ble_msg_t
  • ser_connect : tls_ble_msg_t
  • ser_create : tls_ble_msg_t
  • ser_disconnect : tls_ble_msg_t
  • ser_exec_write : tls_ble_msg_t
  • ser_read : tls_ble_msg_t
  • ser_register : tls_ble_msg_t
  • ser_start_srvc : tls_ble_msg_t
  • ser_stop_srvc : tls_ble_msg_t
  • ser_write : tls_ble_msg_t
  • server_if : tls_ble_se_connect_msg_t
  • signature : Img_Attr_Type
  • skey : psAesKey_t
  • speed_hz : tls_spi_port
  • SPI_HS : TIPC_VLD1_Type
  • SPI_LS : TIPC_VLD0_Type
  • SR : FLASH_TypeDef
  • ssid : tls_bss_info_format2_t , tls_bss_info_t , tls_curr_bss_t , tls_ibss_info_t , tls_softap_info_t
  • ssid_len : tls_bss_info_format2_t , tls_bss_info_t , tls_curr_bss_t
  • state : psCrcContext_t
  • status : tls_ble_cl_open_msg_t , tls_ble_cl_register_msg_t , tls_ble_cl_search_cmpl_msg_t , tls_ble_dm_set_adv_data_cmpl_msg_t , tls_ble_se_add_char_msg_t , tls_ble_se_add_incl_srvc_msg_t , tls_ble_se_confirm_msg_t , tls_ble_se_create_msg_t , tls_ble_se_start_msg_t , tls_bt_adapter_state_change_msg_t , tls_spi_message
  • stk_size : task_parameter
  • stk_start : task_parameter
  • stop_bit : tls_bt_hci_if_t
  • stopbits : tls_uart_options


W800 SDK APIs: Data Fields - Variables

- t -

  • task_id : task_parameter
  • timeo_id : task_parameter
  • timeout : tls_timer_cfg
  • TIMER : TIPC_VLD0_Type
  • transfer_list : tls_spi_transfer
  • transfers : tls_spi_message
  • transtype : tls_spi_port
  • tx_buf : tls_spi_transfer
  • tx_callback : wm_i2s_buf_s
  • tx_fifofull : tls_uart_port
  • tx_gain : tls_wifi_tx_rate_t
  • tx_rate : tls_wifi_tx_rate_t
  • type : psAesKey_t , psCrcContext_t , tls_curr_bss_t


W800 SDK APIs: Data Fields - Variables

- u -

  • UART0 : TIPC_VLD0_Type
  • UART1 : TIPC_VLD0_Type
  • UART2 : TIPC_VLD0_Type
  • UART3 : TIPC_VLD0_Type
  • UART4 : TIPC_VLD0_Type
  • UART5 : TIPC_VLD0_Type
  • uart_index : tls_bt_hci_if_t
  • uart_irq_no : tls_uart_port
  • uart_mode : tls_uart_port
  • uart_no : tls_uart_port
  • unit : tls_timer_cfg
  • UR_BD : TLS_UART_REGS
  • UR_DMAC : TLS_UART_REGS
  • UR_FC : TLS_UART_REGS
  • UR_FIFOC : TLS_UART_REGS
  • UR_FIFOS : TLS_UART_REGS
  • UR_INTM : TLS_UART_REGS
  • UR_INTS : TLS_UART_REGS
  • UR_LC : TLS_UART_REGS
  • UR_RXW : TLS_UART_REGS
  • UR_TXW : TLS_UART_REGS


W800 SDK APIs: Data Fields - Variables

- v -

  • value : tls_ble_dm_scan_res_msg_t , tls_ble_se_write_msg_t
  • verify_bit : tls_bt_hci_if_t
  • vlcd : tls_lcd_options


W800 SDK APIs: Data Fields - Variables

- w -

  • w : FLASH_ENCRYPT_CTRL_Type , Img_Attr_Type
  • wait_queue : tls_spi_port
  • WD : TIPC_VLD0_Type
  • WLAN : clk_div_reg
  • wps_support : tls_bss_info_format2_t , tls_bss_info_t


W800 SDK APIs: Data Fields - Variables

- x -

  • XferCpltCallback : _dma_handler_type
  • XferHalfCpltCallback : _dma_handler_type


W800 SDK APIs: Data Fields - Variables

- z -

  • zip_type : Img_Attr_Type


W800 SDK APIs: File List

File List
Here is a list of all documented files with brief descriptions:
[detail level 1234]
▼ doxy_out |
▼ include |
▼ app |
wm_at_ri_init.h | AT_RI task and interface resource initial Module
wm_crypto.h | Crypto driver module
wm_dhcp_server.h | DHCP SERVER
wm_dns_server.h | DNS SERVER
wm_http_client.h | Http client APIs
wm_netif.h | ETHERNET INIT Interface
wm_netif2.1.3.h | Netif213 module
wm_ntp.h | Ntp module
wm_ssl_server.h |
wm_webserver.h | WEB SERVER
wm_wifi_oneshot.h | Wi-Fi OneShot
▼ bt |
wm_ble.h | Bluetooth API
wm_ble_gatt.h | Bluetooth API
wm_bt.h | Bluetooth API
wm_bt_api.h |
wm_bt_av.h | Bluetooth API
wm_bt_def.h | Bluetooth Define
wm_bt_hf_client.h | Bluetooth API
wm_bt_spp.h | Bluetooth API
▼ driver |
wm_7816.h |
wm_adc.h |
wm_cpu.h | Cpu driver module
wm_dma.h | DMA Driver Module
wm_efuse.h | Virtual efuse Driver Module
wm_flash.h | Flash Driver module
wm_flash_map.h | Flash zone map
wm_fls_gd25qxx.h | Wm gd25qxx flash driver
wm_gpio.h | GPIO Driver Module
wm_gpio_afsel.h | GPIO Driver Module
wm_hostspi.h | Host spi Driver Module
wm_hspi.h | High speed spi slave Module
wm_i2c.h |
wm_i2s.h |
wm_internal_flash.h | Inter flash driver
wm_io.h | IO Driver Module
wm_irq.h | Interupt driver module
wm_lcd.h | LCD Driver Module
wm_pmu.h | Pmu driver module
wm_psram.h |
wm_pwm.h | Pwm driver module
wm_rtc.h | Rtc Driver Module
wm_sasc.h |
wm_sdio_host.h |
wm_timer.h | Timer Driver Module
wm_tipc.h |
wm_touchsensor.h | Touchsensor Driver Module
wm_uart.h | Uart Driver Module
wm_watchdog.h | Watchdog Driver Module
▼ net |
wm_socket.h | Socket Module
wm_socket2.1.3.h | Socket2.1.3 apis
wm_sockets.h | Socket apis
wm_sockets2.1.3.h | Sockets2.1.3 apis
▼ os |
wm_os_config.h | WM OS select freertos or ucos
wm_osal.h | WM OS adapter layer
▼ platform |
aes.h | AES functions
wm_crypto_hard.h | Hard crypto module
wm_crypto_hard_mbed.h |
wm_fwup.h | Firmware upgrade
wm_mem.h |
wm_params.h | Param manager Module
wm_wl_mbox.h | Mailbox (mbox) APIs
wm_wl_task.h | Task APIs
wm_wl_timers.h | Task APIs
▼ wifi |
litepoint.h |
wm_ieee80211.h | IEEE802.11 protocol type define
wm_wifi.h | Wi-Fi API
list.h |
random.h |
wm_bt_config.h | WM bluetooth model configure
wm_config.h | W800 chip inferface configure
wm_debug.h | Debug Module APIs
wm_include.h | Configuration file of sdk
wm_ram_config.h | WM ram model configure
wm_regs.h | Register & operation file
wm_type_def.h | WM type redefine
wm_wifi_config.h | WM wifi model configure


W800 SDK APIs: doxy_out Directory Reference

  • doxy_out
doxy_out Directory Reference

Directories

Generated by doxygen 1.8.14


W800 SDK APIs: doxy_out/include Directory Reference

  • doxy_out
  • include
include Directory Reference

Directories

Files

file | wm_bt_config.h [code]
WM bluetooth model configure.
file | wm_config.h [code]
w800 chip inferface configure
file | wm_debug.h [code]
debug Module APIs
file | wm_include.h [code]
the configuration file of sdk
file | wm_ram_config.h [code]
WM ram model configure.
file | wm_regs.h [code]
register & operation file
file | wm_type_def.h [code]
WM type redefine.
file | wm_wifi_config.h [code]
WM wifi model configure.


W800 SDK APIs: doxy_out/include/app Directory Reference

  • doxy_out
  • include
  • app
app Directory Reference

Files

file | wm_at_ri_init.h [code]
AT_RI task and interface resource initial Module.
file | wm_crypto.h [code]
crypto driver module
file | wm_dhcp_server.h [code]
DHCP SERVER.
file | wm_dns_server.h [code]
DNS SERVER.
file | wm_http_client.h [code]
Http client APIs.
file | wm_netif.h [code]
ETHERNET INIT Interface.
file | wm_netif2.1.3.h [code]
netif213 module
file | wm_ntp.h [code]
ntp module
file | wm_webserver.h [code]
WEB SERVER.
file | wm_wifi_oneshot.h [code]
Wi-Fi OneShot.


W800 SDK APIs: doxy_out/include/app/wm_at_ri_init.h File Reference

  • doxy_out
  • include
  • app
Functions
wm_at_ri_init.h File Reference

AT_RI task and interface resource initial Module. More...

Go to the source code of this file.

Functions

int | tls_hostif_init (void)
This function is used to initialize hostif task used by AT&RI Command. More...
int | tls_hspi_init (void)
This function is used to initialize high speed SPI. More...
void | tls_uart_init (void)
This function is used to initialize UART. More...

Detailed Description

AT_RI task and interface resource initial Module.

Author
winnermicro

Copyright (c) 2015 Winner Microelectronics Co., Ltd.

Function Documentation

◆ tls_hspi_init()

int tls_hspi_init ( void )

This function is used to initialize high speed SPI.

Parameters
None
Return values
0 | success
other | failed
Note
Users can decide to call this api or not according to his application.

◆ tls_uart_init()

void tls_uart_init ( void )

This function is used to initialize UART.

Parameters
None
Returns
None
Note
Usually the system will call this api at power on.


W800 SDK APIs: doxy_out/include/app/wm_crypto.h File Reference

  • doxy_out
  • include
  • app
Functions
wm_crypto.h File Reference

crypto driver module More...

Go to the source code of this file.

Functions

int | aes_128_cbc_encrypt (const u8 *key, const u8 *iv, u8 *data, size_t data_len)
Encrypt plain data by 128 AES crypto. More...
int | aes_128_cbc_decrypt (const u8 *key, const u8 *iv, u8 *data, size_t data_len)
Decrypt data by 128 AES crypto. More...
int | rc4 (const u8 *key, size_t keylen, u8 *data, size_t data_len)
XOR RC4 stream to given data with skip-stream-start. More...
int | md5 (const u8 *addr, int len, u8 *mac)
MD5 hash for data vector. More...
int | hmac_md5 (const u8 *key, size_t key_len, const u8 *data, size_t data_len, u8 *mac)
HMAC-MD5 over data buffer (RFC 2104) More...
int | sha1 (const u8 *addr, int len, u8 *mac)
SHA1 hash for data vector. More...

Detailed Description

crypto driver module

Author
dave

Copyright (c) 2014 Winner Microelectronics Co., Ltd.

Function Documentation

◆ aes_128_cbc_decrypt()

int aes_128_cbc_decrypt | ( | const u8 * | key,
 |  | const u8 * | iv,
 |  | u8 * | data,
 |  | size_t | data_len
 | ) |  |

Decrypt data by 128 AES crypto.

Parameters
[in] | key | the key for encryption
[in] | iv | the IV value for encryption
[in] | data | where the plain data stored
[in] | data_len | length of the plain data to be decrypted
Return values
0 | finish Decryption successfully
-1 | Error
Note
plain data will be placed into the encrypted area

◆ aes_128_cbc_encrypt()

int aes_128_cbc_encrypt | ( | const u8 * | key,
 |  | const u8 * | iv,
 |  | u8 * | data,
 |  | size_t | data_len
 | ) |  |

Encrypt plain data by 128 AES crypto.

Parameters
[in] | key | the key for encryption
[in] | iv | the IV value for encryption
[in] | data | where the plain data stored
[in] | data_len | length of the plain data to be encrypted
Return values
0 | finish Encryption successfully
-1 | Error
Note
Encrypted data will be placed into the plain area

◆ hmac_md5()

int hmac_md5 | ( | const u8 * | key,
 |  | size_t | key_len,
 |  | const u8 * | data,
 |  | size_t | data_len,
 |  | u8 * | mac
 | ) |  |

HMAC-MD5 over data buffer (RFC 2104)

Parameters
[in] | key | Key for HMAC operations
[in] keylen Length of the key in bytes
[in] data data to be caculated
[in] | data_len | Lengths of the data block
[in] | mac | Buffer for the hash (16 bytes)
Return values
0 | finish caculation successfully
-1 | Error
Note

◆ md5()

int md5 | ( | const u8 * | addr,
 |  | int | len,
 |  | u8 * | mac
 | ) |  |

MD5 hash for data vector.

Parameters
[in] | addr | Pointers to the data area
[in] | len | Lengths of the data block
[in] | mac | Buffer for the hash (16 bytes)
Return values
0 | finish caculation successfully
-1 | Error
Note

◆ rc4()

int rc4 | ( | const u8 * | key,
 |  | size_t | keylen,
 |  | u8 * | data,
 |  | size_t | data_len
 | ) |  |

XOR RC4 stream to given data with skip-stream-start.

Parameters
[in] | key | RC4 key
[in] | keylen | RC4 key length
[in] | data | data to be XOR'ed with RC4 stream
[in] | data_len | length of the plain data to be encrypted
Return values
0 | finish Encryption/Decryption successfully
-1 | Error
Note
this function should be used for Encryption & Decryption both For the Encryption, the plain will be replaced by the encrypted output, and vice versa;

◆ sha1()

int sha1 | ( | const u8 * | addr,
 |  | int | len,
 |  | u8 * | mac
 | ) |  |

SHA1 hash for data vector.

Parameters
[in] | addr | Pointers to the data area
[in] | len | Lengths of the data block
[in] | mac | Buffer for the hash (16 bytes)
Return values
0 | finish caculation successfully
-1 | Error
Note


W800 SDK APIs: doxy_out/include/app/wm_dhcp_server.h File Reference

  • doxy_out
  • include
  • app
Functions
wm_dhcp_server.h File Reference

DHCP SERVER. More...

Go to the source code of this file.

Functions

s8 | tls_dhcps_start (void)
This function is used to start DHCP Server for a network interface. More...
void | tls_dhcps_stop (void)
This function is used to stop DHCP server. More...
ip_addr_t * | tls_dhcps_getip (const u8 *mac)
This function is used to get station's IP address by MAC address. More...
void | tls_dhcps_setdns (u8 numdns)
This function is used to set DHCP server's DNS address. More...

Detailed Description

DHCP SERVER.

Author
winnermicro

Copyright (c) 2015 Winner Microelectronics Co., Ltd.


W800 SDK APIs: doxy_out/include/app/wm_dns_server.h File Reference

  • doxy_out
  • include
  • app
Functions
wm_dns_server.h File Reference

DNS SERVER. More...

Go to the source code of this file.

Functions

s8 | tls_dnss_start (u8 *dnsname)
This function is used to start DNS service. More...
void | tls_dnss_stop (void)
This function is used to stop DNS service. More...

Detailed Description

DNS SERVER.

Author
winnermicro

Copyright (c) 2015 Winner Microelectronics Co., Ltd.


W800 SDK APIs: doxy_out/include/app/wm_http_client.h File Reference

  • doxy_out
  • include
  • app
Data Structures | Macros | Typedefs | Enumerations | Functions
wm_http_client.h File Reference

Http client APIs. More...

#include "wm_config.h"
#include "wm_type_def.h"

Go to the source code of this file.

Data Structures

struct | _HTTP_CLIENT
struct | _HTTPParameters

Macros

#define | VOID void
#define | HTTP_CLIENT_SUCCESS 0
#define | HTTP_CLIENT_UNKNOWN_ERROR 1
#define | HTTP_CLIENT_ERROR_INVALID_HANDLE 2
#define | HTTP_CLIENT_ERROR_NO_MEMORY 3
#define | HTTP_CLIENT_ERROR_SOCKET_INVALID 4
#define | HTTP_CLIENT_ERROR_SOCKET_CANT_SET 5
#define | HTTP_CLIENT_ERROR_SOCKET_RESOLVE 6
#define | HTTP_CLIENT_ERROR_SOCKET_CONNECT 7
#define | HTTP_CLIENT_ERROR_SOCKET_TIME_OUT 8
#define | HTTP_CLIENT_ERROR_SOCKET_RECV 9
#define | HTTP_CLIENT_ERROR_SOCKET_SEND 10
#define | HTTP_CLIENT_ERROR_HEADER_RECV 11
#define | HTTP_CLIENT_ERROR_HEADER_NOT_FOUND 12
#define | HTTP_CLIENT_ERROR_HEADER_BIG_CLUE 13
#define | HTTP_CLIENT_ERROR_HEADER_NO_LENGTH 14
#define | HTTP_CLIENT_ERROR_CHUNK_TOO_BIG 15
#define | HTTP_CLIENT_ERROR_AUTH_HOST 16
#define | HTTP_CLIENT_ERROR_AUTH_PROXY 17
#define | HTTP_CLIENT_ERROR_BAD_VERB 18
#define | HTTP_CLIENT_ERROR_LONG_INPUT 19
#define | HTTP_CLIENT_ERROR_BAD_STATE 20
#define | HTTP_CLIENT_ERROR_CHUNK 21
#define | HTTP_CLIENT_ERROR_BAD_URL 22
#define | HTTP_CLIENT_ERROR_BAD_HEADER 23
#define | HTTP_CLIENT_ERROR_BUFFER_RSIZE 24
#define | HTTP_CLIENT_ERROR_BAD_AUTH 25
#define | HTTP_CLIENT_ERROR_AUTH_MISMATCH 26
#define | HTTP_CLIENT_ERROR_NO_DIGEST_TOKEN 27
#define | HTTP_CLIENT_ERROR_NO_DIGEST_ALG 28
#define | HTTP_CLIENT_ERROR_SOCKET_BIND 29
#define | HTTP_CLIENT_ERROR_TLS_NEGO 30
#define | HTTP_CLIENT_ERROR_NOT_IMPLEMENTED 64
#define | HTTP_CLIENT_ERROR_CONNECTION_CLOSE 500
#define | HTTP_CLIENT_EOS 1000
#define | HTTP_CLIENT_FLAG_KEEP_ALIVE 0x00000001
#define | HTTP_CLIENT_FLAG_SEND_CHUNKED 0x00000002
#define | HTTP_CLIENT_FLAG_NO_CACHE 0x00000004
#define | HTTP_CLIENT_FLAG_ASYNC 0x00000008
#define | HTTP_CLIENT_FLAG_MULTIPART_FORM 0x00000010

Typedefs

typedef int | BOOL
typedef unsigned char | UCHAR
typedef char | CHAR
typedef unsigned short | UINT16
typedef signed short | INT16
typedef unsigned int | UINT32
typedef signed int | INT32
typedef unsigned long long | UINT64
typedef long long | INT64
typedef unsigned long | ULONG
typedef signed long | LONG
typedef UINT32 | HTTP_SESSION_HANDLE
typedef UINT32 | HTTP_CLIENT_SESSION_FLAGS
typedef u32 | tls_http_session_handle_t
typedef u32 | tls_http_session_flags_t
typedef enum _HTTP_AUTH_SCHEMA | HTTP_AUTH_SCHEMA
typedef enum _HTTP_VERB | HTTP_VERB
typedef struct _HTTP_CLIENT | HTTP_CLIENT
typedef struct _HTTPParameters | HTTPParameters

Enumerations

enum _HTTP_AUTH_SCHEMA {
AuthSchemaNone = 0, AuthSchemaBasic, AuthSchemaDigest, AuthSchemaKerberos,
AuthNotSupported
}
enum _HTTP_VERB {
VerbGet = 0, VerbHead, VerbPost, VerbPut,
VerbFwup, VerbNotSupported
}

Functions

HTTP_SESSION_HANDLE | HTTPClientOpenRequest (HTTP_CLIENT_SESSION_FLAGS Flags)
Allocate memory for a new HTTP Session. More...
UINT32 | HTTPClientCloseRequest (HTTP_SESSION_HANDLE *pSession)
Closes the active connection and free the corresponding memory. More...
UINT32 | HTTPClientSetAuth (HTTP_SESSION_HANDLE pSession, HTTP_AUTH_SCHEMA AuthSchema, void *pReserved)
Sets the HTTP authentication schema. More...
UINT32 | HTTPClientSetCredentials (HTTP_SESSION_HANDLE pSession, CHAR *pUserName, CHAR *pPassword)
Sets credentials for the target host. More...
UINT32 | HTTPClientSetProxy (HTTP_SESSION_HANDLE pSession, CHAR *pProxyName, UINT16 nPort, CHAR *pUserName, CHAR *pPassword)
Sets all the proxy related parameters. More...
UINT32 | HTTPClientSetVerb (HTTP_SESSION_HANDLE pSession, HTTP_VERB HttpVerb)
Sets the HTTP verb for the outgoing request. More...
UINT32 | HTTPClientAddRequestHeaders (HTTP_SESSION_HANDLE pSession, CHAR *pHeaderName, CHAR *pHeaderData, BOOL nInsert)
Add headers into the outgoing request. More...
UINT32 | HTTPClientSendRequest (HTTP_SESSION_HANDLE pSession, CHAR *pUrl, VOID *pData, UINT32 nDataLength, BOOL TotalLength, UINT32 nTimeout, UINT32 nClientPort)
This function builds the request headers, performs a DNS resolution, opens the connection (if it was not opened yet by a previous request or if it has closed) and sends the request headers. More...
UINT32 | HTTPClientWriteData (HTTP_SESSION_HANDLE pSession, VOID *pBuffer, UINT32 nBufferLength, UINT32 nTimeout)
Write data to the remote server. More...
UINT32 | HTTPClientRecvResponse (HTTP_SESSION_HANDLE pSession, UINT32 nTimeout)
Receives the response header on the connection and parses it. Performs any required authentication. More...
UINT32 | HTTPClientReadData (HTTP_SESSION_HANDLE pSession, VOID *pBuffer, UINT32 nBytesToRead, UINT32 nTimeout, UINT32 *nBytesRecived)
Read data from the server. Parse out the chunks data. More...
UINT32 | HTTPClientGetInfo (HTTP_SESSION_HANDLE pSession, HTTP_CLIENT *HTTPClient)
Fill the users structure with the session information. More...
UINT32 | HTTPClientFindFirstHeader (HTTP_SESSION_HANDLE pSession, CHAR *pSearchClue, CHAR *pHeaderBuffer, UINT32 *nLength)
Initiate the headr searching functions and find the first header. More...
UINT32 | HTTPClientGetNextHeader (HTTP_SESSION_HANDLE pSession, CHAR *pHeaderBuffer, UINT32 *nLength)
Find the next header. More...
UINT32 | HTTPClientFindCloseHeader (HTTP_SESSION_HANDLE pSession)
Terminate a headers search session. More...

Detailed Description

Http client APIs.

Author
wanghf

Copyright (c) 2014 Winner Microelectronics Co., Ltd.

Macro Definition Documentation

◆ HTTP_CLIENT_EOS

#define HTTP_CLIENT_EOS 1000

HTTP end of stream message

◆ HTTP_CLIENT_ERROR_AUTH_HOST

#define HTTP_CLIENT_ERROR_AUTH_HOST 16

Could not authenticate with the remote host

◆ HTTP_CLIENT_ERROR_AUTH_MISMATCH

#define HTTP_CLIENT_ERROR_AUTH_MISMATCH 26

The selected authentication schema does not match the server response

◆ HTTP_CLIENT_ERROR_AUTH_PROXY

#define HTTP_CLIENT_ERROR_AUTH_PROXY 17

Could not authenticate with the remote proxy

◆ HTTP_CLIENT_ERROR_BAD_AUTH

#define HTTP_CLIENT_ERROR_BAD_AUTH 25

Authentication schema is not supported

◆ HTTP_CLIENT_ERROR_BAD_HEADER

#define HTTP_CLIENT_ERROR_BAD_HEADER 23

Could not detect key elements in the received headers

◆ HTTP_CLIENT_ERROR_BAD_STATE

#define HTTP_CLIENT_ERROR_BAD_STATE 20

The session state prevents the current function from proceeding

◆ HTTP_CLIENT_ERROR_BAD_URL

#define HTTP_CLIENT_ERROR_BAD_URL 22

Could not parse curtail elements from the URL (such as the host name, HTTP prefix act')

◆ HTTP_CLIENT_ERROR_BAD_VERB

#define HTTP_CLIENT_ERROR_BAD_VERB 18

Bad or not supported HTTP verb was passed to a function

◆ HTTP_CLIENT_ERROR_BUFFER_RSIZE

#define HTTP_CLIENT_ERROR_BUFFER_RSIZE 24

Error while attempting to resize a buffer

◆ HTTP_CLIENT_ERROR_CHUNK

#define HTTP_CLIENT_ERROR_CHUNK 21

Could not parse the chunk length while in chunked transfer

◆ HTTP_CLIENT_ERROR_CHUNK_TOO_BIG

#define HTTP_CLIENT_ERROR_CHUNK_TOO_BIG 15

The HTTP chunk token that was received from the server was too big and possibly wrong

◆ HTTP_CLIENT_ERROR_CONNECTION_CLOSE

#define HTTP_CLIENT_ERROR_CONNECTION_CLOSE 500

Connection closed.

◆ HTTP_CLIENT_ERROR_HEADER_BIG_CLUE

#define HTTP_CLIENT_ERROR_HEADER_BIG_CLUE 13

The headers search clue was too large for the internal API buffer

◆ HTTP_CLIENT_ERROR_HEADER_NO_LENGTH

#define HTTP_CLIENT_ERROR_HEADER_NO_LENGTH 14

No content length was specified for the outgoing data. the caller should specify chunking mode in the session creation

◆ HTTP_CLIENT_ERROR_HEADER_NOT_FOUND

#define HTTP_CLIENT_ERROR_HEADER_NOT_FOUND 12

Could not find element within header

◆ HTTP_CLIENT_ERROR_HEADER_RECV

#define HTTP_CLIENT_ERROR_HEADER_RECV 11

Error while receiving the remote HTTP headers

◆ HTTP_CLIENT_ERROR_INVALID_HANDLE

#define HTTP_CLIENT_ERROR_INVALID_HANDLE 2

an Invalid handle or possible bad pointer was passed to a function

◆ HTTP_CLIENT_ERROR_LONG_INPUT

#define HTTP_CLIENT_ERROR_LONG_INPUT 19

a function received a parameter that was too large

◆ HTTP_CLIENT_ERROR_NO_DIGEST_ALG

#define HTTP_CLIENT_ERROR_NO_DIGEST_ALG 28

Digest algorithem could be MD5 or MD5-sess other types are not supported

◆ HTTP_CLIENT_ERROR_NO_DIGEST_TOKEN

#define HTTP_CLIENT_ERROR_NO_DIGEST_TOKEN 27

an element was missing while parsing the digest authentication challenge

◆ HTTP_CLIENT_ERROR_NO_MEMORY

#define HTTP_CLIENT_ERROR_NO_MEMORY 3

Buffer too small or a failure while in memory allocation

◆ HTTP_CLIENT_ERROR_NOT_IMPLEMENTED

#define HTTP_CLIENT_ERROR_NOT_IMPLEMENTED 64

Feature is not (yet) implemented

◆ HTTP_CLIENT_ERROR_SOCKET_BIND

#define HTTP_CLIENT_ERROR_SOCKET_BIND 29

Binding error

◆ HTTP_CLIENT_ERROR_SOCKET_CANT_SET

#define HTTP_CLIENT_ERROR_SOCKET_CANT_SET 5

Can't send socket parameters

◆ HTTP_CLIENT_ERROR_SOCKET_CONNECT

#define HTTP_CLIENT_ERROR_SOCKET_CONNECT 7

Error while connecting to the remote server

◆ HTTP_CLIENT_ERROR_SOCKET_INVALID

#define HTTP_CLIENT_ERROR_SOCKET_INVALID 4

an attempt to use an invalid socket handle was made

◆ HTTP_CLIENT_ERROR_SOCKET_RECV

#define HTTP_CLIENT_ERROR_SOCKET_RECV 9

Error while receiving data

◆ HTTP_CLIENT_ERROR_SOCKET_RESOLVE

#define HTTP_CLIENT_ERROR_SOCKET_RESOLVE 6

Error while resolving host name

◆ HTTP_CLIENT_ERROR_SOCKET_SEND

#define HTTP_CLIENT_ERROR_SOCKET_SEND 10

Error while sending data

◆ HTTP_CLIENT_ERROR_SOCKET_TIME_OUT

#define HTTP_CLIENT_ERROR_SOCKET_TIME_OUT 8

socket time out error

◆ HTTP_CLIENT_ERROR_TLS_NEGO

#define HTTP_CLIENT_ERROR_TLS_NEGO 30

Tls negotiation error

◆ HTTP_CLIENT_SUCCESS

#define HTTP_CLIENT_SUCCESS 0

HTTP Success status

◆ HTTP_CLIENT_UNKNOWN_ERROR

#define HTTP_CLIENT_UNKNOWN_ERROR 1

Unknown error

Typedef Documentation

◆ HTTP_AUTH_SCHEMA

typedef enum _HTTP_AUTH_SCHEMA HTTP_AUTH_SCHEMA

HTTP Supported authentication methods

◆ HTTP_CLIENT

typedef struct _HTTP_CLIENT HTTP_CLIENT

Data structure that the caller can request at any time that will include some information regarding the session

◆ HTTP_VERB

typedef enum _HTTP_VERB HTTP_VERB

HTTP supported verbs

◆ HTTPParameters

typedef struct _HTTPParameters HTTPParameters

HTTP parameters

◆ tls_http_session_flags_t

typedef u32 tls_http_session_flags_t

http seesion flags

◆ tls_http_session_handle_t

typedef u32 tls_http_session_handle_t

http seesion handle

Enumeration Type Documentation

◆ _HTTP_AUTH_SCHEMA

enum _HTTP_AUTH_SCHEMA

HTTP Supported authentication methods

◆ _HTTP_VERB

enum _HTTP_VERB

HTTP supported verbs


W800 SDK APIs: doxy_out/include/app/wm_netif.h File Reference

  • doxy_out
  • include
  • app
wm_netif.h File Reference

ETHERNET INIT Interface. More...

#include "wm_config.h"
#include "wm_netif2.1.3.h"

Go to the source code of this file.

Detailed Description

ETHERNET INIT Interface.

Author
winnermicro

Copyright (c) 2015 Winner Microelectronics Co., Ltd.


W800 SDK APIs: doxy_out/include/app/wm_netif2.1.3.h File Reference

  • doxy_out
  • include
  • app
Data Structures | Macros | Typedefs | Functions
wm_netif2.1.3.h File Reference

netif213 module More...

#include "wm_config.h"
#include "wm_type_def.h"
#include "wm_sockets.h"
#include "wm_wifi.h"
#include "wm_params.h"

Go to the source code of this file.

Data Structures

struct tls_ethif

Macros

#define | NETIF_WIFI_JOIN_SUCCESS 0x1
#define | NETIF_WIFI_JOIN_FAILED 0x2
#define | NETIF_WIFI_DISCONNECTED 0x3
#define | NETIF_IP_NET_UP 0x4
#define | NETIF_WIFI_SOFTAP_SUCCESS 0x5
#define | NETIF_WIFI_SOFTAP_FAILED 0x6
#define | NETIF_WIFI_SOFTAP_CLOSED 0x7
#define | NETIF_IP_NET2_UP 0x8
#define | NETIF_IPV6_NET_UP 0x9
#define | IPADDR_TYPE_V4 0U
#define | IPADDR_TYPE_V6 6U
#define | IPADDR_TYPE_ANY 46U
#define | IPV6_ADDR_MAX_NUM 3

Typedefs

typedef void(* tls_netif_status_event_fn) (u8 status)

Functions

int | tls_ethernet_init (void)
This function is used to initialize TCP/IP Stack. More...
struct tls_ethif * | tls_netif_get_ethif (void)
This function is used to get IP information stored in tls_ethif struct. More...
void | tls_netif_set_status (u8 status)
This function is used to set tls_ethif status. More...
err_t | tls_dhcp_start (void)
This function is used to start DHCP Client. More...
err_t | tls_dhcp_stop (void)
This function is used to stop DHCP client. More...
err_t | tls_netif_set_addr (ip_addr_t *ipaddr, ip_addr_t *netmask, ip_addr_t *gw)
This function is used to change IP information. More...
void | tls_netif_dns_setserver (u8 numdns, ip_addr_t *dnsserver)
This function is used to set dns servers. More...
err_t | tls_netif_set_up (void)
This function is used to bring up an interface,available for processing traffic. More...
err_t | tls_netif_set_down (void)
This function is used to bring down an interface,disabling any traffic processing. More...
err_t | tls_netif_add_status_event (tls_netif_status_event_fn event_fn)
This function is used to add netif status changed callback to event list,if exists, do nothing. More...
err_t | tls_netif_remove_status_event (tls_netif_status_event_fn event_fn)
This function is used to remove netif status changed callback function from event list,if not exists, do nothing. More...
struct netif * | tls_get_netif (void)
This function is used to get pointer of netif. More...

Detailed Description

netif213 module

Author
WinnerMicro

Copyright (c) 2014 Winner Microelectronics Co., Ltd.

Macro Definition Documentation

◆ IPADDR_TYPE_V4

#define IPADDR_TYPE_V4 0U

These are the values for ip_addr_t.type

◆ NETIF_IP_NET2_UP

#define NETIF_IP_NET2_UP 0x8

MACRO for callback EVNET to inform soft ap's net

◆ NETIF_IP_NET_UP

#define NETIF_IP_NET_UP 0x4

MACRO for callbck EVENT to get IP address

◆ NETIF_WIFI_DISCONNECTED

#define NETIF_WIFI_DISCONNECTED 0x3

MACRO for callback EVENT to disconnect from AP or destroy soft-AP

◆ NETIF_WIFI_JOIN_FAILED

#define NETIF_WIFI_JOIN_FAILED 0x2

MACRO for callback EVENT to fail to join AP

◆ NETIF_WIFI_JOIN_SUCCESS

#define NETIF_WIFI_JOIN_SUCCESS 0x1

MACRO for callback EVENT to join AP or create soft-AP successfully

◆ NETIF_WIFI_SOFTAP_CLOSED

#define NETIF_WIFI_SOFTAP_CLOSED 0x7

MACRO for callback EVNET to close soft-AP

◆ NETIF_WIFI_SOFTAP_FAILED

#define NETIF_WIFI_SOFTAP_FAILED 0x6

MACRO for callback EVNET to create soft-AP failed

◆ NETIF_WIFI_SOFTAP_SUCCESS

#define NETIF_WIFI_SOFTAP_SUCCESS 0x5

MACRO for callback EVNET to create AP successfully


W800 SDK APIs: doxy_out/include/app/wm_ntp.h File Reference

  • doxy_out
  • include
  • app
Functions
wm_ntp.h File Reference

ntp module More...

#include "wm_type_def.h"

Go to the source code of this file.

Functions

u32 | tls_ntp_client (void)
This function is used to get network time. More...
int | tls_ntp_set_server (char *ipaddr, int server_no)
This function is used to set ntp servers. More...
int | tls_ntp_query_sntpcfg (void)
This function is used to query params of the ntp servers. More...

Detailed Description

ntp module

Author
dave

Copyright (c) 2015 Winner Microelectronics Co., Ltd.


W800 SDK APIs: doxy_out/include/app/wm_ssl_server.h Source File

  • doxy_out
  • include
  • app
wm_ssl_server.h
1 #ifndef _SSL_SERVER_H_
2 #define _SSL_SERVER_H_
3
4 #include "wm_config.h"
5 #include "HTTPClientWrapper.h"
6
7 #if 1//for doxygen
8 //#if TLS_CONFIG_SERVER_SIDE_SSL
9
10 #if TLS_CONFIG_USE_POLARSSL
11 #include "polarssl/config.h"
12 #include "polarssl/ssl.h"
13
14 #error "PolaSSL does not support ssl server now!"
15 #elif TLS_CONFIG_USE_MBEDTLS
16 typedef void tls_ssl_key_t;
17 #endif
18 //key type for tls_ssl_server_init
19 #define KEY_RSA 1
20 #define KEY_ECC 2
21 #define KEY_DH 3
22
56 int tls_ssl_server_init(void * arg);
57
75 int tls_ssl_server_load_keys(tls_ssl_key_t **keys, unsigned char *certBuf,
76 int32 certLen, unsigned char *privBuf, int32 privLen,
77 unsigned char *CAbuf, int32 CAlen, int keyType);
78
91 int tls_ssl_server_handshake(tls_ssl_t **ssl_p, int fd, tls_ssl_key_t *keys);
92
107 int tls_ssl_server_send(tls_ssl_t *ssl, int s,char *sndbuf, int len,int flags);
108
123 int tls_ssl_server_recv(tls_ssl_t *ssl,int s,char *buf, int len,int flags);
124
135 void tls_ssl_server_close_conn(tls_ssl_t *ssl, int s);
136
147 int tls_ssl_server_close(tls_ssl_key_t * keys);
148
157 #endif /*TLS_CONFIG_SERVER_SIDE_SSL*/
158 #endif /*_SSL_SERVER_H_*/
159
tls_ssl_server_handshake
int tls_ssl_server_handshake(tls_ssl_t **ssl_p, int fd, tls_ssl_key_t *keys)
This function is used to set SSL Server working.
tls_ssl_server_send
int tls_ssl_server_send(tls_ssl_t *ssl, int s, char *sndbuf, int len, int flags)
This function is used to send data.
tls_ssl_server_init
int tls_ssl_server_init(void *arg)
This function is used to initialize SSL Server.
tls_ssl_server_recv
int tls_ssl_server_recv(tls_ssl_t *ssl, int s, char *buf, int len, int flags)
This function is used to receive data.
tls_ssl_server_close
int tls_ssl_server_close(tls_ssl_key_t *keys)
This function is used to close SSL Server.
tls_ssl_server_close_conn
void tls_ssl_server_close_conn(tls_ssl_t *ssl, int s)
This function is used to close connection.
wm_config.h
w800 chip inferface configure
tls_ssl_server_load_keys
int tls_ssl_server_load_keys(tls_ssl_key_t **keys, unsigned char *certBuf, int32 certLen, unsigned char *privBuf, int32 privLen, unsigned char *CAbuf, int32 CAlen, int keyType)
This function is used to set SSL keys.


W800 SDK APIs: doxy_out/include/app/wm_webserver.h File Reference

  • doxy_out
  • include
  • app
Functions
wm_webserver.h File Reference

WEB SERVER. More...

Go to the source code of this file.

Functions

void | tls_webserver_init (void)
This function is used to start WEB SERVER service. More...
void | tls_webserver_deinit (void)
This function is used to deinit WEB SERVER service. More...

Detailed Description

WEB SERVER.

Author
winnermicro

Copyright (c) 2015 Winner Microelectronics Co., Ltd.


W800 SDK APIs: doxy_out/include/app/wm_wifi_oneshot.h File Reference

  • doxy_out
  • include
  • app
Macros | Enumerations | Functions
wm_wifi_oneshot.h File Reference

Wi-Fi OneShot. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <wm_type_def.h>
#include <wm_ieee80211.h>
#include "wm_config.h"
#include "wm_bt_config.h"

Go to the source code of this file.

Macros

#define | CONFIG_ONESHOT_MAC_FILTER 0
#define | ONESHOT_ON 1
#define | ONESHOT_OFF 0
#define | TLS_CONFIG_UDP_ONE_SHOT ONESHOT_ON
#define | TLS_CONFIG_UDP_LSD_SPECIAL (ONESHOT_ON&& TLS_CONFIG_UDP_ONE_SHOT)
#define | TLS_CONFIG_ONESHOT_DELAY_SPECIAL ONESHOT_ON
#define | TLS_CONFIG_AP_MODE_ONESHOT (ONESHOT_ON && TLS_CONFIG_AP)
#define | TLS_CONFIG_WEB_SERVER_MODE (ONESHOT_ON && TLS_CONFIG_AP_MODE_ONESHOT)
#define | TLS_CONFIG_SOCKET_MODE (ONESHOT_ON && TLS_CONFIG_AP_MODE_ONESHOT)
#define | TLS_CONFIG_AIRKISS_MODE_ONESHOT (ONESHOT_ON && TLS_CONFIG_UDP_ONE_SHOT)
#define | AIRKISS_USE_SELF_WRITE 1
#define | TLS_CONFIG_BLE_WIFI_ONESHOT (ONESHOT_ON && (WM_BLE_INCLUDED == CFG_ON || WM_NIMBLE_INCLUDED == CFG_ON))

Enumerations

enum ONESHOT_MSG_ENUM {
ONESHOT_SCAN_START, ONESHOT_SCAN_FINISHED, ONESHOT_SWITCH_CHANNEL, ONESHOT_STOP_TMP_CHAN_SWITCH,
ONESHOT_STOP_CHAN_SWITCH, ONESHOT_HANDSHAKE_TIMEOUT, ONESHOT_RECV_TIMEOUT, ONESHOT_RECV_ERR,
ONESHOT_STOP_DATA_CLEAR, ONESHOT_NET_UP, AP_SOCK_S_MSG_SOCKET_RECEIVE_DATA, AP_WEB_S_MSG_RECEIVE_DATA,
AP_SOCK_S_MSG_SOCKET_CREATE, AP_SOCK_S_MSG_WJOIN_FAILD
}

Functions

int | tls_filter_module_srcmac (u8 *mac)
int | tls_wifi_set_oneshot_flag (u8 flag)
This function is used to set oneshot flag. More...
int | tls_wifi_get_oneshot_flag (void)
This function is used to get oneshot flag. More...
u8 | tls_wifi_dataframe_recv (struct ieee80211_hdr *hdr, u32 data_len)
Handle wild packets coming from the air. More...
void | oneshot_airkiss_send_reply (void)
This function is used to acknowledge app when airkiss process is done. More...
void | tls_airkiss_recv (u8 *data, u16 data_len)
This function is used to deal with airkiss's wild packet. More...
void | tls_airkiss_start (void)
This function is used to start airkiss. More...
void | tls_airkiss_stop (void)
This function is used to stop airkiss. More...
void | tls_oneshot_airkiss_change_channel (void)
This function is used to change channel for airkiss. More...
int | wm_oneshot_task_init (void)
This function is used to init oneshot task. More...
void | tls_oneshot_switch_channel_tim_stop (struct ieee80211_hdr *hdr)
This function is used to stop oneshot timer. More...
void | tls_oneshot_switch_channel_tim_temp_stop (void)
This function is used to stop oneshot temp timer. More...
int | tls_oneshot_if_use_bssid (u8 *ssid, u8 *ssid_len, u8 *bssid)
handle if use bssid to connect wifi. More...
void | tls_oneshot_find_chlist (u8 *ssid, u8 ssid_len, u16 *chlist)
Find channel according to ssid. More...
void | wm_oneshot_netif_status_event (u8 status)
This function is to deal with oneshot event according netif status. More...

Detailed Description

Wi-Fi OneShot.

Author
winnermicro

Copyright (c) 2015 Winner Microelectronics Co., Ltd.

Macro Definition Documentation

◆ CONFIG_ONESHOT_MAC_FILTER

#define CONFIG_ONESHOT_MAC_FILTER 0

DEBUG USE MAC FILTER START

◆ TLS_CONFIG_AIRKISS_MODE_ONESHOT

#define TLS_CONFIG_AIRKISS_MODE_ONESHOT (ONESHOT_ON && TLS_CONFIG_UDP_ONE_SHOT)

AIRKISS ONESHOT

◆ TLS_CONFIG_AP_MODE_ONESHOT

#define TLS_CONFIG_AP_MODE_ONESHOT (ONESHOT_ON && TLS_CONFIG_AP)

AP ONESHOT

◆ TLS_CONFIG_BLE_WIFI_ONESHOT

#define TLS_CONFIG_BLE_WIFI_ONESHOT (ONESHOT_ON && (WM_BLE_INCLUDED == CFG_ON || WM_NIMBLE_INCLUDED == CFG_ON))

BLE ONESHOT

◆ TLS_CONFIG_ONESHOT_DELAY_SPECIAL

#define TLS_CONFIG_ONESHOT_DELAY_SPECIAL ONESHOT_ON

Delay start plcp receive

◆ TLS_CONFIG_UDP_LSD_SPECIAL

#define TLS_CONFIG_UDP_LSD_SPECIAL (ONESHOT_ON&& TLS_CONFIG_UDP_ONE_SHOT)

WinnerMicro ONSHOT

◆ TLS_CONFIG_UDP_ONE_SHOT

#define TLS_CONFIG_UDP_ONE_SHOT ONESHOT_ON

UDP MULTICAST ONE SHOT

Function Documentation

◆ oneshot_airkiss_send_reply()

void oneshot_airkiss_send_reply ( void )

This function is used to acknowledge app when airkiss process is done.

Parameters
[in] None
Returns
None
Note
None

◆ tls_airkiss_recv()

void tls_airkiss_recv | ( | u8 * | data,
 |  | u16 | data_len
 | ) |  |

This function is used to deal with airkiss's wild packet.

Parameters
[in] | *data | ieee80211 packet
[in] | data_len | packet length
Returns
None
Note
None

◆ tls_airkiss_start()

void tls_airkiss_start ( void )

This function is used to start airkiss.

Parameters
[in] None
Returns
None
Note
None

◆ tls_airkiss_stop()

void tls_airkiss_stop ( void )

This function is used to stop airkiss.

Parameters
[in] None
Returns
None
Note
None

◆ tls_oneshot_airkiss_change_channel()

void tls_oneshot_airkiss_change_channel ( void )

This function is used to change channel for airkiss.

Parameters
[in] None
Returns
None
Note
None

◆ tls_oneshot_find_chlist()

void tls_oneshot_find_chlist | ( | u8 * | ssid,
 |  | u8 | ssid_len,
 |  | u16 * | chlist
 | ) |  |

Find channel according to ssid.

Parameters
[in] | *ssid | ssid to be compared
[in] | ssid_len | ssid length
[out] | chlist | chlist to be add according to ssid info
Return values
None
Note
None

◆ tls_oneshot_if_use_bssid()

int tls_oneshot_if_use_bssid | ( | u8 * | ssid,
 |  | u8 * | ssid_len,
 |  | u8 * | bssid
 | ) |  |

handle if use bssid to connect wifi.

Parameters
[in] | *ssid | : ap name to connect
[in] | *ssid_len | ap name's length to connect
[in] | *bssid | : ap bssid
Return values
no mean
Note
None

◆ tls_oneshot_switch_channel_tim_stop()

void tls_oneshot_switch_channel_tim_stop ( struct ieee80211_hdr * hdr )

This function is used to stop oneshot timer.

Parameters
[in] None
Returns
None
Note
None

◆ tls_oneshot_switch_channel_tim_temp_stop()

void tls_oneshot_switch_channel_tim_temp_stop ( void )

This function is used to stop oneshot temp timer.

Parameters
[in] None
Returns
None
Note
None

◆ tls_wifi_dataframe_recv()

u8 tls_wifi_dataframe_recv | ( | struct ieee80211_hdr * | hdr,
 |  | u32 | data_len
 | ) |  |

Handle wild packets coming from the air.

Parameters
[in] | *hdr | point to ieee80211 data header
[in] | data_len | data len of ieee80211 data
Return values
no mean
Note
None

◆ wm_oneshot_netif_status_event()

void wm_oneshot_netif_status_event ( u8 status )

This function is to deal with oneshot event according netif status.

Parameters
[in] | status:net | status
[out] | None
Return values
None
Note
None

◆ wm_oneshot_task_init()

int wm_oneshot_task_init ( void )

This function is used to init oneshot task.

Parameters
[in] None
Returns
None
Note
Not in use now


W800 SDK APIs: doxy_out/include/bt Directory Reference

  • doxy_out
  • include
  • bt
bt Directory Reference

Files

file | wm_ble.h [code]
Bluetooth API.
file | wm_ble_gatt.h [code]
Bluetooth API.
file | wm_bt.h [code]
Bluetooth API.
file | wm_bt_av.h [code]
Bluetooth API.
file | wm_bt_def.h [code]
Bluetooth Define.
file | wm_bt_hf_client.h [code]
Bluetooth API.
file | wm_bt_spp.h [code]
Bluetooth API.


W800 SDK APIs: doxy_out/include/bt/wm_ble.h File Reference

  • doxy_out
  • include
  • bt
Functions
wm_ble.h File Reference

Bluetooth API. More...

#include "wm_bt_def.h"

Go to the source code of this file.

Functions

tls_bt_status_t | tls_ble_dm_init (tls_ble_dm_callback_t callback)
initialize the application callback function More...
tls_bt_status_t | tls_ble_adv (uint8_t adv_state)
start/stop ble advertisement More...
tls_bt_status_t | tls_ble_set_adv_data (tls_ble_dm_adv_data_t *data)
configure the advertisment content More...
tls_bt_status_t | tls_ble_set_adv_param (tls_ble_dm_adv_param_t *param)
configure the advertisment parameters More...
tls_bt_status_t | tls_ble_set_adv_ext_param (tls_ble_dm_adv_ext_param_t *param)
configure the advertisment extented parameters More...
tls_bt_status_t | tls_ble_scan (bool start)
start/stop ble scan More...
tls_bt_status_t | tls_ble_set_scan_param (int window, int interval, uint8_t scan_mode)
configure the scan parameters More...
tls_bt_status_t | tls_dm_evt_triger (int id, tls_ble_dm_triger_callback_t callback)
enable a async process evt More...
tls_bt_status_t | tls_dm_set_data_length (tls_bt_addr_t *bd_addr, uint16_t length)
configure the max transmit unit More...
tls_bt_status_t | tls_dm_set_privacy (uint8_t enable)
configure the ble privacy More...
tls_bt_status_t | tls_ble_conn_parameter_update (const tls_bt_addr_t *bd_addr, int min_interval, int max_interval, int latency, int timeout)
update the connection parameters More...
tls_bt_status_t | tls_dm_read_remote_rssi (const tls_bt_addr_t *bd_addr)
read the remote device signal strength connected More...
tls_bt_status_t | tls_ble_set_sec_io_cap (uint8_t io_cap)
config the io capabilities of local device More...
tls_bt_status_t | tls_ble_set_sec_auth_req (uint8_t auth_req)
config the auth requirement of local device More...
tls_bt_status_t | tls_ble_set_sec (const tls_bt_addr_t *bd_addr, uint8_t sec_act)
This function is called to ensure that connection is encrypted. Should be called only on an open connection. Typically only needed for connections that first want to bring up unencrypted links, then later encrypt them. More...
tls_bt_status_t | tls_ble_gap_adv (uint8_t start, int duration)
only used to start/stop ble advertisement More...

Detailed Description

Bluetooth API.

Author
WinnerMicro

Copyright (c) 2020 Winner Microelectronics Co., Ltd.


W800 SDK APIs: doxy_out/include/bt/wm_ble_gatt.h File Reference

  • doxy_out
  • include
  • bt
Functions
wm_ble_gatt.h File Reference

Bluetooth API. More...

#include "wm_bt_def.h"

Go to the source code of this file.

Functions

tls_bt_status_t | tls_ble_client_app_init (tls_ble_callback_t callback)
initialize the btif_gatt_client callback function More...
tls_bt_status_t | tls_ble_client_app_deinit (void)
free the tls_ble_callback_t pointer More...
tls_bt_status_t | tls_ble_client_app_register (tls_bt_uuid_t *uuid)
this function is called to register client application More...
tls_bt_status_t | tls_ble_client_app_unregister (uint8_t client_if)
this function is called to unregister client application More...
tls_bt_status_t | tls_ble_client_connect (uint8_t client_if, const tls_bt_addr_t *bd_addr, uint8_t is_direct, int transport)
this function is called to open an BLE connection to a remote device or add a background auto connection More...
tls_bt_status_t | tls_ble_client_disconnect (uint8_t client_if, const tls_bt_addr_t *bd_addr, int conn_id)
this function is called to disconnect with gatt server connection More...
tls_bt_status_t | tls_ble_client_listen (uint8_t client_if, uint8_t start)
start or stop advertisements to listen for incoming connections More...
tls_bt_status_t | tls_ble_client_refresh (uint8_t client_if, const tls_bt_addr_t *bd_addr)
clear the attribute cache for a given device More...
tls_bt_status_t | tls_ble_client_search_service (uint16_t conn_id, tls_bt_uuid_t *filter_uuid)
enumerate all GATT services on a connected device More...
tls_bt_status_t | tls_ble_client_write_characteristic (uint16_t conn_id, uint16_t handle, int write_type, int len, int auth_req, char *p_value)
write a remote characteristic More...
tls_bt_status_t | tls_ble_client_read_characteristic (uint16_t conn_id, uint16_t handle, int auth_req)
read a characteristic on a remote device More...
tls_bt_status_t | tls_ble_client_read_descriptor (uint16_t conn_id, uint16_t handle, int auth_req)
read the descriptor for a given characteristic More...
tls_bt_status_t | tls_ble_client_write_descriptor (uint16_t conn_id, uint16_t handle, int write_type, int len, int auth_req, char *p_value)
write a remote descriptor for a given characteristic More...
tls_bt_status_t | tls_ble_client_execute_write (uint16_t conn_id, int execute)
execute a prepared write operation More...
tls_bt_status_t | tls_ble_client_register_for_notification (int client_if, const tls_bt_addr_t *bd_addr, uint16_t handle, uint16_t conn_id)
Register to receive notifications or indications for a given characteristic. More...
tls_bt_status_t | tls_ble_client_deregister_for_notification (int client_if, const tls_bt_addr_t *bd_addr, uint16_t handle, uint16_t conn_id)
deregister a previous request for notifications/indications More...
tls_bt_status_t | tls_ble_client_configure_mtu (uint16_t conn_id, uint16_t mtu)
configure the MTU for a given connection More...
tls_bt_status_t | tls_ble_client_get_gatt_db (uint16_t conn_id)
get gatt db content More...
tls_bt_status_t | tls_ble_server_app_init (tls_ble_callback_t callback)
initialize the btif_gatt_server callback function More...
tls_bt_status_t | tls_ble_server_app_deinit ()
tls_bt_status_t | tls_ble_server_app_register (tls_bt_uuid_t *uuid)
this function is called to register server application More...
tls_bt_status_t | tls_ble_server_app_unregister (uint8_t server_if)
this function is called to unregister server application More...
tls_bt_status_t | tls_ble_server_add_service (uint8_t server_if, int inst_id, int primay, tls_bt_uuid_t *uuid, int num_handles)
create a new service More...
tls_bt_status_t | tls_ble_server_add_characteristic (uint8_t server_if, uint16_t service_handle, tls_bt_uuid_t *uuid, int properties, int permission)
add a characteristic to a service More...
tls_bt_status_t | tls_ble_server_add_descriptor (uint8_t server_if, uint16_t service_handle, tls_bt_uuid_t *uuid, int permissions)
add a descriptor to a given service More...
tls_bt_status_t | tls_ble_server_start_service (uint8_t server_if, uint16_t service_handle, int transport)
starts a local service More...
tls_bt_status_t | tls_ble_server_stop_service (uint8_t server_if, uint16_t service_handle)
stop a local service More...
tls_bt_status_t | tls_ble_server_delete_service (uint8_t server_if, uint16_t service_handle)
delete a local service More...
tls_bt_status_t | tls_ble_server_connect (uint8_t server_if, const tls_bt_addr_t *bd_addr, uint8_t is_direct, int transport)
create a connection to a remote peripheral More...
tls_bt_status_t | tls_ble_server_disconnect (uint8_t server_if, const tls_bt_addr_t *bd_addr, uint16_t conn_id)
disconnect an established connection or cancel a pending one More...
tls_bt_status_t | tls_ble_server_send_indication (uint8_t server_if, uint16_t attribute_handle, uint16_t conn_id, int len, int confirm, char *p_value)
send value indication to a remote device More...
tls_bt_status_t | tls_ble_server_send_response (uint16_t conn_id, uint32_t trans_id, uint8_t status, int offset, uint16_t attr_handle, int auth_req, uint8_t *p_value, int len)
send a response to a read/write operation More...

Detailed Description

Bluetooth API.

Author
WinnerMicro

Copyright (c) 2020 Winner Microelectronics Co., Ltd.


W800 SDK APIs: doxy_out/include/bt/wm_bt.h File Reference

  • doxy_out
  • include
  • bt
Functions
wm_bt.h File Reference

Bluetooth API. More...

#include "wm_bt_def.h"

Go to the source code of this file.

Functions

tls_bt_status_t | tls_bt_pin_reply (const tls_bt_addr_t *bd_addr, uint8_t accept, uint8_t pin_len, tls_bt_pin_code_t *pin_code)
reply the pin request More...
tls_bt_status_t | tls_bt_ssp_reply (const tls_bt_addr_t *bd_addr, tls_bt_ssp_variant_t variant, uint8_t accept, uint32_t passkey)
reply the ssp request More...
tls_bt_status_t | tls_bt_set_adapter_property (const tls_bt_property_t *property, uint8_t update_to_flash)
set the adapter property More...
tls_bt_status_t | tls_bt_get_adapter_property (tls_bt_property_type_t type)
get the adapter property More...
tls_bt_status_t | tls_bt_start_discovery (void)
tls_bt_status_t | tls_bt_cancel_discovery (void)
tls_bt_status_t | tls_bt_create_bond (const tls_bt_addr_t *bd_addr, int transport)
tls_bt_status_t | tls_bt_cancel_bond (const tls_bt_addr_t *bd_addr)
tls_bt_status_t | tls_bt_remove_bond (const tls_bt_addr_t *bd_addr)
tls_bt_status_t | tls_bt_host_cleanup (void)
tls_bt_status_t | tls_bt_enable (tls_bt_host_callback_t callback, tls_bt_hci_if_t *p_hci_if, tls_bt_log_level_t log_level)
tls_bt_status_t tls_bt_disable ()
tls_bt_status_t | tls_bt_ctrl_enable (tls_bt_hci_if_t *p_hci_if, tls_bt_log_level_t log_level)
enable the bluetooth controller stack More...
tls_bt_status_t | tls_bt_ctrl_disable (void)
disable the bluetooth controller stack More...
tls_bt_status_t | tls_ble_set_tx_power (tls_ble_power_type_t power_type, int8_t power_level_index)
configure the ble emit power of different ble handle type More...
int8_t | tls_ble_get_tx_power (tls_ble_power_type_t power_type)
get the ble emit power of different ble handle type More...
tls_bt_status_t | tls_bredr_set_tx_power (int8_t min_power_level, int8_t max_power_level)
configure the classic/enhanced bluetooth transmit power More...
tls_bt_status_t | tls_bredr_get_tx_power (int8_t *min_power_level, int8_t *max_power_level)
get the classic/enhanced bluetooth transmit power level More...
tls_bt_status_t | tls_bredr_sco_datapath_set (tls_sco_data_path_t data_path)
configure the voice output path More...
tls_bt_ctrl_status_t | tls_bt_controller_get_status (void)
get controller stack status More...
tls_bt_status_t | tls_bt_vuart_host_send_packet (uint8_t *data, uint16_t len)
this function receive the hci message from host hci_h4 inteface More...
tls_bt_status_t | tls_bt_ctrl_if_register (const tls_bt_host_if_t *p_host_if)
this function register the host stack receive message function and indication the controller receive hci command avaiable More...
tls_bt_status_t tls_bt_ctrl_if_unregister ()
this function unregister the host stack receive message function and indication the controller receive hci command avaiable More...
tls_bt_status_t | tls_bt_ctrl_sleep (bool enable)
this function configure the controller enter into sleep mode when controller is in idle mode More...
bool | tls_bt_ctrl_is_sleep (void)
this function look up the controller is in sleep mode or not More...
tls_bt_status_t | tls_bt_ctrl_wakeup (void)
this function wake up the controller, in other words exit sleep mode More...
bool | tls_bt_vuart_host_check_send_available ()
this function check controller can handle hci commands yes or no More...
tls_bt_status_t exit_bt_test_mode ()
this function exit bluetooth test mode More...
tls_bt_status_t | enable_bt_test_mode (tls_bt_hci_if_t *p_hci_if)
this function enable bluetooth test mode More...
void | tls_rf_bt_mode (uint8_t enable)
this function enable rf to bluetooth mode More...
tls_bt_status_t | tls_bt_set_mesh_mode (uint8_t enable)
this function enable controller to running in mesh mode or not More...
tls_bt_status_t | tls_bt_register_sleep_callback (tls_bt_controller_sleep_enter_func_ptr sleep_enter, tls_bt_controller_sleep_exit_func_ptr sleep_exit)
this function register callback function when controller entering or exiting sleep mode More...
tls_bt_status_t | tls_bt_register_pending_process_callback (tls_bt_app_pending_process_func_ptr process_ptr)
this function register blocking operation function(eg. flash read/write). More...

Detailed Description

Bluetooth API.

Author
WinnerMicro

Copyright (c) 2020 Winner Microelectronics Co., Ltd.


W800 SDK APIs: doxy_out/include/bt/wm_bt_api.h Source File

  • doxy_out
  • include
  • bt
wm_bt_api.h
1 #ifndef __WM_BT_API_H__
2 #define __WM_BT_API_H__
3
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7
8 #if (WM_NIMBLE_INCLUDED == CFG_ON)
9 #include "wm_bt.h"
10 #include "wm_ble.h"
11
12 extern tls_bt_status_t enable_bt_test_mode(tls_bt_hci_if_t *p_hci_if);
13 extern tls_bt_status_t exit_bt_test_mode();
14
15 extern int tls_at_bt_enable(int uart_no, tls_bt_log_level_t log_level);
16 extern int tls_at_bt_destroy(void);
17 extern void tls_rf_bt_mode(uint8_t mode);
18 extern int tls_ble_client_demo_api_init(tls_ble_uart_output_ptr output_func_ptr,tls_ble_uart_sent_ptr uart_in_and_sent_ptr);
19 extern int tls_ble_server_demo_api_init(tls_ble_uart_output_ptr output_func_ptr,tls_ble_uart_sent_ptr uart_in_and_sent_ptr);
20 extern int tls_ble_client_demo_api_deinit();
21 extern int tls_ble_server_demo_api_deinit();
22 extern int tls_ble_client_multi_conn_demo_api_init();
23 extern int tls_ble_client_multi_conn_demo_api_deinit();
24 extern int tls_ble_uart_init(tls_ble_uart_mode_t mode, uint8_t uart_id, tls_uart_options_t *p_hci_if);
25 extern int tls_ble_uart_deinit(tls_ble_uart_mode_t mode,uint8_t uart_id);
26 extern int tls_ble_demo_adv(uint8_t type);
27 extern int tls_ble_demo_scan(uint8_t start);
28 extern tls_bt_status_t tls_ble_set_scan_chnl_map(uint8_t map);
29 extern int tls_ble_client_demo_api_send_msg(uint8_t *ptr, int length);
30 extern int tls_ble_server_demo_api_send_msg(uint8_t *data, int data_len);
31
32
33 extern int tls_ble_gap_set_name(const char *dev_name, uint8_t update_flash);
34 extern int tls_ble_gap_get_name(char *dev_name);
35 extern int tls_ble_gap_set_data(wm_ble_gap_data_t type, uint8_t *data, uint8_t data_len);
36 extern int tls_ble_gap_set_adv_param(uint8_t adv_type, uint32_t min, uint32_t max, uint8_t chn_map, uint8_t filter_policy, uint8_t *dir_mac, uint8_t dir_mac_type);
37 extern int tls_ble_gap_set_scan_param(uint32_t intv, uint32_t window, uint8_t filter_policy, bool limited, bool passive, bool filter_duplicate);
38 extern int tls_nimble_gap_adv(wm_ble_adv_type_t type, int duration);
39 extern void tls_ble_demo_scan_at_cmd_register(void (*scan_resp_cb_fn)(int type, int8_t rssi, uint8_t *addr, const uint8_t *name, int name_len, const uint8_t *raw_scan_resp, int raw_scan_resp_length));
40 extern void tls_ble_demo_scan_at_cmd_unregister();
41 extern int tls_ble_gap_scan(wm_ble_scan_type_t type, bool filter_duplicate);
42
43
44 #if (WM_MESH_INCLUDED == CFG_ON)
45 extern int tls_ble_mesh_init(tls_bt_mesh_at_callback_t at_cb, tls_bt_mesh_role_t role, bool running);
46 extern int tls_ble_mesh_deinit(void);
47 extern int tls_ble_mesh_get_cfg(tls_mesh_primary_cfg_t *cfg);
48 extern int tls_ble_mesh_get_primary_addr(uint16_t *primary_addr);
49 extern int tls_ble_mesh_change_ttl(uint8_t ttl);
50 extern int tls_ble_mesh_change_primary_addr(uint16_t primary_addr);
51 extern int tls_ble_mesh_clear_local_rpl(void);
52 extern int tls_ble_mesh_gen_level_set(uint16_t net_idx, uint16_t dst, uint16_t app_idx, int16_t val,
53 int16_t *state);
54 extern int tls_ble_mesh_gen_level_get(uint16_t net_idx, uint16_t dst, uint16_t app_idx, int16_t *state);
55 extern int tls_ble_mesh_gen_off_publish(uint8_t onoff_state);
56 extern int tls_ble_mesh_gen_onoff_get(uint16_t net_idx, uint16_t dst, uint16_t app_idx, uint8_t *state);
57 extern int tls_ble_mesh_gen_onoff_set(uint16_t net_idx, uint16_t dst, uint16_t app_idx, uint8_t val,
58 uint8_t *state);
59 extern int tls_ble_mesh_pub_set(uint16_t net_idx, uint16_t dst, uint16_t elem_addr, uint16_t mod_id,
60 uint16_t cid,
61 tls_bt_mesh_cfg_mod_pub *pub, uint8_t *status);
62 extern int tls_ble_mesh_pub_get(uint16_t net_idx, uint16_t dst, uint16_t elem_addr, uint16_t mod_id,
63 uint16_t cid, tls_bt_mesh_cfg_mod_pub *pub, uint8_t *status);
64 extern int tls_ble_mesh_sub_add(uint16_t net_idx, uint16_t dst, uint16_t elem_addr, uint16_t sub_addr,
65 uint16_t mod_id, uint16_t cid, uint8_t *status);
66
67 extern int tls_ble_mesh_sub_del(uint16_t net_idx, uint16_t dst, uint16_t elem_addr, uint16_t sub_addr,
68 uint16_t mod_id, uint16_t cid, uint8_t *status);
69 extern int tls_ble_mesh_sub_add(uint16_t net_idx, uint16_t dst, uint16_t elem_addr, uint16_t sub_addr,
70 uint16_t mod_id, uint16_t cid, uint8_t *status);
71 extern int tls_ble_mesh_sub_get(uint16_t net_idx, uint16_t dst, uint16_t elem_addr, uint16_t mod_id,
72 uint16_t cid,
73 uint8_t *status, uint16_t *subs, uint32_t *sub_cnt);
74 extern int tls_ble_mesh_friend_set(uint16_t net_idx, uint16_t dst, uint8_t val, uint8_t *status);
75 extern int tls_ble_mesh_friend_get(uint16_t net_idx, uint16_t dst, uint8_t *val);
76 extern int tls_ble_mesh_proxy_get(uint16_t net_idx, uint16_t dst, uint8_t *proxy);
77 extern int tls_ble_mesh_proxy_set(uint16_t net_idx, uint16_t dst, uint8_t val, uint8_t *proxy);
78 extern int tls_ble_mesh_relay_get(uint16_t net_idx, uint16_t dst, uint8_t *relay, uint8_t *transmit);
79 extern int tls_ble_mesh_relay_set(uint16_t net_idx, uint16_t dst, uint8_t relay, uint8_t count,
80 uint8_t interval, uint8_t *status, uint8_t *transmit);
81 extern int tls_ble_mesh_unbind_app_key(uint16_t net_idx, uint16_t dst, uint16_t elem_addr,
82 uint16_t mod_app_idx, uint16_t mod_id, uint16_t cid, uint8_t *status);
83 extern int tls_ble_mesh_bind_app_key(uint16_t net_idx, uint16_t dst, uint16_t elem_addr,
84 uint16_t mod_app_idx, uint16_t mod_id, uint16_t cid, uint8_t *status);
85 extern int tls_ble_mesh_add_app_key(uint16_t net_idx, uint16_t dst, uint16_t key_net_idx,
86 uint16_t key_app_idx, uint8_t app_key[16], uint8_t *status);
87 extern int tls_ble_mesh_add_local_app_key(uint16_t net_idx, uint16_t app_idx, uint8_t app_key[16]);
88 extern int tls_ble_mesh_input_oob_number(uint32_t number);
89 extern int tls_ble_mesh_input_oob_string(const char *string);
90 extern int tls_ble_mesh_node_reset(uint16_t net_idx, uint16_t addr, uint8_t *status);
91 extern int tls_ble_mesh_provisioner_prov_adv(uint8_t uuid[16], uint16_t net_idx, uint16_t addr,
92 uint8_t duration);
93 extern int tls_ble_mesh_provisioner_scan(bool enable);
94 extern int tls_ble_mesh_clear_local_rpl(void);
95 extern int tls_ble_mesh_change_primary_addr(uint16_t primary_addr);
96 extern int tls_ble_mesh_get_primary_addr(uint16_t *primary_addr);
97 extern int tls_ble_mesh_change_ttl(uint8_t ttl);
98 extern int tls_ble_mesh_get_cfg(tls_mesh_primary_cfg_t *cfg);
99 extern int tls_ble_mesh_get_comp(uint16_t net_idx, uint16_t dst, uint8_t *status, char *rsp_data,
100 uint32_t *data_len);
101 extern int tls_ble_mesh_vnd_send_msg(uint8_t *msg, int len);
102
103 extern int tls_ble_mesh_hb_sub_set(uint16_t net_idx, uint16_t dst, tls_bt_mesh_cfg_hb_sub *hb_sub, uint8_t *status);
104 extern int tls_ble_mesh_hb_sub_get(uint16_t net_idx, uint16_t dst, tls_bt_mesh_cfg_hb_sub *hb_sub, uint8_t *status);
105
106 extern int tls_ble_mesh_hb_pub_set(uint16_t net_idx, uint16_t dst, const tls_bt_mesh_cfg_hb_pub *hb_pub, uint8_t *status);
107 extern int tls_ble_mesh_hb_pub_get(uint16_t net_idx, uint16_t dst, tls_bt_mesh_cfg_hb_pub *hb_pub, uint8_t *status);
109 extern int tls_ble_mesh_node_deinit(int reason);
110 extern int tls_ble_mesh_node_init(void);
111 extern int tls_ble_mesh_erase_cfg(void);
112
113 #endif
114
115 #else
116 #if (WM_BT_INCLUDED == CFG_ON || WM_BLE_INCLUDED == CFG_ON)
117 #include "wm_bt.h"
118 #include "wm_ble.h"
119 #include "wm_ble_gatt.h"
120
121 extern tls_bt_status_t enable_bt_test_mode(tls_bt_hci_if_t *p_hci_if);
122 extern tls_bt_status_t exit_bt_test_mode();
123
124 extern int tls_at_bt_enable(int uart_no, tls_bt_log_level_t log_level, tls_bt_host_callback_t at_callback_ptr);
125 extern int tls_at_bt_destroy(void);
126 extern int tls_at_bt_cleanup_host(void);
127 extern void tls_rf_bt_mode(uint8_t mode);
128 #if (WM_BT_INCLUDED == CFG_ON)
129 extern int demo_bt_scan_mode(int type);
130 extern int demo_bt_inquiry(int type);
131 extern int demo_bt_app_on();
132 extern int demo_bt_app_off();
133 #endif
134
135 #if (WM_BTA_AV_SINK_INCLUDED == CFG_ON)
136 extern tls_bt_status_t tls_bt_enable_a2dp_sink();
137 extern tls_bt_status_t tls_bt_disable_a2dp_sink();
138 #endif
139
140 #if (WM_BTA_HFP_HSP_INCLUDED == CFG_ON)
141 extern tls_bt_status_t tls_bt_enable_hfp_client();
142 extern tls_bt_status_t tls_bt_disable_hfp_client();
143 extern tls_bt_status_t tls_bt_dial_number(const char* number);
144 #endif
145
146 #if (WM_BTA_SPPS_INCLUDED == CFG_ON)
147 extern tls_bt_status_t tls_bt_enable_spp_server();
148 extern tls_bt_status_t tls_bt_disable_spp_server();
149 #endif
150 #if (WM_BTA_SPPC_INCLUDED == CFG_ON)
151 extern tls_bt_status_t tls_bt_enable_spp_client();
152 extern tls_bt_status_t tls_bt_disable_spp_client();
153 #endif
154
155 #if (WM_BLE_INCLUDED == CFG_ON)
156 extern int tls_ble_client_demo_api_init(tls_ble_output_func_ptr output_func_ptr);
157 extern int tls_ble_server_demo_api_init(tls_ble_output_func_ptr output_func_ptr);
158 extern int tls_ble_client_demo_api_deinit();
159 extern int tls_ble_server_demo_api_deinit();
160
161 extern int tls_ble_client_multi_conn_demo_api_init();
162 extern int tls_ble_client_multi_conn_demo_api_deinit();
163 extern int tls_ble_uart_init(tls_ble_uart_mode_t mode, uint8_t uart_id, tls_uart_options_t *p_hci_if);
164 extern int tls_ble_uart_deinit(tls_ble_uart_mode_t mode,uint8_t uart_id);
165 extern int tls_ble_demo_adv(uint8_t type);
166 extern int tls_ble_demo_scan(uint8_t start);
167 extern tls_bt_status_t tls_ble_set_scan_chnl_map(uint8_t map);
168 extern int tls_ble_client_demo_api_send_msg(uint8_t *ptr, int length);
169 extern int tls_ble_server_demo_api_send_msg(uint8_t *data, int data_len);
170
171 extern int tls_ble_register_report_evt(tls_ble_dm_evt_t rpt_evt, tls_ble_dm_callback_t rpt_callback);
172 extern int tls_ble_deregister_report_result(tls_ble_dm_evt_t rpt_evt, tls_ble_dm_callback_t rpt_callback);
173 extern int tls_ble_demo_prof_init(uint16_t uuid, tls_ble_callback_t at_cb_ptr);
174 extern int tls_ble_demo_prof_deinit(int server_if);
175 extern int tls_ble_demo_cli_init(uint16_t uuid, tls_ble_callback_t at_cb_ptr);
176 extern int tls_ble_demo_cli_deinit(int client_if);
177 extern tls_bt_uuid_t * app_uuid16_to_uuid128(uint16_t uuid16);
178
179 #endif
180
181 #endif
182
183
184 #endif
185
186 #ifdef __cplusplus
187 }
188 #endif
189
190
191 #endif
tls_ble_dm_evt_t
tls_ble_dm_evt_t
Definition: wm_bt_def.h:864
tls_mesh_primary_cfg_t
Definition: wm_bt_def.h:1928
tls_bt_status_t
tls_bt_status_t
Definition: wm_bt_def.h:14
tls_bt_host_callback_t
void(* tls_bt_host_callback_t)(tls_bt_host_evt_t event, tls_bt_host_msg_t *p_data)
Definition: wm_bt_def.h:378
tls_uart_options
Definition: wm_uart.h:201
tls_bt_mesh_role_t
tls_bt_mesh_role_t
Definition: wm_bt_def.h:1904
wm_ble.h
Bluetooth API.
tls_bt_mesh_cfg_mod_pub
Definition: wm_bt_def.h:1940
wm_ble_gatt.h
Bluetooth API.
tls_bt_mesh_cfg_hb_pub
Definition: wm_bt_def.h:1949
tls_bt_mesh_cfg_hb_sub
Definition: wm_bt_def.h:1958
tls_bt_uuid_t
Definition: wm_bt_def.h:534
enable_bt_test_mode
tls_bt_status_t enable_bt_test_mode(tls_bt_hci_if_t *p_hci_if)
this function enable bluetooth test mode
tls_ble_callback_t
void(* tls_ble_callback_t)(tls_ble_evt_t event, tls_ble_msg_t *p_data)
Definition: wm_bt_def.h:858
exit_bt_test_mode
tls_bt_status_t exit_bt_test_mode()
this function exit bluetooth test mode
tls_ble_dm_callback_t
void(* tls_ble_dm_callback_t)(tls_ble_dm_evt_t event, tls_ble_dm_msg_t *p_data)
Definition: wm_bt_def.h:979
tls_bt_hci_if_t
Definition: wm_bt_def.h:392
tls_rf_bt_mode
void tls_rf_bt_mode(uint8_t enable)
this function enable rf to bluetooth mode
wm_bt.h
Bluetooth API.
tls_ble_uart_output_ptr
void(* tls_ble_uart_output_ptr)(tls_uart_msg_out_t type, uint8_t *payload, int length)
Definition: wm_bt_def.h:1896
tls_ble_uart_sent_ptr
void(* tls_ble_uart_sent_ptr)(tls_ble_uart_mode_t mode, int status)
Definition: wm_bt_def.h:1899


W800 SDK APIs: doxy_out/include/bt/wm_bt_av.h File Reference

  • doxy_out
  • include
  • bt
Functions
wm_bt_av.h File Reference

Bluetooth API. More...

#include "wm_bt.h"

Go to the source code of this file.

Functions

tls_bt_status_t | tls_bt_av_sink_init (tls_bt_a2dp_sink_callback_t callback)
Initializes the AV interface for sink mode. More...
tls_bt_status_t | tls_bt_av_sink_deinit (void)
Shuts down the AV sink interface and does the cleanup. More...
tls_bt_status_t | tls_bt_av_sink_connect_src (tls_bt_addr_t *bd_addr)
Establishes the AV signalling channel with the source. More...
tls_bt_status_t | tls_bt_av_sink_disconnect (tls_bt_addr_t *bd_addr)
Tears down the AV signalling channel with the source side. More...
tls_bt_status_t | tls_bt_av_src_init (tls_bt_a2dp_src_callback_t callback)
Initializes the AV interface for source mode. More...
tls_bt_status_t | tls_bt_av_src_deinit (void)
Shuts down the AV source interface and does the cleanup. More...
tls_bt_status_t | tls_bt_av_src_connect_sink (tls_bt_addr_t *bd_addr)
Establishes the AV signalling channel with the sink. More...
tls_bt_status_t | tls_bt_av_src_disconnect (tls_bt_addr_t *bd_addr)
Tears down the AV signalling channel with the sink side. More...
tls_bt_status_t | tls_btrc_init (tls_btrc_callback_t callback)
Initializes the AVRC interface. More...
tls_bt_status_t | tls_btrc_deinit (void)
Closes the AVRC interface. More...
tls_bt_status_t | tls_btrc_get_play_status_rsp (tls_btrc_play_status_t play_status, uint32_t song_len, uint32_t song_pos)
Returns the current play status. More...
tls_bt_status_t | tls_btrc_get_element_attr_rsp (uint8_t num_attr, tls_btrc_element_attr_val_t *p_attrs)
Returns the current songs' element attributes in text. More...
tls_bt_status_t | tls_btrc_register_notification_rsp (tls_btrc_event_id_t event_id, tls_btrc_notification_type_t type, tls_btrc_register_notification_t *p_param)
Response to the register notification request in text. More...
tls_bt_status_t | tls_btrc_set_volume (uint8_t volume)
Send current volume setting to remote side. More...
tls_bt_status_t | tls_btrc_ctrl_init (tls_btrc_ctrl_callback_t callback)
Initializes the AVRC ctrl interface. More...
tls_bt_status_t | tls_btrc_ctrl_deinit (void)
Closes the AVRC ctrl interface. More...
tls_bt_status_t | tls_btrc_ctrl_send_passthrough_cmd (tls_bt_addr_t *bd_addr, uint8_t key_code, uint8_t key_state)
Send Pass-Through command. More...
tls_bt_status_t | tls_btrc_ctrl_send_groupnavigation_cmd (tls_bt_addr_t *bd_addr, uint8_t key_code, uint8_t key_state)
Send group navigation command. More...
tls_bt_status_t | tls_btrc_ctrl_change_player_app_setting (tls_bt_addr_t *bd_addr, uint8_t num_attrib, uint8_t *attrib_ids, uint8_t *attrib_vals)
Set current values of Player Attributes. More...
tls_bt_status_t | tls_btrc_ctrl_set_volume_rsp (tls_bt_addr_t *bd_addr, uint8_t abs_vol, uint8_t label)
Rsp for SetAbsoluteVolume Command. More...
tls_bt_status_t | tls_btrc_ctrl_volume_change_notification_rsp (tls_bt_addr_t *bd_addr, tls_btrc_notification_type_t rsp_type, uint8_t abs_vol, uint8_t label)
Rsp for Notification of Absolute Volume. More...

Detailed Description

Bluetooth API.

Author
WinnerMicro

Copyright (c) 2020 Winner Microelectronics Co., Ltd.


W800 SDK APIs: doxy_out/include/bt/wm_bt_def.h File Reference

  • doxy_out
  • include
  • bt
Data Structures | Macros | Typedefs | Enumerations
wm_bt_def.h File Reference

Bluetooth Define. More...

Go to the source code of this file.

Data Structures

struct | tls_bt_adapter_state_change_msg_t
struct | tls_bt_property_t
struct | tls_bt_adapter_prop_msg_t
struct | __attribute__
struct | tls_bt_remote_dev_prop_msg_t
struct | tls_bt_device_found_msg_t
struct | tls_bt_discovery_state_chg_msg_t
struct | __attribute__
struct | tls_bt_pin_request_msg_t
struct | __attribute__
struct | tls_bt_ssp_request_msg_t
struct | tls_bt_bond_state_chg_msg_t
struct | tls_bt_acl_state_chg_msg_t
struct | __attribute__
struct | tls_bt_energy_info_msg_t
struct | tls_bt_ble_test_msg_t
union | tls_bt_host_msg_t
struct | tls_bt_hci_if_t
struct | tls_bt_host_if_t
struct | tls_bt_uuid_t
struct | tls_ble_cl_register_msg_t
struct | tls_ble_cl_read_msg_t
struct | tls_ble_cl_write_msg_t
struct | tls_ble_cl_exec_cmpl_msg_t
struct | tls_ble_cl_search_cmpl_msg_t
struct | tls_ble_cl_search_res_msg_t
struct | tls_ble_cl_notify_msg_t
struct | tls_ble_cl_open_msg_t
struct | tls_ble_cl_close_msg_t
struct | tls_ble_cl_listen_msg_t
struct | tls_ble_cl_cfg_mtu_msg_t
struct | tls_ble_cl_congest_msg_t
struct | tls_btgatt_db_element_t
struct | tls_ble_cl_gatt_db_msg_t
struct | tls_ble_cl_reg_notify_msg_t
struct | tls_ble_se_register_msg_t
struct | tls_ble_se_connect_msg_t
struct | tls_ble_se_create_msg_t
struct | tls_ble_se_add_incl_srvc_msg_t
struct | tls_ble_se_add_char_msg_t
struct | tls_ble_se_start_msg_t
struct | tls_ble_se_read_msg_t
struct | tls_ble_se_write_msg_t
struct | tls_ble_se_exec_write_msg_t
struct | tls_ble_se_confirm_msg_t
struct | tls_ble_se_response_msg_t
struct | tls_ble_se_congest_msg_t
struct | tls_ble_se_mtu_msg_t
union | tls_ble_msg_t
struct | tls_ble_dm_set_adv_data_cmpl_msg_t
struct | tls_ble_dm_set_scan_param_cmpl_msg_t
struct | tls_ble_dm_timer_expired_msg_t
struct | tls_ble_dm_scan_res_msg_t
struct | tls_ble_report_rssi_msg_t
struct | tls_ble_sec_msg_t
struct | tls_ble_dm_scan_res_cmpl_msg_t
union | tls_ble_dm_msg_t
struct | __attribute__
struct | __attribute__
struct | __attribute__
struct | tls_bt_av_connection_state_t
struct | tls_bt_av_audio_state_t
struct | tls_bt_av_audio_config_t
struct | tls_bt_av_audio_payload_t
union | tls_bt_av_msg_t
struct | tls_btrc_player_settings_t
struct | tls_btrc_element_attr_val_t
struct | tls_btrc_player_app_attr_t
struct | tls_btrc_player_app_ext_attr_val_t
struct | tls_btrc_player_app_ext_attr_t
union | tls_btrc_register_notification_t
struct | tls_btrc_passthrough_rsp_msg_t
struct | tls_btrc_groupnavigation_rsp_msg_t
struct | tls_btrc_connection_state_msg_t
struct | tls_btrc_ctrl_getrcfeatures_msg_t
struct | tls_btrc_ctrl_setabsvol_msg_t
struct | tls_btrc_ctrl_registernotification_abs_vol_msg_t
struct | tls_btrc_ctrl_setplayerapplicationsetting_rsp_msg_t
struct | tls_btrc_ctrl_playerapplicationsetting_msg_t
struct | tls_btrc_ctrl_playerapplicationsetting_changed_msg_t
struct | tls_btrc_ctrl_track_changed_msg_t
struct | tls_btrc_ctrl_play_position_changed_msg_t
struct | tls_btrc_ctrl_play_status_changed_msg_t
union | tls_btrc_ctrl_msg_t
struct | tls_btrc_remote_features_msg_t
struct | tls_btrc_get_play_status_msg_t
struct | tls_btrc_list_player_app_attr_msg_t
struct | tls_btrc_list_player_app_values_msg_t
struct | tls_btrc_get_player_app_value_msg_t
struct | tls_btrc_get_player_app_attrs_text_msg_t
struct | tls_btrc_get_player_app_values_text_msg_t
struct | tls_btrc_set_player_app_value_msg_t
struct | tls_btrc_get_element_attr_msg_t
struct | tls_btrc_register_notification_msg_t
struct | tls_btrc_volume_change_msg_t
struct | tls_btrc_passthrough_cmd_msg_t
union | tls_btrc_msg_t
struct | tls_bthf_client_connection_state_msg_t
struct | tls_bthf_client_audio_state_msg_t
struct | tls_bthf_client_vr_cmd_msg_t
struct | tls_bthf_client_network_state_msg_t
struct | tls_bthf_client_network_roaming_msg_t
struct | tls_bthf_client_network_signal_msg_t
struct | tls_bthf_client_battery_level_msg_t
struct | tls_bthf_client_current_operator_msg_t
struct | tls_bthf_client_call_msg_t
struct | tls_bthf_client_callsetup_msg_t
struct | tls_bthf_client_callheld_msg_t
struct | tls_bthf_client_resp_and_hold_msg_t
struct | tls_bthf_client_clip_msg_t
struct | tls_bthf_client_call_waiting_msg_t
struct | tls_bthf_client_current_calls_msg_t
struct | tls_bthf_client_volume_change_msg_t
struct | tls_bthf_client_cmd_complete_msg_t
struct | tls_bthf_client_subscriber_info_msg_t
struct | tls_bthf_client_in_band_ring_tone_msg_t
struct | tls_bthf_client_last_voice_tag_number_msg_t
struct | tls_bthf_client_ring_indication_msg_t
struct | tls_bthf_audio_payload_msg_t
union | tls_bthf_client_msg_t
struct | tls_spp_init_msg_t
struct | tls_spp_disc_comp_msg_t
struct | tls_spp_open_msg_t
struct | tls_spp_srv_open_msg_t
struct | tls_spp_close_msg_t
struct | tls_spp_start_msg_t
struct | tls_spp_cli_init_msg_t
struct | tls_spp_write_msg_t
struct | tls_spp_data_ind_msg_t
struct | tls_spp_cong_msg_t
union | tls_spp_msg_t
struct | tls_mesh_primary_cfg_t
struct | tls_bt_mesh_cfg_mod_pub
struct | tls_bt_mesh_cfg_hb_pub
struct | tls_bt_mesh_cfg_hb_sub
struct | tls_mesh_unprov_msg_t
struct | tls_mesh_node_added_msg_t
struct | tls_mesh_prov_complete_msg_t
struct | tls_mesh_oob_output_str_msg_t
struct | tls_mesh_oob_output_number_msg_t
struct | tls_mesh_oob_input_msg_t
struct | tls_mesh_prov_end_msg_t
union | tls_mesh_msg_t

Macros

#define | WM_BLE_GAP_EVENT_CONNECT (0x01<<0)
#define | WM_BLE_GAP_EVENT_DISCONNECT (0x01<<1)
#define | WM_BLE_GAP_EVENT_CONN_UPDATE (0x01<<3)
#define | WM_BLE_GAP_EVENT_CONN_UPDATE_REQ (0x01<<4)
#define | WM_BLE_GAP_EVENT_L2CAP_UPDATE_REQ (0x01<<5)
#define | WM_BLE_GAP_EVENT_TERM_FAILURE (0x01<<6)
#define | WM_BLE_GAP_EVENT_DISC (0x01<<7)
#define | WM_BLE_GAP_EVENT_DISC_COMPLETE (0x01<<8)
#define | WM_BLE_GAP_EVENT_ADV_COMPLETE (0x01<<9)
#define | WM_BLE_GAP_EVENT_ENC_CHANGE (0x01<<10)
#define | WM_BLE_GAP_EVENT_PASSKEY_ACTION (0x01<<11)
#define | WM_BLE_GAP_EVENT_NOTIFY_RX (0x01<<12)
#define | WM_BLE_GAP_EVENT_NOTIFY_TX (0x01<<13)
#define | WM_BLE_GAP_EVENT_SUBSCRIBE (0x01<<14)
#define | WM_BLE_GAP_EVENT_MTU (0x01<<15)
#define | WM_BLE_GAP_EVENT_IDENTITY_RESOLVED (0x01<<16)
#define | WM_BLE_GAP_EVENT_REPEAT_PAIRING (0x01<<17)
#define | WM_BLE_GAP_EVENT_PHY_UPDATE_COMPLETE (0x01<<18)
#define | WM_BLE_GAP_EVENT_EXT_DISC (0x01<<19)
#define | WM_BLE_GAP_EVENT_PERIODIC_SYNC (0x01<<20)
#define | WM_BLE_GAP_EVENT_PERIODIC_REPORT (0x01<<21)
#define | WM_BLE_GAP_EVENT_PERIODIC_SYNC_LOST (0x01<<22)
#define | WM_BLE_GAP_EVENT_SCAN_REQ_RCVD (0x01<<23)
#define | WM_BLE_GAP_EVENT_PERIODIC_TRANSFER (0x01<<24)
#define | WM_BLE_GAP_EVENT_HOST_SHUTDOWN (0x01<<31)
#define | WM_GATT_PERM_READ (1 << 0)
#define | WM_GATT_PERM_READ_ENCRYPTED (1 << 1)
#define | WM_GATT_PERM_READ_ENC_MITM (1 << 2)
#define | WM_GATT_PERM_WRITE (1 << 4)
#define | WM_GATT_PERM_WRITE_ENCRYPTED (1 << 5)
#define | WM_GATT_PERM_WRITE_ENC_MITM (1 << 6)
#define | WM_GATT_PERM_WRITE_SIGNED (1 << 7)
#define | WM_GATT_PERM_WRITE_SIGNED_MITM (1 << 8)
#define | WM_GATT_CHAR_PROP_BIT_BROADCAST (1 << 0)
#define | WM_GATT_CHAR_PROP_BIT_READ (1 << 1)
#define | WM_GATT_CHAR_PROP_BIT_WRITE_NR (1 << 2)
#define | WM_GATT_CHAR_PROP_BIT_WRITE (1 << 3)
#define | WM_GATT_CHAR_PROP_BIT_NOTIFY (1 << 4)
#define | WM_GATT_CHAR_PROP_BIT_INDICATE (1 << 5)
#define | WM_GATT_CHAR_PROP_BIT_AUTH (1 << 6)
#define | WM_GATT_CHAR_PROP_BIT_EXT_PROP (1 << 7)
#define | WM_BLE_MAX_ATTR_LEN 600
#define | WM_BLE_CLIENT_MAX 3
#define | WM_BLE_SERVER_MAX 4
#define | WM_BLE_ATTRIBUTE_MAX 50
#define | WM_BLE_SERVER_SECURITY BTA_DM_BLE_SEC_NONE
#define | WM_BLE_INVALID_IF 0xFF
#define | WM_BLE_INVALID_CONN 0xFFFF
#define | WM_BLE_GATT_TRANSPORT_LE 0x02
#define | WM_BLE_GATT_TRANSPORT_BR_EDR 0x01
#define | WM_BLE_GATT_TRANSPORT_LE_BR_EDR 0x03
#define | WM_BLE_MAX_PDU_LENGTH 251
#define | WM_BTRC_MAX_ATTR_STR_LEN 255
#define | WM_BTRC_UID_SIZE 8
#define | WM_BTRC_MAX_APP_SETTINGS 8
#define | WM_BTRC_MAX_FOLDER_DEPTH 4
#define | WM_BTRC_MAX_APP_ATTR_SIZE 16
#define | WM_BTRC_MAX_ELEM_ATTR_SIZE 7
#define | WM_BTHF_CLIENT_PEER_FEAT_3WAY 0x00000001 /* Three-way calling */
#define | WM_BTHF_CLIENT_PEER_FEAT_ECNR 0x00000002 /* Echo cancellation and/or noise reduction */
#define | WM_BTHF_CLIENT_PEER_FEAT_VREC 0x00000004 /* Voice recognition */
#define | WM_BTHF_CLIENT_PEER_FEAT_INBAND 0x00000008 /* In-band ring tone */
#define | WM_BTHF_CLIENT_PEER_FEAT_VTAG 0x00000010 /* Attach a phone number to a voice tag */
#define | WM_BTHF_CLIENT_PEER_FEAT_REJECT 0x00000020 /* Ability to reject incoming call */
#define | WM_BTHF_CLIENT_PEER_FEAT_ECS 0x00000040 /* Enhanced Call Status */
#define | WM_BTHF_CLIENT_PEER_FEAT_ECC 0x00000080 /* Enhanced Call Control */
#define | WM_BTHF_CLIENT_PEER_FEAT_EXTERR 0x00000100 /* Extended error codes */
#define | WM_BTHF_CLIENT_PEER_FEAT_CODEC 0x00000200 /* Codec Negotiation */
#define | WM_BTHF_CLIENT_CHLD_FEAT_REL 0x00000001 /* 0 Release waiting call or held calls */
#define | WM_BTHF_CLIENT_CHLD_FEAT_REL_ACC
#define | WM_BTHF_CLIENT_CHLD_FEAT_REL_X 0x00000004 /* 1x Release specified active call only */
#define | WM_BTHF_CLIENT_CHLD_FEAT_HOLD_ACC
#define | WM_BTHF_CLIENT_CHLD_FEAT_PRIV_X
#define | WM_BTHF_CLIENT_CHLD_FEAT_MERGE 0x00000020 /* 3 Add held call to multiparty */
#define | WM_BTHF_CLIENT_CHLD_FEAT_MERGE_DETACH
#define | WM_SPP_SEC_NONE 0x0000 /* No security*/
#define | WM_SPP_SEC_AUTHORIZE 0x0001 /*Authorization required (only needed for out going connection ) */
#define | WM_SPP_SEC_AUTHENTICATE 0x0012 /*Authentication required*/
#define | WM_SPP_SEC_ENCRYPT 0x0024 /*Encryption required*/
#define | WM_SPP_SEC_MODE4_LEVEL4 0x0040 /*Mode 4 level 4 service, i.e. incoming/outgoing MITM and P-256 encryption*/
#define | WM_SPP_SEC_MITM 0x3000 /*Man-In-The_Middle protection*/
#define | WM_SPP_SEC_IN_16_DIGITS 0x4000 /*Min 16 digit for pin code*/
#define | WM_SPP_MAX_SCN 31
#define | BIT(n) (1UL << (n))
#define | BIT_MASK(n) (BIT(n) - 1)
#define | TLS_BT_MESH_TRANSMIT_INT(transmit) ((((transmit) >> 3) + 1) * 10)
#define | TLS_BT_MESH_TRANSMIT_COUNT(transmit) (((transmit) & (uint8_t)BIT_MASK(3)))
#define | TLS_BT_MESH_TRANSMIT(count, int_ms) ((count) | (((int_ms / 10) - 1) << 3))
#define | TLS_BT_MESH_PUB_TRANSMIT(count, int_ms)
#define | TLS_BT_MESH_PUB_TRANSMIT_INT(transmit) ((((transmit) >> 3) + 1) * 50)
#define | TLS_BT_MESH_PUB_TRANSMIT_COUNT(transmit) TLS_BT_MESH_TRANSMIT_COUNT(transmit)
#define | TLS_HAL_AT_NOTIFY(P_CB, PARAM1, PARAM2)
#define | TLS_HAL_CBACK(P_CB, P_CBACK, ...)

Typedefs

typedef void(* | tls_bt_host_callback_t) (tls_bt_host_evt_t event, tls_bt_host_msg_t *p_data)
typedef tls_ble_se_connect_msg_t | tls_ble_se_disconnect_msg_t
typedef tls_ble_se_add_char_msg_t | tls_ble_se_add_char_descr_msg_t
typedef tls_ble_se_start_msg_t | tls_ble_se_stop_msg_t
typedef tls_ble_se_start_msg_t | tls_ble_se_delete_msg_t
typedef void(* | tls_ble_callback_t) (tls_ble_evt_t event, tls_ble_msg_t *p_data)
typedef void(* | tls_ble_output_func_ptr) (uint8_t *p_data, uint32_t length)
typedef tls_ble_dm_timer_expired_msg_t | tls_ble_dm_evt_triger_msg_t
typedef tls_ble_dm_set_adv_data_cmpl_msg_t | tls_ble_dm_adv_cmpl_msg_t
typedef void(* | tls_ble_dm_callback_t) (tls_ble_dm_evt_t event, tls_ble_dm_msg_t *p_data)
typedef void(* | tls_ble_dm_timer_callback_t) (uint8_t timer_id)
typedef void(* | tls_ble_dm_triger_callback_t) (uint32_t evt_id)
typedef void(* | tls_ble_scan_res_notify_t) (tls_ble_dm_scan_res_msg_t *msg)
typedef void(* | tls_bt_a2dp_sink_callback_t) (tls_bt_av_evt_t event, tls_bt_av_msg_t *p_data)
typedef void(* | tls_bt_a2dp_src_callback_t) (tls_bt_av_evt_t event, tls_bt_av_msg_t *p_data)
typedef uint8_t | tls_btrc_uid_t[WM_BTRC_UID_SIZE]
typedef void(* | tls_btrc_ctrl_callback_t) (tls_btrc_ctrl_evt_t event, tls_btrc_ctrl_msg_t *p_data)
typedef void(* | tls_btrc_callback_t) (tls_btrc_evt_t event, tls_btrc_msg_t *p_data)
typedef void(* | tls_bthf_client_callback_t) (tls_bthf_client_evt_t event, tls_bthf_client_msg_t *p_data)
typedef uint16_t | wm_spp_sec_t
typedef void(* | tls_bt_spp_callback_t) (tls_spp_event_t event, tls_spp_msg_t *p_data)
typedef void(* | tls_ble_uart_output_ptr) (tls_uart_msg_out_t type, uint8_t *payload, int length)
typedef void(* | tls_ble_uart_sent_ptr) (tls_ble_uart_mode_t mode, int status)
typedef void(* | tls_bt_mesh_at_callback_t) (tls_mesh_event_t event, tls_mesh_msg_t *p_data)
typedef void(* | tls_bt_controller_sleep_enter_func_ptr) (uint32_t sleep_duration_ms)
typedef void(* | tls_bt_controller_sleep_exit_func_ptr) (void)
typedef void(* | tls_bt_app_pending_process_func_ptr) (void)

Enumerations

enum tls_bt_status_t {
TLS_BT_STATUS_SUCCESS, TLS_BT_STATUS_FAIL, TLS_BT_STATUS_NOT_READY, TLS_BT_STATUS_NOMEM,
TLS_BT_STATUS_BUSY, TLS_BT_STATUS_DONE, TLS_BT_STATUS_UNSUPPORTED, TLS_BT_STATUS_PARM_INVALID,
TLS_BT_STATUS_UNHANDLED, TLS_BT_STATUS_AUTH_FAILURE, TLS_BT_STATUS_RMT_DEV_DOWN, TLS_BT_STATUS_AUTH_REJECTED,
TLS_BT_STATUS_THREAD_FAILED, TLS_BT_STATUS_INTERNAL_ERROR, TLS_BT_STATUS_CTRL_ENABLE_FAILED, TLS_BT_STATUS_HOST_ENABLE_FAILED,
TLS_BT_STATUS_CTRL_DISABLE_FAILED, TLS_BT_STATUS_HOST_DISABLE_FAILED
}
enum tls_bt_ctrl_status_t {
TLS_BT_CTRL_IDLE = (1<<0), TLS_BT_CTRL_ENABLED = (1<<1), TLS_BT_CTRL_SLEEPING = (1<<2), TLS_BT_CTRL_BLE_ROLE_MASTER = (1<<3),
TLS_BT_CTRL_BLE_ROLE_SLAVE = (1<<4), TLS_BT_CTRL_BLE_ROLE_END = (1<<5), TLS_BT_CTRL_BLE_STATE_IDLE = (1<<6), TLS_BT_CTRL_BLE_STATE_ADVERTISING = (1<<7),
TLS_BT_CTRL_BLE_STATE_SCANNING = (1<<8), TLS_BT_CTRL_BLE_STATE_INITIATING = (1<<9), TLS_BT_CTRL_BLE_STATE_STOPPING = (1<<10), TLS_BT_CTRL_BLE_STATE_TESTING = (1<<11)
}
enum | tls_bt_state_t { WM_BT_STATE_OFF, WM_BT_STATE_ON }
enum tls_bt_host_evt_t {
WM_BT_ADAPTER_STATE_CHG_EVT = (0x01<<0), WM_BT_ADAPTER_PROP_CHG_EVT = (0x01<<1), WM_BT_RMT_DEVICE_PROP_EVT = (0x01<<2), WM_BT_DEVICE_FOUND_EVT = (0x01<<3),
WM_BT_DISCOVERY_STATE_CHG_EVT =(0x01<<4), WM_BT_REQUEST_EVT = (0x01<<5), WM_BT_SSP_REQUEST_EVT = (0x01<<6), WM_BT_PIN_REQUEST_EVT = (0x01<<7),
WM_BT_BOND_STATE_CHG_EVT = (0x01<<8), WM_BT_ACL_STATE_CHG_EVT = (0x01<<9), WM_BT_ENERGY_INFO_EVT = (0x01<<10), WM_BT_LE_TEST_EVT = (0x01<<11)
}
enum tls_bt_property_type_t {
WM_BT_PROPERTY_BDNAME = 0x1, WM_BT_PROPERTY_BDADDR, WM_BT_PROPERTY_UUIDS, WM_BT_PROPERTY_CLASS_OF_DEVICE,
WM_BT_PROPERTY_TYPE_OF_DEVICE, WM_BT_PROPERTY_SERVICE_RECORD, WM_BT_PROPERTY_ADAPTER_SCAN_MODE, WM_BT_PROPERTY_ADAPTER_BONDED_DEVICES,
WM_BT_PROPERTY_ADAPTER_DISCOVERY_TIMEOUT, WM_BT_PROPERTY_REMOTE_FRIENDLY_NAME, WM_BT_PROPERTY_REMOTE_RSSI, WM_BT_PROPERTY_REMOTE_VERSION_INFO,
WM_BT_PROPERTY_LOCAL_LE_FEATURES, WM_BT_PROPERTY_REMOTE_DEVICE_TIMESTAMP = 0xFF
}
enum | wm_ble_scan_type_t { WM_BLE_SCAN_STOP = 0, WM_BLE_SCAN_PASSIVE = 1, WM_BLE_SCAN_ACTIVE = 2 }
enum | wm_ble_gap_data_t { WM_BLE_ADV_DATA = 0, WM_BLE_ADV_RSP_DATA }
enum wm_ble_adv_type_t {
WM_BLE_ADV_STOP = 0, WM_BLE_ADV_IND, WM_BLE_ADV_DIRECT_IND_HDC, WM_BLE_ADV_SCAN_IND,
WM_BLE_ADV_NONCONN_IND, WM_BLE_ADV_DIRECT_IND_LDC
}
enum | tls_bt_discovery_state_t { WM_BT_DISCOVERY_STOPPED, WM_BT_DISCOVERY_STARTED }
enum | tls_bt_ssp_variant_t { WM_BT_SSP_VARIANT_PASSKEY_CONFIRMATION, WM_BT_SSP_VARIANT_PASSKEY_ENTRY, WM_BT_SSP_VARIANT_CONSENT, WM_BT_SSP_VARIANT_PASSKEY_NOTIFICATION }
enum | tls_bt_bond_state_t { WM_BT_BOND_STATE_NONE, WM_BT_BOND_STATE_BONDING, WM_BT_BOND_STATE_BONDED }
enum | tls_bt_acl_state_t { WM_BT_ACL_STATE_CONNECTED, WM_BT_ACL_STATE_DISCONNECTED }
enum tls_bt_log_level_t {
TLS_BT_LOG_NONE = 0, TLS_BT_LOG_ERROR = 1, TLS_BT_LOG_WARNING = 2, TLS_BT_LOG_API = 3,
TLS_BT_LOG_EVENT = 4, TLS_BT_LOG_DEBUG = 5, TLS_BT_LOG_VERBOSE = 6
}
enum tls_ble_power_type_t {
TLS_BLE_PWR_TYPE_CONN_HDL0, TLS_BLE_PWR_TYPE_CONN_HDL1, TLS_BLE_PWR_TYPE_CONN_HDL2, TLS_BLE_PWR_TYPE_CONN_HDL3,
TLS_BLE_PWR_TYPE_CONN_HDL4, TLS_BLE_PWR_TYPE_CONN_HDL5, TLS_BLE_PWR_TYPE_CONN_HDL6, TLS_BLE_PWR_TYPE_CONN_HDL7,
TLS_BLE_PWR_TYPE_CONN_HDL8, TLS_BLE_PWR_TYPE_ADV, TLS_BLE_PWR_TYPE_SCAN, TLS_BLE_PWR_TYPE_DEFAULT
}
enum | tls_sco_data_path_t { WM_AUDIO_OVER_HCI = 0, WM_AUDIO_INTERNAL_MODE }
enum tls_ble_evt_t {
WM_BLE_CL_REGISTER_EVT, WM_BLE_CL_DEREGISTER_EVT, WM_BLE_CL_READ_CHAR_EVT, WM_BLE_CL_WRITE_CHAR_EVT,
WM_BLE_CL_PREP_WRITE_EVT, WM_BLE_CL_EXEC_CMPL_EVT, WM_BLE_CL_SEARCH_CMPL_EVT, WM_BLE_CL_SEARCH_RES_EVT,
WM_BLE_CL_READ_DESCR_EVT, WM_BLE_CL_WRITE_DESCR_EVT, WM_BLE_CL_NOTIF_EVT, WM_BLE_CL_OPEN_EVT,
WM_BLE_CL_CLOSE_EVT, WM_BLE_CL_LISTEN_EVT, WM_BLE_CL_CFG_MTU_EVT, WM_BLE_CL_CONGEST_EVT,
WM_BLE_CL_REPORT_DB_EVT, WM_BLE_CL_REG_NOTIFY_EVT, WM_BLE_CL_DEREG_NOTIFY_EVT, WM_BLE_SE_REGISTER_EVT,
WM_BLE_SE_DEREGISTER_EVT, WM_BLE_SE_CONNECT_EVT, WM_BLE_SE_DISCONNECT_EVT, WM_BLE_SE_CREATE_EVT,
WM_BLE_SE_ADD_INCL_SRVC_EVT, WM_BLE_SE_ADD_CHAR_EVT, WM_BLE_SE_ADD_CHAR_DESCR_EVT, WM_BLE_SE_START_EVT,
WM_BLE_SE_STOP_EVT, WM_BLE_SE_DELETE_EVT, WM_BLE_SE_READ_EVT, WM_BLE_SE_WRITE_EVT,
WM_BLE_SE_EXEC_WRITE_EVT, WM_BLE_SE_CONFIRM_EVT, WM_BLE_SE_RESP_EVT, WM_BLE_SE_CONGEST_EVT,
WM_BLE_SE_MTU_EVT
}
enum tls_bt_gatt_db_attribute_type_t {
WM_BTGATT_DB_PRIMARY_SERVICE, WM_BTGATT_DB_SECONDARY_SERVICE, WM_BTGATT_DB_INCLUDED_SERVICE, WM_BTGATT_DB_CHARACTERISTIC,
WM_BTGATT_DB_DESCRIPTOR
}
enum tls_ble_dm_evt_t {
WM_BLE_DM_SET_ADV_DATA_CMPL_EVT = (0x01<<0), WM_BLE_DM_TIMER_EXPIRED_EVT = (0x01<<1), WM_BLE_DM_TRIGER_EVT = (0x01<<2), WM_BLE_DM_SCAN_RES_EVT = (0x01<<3),
WM_BLE_DM_SET_SCAN_PARAM_CMPL_EVT =(0x01<<4), WM_BLE_DM_REPORT_RSSI_EVT = (0x01<<5), WM_BLE_DM_SCAN_RES_CMPL_EVT = (0x01<<6), WM_BLE_DM_SEC_EVT = (0x01<<7),
WM_BLE_DM_ADV_STARTED_EVT = (0x01<<8), WM_BLE_DM_ADV_STOPPED_EVT = (0x01<<9), WM_BLE_DM_HOST_SHUTDOWN_EVT = (0x01<<31)
}
enum | tls_btav_connection_state_t { WM_BTAV_CONNECTION_STATE_DISCONNECTED = 0, WM_BTAV_CONNECTION_STATE_CONNECTING, WM_BTAV_CONNECTION_STATE_CONNECTED, WM_BTAV_CONNECTION_STATE_DISCONNECTING }
enum | tls_btav_audio_state_t { WM_BTAV_AUDIO_STATE_REMOTE_SUSPEND = 0, WM_BTAV_AUDIO_STATE_STOPPED, WM_BTAV_AUDIO_STATE_STARTED }
enum | tls_bt_av_evt_t { WMBT_A2DP_CONNECTION_STATE_EVT, WMBT_A2DP_AUDIO_STATE_EVT, WMBT_A2DP_AUDIO_CONFIG_EVT, WMBT_A2DP_AUDIO_PAYLOAD_EVT }
enum tls_btrc_play_status_t {
WM_BTRC_PLAYSTATE_STOPPED = 0x00, WM_BTRC_PLAYSTATE_PLAYING = 0x01, WM_BTRC_PLAYSTATE_PAUSED = 0x02, WM_BTRC_PLAYSTATE_FWD_SEEK = 0x03,
WM_BTRC_PLAYSTATE_REV_SEEK = 0x04, WM_BTRC_PLAYSTATE_ERROR = 0xFF
}
enum | tls_btrc_remote_features_t { WM_BTRC_FEAT_NONE = 0x00, WM_BTRC_FEAT_METADATA = 0x01, WM_BTRC_FEAT_ABSOLUTE_VOLUME = 0x02, WM_BTRC_FEAT_BROWSE = 0x04 }
enum | tls_btrc_notification_type_t { WM_BTRC_NOTIFICATION_TYPE_INTERIM = 0, WM_BTRC_NOTIFICATION_TYPE_CHANGED = 1 }
enum | tls_btrc_player_attr_t { WM_BTRC_PLAYER_ATTR_EQUALIZER = 0x01, WM_BTRC_PLAYER_ATTR_REPEAT = 0x02, WM_BTRC_PLAYER_ATTR_SHUFFLE = 0x03, WM_BTRC_PLAYER_ATTR_SCAN = 0x04 }
enum tls_btrc_media_attr_t {
WM_BTRC_MEDIA_ATTR_TITLE = 0x01, WM_BTRC_MEDIA_ATTR_ARTIST = 0x02, WM_BTRC_MEDIA_ATTR_ALBUM = 0x03, WM_BTRC_MEDIA_ATTR_TRACK_NUM = 0x04,
WM_BTRC_MEDIA_ATTR_NUM_TRACKS = 0x05, WM_BTRC_MEDIA_ATTR_GENRE = 0x06, WM_BTRC_MEDIA_ATTR_PLAYING_TIME = 0x07
}
enum | tls_btrc_player_repeat_val_t { WM_BTRC_PLAYER_VAL_OFF_REPEAT = 0x01, WM_BTRC_PLAYER_VAL_SINGLE_REPEAT = 0x02, WM_BTRC_PLAYER_VAL_ALL_REPEAT = 0x03, WM_BTRC_PLAYER_VAL_GROUP_REPEAT = 0x04 }
enum tls_btrc_event_id_t {
WM_BTRC_EVT_PLAY_STATUS_CHANGED = 0x01, WM_BTRC_EVT_TRACK_CHANGE = 0x02, WM_BTRC_EVT_TRACK_REACHED_END = 0x03, WM_BTRC_EVT_TRACK_REACHED_START = 0x04,
WM_BTRC_EVT_PLAY_POS_CHANGED = 0x05, WM_BTRC_EVT_APP_SETTINGS_CHANGED = 0x08
}
enum tls_btrc_ctrl_evt_t {
WM_BTRC_PASSTHROUGH_RSP_EVT, WM_BTRC_GROUPNAVIGATION_RSP_EVT, WM_BTRC_CONNECTION_STATE_EVT, WM_BTRC_CTRL_GETRCFEATURES_EVT,
WM_BTRC_CTRL_SETPLAYERAPPLICATIONSETTING_RSP_EVT, WM_BTRC_CTRL_PLAYERAPPLICATIONSETTING_EVT, WM_BTRC_CTRL_PLAYERAPPLICATIONSETTING_CHANGED_EVT, WM_BTRC_CTRL_SETABSVOL_CMD_EVT,
WM_BTRC_CTRL_REGISTERNOTIFICATION_ABS_VOL_EVT, WM_BTRC_CTRL_TRACK_CHANGED_EVT, WM_BTRC_CTRL_PLAY_POSITION_CHANGED_EVT, WM_BTRC_CTRL_PLAY_STATUS_CHANGED_EVT
}
enum tls_btrc_evt_t {
WM_BTRC_REMOTE_FEATURE_EVT, WM_BTRC_GET_PLAY_STATUS_EVT, WM_BTRC_LIST_PLAYER_APP_ATTR_EVT, WM_BTRC_LIST_PLAYER_APP_VALUES_EVT,
WM_BTRC_GET_PLAYER_APP_VALUE_EVT, WM_BTRC_GET_PLAYER_APP_ATTRS_TEXT_EVT, WM_BTRC_GET_PLAYER_APP_VALUES_TEXT_EVT, WM_BTRC_SET_PLAYER_APP_VALUE_EVT,
WM_BTRC_GET_ELEMENT_ATTR_EVT, WM_BTRC_REGISTER_NOTIFICATION_EVT, WM_BTRC_VOLUME_CHANGED_EVT, WM_BTRC_PASSTHROUGH_CMD_EVT
}
enum tls_bthf_client_connection_state_t {
WM_BTHF_CLIENT_CONNECTION_STATE_DISCONNECTED = 0, WM_BTHF_CLIENT_CONNECTION_STATE_CONNECTING, WM_BTHF_CLIENT_CONNECTION_STATE_CONNECTED, WM_BTHF_CLIENT_CONNECTION_STATE_SLC_CONNECTED,
WM_BTHF_CLIENT_CONNECTION_STATE_DISCONNECTING
}
enum | tls_bthf_client_audio_state_t { WM_BTHF_CLIENT_AUDIO_STATE_DISCONNECTED = 0, WM_BTHF_CLIENT_AUDIO_STATE_CONNECTING, WM_BTHF_CLIENT_AUDIO_STATE_CONNECTED, WM_BTHF_CLIENT_AUDIO_STATE_CONNECTED_MSBC }
enum | tls_bthf_client_vr_state_t { WM_BTHF_CLIENT_VR_STATE_STOPPED = 0, WM_BTHF_CLIENT_VR_STATE_STARTED }
enum | tls_bthf_client_volume_type_t { WM_BTHF_CLIENT_VOLUME_TYPE_SPK = 0, WM_BTHF_CLIENT_VOLUME_TYPE_MIC }
enum | tls_bthf_client_network_state_t { WM_BTHF_CLIENT_NETWORK_STATE_NOT_AVAILABLE = 0, WM_BTHF_CLIENT_NETWORK_STATE_AVAILABLE }
enum | tls_bthf_client_service_type_t { WM_BTHF_CLIENT_SERVICE_TYPE_HOME = 0, WM_BTHF_CLIENT_SERVICE_TYPE_ROAMING }
enum tls_bthf_client_call_state_t {
WM_BTHF_CLIENT_CALL_STATE_ACTIVE = 0, WM_BTHF_CLIENT_CALL_STATE_HELD, WM_BTHF_CLIENT_CALL_STATE_DIALING, WM_BTHF_CLIENT_CALL_STATE_ALERTING,
WM_BTHF_CLIENT_CALL_STATE_INCOMING, WM_BTHF_CLIENT_CALL_STATE_WAITING, WM_BTHF_CLIENT_CALL_STATE_HELD_BY_RESP_HOLD
}
enum | tls_bthf_client_call_t { WM_BTHF_CLIENT_CALL_NO_CALLS_IN_PROGRESS = 0, WM_BTHF_CLIENT_CALL_CALLS_IN_PROGRESS }
enum | tls_bthf_client_callsetup_t { WM_BTHF_CLIENT_CALLSETUP_NONE = 0, WM_BTHF_CLIENT_CALLSETUP_INCOMING, WM_BTHF_CLIENT_CALLSETUP_OUTGOING, WM_BTHF_CLIENT_CALLSETUP_ALERTING }
enum | tls_bthf_client_callheld_t { WM_BTHF_CLIENT_CALLHELD_NONE = 0, WM_BTHF_CLIENT_CALLHELD_HOLD_AND_ACTIVE, WM_BTHF_CLIENT_CALLHELD_HOLD }
enum | tls_bthf_client_resp_and_hold_t { WM_BTHF_CLIENT_RESP_AND_HOLD_HELD = 0, WM_BTRH_CLIENT_RESP_AND_HOLD_ACCEPT, WM_BTRH_CLIENT_RESP_AND_HOLD_REJECT }
enum | tls_bthf_client_call_direction_t { WM_BTHF_CLIENT_CALL_DIRECTION_OUTGOING = 0, WM_BTHF_CLIENT_CALL_DIRECTION_INCOMING }
enum | tls_bthf_client_call_mpty_type_t { WM_BTHF_CLIENT_CALL_MPTY_TYPE_SINGLE = 0, WM_BTHF_CLIENT_CALL_MPTY_TYPE_MULTI }
enum tls_bthf_client_cmd_complete_t {
WM_BTHF_CLIENT_CMD_COMPLETE_OK = 0, WM_BTHF_CLIENT_CMD_COMPLETE_ERROR, WM_BTHF_CLIENT_CMD_COMPLETE_ERROR_NO_CARRIER, WM_BTHF_CLIENT_CMD_COMPLETE_ERROR_BUSY,
WM_BTHF_CLIENT_CMD_COMPLETE_ERROR_NO_ANSWER, WM_BTHF_CLIENT_CMD_COMPLETE_ERROR_DELAYED, WM_BTHF_CLIENT_CMD_COMPLETE_ERROR_BLACKLISTED, WM_BTHF_CLIENT_CMD_COMPLETE_ERROR_CME
}
enum tls_bthf_client_call_action_t {
WM_BTHF_CLIENT_CALL_ACTION_CHLD_0 = 0, WM_BTHF_CLIENT_CALL_ACTION_CHLD_1, WM_BTHF_CLIENT_CALL_ACTION_CHLD_2, WM_BTHF_CLIENT_CALL_ACTION_CHLD_3,
WM_BTHF_CLIENT_CALL_ACTION_CHLD_4, WM_BTHF_CLIENT_CALL_ACTION_CHLD_1x, WM_BTHF_CLIENT_CALL_ACTION_CHLD_2x, WM_BTHF_CLIENT_CALL_ACTION_ATA,
WM_BTHF_CLIENT_CALL_ACTION_CHUP, WM_BTHF_CLIENT_CALL_ACTION_BTRH_0, WM_BTHF_CLIENT_CALL_ACTION_BTRH_1, WM_BTHF_CLIENT_CALL_ACTION_BTRH_2
}
enum | tls_bthf_client_subscriber_service_type_t { WM_BTHF_CLIENT_SERVICE_UNKNOWN = 0, WM_BTHF_CLIENT_SERVICE_VOICE, WM_BTHF_CLIENT_SERVICE_FAX }
enum | tls_bthf_client_in_band_ring_state_t { WM_BTHF_CLIENT_IN_BAND_RINGTONE_NOT_PROVIDED = 0, WM_BTHF_CLIENT_IN_BAND_RINGTONE_PROVIDED }
enum tls_bthf_client_evt_t {
WM_BTHF_CLIENT_CONNECTION_STATE_EVT, WM_BTHF_CLIENT_AUDIO_STATE_EVT, WM_BTHF_CLIENT_VR_CMD_EVT, WM_BTHF_CLIENT_NETWORK_STATE_EVT,
WM_BTHF_CLIENT_NETWORK_ROAMING_EVT, WM_BTHF_CLIENT_NETWORK_SIGNAL_EVT, WM_BTHF_CLIENT_BATTERY_LEVEL_EVT, WM_BTHF_CLIENT_CURRENT_OPERATOR_EVT,
WM_BTHF_CLIENT_CALL_EVT, WM_BTHF_CLIENT_CALLSETUP_EVT, WM_BTHF_CLIENT_CALLHELD_EVT, WM_BTHF_CLIENT_RESP_AND_HOLD_EVT,
WM_BTHF_CLIENT_CLIP_EVT, WM_BTHF_CLIENT_CALL_WAITING_EVT, WM_BTHF_CLIENT_CURRENT_CALLS_EVT, WM_BTHF_CLIENT_VOLUME_CHANGE_EVT,
WM_BTHF_CLIENT_CMD_COMPLETE_EVT, WM_BTHF_CLIENT_SUBSCRIBER_INFO_EVT, WM_BTHF_CLIENT_IN_BAND_RING_TONE_EVT, WM_BTHF_CLIENT_LAST_VOICE_TAG_NUMBER_EVT,
WM_BTHF_CLIENT_RING_INDICATION_EVT, WM_BTHF_CLIENT_AUDIO_PAYLOAD_EVT
}
enum | tls_spp_role_t { WM_SPP_ROLE_CLIENT = 0, WM_SPP_ROLE_SERVER = 1 }
enum tls_spp_event_t {
WM_SPP_INIT_EVT = 0, WM_SPP_DISCOVERY_COMP_EVT = 8, WM_SPP_OPEN_EVT = 26, WM_SPP_CLOSE_EVT = 27,
WM_SPP_START_EVT = 28, WM_SPP_CL_INIT_EVT = 29, WM_SPP_DATA_IND_EVT = 30, WM_SPP_CONG_EVT = 31,
WM_SPP_WRITE_EVT = 33, WM_SPP_SRV_OPEN_EVT = 34
}
enum | tls_ble_uart_mode_t { BLE_UART_SERVER_MODE, BLE_UART_CLIENT_MODE, BLE_UART_UNKNOWN_MODE }
enum | tls_uart_msg_out_t { UART_OUTPUT_DATA =0, UART_OUTPUT_CMD_ADVERTISING, UART_OUTPUT_CMD_CONNECTED, UART_OUTPUT_CMD_DISCONNECTED }
enum | tls_bt_mesh_role_t { MESH_ROLE_UNKNOWN = 0x00, MESH_ROLE_NODE, MESH_ROLE_PROVISIONER }
enum tls_mesh_event_t {
WM_MESH_UNPROVISION_BEACON_EVT = (0x01<<1), WM_MESH_SECURE_BEACON_EVT = (0x01<<2), WM_MESH_NODE_ADDED_EVT = (0x01<<3), WM_MESH_OOB_STRING_EVT = (0x01<<4),
WM_MESH_OOB_NUMBER_EVT = (0x01<<5), WM_MESH_PROV_CMPLT_EVT = (0x01<<6), WM_MESH_OOB_INPUT_EVT = (0x01<<7), WM_MESH_PROV_END_EVT = (0x01<<8)
}

Detailed Description

Bluetooth Define.

Author
WinnerMicro

Copyright (c) 2020 Winner Microelectronics Co., Ltd.

Macro Definition Documentation

◆ TLS_BT_MESH_PUB_TRANSMIT

#define TLS_BT_MESH_PUB_TRANSMIT | ( | count,
 |  | int_ms
 | ) |
Value:
TLS_BT_MESH_TRANSMIT(count, \
(int_ms) / 5)

◆ TLS_HAL_AT_NOTIFY

#define TLS_HAL_AT_NOTIFY | ( | P_CB,
 |  | PARAM1,
 |  | PARAM2
 | ) |
Value:
if (P_CB) { \
P_CB(PARAM1, PARAM2); \
}

◆ TLS_HAL_CBACK

#define TLS_HAL_CBACK | ( | P_CB,
 |  | P_CBACK,
 |  | ...
 | ) |
Value:
if (P_CB && P_CB->P_CBACK) { \
P_CB->P_CBACK(__VA_ARGS__); \
} \
else { \
assert(0); \
}

◆ WM_BLE_CLIENT_MAX

#define WM_BLE_CLIENT_MAX 3

max client application WM BLE Client can support

◆ WM_BLE_SERVER_MAX

#define WM_BLE_SERVER_MAX 4

max server application WM BLE Server can support

◆ WM_BTHF_CLIENT_CHLD_FEAT_HOLD_ACC

#define WM_BTHF_CLIENT_CHLD_FEAT_HOLD_ACC
Value:
0x00000008 /* 2 Active calls on hold and accept other
(waiting or held) call */

◆ WM_BTHF_CLIENT_CHLD_FEAT_MERGE_DETACH

#define WM_BTHF_CLIENT_CHLD_FEAT_MERGE_DETACH
Value:
0x00000040 /* 4 Connect two calls and leave
(disconnect from) multiparty */

◆ WM_BTHF_CLIENT_CHLD_FEAT_PRIV_X

#define WM_BTHF_CLIENT_CHLD_FEAT_PRIV_X
Value:
0x00000010 /* 2x Request private mode with specified
call (put the rest on hold) */

◆ WM_BTHF_CLIENT_CHLD_FEAT_REL_ACC

#define WM_BTHF_CLIENT_CHLD_FEAT_REL_ACC
Value:
0x00000002 /* 1 Release active calls and accept other
(waiting or held) cal */

◆ WM_BTRC_MAX_ATTR_STR_LEN

#define WM_BTRC_MAX_ATTR_STR_LEN 255

BR-EDR WMBT-RC Controller callback events

◆ WM_GATT_CHAR_PROP_BIT_AUTH

#define WM_GATT_CHAR_PROP_BIT_AUTH (1 << 6)

0x40

◆ WM_GATT_CHAR_PROP_BIT_BROADCAST

#define WM_GATT_CHAR_PROP_BIT_BROADCAST (1 << 0)

definition of characteristic properties 0x01

◆ WM_GATT_CHAR_PROP_BIT_EXT_PROP

#define WM_GATT_CHAR_PROP_BIT_EXT_PROP (1 << 7)

0x80

◆ WM_GATT_CHAR_PROP_BIT_INDICATE

#define WM_GATT_CHAR_PROP_BIT_INDICATE (1 << 5)

0x20

◆ WM_GATT_CHAR_PROP_BIT_NOTIFY

#define WM_GATT_CHAR_PROP_BIT_NOTIFY (1 << 4)

0x10

◆ WM_GATT_CHAR_PROP_BIT_READ

#define WM_GATT_CHAR_PROP_BIT_READ (1 << 1)

0x02

◆ WM_GATT_CHAR_PROP_BIT_WRITE

#define WM_GATT_CHAR_PROP_BIT_WRITE (1 << 3)

0x08

◆ WM_GATT_CHAR_PROP_BIT_WRITE_NR

#define WM_GATT_CHAR_PROP_BIT_WRITE_NR (1 << 2)

0x04

◆ WM_GATT_PERM_READ

#define WM_GATT_PERM_READ (1 << 0)

Attribute permissions bit 0 - 0x0001

◆ WM_GATT_PERM_READ_ENC_MITM

#define WM_GATT_PERM_READ_ENC_MITM (1 << 2)

bit 2 - 0x0004

◆ WM_GATT_PERM_READ_ENCRYPTED

#define WM_GATT_PERM_READ_ENCRYPTED (1 << 1)

bit 1 - 0x0002

◆ WM_GATT_PERM_WRITE

#define WM_GATT_PERM_WRITE (1 << 4)

bit 4 - 0x0010

◆ WM_GATT_PERM_WRITE_ENC_MITM

#define WM_GATT_PERM_WRITE_ENC_MITM (1 << 6)

bit 6 - 0x0040

◆ WM_GATT_PERM_WRITE_ENCRYPTED

#define WM_GATT_PERM_WRITE_ENCRYPTED (1 << 5)

bit 5 - 0x0020

◆ WM_GATT_PERM_WRITE_SIGNED

#define WM_GATT_PERM_WRITE_SIGNED (1 << 7)

bit 7 - 0x0080

◆ WM_GATT_PERM_WRITE_SIGNED_MITM

#define WM_GATT_PERM_WRITE_SIGNED_MITM (1 << 8)

bit 8 - 0x0100

Typedef Documentation

◆ tls_ble_callback_t

typedef void(* tls_ble_callback_t) (tls_ble_evt_t event, tls_ble_msg_t *p_data)

WM BLE Client callback function

◆ tls_ble_dm_callback_t

typedef void(* tls_ble_dm_callback_t) (tls_ble_dm_evt_t event, tls_ble_dm_msg_t *p_data)

WM BLE device manager callback function

◆ tls_ble_dm_timer_callback_t

typedef void(* tls_ble_dm_timer_callback_t) (uint8_t timer_id)

WM BLE dm timer callback function

◆ tls_ble_dm_triger_callback_t

typedef void(* tls_ble_dm_triger_callback_t) (uint32_t evt_id)

WM BLE device evt triger callback function

◆ tls_ble_uart_output_ptr

typedef void(* tls_ble_uart_output_ptr) (tls_uart_msg_out_t type, uint8_t *payload, int length)

uart output function pointer, ble server send the received data to uart

◆ tls_ble_uart_sent_ptr

typedef void(* tls_ble_uart_sent_ptr) (tls_ble_uart_mode_t mode, int status)

uart sent function pointer, after ble server sending the uart data, it will be called

◆ tls_bt_a2dp_sink_callback_t

typedef void(* tls_bt_a2dp_sink_callback_t) (tls_bt_av_evt_t event, tls_bt_av_msg_t *p_data)

WM BT A2DP SINK callback function

◆ tls_bt_a2dp_src_callback_t

typedef void(* tls_bt_a2dp_src_callback_t) (tls_bt_av_evt_t event, tls_bt_av_msg_t *p_data)

WM BT A2DP SRC callback function

◆ tls_bt_host_callback_t

typedef void(* tls_bt_host_callback_t) (tls_bt_host_evt_t event, tls_bt_host_msg_t *p_data)

BT host callback function

◆ tls_bt_spp_callback_t

typedef void(* tls_bt_spp_callback_t) (tls_spp_event_t event, tls_spp_msg_t *p_data)

WM BT SPP callback function

◆ tls_bthf_client_callback_t

typedef void(* tls_bthf_client_callback_t) (tls_bthf_client_evt_t event, tls_bthf_client_msg_t *p_data)

WM BT HFP CLIENT callback function

◆ tls_btrc_callback_t

typedef void(* tls_btrc_callback_t) (tls_btrc_evt_t event, tls_btrc_msg_t *p_data)

WM BT RC callback function

◆ tls_btrc_ctrl_callback_t

typedef void(* tls_btrc_ctrl_callback_t) (tls_btrc_ctrl_evt_t event, tls_btrc_ctrl_msg_t *p_data)

WM BT RC CTRL callback function

Enumeration Type Documentation

◆ tls_ble_dm_evt_t

enum tls_ble_dm_evt_t

BLE dm events

Enumerator
WM_BLE_DM_SET_ADV_DATA_CMPL_EVT | BLE DM set advertisement data completed
WM_BLE_DM_TIMER_EXPIRED_EVT | BLE DM timer expired event.
WM_BLE_DM_TRIGER_EVT | BLE DM event trigered event, async processing
WM_BLE_DM_SCAN_RES_EVT | BLE DM scan result evt

◆ tls_ble_evt_t

enum tls_ble_evt_t

BLE events

Enumerator
WM_BLE_CL_REGISTER_EVT | BLE Client events BLE client is registered.
WM_BLE_CL_DEREGISTER_EVT | BLE client is deregistered.
WM_BLE_CL_EXEC_CMPL_EVT | Execute complete event
WM_BLE_CL_SEARCH_CMPL_EVT | GATT discovery complete event
WM_BLE_CL_SEARCH_RES_EVT | GATT discovery result event
WM_BLE_CL_NOTIF_EVT | GATT attribute notification event
WM_BLE_CL_OPEN_EVT | BLE open request status event
WM_BLE_CL_CLOSE_EVT | GATTC close request status event
WM_BLE_CL_CFG_MTU_EVT | configure MTU complete event
WM_BLE_CL_CONGEST_EVT | GATT congestion/uncongestion event
WM_BLE_SE_REGISTER_EVT | BLE Server events BLE Server is registered
WM_BLE_SE_DEREGISTER_EVT | BLE Server is deregistered
WM_BLE_SE_CREATE_EVT | Service is created
WM_BLE_SE_ADD_CHAR_EVT | char data is added
WM_BLE_SE_START_EVT | Service is started
WM_BLE_SE_STOP_EVT | Service is stopped
WM_BLE_SE_READ_EVT | Read request from client
WM_BLE_SE_WRITE_EVT | Write request from client
WM_BLE_SE_EXEC_WRITE_EVT | Execute Write request from client
WM_BLE_SE_CONFIRM_EVT | Confirm event
WM_BLE_SE_CONGEST_EVT | Congestion event

◆ tls_bt_acl_state_t

enum tls_bt_acl_state_t

Bluetooth ACL connection state

◆ tls_bt_av_evt_t

enum tls_bt_av_evt_t

BR-EDR A2DP sink events

◆ tls_bt_bond_state_t

enum tls_bt_bond_state_t

Bluetooth Bond state

◆ tls_bt_discovery_state_t

enum tls_bt_discovery_state_t

Bluetooth Adapter Discovery state

◆ tls_bt_host_evt_t

enum tls_bt_host_evt_t

bluetooth host statck events

◆ tls_bt_mesh_role_t

enum tls_bt_mesh_role_t

WM Mesh definition

◆ tls_bt_property_type_t

enum tls_bt_property_type_t

Bluetooth Adapter and Remote Device property types

Enumerator
WM_BT_PROPERTY_BDNAME | Description - Bluetooth Device Name Access mode - Adapter name can be GET/SET. Remote device can be GET Data type - bt_bdname_t
WM_BT_PROPERTY_BDADDR | Description - Bluetooth Device Address Access mode - Only GET. Data type - bt_bdaddr_t
WM_BT_PROPERTY_UUIDS | Description - Bluetooth Service 128-bit UUIDs Access mode - Only GET. Data type - Array of bt_uuid_t (Array size inferred from property length).
WM_BT_PROPERTY_CLASS_OF_DEVICE | Description - Bluetooth Class of Device as found in Assigned Numbers Access mode - Only GET. Data type - uint32_t.
WM_BT_PROPERTY_TYPE_OF_DEVICE | Description - Device Type - BREDR, BLE or DUAL Mode Access mode - Only GET. Data type - bt_device_type_t
WM_BT_PROPERTY_SERVICE_RECORD | Description - Bluetooth Service Record Access mode - Only GET. Data type - bt_service_record_t
WM_BT_PROPERTY_ADAPTER_SCAN_MODE | Description - Bluetooth Adapter scan mode Access mode - GET and SET Data type - bt_scan_mode_t.
WM_BT_PROPERTY_ADAPTER_BONDED_DEVICES | Description - List of bonded devices Access mode - Only GET. Data type - Array of bt_bdaddr_t of the bonded remote devices (Array size inferred from property length).
WM_BT_PROPERTY_ADAPTER_DISCOVERY_TIMEOUT | Description - Bluetooth Adapter Discovery timeout (in seconds) Access mode - GET and SET Data type - uint32_t
WM_BT_PROPERTY_REMOTE_FRIENDLY_NAME | Description - User defined friendly name of the remote device Access mode - GET and SET Data type - bt_bdname_t.
WM_BT_PROPERTY_REMOTE_RSSI | Description - RSSI value of the inquired remote device Access mode - Only GET. Data type - int32_t.
WM_BT_PROPERTY_REMOTE_VERSION_INFO | Description - Remote version info Access mode - SET/GET. Data type - bt_remote_version_t.
WM_BT_PROPERTY_LOCAL_LE_FEATURES | Description - Local LE features Access mode - GET. Data type - bt_local_le_features_t.

◆ tls_bt_ssp_variant_t

enum tls_bt_ssp_variant_t

Bluetooth SSP Bonding Variant

◆ tls_bt_state_t

enum tls_bt_state_t

Bluetooth Adapter State

◆ tls_bt_status_t

enum tls_bt_status_t

Bluetooth Error Status

Enumerator
TLS_BT_STATUS_SUCCESS | success
TLS_BT_STATUS_NOMEM | alloc memory failed
TLS_BT_STATUS_DONE | request already completed
TLS_BT_STATUS_THREAD_FAILED | create internal thread failed
TLS_BT_STATUS_INTERNAL_ERROR | controller stack internal error


W800 SDK APIs: doxy_out/include/bt/wm_bt_hf_client.h File Reference

  • doxy_out
  • include
  • bt
Functions
wm_bt_hf_client.h File Reference

Bluetooth API. More...

#include "wm_bt.h"

Go to the source code of this file.

Functions

tls_bt_status_t | tls_bt_hf_client_init (tls_bthf_client_callback_t callback)
initializes the hf client interface More...
tls_bt_status_t | tls_bt_hf_client_deinit (void)
Closes the HF client interface. More...
tls_bt_status_t | tls_bt_hf_client_connect (tls_bt_addr_t *bd_addr)
connect to audio gateway More...
tls_bt_status_t | tls_bt_hf_client_disconnect (tls_bt_addr_t *bd_addr)
disconnect from audio gateway More...
tls_bt_status_t | tls_bt_hf_client_connect_audio (tls_bt_addr_t *bd_addr)
create an audio connection More...
tls_bt_status_t | tls_bt_hf_client_disconnect_audio (tls_bt_addr_t *bd_addr)
close the audio connection More...
tls_bt_status_t | tls_bt_hf_client_start_voice_recognition (void)
start voice recognition More...
tls_bt_status_t | tls_bt_hf_client_stop_voice_recognition (void)
stop voice recognition More...
tls_bt_status_t | tls_bt_hf_client_volume_control (tls_bthf_client_volume_type_t type, int volume)
volume control More...
tls_bt_status_t | tls_bt_hf_client_dial (const char *number)
place a call More...
tls_bt_status_t | tls_bt_hf_client_dial_memory (int location)
place a call with number specified by location (speed dial) More...
tls_bt_status_t | tls_bt_hf_client_handle_call_action (tls_bthf_client_call_action_t action, int idx)
handle specified call related action More...
tls_bt_status_t | tls_bt_hf_client_query_current_calls (void)
query list of current calls More...
tls_bt_status_t | tls_bt_hf_client_query_current_operator_name (void)
query current selected operator name More...
tls_bt_status_t | tls_bt_hf_client_retrieve_subscriber_info (void)
retrieve subscriber number information More...
tls_bt_status_t | tls_bt_hf_client_send_dtmf (char code)
send dtmf More...
tls_bt_status_t | tls_bt_hf_client_request_last_voice_tag_number (void)
Request number from AG for VR purposes. More...
tls_bt_status_t | tls_bt_hf_client_send_at_cmd (int cmd, int val1, int val2, const char *arg)
Send requested AT command to remote device. More...
tls_bt_status_t | tls_bt_hf_client_send_audio (tls_bt_addr_t *bd_addr, uint8_t *p_data, uint16_t length)
Send audio to audio gateway. More...

Detailed Description

Bluetooth API.

Author
WinnerMicro

Copyright (c) 2020 Winner Microelectronics Co., Ltd.


W800 SDK APIs: doxy_out/include/bt/wm_bt_spp.h File Reference

  • doxy_out
  • include
  • bt
Functions
wm_bt_spp.h File Reference

Bluetooth API. More...

#include "wm_bt.h"

Go to the source code of this file.

Functions

tls_bt_status_t | tls_bt_spp_init (tls_bt_spp_callback_t callback)
Initializes the SPP interface. More...
tls_bt_status_t | tls_bt_spp_deinit (void)
Shuts down the SPP interface and does the cleanup. More...
tls_bt_status_t | tls_bt_spp_enable (void)
Enable the bta jv interface. More...
tls_bt_status_t | tls_bt_spp_disable (void)
Disable the bta jv interface and cleanup internal resource. More...
tls_bt_status_t | tls_bt_spp_start_discovery (tls_bt_addr_t *bd_addr, tls_bt_uuid_t *uuid)
Discovery the spp service by the given peer device. More...
tls_bt_status_t | tls_bt_spp_connect (wm_spp_sec_t sec_mask, tls_spp_role_t role, uint8_t remote_scn, tls_bt_addr_t *bd_addr)
Create a spp connection to the remote device. More...
tls_bt_status_t | tls_bt_spp_disconnect (uint32_t handle)
Close a spp connection. More...
tls_bt_status_t | tls_bt_spp_start_server (wm_spp_sec_t sec_mask, tls_spp_role_t role, uint8_t local_scn, const char *name)
This function create a SPP server and starts listening for an SPP connection request from a remote Bluetooth device. More...
tls_bt_status_t | tls_bt_spp_write (uint32_t handle, uint8_t *p_data, int length)
This function is used to write data. More...

Detailed Description

Bluetooth API.

Author
WinnerMicro

Copyright (c) 2020 Winner Microelectronics Co., Ltd.


W800 SDK APIs: doxy_out/include/driver Directory Reference

  • doxy_out
  • include
  • driver
driver Directory Reference

Files

file | wm_7816.h [code]
file | wm_cpu.h [code]
cpu driver module
file | wm_dma.h [code]
DMA Driver Module.
file | wm_efuse.h [code]
virtual efuse Driver Module
file | wm_flash.h [code]
flash Driver module
file | wm_flash_map.h [code]
flash zone map
file | wm_fls_gd25qxx.h [code]
wm gd25qxx flash driver
file | wm_gpio.h [code]
GPIO Driver Module.
file | wm_gpio_afsel.h [code]
GPIO Driver Module.
file | wm_hostspi.h [code]
host spi Driver Module
file | wm_hspi.h [code]
High speed spi slave Module.
file | wm_i2c.h [code]
file | wm_internal_flash.h [code]
inter flash driver
file | wm_io.h [code]
IO Driver Module.
file | wm_irq.h [code]
interupt driver module
file | wm_lcd.h [code]
LCD Driver Module.
file | wm_pmu.h [code]
pmu driver module
file | wm_pwm.h [code]
pwm driver module
file | wm_rtc.h [code]
rtc Driver Module
file | wm_timer.h [code]
Timer Driver Module.
file | wm_touchsensor.h [code]
touchsensor Driver Module
file | wm_uart.h [code]
uart Driver Module
file | wm_watchdog.h [code]
watchdog Driver Module


W800 SDK APIs: doxy_out/include/driver/wm_7816.h File Reference

  • doxy_out
  • include
  • driver
Data Structures | Macros | Typedefs | Functions | Variables
wm_7816.h File Reference
#include <string.h>
#include <stdbool.h>
#include "wm_regs.h"
#include "wm_type_def.h"
#include "wm_io.h"

Go to the source code of this file.

Data Structures

struct sc_io_map_

Macros

#define | WM_SC_RST_PIN WM_IO_PB_23
#define | WM_SC_PWR_PIN WM_IO_PB_24
#define | WM_SC_DEFAULT_FD (372)

Typedefs

typedef struct sc_io_map_ sc_io_map

Functions

void | wm_sc_io_clk_config (uint8_t mode)
This function is used to config the pin in gpio or 7816 mode for the 7816 power on timing. More...
void | wm_sc_powerInit (void)
close af to use as gpio More...
void | wm_sc_poweron (void)
power on the 7816 device if power is controled by GPIO More...
void | wm_sc_poweroff (void)
power off the 7816 device if power is controled by GPIO More...
void | wm_sc_rst_low (void)
driver the reset gpio in low level More...
void | wm_sc_rst_high (void)
driver the reset gpio in high level More...
void | wm_sc_hotreset (void)
hotrest the 7816 device obey the 7816-3 timing More...
void | wm_sc_colreset (void)
colreset the 7816 device obey the 7816-3 timing More...
void | wm_sc_deactive (void)
deactive the 7816 device obey the 7816-3 timing More...
void | wm_sc_set_bgt (uint8_t bgt)
This function is used to config the block guard time param in 7816 mode. More...
void | wm_sc_tx_retry_times (uint8_t count)
This function is used to config the tx retry count when detect err signal. More...
void | wm_sc_rx_retry_times (uint8_t count)
This function is used to config the rx retry count when detect parity error. More...
void | wm_sc_set_etu (uint16_t etu)
This function is used to config the etu param. More...
void | wm_sc_set_frequency (uint32_t freq)
This function config the module clock freq. More...
static void | wm_sc_parity_recv (bool bl)
config recv or not when parity error More...
static void | wm_sc_7816_mode (bool bl)
select the model in 7816 or uart function More...
static void | wm_sc_set_guardtime (uint8_t gt)
This function is used to config the guard time param. More...
static void | wm_sc_set_bcwt (uint32_t bwt)
This function is used to config the CWT or BWT param. More...
static void | wm_sc_tx_errsignal_mask (bool bl)
module errsignal int enable or disable More...
static void | wm_sc_set_protocol (bool bl)
config the module protol More...
static uint8_t | wm_sc_get_protocol ()
get the module protol More...
static void | wm_sc_clk_enable (bool bl)
smart card clock output enable or disable More...

Variables

sc_io_map sc_io

Detailed Description

Author
Version
Date
Copyright
(c) 2014 Winner Microelectronics Co., Ltd. All rights reserved.


W800 SDK APIs: doxy_out/include/driver/wm_adc.h Source File

  • doxy_out
  • include
  • driver
wm_adc.h
1 /*****************************************************************************
2 *
3 * File Name : wm_adc.h
4 *
5 * Description: adc Driver Module
6 *
7 * Copyright (c) 2014 Winner Microelectronics Co., Ltd.
8 * All rights reserved.
9 *
10 * Author : dave
11 *
12 * Date : 2014-8-15
13 *****************************************************************************/
14
15 #ifndef WM_ADC_H
16 #define WM_ADC_H
17
18 #include "wm_type_def.h"
19
20 #define ADC_DEST_BUFFER_SIZE 16383//ÒÔ×ÖÎªµ¥Î»
21
22
23 /*ADC Result*/
24 #define ADC_RESULT_MASK (0x3FFFF)
25 #define ADC_RESULT_VAL(n) ((n)&ADC_RESULT_MASK)
26
27 /*ADC_ANALOG_CTRL*/
28 #define CONFIG_ADC_CHL_SEL_MASK (0xF<<8)
29 #define CONFIG_ADC_CHL_SEL(n) ((n)<<8)
30
31 #define CONFIG_PD_ADC_MASK (0x1<<2)
32 #define CONFIG_PD_ADC_VAL(n) ((n)<<2) /*1:pd adc, 0: normal work*/
33
34 #define CONFIG_RSTN_ADC_MASK (0x1<<1)
35 #define CONFIG_RSTN_ADC_VAL(n) ((n)<<1) /*1:normal work, 0:adc reset*/
36
37 #define CONFIG_EN_LDO_ADC_MASK (0x1<<0)
38 #define CONFIG_EN_LDO_ADC_VAL(n) ((n)<<0) /*1:ldo work, 0: ldo shutdown*/
39
40 /*PGA_CTRL*/
41 #define CLK_CHOP_SEL_PGA_MASK (0x7<<4)
42 #define CLK_CHOP_SEL_PGA_VAL(n) ((n)<<4)
43
44
45 #define GAIN_CTRL_PGA_MASK (0x3<<7)
46 #define GAIN_CTRL_PGA_VAL(n) ((n)<<7)
47
48
49 #define PGA_BYPASS_MASK (0x1<<3)
50 #define PGA_BYPASS_VAL(n) ((n)<<3) /*1:bypass pga, 0:use pga*/
51
52 #define BYPASS_INNER_REF_SEL (0x1<<2) /*Internal or external reference select*/
53
54 #define PGA_CHOP_ENP_MASK (0x1<<1)
55 #define PGA_CHOP_ENP_VAL(n) ((n)<<1) /*1: enable chop, 0: disable chop*/
56
57 #define PGA_EN_MASK (0x1<<0)
58 #define PGA_EN_VAL(n) ((n)<<0) /*1: enable pga, 0: disable pga*/
59
60
61 /*Temperature Control*/
62 #define TEMP_GAIN_MASK (0x3<<4)
63 #define TEMP_GAIN_VAL(n) ((n)<<4)
64
65 #define TEMP_CAL_OFFSET_MASK (0x1<<1)
66
67 #define TEMP_EN_MASK (0x1<<0)
68 #define TEMP_EN_VAL(n) ((n)<<0) /*1: enable temperature, 0: disable temperature*/
69
70
71 /*ADC CTRL*/
72 #define ANALOG_SWITCH_TIME_MASK (0x3FF<<20)
73 #define ANALOG_SWITCH_TIME_VAL(n) (((n)&0x3FF)<<20)
74
75 #define ANALOG_INIT_TIME_MASK (0x3FF<<8)
76 #define ANALOG_INIT_TIME_VAL(n) (((n)&0x3FF)<<8)
77
78 #define CMP_POLAR_MASK (0x1<<6)
79
80 #define CMP_IRQ_EN_MASK (0x1<<5)
81 #define CMP_IRQ_EN_VAL(n) ((n)<<5) /*1: enable cmp irq, 0: disable cmp irq*/
82
83
84 #define CMP_EN_MASK (0x1<<4)
85 #define CMP_EN_VAL(n) ((n)<<4) /*1: enable cmp function, 0: disable cmp function*/
86
87 #define ADC_IRQ_EN_MASK (0x1<<1)
88 #define ADC_IRQ_EN_VAL(n) ((n)<<1) /*1:enable adc transfer irq, 0: disable*/
89
90 #define ADC_DMA_EN_MASK (0x1<<0)
91 #define ADC_DMA_EN_VAL(n) ((n)<<0) /*1:enable adc dma, 0: disable*/
92
93
94 /*ADC IRQ Status*/
95 #define CMP_INT_MASK (0x1<<1)
96
97 #define ADC_INT_MASK (0x1<<0)
98
99 /*CMP Value*/
100 #define CONFIG_ADC_INPUT_CMP_VAL(n) ((n)&0x3FFFF)
101
102
103 /*ADC Channel*/
104 #define CONFIG_ADC_CHL_OFFSET (0x0E)
105 #define CONFIG_ADC_CHL_VOLT (0x0D)
106 #define CONFIG_ADC_CHL_TEMP (0x0C)
107
108
109
110 #define ADC_INT_TYPE_ADC 0
111 #define ADC_INT_TYPE_DMA 1
112 #define ADC_INT_TYPE_ADC_COMP 2
113
114 #define ADC_REFERENCE_EXTERNAL 0 //Íâ²¿²Î¿¼
115 #define ADC_REFERENCE_INTERNAL 1 //ÄÚ²¿²Î¿¼
116
117 typedef struct adc_st{
118 u8 dmachannel;
119 void (*adc_cb)(int *buf, u16 len);
120 void (*adc_bigger_cb)(int *buf, u16 len);
121 void (*adc_dma_cb)(int *buf,u16 len);
122 u16 valuelen; /*dma ²ÉÑùÊý¾Ý³¤¶È/ u16 offset; }ST_ADC; /** * @defgroup Driver_APIs Driver APIs * @brief Driver APIs */ /** * @addtogroup Driver_APIs * @{ */ /** * @defgroup ADC_Driver_APIs ADC Driver APIs * @brief ADC driver APIs */ /** * @addtogroup ADC_Driver_APIs * @{ */ /** * @brief This function is used to init adc. * * @param[in] ifusedma if use dma * @param[in] dmachannel dma channel * * @return None * * @note None */ void tls_adc_init(u8 ifusedma,u8 dmachannel); /** * @brief This function is used to register interrupt callback function. * * @param[in] inttype interrupt type: * ADC_INT_TYPE_ADC adc interrupt,user get adc result from the callback function. * ADC_INT_TYPE_DMA dma interrupt,dma transfer the adc result to the user's buffer. * @param[in] callback interrupt callback function. * * @return None * * @note None */ void tls_adc_irq_register(int inttype, void (*callback)(int *buf, u16 len)); /** * @brief This function is used to clear the interrupt source. * * @param[in] inttype interrupt type: * ADC_INT_TYPE_ADC adc interrupt,user get adc result from the callback function. * ADC_INT_TYPE_DMA dma interrupt,dma transfer the adc result to the user's buffer. * * @return None * * @note None */ void tls_adc_clear_irq(int inttype); /** * @brief This function is used to register interrupt callback function. * * @param[in] Channel adc channel,from 0 to 3 is single input;4 and 5 is differential input. * @param[in] Length byte data length,is an integer multiple of half word,need <= 0x500 * * @return None * * @note None */ void tls_adc_start_with_dma(int Channel, int Length); /** * @brief This function is used to start adc. * * @param[in] Channel adc channel,from 0 to 3 is single input;4 and 5 is differential input. * * @return None * * @note None */ void tls_adc_start_with_cpu(int Channel); /** * @brief This function is used to read adc result. * * @param[in] None * * @retval adc result * * @note None */ u32 tls_read_adc_result(void); /** * @brief This function is used to stop the adc. * * @param[in] ifusedma if use dma * * @return None * * @note None */ void tls_adc_stop(int ifusedma); /** * @brief This function is used to config adc bigger register. * * @param[in] cmp_data compare data * @param[in] cmp_pol compare pol * * @return None * * @note None */ void tls_adc_config_cmp_reg(int cmp_data, int cmp_pol); /** * @brief This function is used to set adc reference source. * * @param[in] ref ADC_REFERENCE_EXTERNAL,ADC_REFERENCE_INTERNAL * * @return None * * @note None */ void tls_adc_reference_sel(int ref); /** * @brief This function is used to read internal temperature. * * @param[in] None * * @retval temperature * * @note None */ int adc_get_interTemp(void); /** * @brief This function is used to read input voltage. * * @param[in] channel adc channel,from 0 to 3 is single input;8 and 9 is differential input. * * @retval voltage unit:mV * * @note None */ int adc_get_inputVolt(u8 channel); /** * @brief This function is used to read internal voltage. * * @param[in] None * * @retval voltage (mV) * * @note None */ u32 adc_get_interVolt(void); /** * @brief This function is used to read temperature. * * @param[in] None * * @retval temperature * * @note None */ int adc_temp(void); /** * @brief This function is used to calibrate adc single-end voltage. offset after FT or multipoint calibration. * * @param[in] chan: adc calibration channel to be used, ADC channel 0,1,2,3 * @param[in] refvoltage: calibration reference voltage to be used, unit:mV * input range[100,2300)mV, suggest reference voltage[500,2000]mV * * @return 0: success, < 0: failure * * @note After FT calibration or mulitpoint calibration, adc curve is y=ax+b, * y is real voltage(unit:mV), x is adc sample data * a and b is the coefficient. This fuction only used to revise b value. */ int adc_offset_calibration(int chan, int refvoltage); /** * @brief This function can used to calibrate adc coefficient if not calibrated, * or adc offset after FT or multipoint calibration. * * @param[in] chanused: bitmap, specified calibration channel,only bit0-3 can be used * @param[in] refvoltage[]: array, calibration reference voltage to be used, unit:mV * refvoltage keep the same position with chan bitmap * input range[100,2300)mV, suggest reference voltage[500,2000]mV * * @return 0: success, < 0: failure * * @note 1)Adc curve is y=ax+b,y is real voltage(unit:mV), x is adc sample data. * After calibration, we can get a and b, or only update b. * 2) Only used single-end adc * 3) For example, use chan 0,1,3, and refvoltage 500,1000,2000, * then chanused is 0xB, refvoltage[] value is {500,1000,0, 2000}; */ int adc_multipoint_calibration(int chanused, int refvoltage[]); /** * @} */ /** * @} */ void tls_adc_enable_calibration_buffer_offset(void); void tls_adc_voltage_start_with_cpu(void); void tls_adc_temp_offset_with_cpu(u8 calTemp12); void tls_adc_voltage_start_with_dma(int Length); void tls_adc_set_clk(int div); void signedToUnsignedData(int *adcValue); void tls_adc_buffer_bypass_set(u8 isset); void tls_adc_cmp_start(int Channel, int cmp_data, int cmp_pol); u32 adc_get_offset(void); void tls_adc_set_pga(int gain1, int gain2); int cal_voltage(double vol); #endif */
123 u16 offset;
124 }ST_ADC;
125
156 void tls_adc_init(u8 ifusedma,u8 dmachannel);
157
170 void tls_adc_irq_register(int inttype, void (*callback)(int *buf, u16 len));
171
183 void tls_adc_clear_irq(int inttype);
184
195 void tls_adc_start_with_dma(int Channel, int Length);
196
206 void tls_adc_start_with_cpu(int Channel);
207
217 u32 tls_read_adc_result(void);
218
228 void tls_adc_stop(int ifusedma);
229
240 void tls_adc_config_cmp_reg(int cmp_data, int cmp_pol);
241
251 void tls_adc_reference_sel(int ref);
252
262 int adc_get_interTemp(void);
263
273 int adc_get_inputVolt(u8 channel);
274
284 u32 adc_get_interVolt(void);
285
295 int adc_temp(void);
296
310 int adc_offset_calibration(int chan, int refvoltage);
311
329 int adc_multipoint_calibration(int chanused, int refvoltage[]);
330
331
340 void tls_adc_enable_calibration_buffer_offset(void);
341 void tls_adc_voltage_start_with_cpu(void);
342 void tls_adc_temp_offset_with_cpu(u8 calTemp12);
343 void tls_adc_voltage_start_with_dma(int Length);
344 void tls_adc_set_clk(int div);
345 void signedToUnsignedData(int *adcValue);
346 void tls_adc_buffer_bypass_set(u8 isset);
347 void tls_adc_cmp_start(int Channel, int cmp_data, int cmp_pol);
348 u32 adc_get_offset(void);
349 void tls_adc_set_pga(int gain1, int gain2);
350 int cal_voltage(double vol);
351
352
353 #endif
354
adc_get_interTemp
int adc_get_interTemp(void)
This function is used to read internal temperature.
tls_adc_irq_register
void tls_adc_irq_register(int inttype, void(*callback)(int *buf, u16 len))
This function is used to register interrupt callback function.
tls_adc_start_with_dma
void tls_adc_start_with_dma(int Channel, int Length)
This function is used to register interrupt callback function.
adc_multipoint_calibration
int adc_multipoint_calibration(int chanused, int refvoltage[])
This function can used to calibrate adc coefficient if not calibrated, or adc offset after FT or mult...
adc_temp
int adc_temp(void)
This function is used to read temperature.
adc_st
Definition: wm_adc.h:117
adc_offset_calibration
int adc_offset_calibration(int chan, int refvoltage)
This function is used to calibrate adc single-end voltage. offset after FT or multipoint calibration...
adc_get_inputVolt
int adc_get_inputVolt(u8 channel)
This function is used to read input voltage.
tls_adc_stop
void tls_adc_stop(int ifusedma)
This function is used to stop the adc.
tls_read_adc_result
u32 tls_read_adc_result(void)
This function is used to read adc result.
tls_adc_reference_sel
void tls_adc_reference_sel(int ref)
This function is used to set adc reference source.
tls_adc_start_with_cpu
void tls_adc_start_with_cpu(int Channel)
This function is used to start adc.
wm_type_def.h
WM type redefine.
tls_adc_init
void tls_adc_init(u8 ifusedma, u8 dmachannel)
This function is used to init adc.
adc_get_interVolt
u32 adc_get_interVolt(void)
This function is used to read internal voltage.
tls_adc_config_cmp_reg
void tls_adc_config_cmp_reg(int cmp_data, int cmp_pol)
This function is used to config adc bigger register.
tls_adc_clear_irq
void tls_adc_clear_irq(int inttype)
This function is used to clear the interrupt source.


W800 SDK APIs: doxy_out/include/driver/wm_cpu.h File Reference

  • doxy_out
  • include
  • driver
Data Structures | Macros | Enumerations | Functions
wm_cpu.h File Reference

cpu driver module More...

#include <stdint.h>

Go to the source code of this file.

Data Structures

union | clk_div_reg
struct | tls_sys_clk

Macros

#define | W800_PLL_CLK_MHZ (480)
#define | UNIT_MHZ (1000000)

Enumerations

enum CPU_CLK {
CPU_CLK_240M = 2, CPU_CLK_160M = 3, CPU_CLK_80M = 6, CPU_CLK_40M = 12,
CPU_CLK_2M = 240
}

Functions

void | tls_sys_clk_set (u32 clk)
This function is used to set cpu clock. More...
void | tls_sys_clk_get (tls_sys_clk *sysclk)
This function is used to get cpu clock. More...

Detailed Description

cpu driver module

Author
dave
Copyright
(c) 2014 Winner Microelectronics Co., Ltd.

Macro Definition Documentation

◆ W800_PLL_CLK_MHZ

#define W800_PLL_CLK_MHZ (480)

W800 BASE PLL CLOCK


W800 SDK APIs: doxy_out/include/driver/wm_dma.h File Reference

  • doxy_out
  • include
  • driver
Data Structures | Macros | Functions
wm_dma.h File Reference

DMA Driver Module. More...

Go to the source code of this file.

Data Structures

struct tls_dma_descriptor

Macros

#define | TLS_DMA_SEL_UART_RX 0
#define | TLS_DMA_SEL_UART_TX 1
#define | TLS_DMA_SEL_PWM_CAP0 2
#define | TLS_DMA_SEL_PWM_CAP1 3
#define | TLS_DMA_SEL_LSSPI_RX 4
#define | TLS_DMA_SEL_LSSPI_TX 5
#define | TLS_DMA_SEL_SDADC_CH0 6
#define | TLS_DMA_SEL_SDADC_CH1 7
#define | TLS_DMA_SEL_SDADC_CH2 8
#define | TLS_DMA_SEL_SDADC_CH3 9
#define | TLS_DMA_SEL_I2S_RX 10
#define | TLS_DMA_SEL_I2S_TX 11
#define | TLS_DMA_SEL_SDIO_HOST 12
#define | TLS_DMA_FLAGS_HARD_MODE (1 << 0)
#define | TLS_DMA_FLAGS_CHAIN_MODE (1 << 1)
#define | TLS_DMA_FLAGS_CHANNEL_SEL(n) ((n) << 2)
#define | TLS_DMA_FLAGS_CHAIN_LINK_EN (1 << 6)
#define | TLS_DMA_FLAGS_CHANNEL_VALID (1 << 7)
#define | TLS_DMA_DESC_VALID (1U << 31)
#define | TLS_DMA_DESC_CTRL_SRC_ADD_INC (1 << 0)
#define | TLS_DMA_DESC_CTRL_DEST_ADD_INC (1 << 2)
#define | TLS_DMA_DESC_CTRL_DATA_SIZE_BYTE (0 << 4)
#define | TLS_DMA_DESC_CTRL_DATA_SIZE_SHORT (1 << 4)
#define | TLS_DMA_DESC_CTRL_DATA_SIZE_WORD (2 << 4)
#define | TLS_DMA_DESC_CTRL_BURST_SIZE1 (0 << 6)
#define | TLS_DMA_DESC_CTRL_BURST_SIZE4 (1 << 6)
#define | TLS_DMA_DESC_CTRL_TOTAL_BYTES(n) ((n) << 7)
#define | TLS_DMA_IRQ_BURST_DONE (1 << 0)
#define | TLS_DMA_IRQ_TRANSFER_DONE (1 << 1)
#define | TLS_DMA_IRQ_BOTH_DONE (TLS_DMA_IRQ_BURST_DONE | TLS_DMA_IRQ_TRANSFER_DONE)

Functions

void | tls_dma_irq_clr (unsigned char ch, unsigned char flags)
This function is used to clear dma interrupt flag. More...
void | tls_dma_irq_register (unsigned char ch, void(*callback)(void *p), void *arg, unsigned char flags)
This function is used to register dma interrupt callback function. More...
int | tls_dma_wait_complt (unsigned char ch)
This function is used to register dma interrupt. More...
unsigned char | tls_dma_start_by_wrap (unsigned char ch, struct tls_dma_descriptor *dma_desc, unsigned char auto_reload, unsigned short src_zize, unsigned short dest_zize)
This function is used to Start the DMA controller by Wrap. More...
unsigned char | tls_dma_start (unsigned char ch, struct tls_dma_descriptor *dma_desc, unsigned char auto_reload)
This function is used to Wait until DMA operation completes. More...
unsigned char | tls_dma_stop (unsigned char ch)
This function is used to To stop current DMA channel transfer. More...
unsigned char | tls_dma_request (unsigned char ch, unsigned char flags)
This function is used to Request a free dma channel If ch is out of range [0,7] or valid but used, the function will select another free channel. else return the selected channel no. More...
void | tls_dma_free (unsigned char ch)
This function is used to Free the DMA channel when not use. More...
void | tls_dma_init (void)
This function is used to Initialize DMA Control. More...

Detailed Description

DMA Driver Module.

Author
dave

Copyright (c) 2014 Winner Microelectronics Co., Ltd.


W800 SDK APIs: doxy_out/include/driver/wm_efuse.h File Reference

  • doxy_out
  • include
  • driver
Data Structures | Macros | Typedefs | Enumerations | Functions
wm_efuse.h File Reference

virtual efuse Driver Module More...

Go to the source code of this file.

Data Structures

struct | FT_ADC_CAL_UNIT
struct | FT_ADC_CAL
struct | FT_TEMP_CAL

Macros

#define | TLS_EFUSE_STATUS_OK (0)
#define | TLS_EFUSE_STATUS_EINVALID (1)
#define | TLS_EFUSE_STATUS_EIO (2)
#define | FREQERR_ADDR (FT_MAGICNUM_ADDR + sizeof(FT_PARAM_ST))
#define | FREQERR_LEN (4)
#define | CAL_FLAG_ADDR (FT_MAGICNUM_ADDR + sizeof(FT_PARAM_ST)+4)
#define | CAL_FLAG_LEN (4)
#define | TX_GAIN_LEN (28*3)

Typedefs

typedef struct FT_ADC_CAL_UNIT | FT_ADC_CAL_UINT_ST
typedef struct FT_ADC_CAL | FT_ADC_CAL_ST
typedef struct FT_TEMP_CAL | FT_TEMP_CAL_ST

Enumerations

enum {
CMD_WIFI_MAC = 0x01, CMD_BT_MAC, CMD_TX_DC, CMD_RX_DC,
CMD_TX_IQ_GAIN, CMD_RX_IQ_GAIN, CMD_TX_IQ_PHASE, CMD_RX_IQ_PHASE,
CMD_TX_GAIN, CMD_TX_ADC_CAL, CMD_FREQ_ERR, CMD_RF_CAL_FLAG,
CMD_ALL
}

Functions

int | tls_ft_param_init (void)
This function is used to init ft param. More...
int | tls_ft_param_set (unsigned int opnum, void *data, unsigned int len)
This function is used to write ft_param. More...
int | tls_ft_param_get (unsigned int opnum, void *data, unsigned int rdlen)
This function is used to read ft_param. More...
int | tls_get_mac_addr (u8 *mac)
This function is used to get mac addr. More...
int | tls_set_mac_addr (u8 *mac)
This function is used to set mac addr. More...
int | tls_get_bt_mac_addr (u8 *mac)
This function is used to get bluetooth mac addr. More...
int | tls_set_bt_mac_addr (u8 *mac)
This function is used to set bluetooth mac addr. More...
int | tls_get_tx_gain (u8 *txgain)
This function is used to get tx gain. More...
int | tls_set_tx_gain (u8 *txgain)
This function is used to set tx gain. More...
int | tls_get_tx_lo (u8 *txlo)
This function is used to get tx lod. More...
int | tls_set_tx_lo (u8 *txlo)
This function is used to set tx lod. More...
int | tls_get_tx_iq_gain (u8 *txGain)
This function is used to get tx iq gain. More...
int | tls_set_tx_iq_gain (u8 *txGain)
This function is used to set tx iq gain. More...
int | tls_get_rx_iq_gain (u8 *rxGain)
This function is used to get rx iq gain. More...
int | tls_set_rx_iq_gain (u8 *rxGain)
This function is used to get rx iq gain. More...
int | tls_get_tx_iq_phase (u8 *txPhase)
This function is used to get tx iq phase. More...
int | tls_set_tx_iq_phase (u8 *txPhase)
This function is used to set tx iq phase. More...
int | tls_get_rx_iq_phase (u8 *rxPhase)
This function is used to get rx iq phase. More...
int | tls_set_rx_iq_phase (u8 *rxPhase)
This function is used to set rx iq phase. More...
int | tls_freq_err_op (u8 *freqerr, u8 flag)
This function is used to set/get freq err. More...
int | tls_rf_cal_finish_op (u8 *calflag, u8 flag)
This function is used to set/get cal finish flag. More...
int | tls_get_adc_cal_param (FT_ADC_CAL_ST *adc_cal)
This function is used to get adc cal param. More...
int | tls_set_adc_cal_param (FT_ADC_CAL_ST *adc_cal)
This function is used to set adc cal param. More...

Detailed Description

virtual efuse Driver Module

Author
dave

Copyright (c) 2014 Winner Microelectronics Co., Ltd.


W800 SDK APIs: doxy_out/include/driver/wm_flash.h File Reference

  • doxy_out
  • include
  • driver
Data Structures | Macros | Functions
wm_flash.h File Reference

flash Driver module More...

#include "wm_type_def.h"
#include "wm_osal.h"

Go to the source code of this file.

Data Structures

struct | fls_list
struct | tls_fls_drv
struct | tls_fls

Macros

#define | TLS_FLS_STATUS_OK (0)
#define | TLS_FLS_STATUS_EINVAL (1)
#define | TLS_FLS_STATUS_EBUSY (2)
#define | TLS_FLS_STATUS_EPERM (3)
#define | TLS_FLS_STATUS_ENOSUPPORT (4)
#define | TLS_FLS_STATUS_EEXIST (5)
#define | TLS_FLS_STATUS_ENOMEM (6)
#define | TLS_FLS_STATUS_EOVERFLOW (7)
#define | TLS_FLS_STATUS_ENODEV (8)
#define | TLS_FLS_STATUS_EDEV (9)
#define | TLS_FLS_STATUS_EIO (10)
#define | TLS_FLS_STATUS_ENODRV (11)
#define | TLS_FLS_PARAM_TYPE_ID (0)
#define | TLS_FLS_PARAM_TYPE_SIZE (1)
#define | TLS_FLS_PARAM_TYPE_PAGE_SIZE (2)
#define | TLS_FLS_PARAM_TYPE_PROG_SIZE (3)
#define | TLS_FLS_PARAM_TYPE_SECTOR_SIZE (4)
#define | TLS_FLS_FLAG_UNDER_PROTECT (1<<0)
#define | TLS_FLS_FLAG_FAST_READ (1<<1)
#define | TLS_FLS_FLAG_AAAI (1<<2)
#define | FLS_CMD_READ_DEV_ID (0x9F)

Functions

int | tls_spifls_init (void)
This function is used to initial flash module structer. More...
int | tls_spifls_read (u32 addr, u8 *buf, u32 len)
This function is used to read data from the flash. More...
int | tls_spifls_write (u32 addr, u8 *buf, u32 len)
This function is used to write data into the flash. More...

Detailed Description

flash Driver module

Author
dave

Copyright (c) 2015 Winner Microelectronics Co., Ltd.


W800 SDK APIs: doxy_out/include/driver/wm_flash_map.h File Reference

  • doxy_out
  • include
  • driver
Macros | Variables
wm_flash_map.h File Reference

flash zone map More...

Go to the source code of this file.

Macros

#define | FLASH_BASE_ADDR (0x8000000UL)
#define | CODE_UPD_START_ADDR (0x8010000UL)
#define | CODE_RUN_START_ADDR (0x80D0000UL)
#define | USER_ADDR_START (0x81E0000UL)
#define | SIGNATURE_WORD (0xA0FFFF9FUL)
#define | IMAGE_START_ADDR_MSK (0x400)

Variables

unsigned int | TLS_FLASH_MESH_PARAM_ADDR
unsigned int | TLS_FLASH_PARAM_DEFAULT
unsigned int | TLS_FLASH_PARAM1_ADDR
unsigned int | TLS_FLASH_PARAM2_ADDR
unsigned int | TLS_FLASH_PARAM_RESTORE_ADDR
unsigned int | TLS_FLASH_OTA_FLAG_ADDR
unsigned int | TLS_FLASH_END_ADDR

Detailed Description

flash zone map

Author
dave

Copyright (c) 2014 Winner Microelectronics Co., Ltd.

Macro Definition Documentation

◆ CODE_RUN_START_ADDR

#define CODE_RUN_START_ADDR (0x80D0000UL)

Run-time image header area

◆ CODE_UPD_START_ADDR

#define CODE_UPD_START_ADDR (0x8010000UL)

Upgrade image area

◆ FLASH_BASE_ADDR

#define FLASH_BASE_ADDR (0x8000000UL)

FLASH MAP Flash Base Address

◆ USER_ADDR_START

#define USER_ADDR_START (0x81E0000UL)

Area can be used by User

Variable Documentation

◆ TLS_FLASH_MESH_PARAM_ADDR

unsigned int TLS_FLASH_MESH_PARAM_ADDR

System parameter defined in wm_internal_fls.c


W800 SDK APIs: doxy_out/include/driver/wm_fls_gd25qxx.h File Reference

  • doxy_out
  • include
  • driver
Macros | Functions
wm_fls_gd25qxx.h File Reference

wm gd25qxx flash driver More...

Go to the source code of this file.

Macros

#define | SPI_SCLK (10000000) /** 10MHz. */
#define | FLASH_TOTAL_SIZE (1024*1024)
#define | PAGE_SIZE 256
#define | PROGRAM_SIZE 256
#define | PAGE_ADDR_OFFSET 8
#define | SECTOR_SIZE 4096
#define | EXSPIFLASH_WRITE_ENABLE (0x06) /** Global write enable */
#define | EXSPIFLASH_WRITE_DISABLE (0x04) /** Global write disable */
#define | EXSPIFLASH_READ_SR1 (0x05) /** Read flash status register s0~s7 */
#define | EXSPIFLASH_READ_SR2 (0x35) /** Read flash status register s8~s15 */
#define | EXSPIFLASH_WRITE_SR (0x01) /** Write flash status register s0~s15 */
#define | EXSPIFLASH_PAGE_PROGRAM (0x02) /** program one page */
#define | EXSPIFLASH_DATA_READ (0x03) /** read data from specified address */
#define | EXSPIFLASH_DATA_FAST_READ (0x0b) /** fast read data from specified address */
#define | EXSPIFLASH_SECTOR_ERASE (0x20) /** Sector erase */
#define | EXSPIFLASH_BLOCK32_ERASE (0x52) /** 32KB Block erase(128 pages) */
#define | EXSPIFLASH_BLOCK64_ERASE (0xd8) /** 64kb Block erase(256 pages) */
#define | EXSPIFLASH_CHIP_ERASE (0xc7) /** Chip erase */
#define | EXSPIFLASH_FLASH_DEVICEID (0x90) /** Read flash manufacturer/device ID */
#define | EXSPIFLASH_FLASH_ID (0x9f) /** Read flash ID */
#define | FLASH_STATUS_BUSY (1 << 0)
#define | FLASH_STATUS_WEL (1 << 1)

Functions

int tls_spifls_drv_install (void)
This function is used to install gd25qxx driver. More...

Detailed Description

wm gd25qxx flash driver

Author
dave
Copyright
(c) 2015 Winner Microelectronics Co., Ltd.

Macro Definition Documentation

◆ EXSPIFLASH_WRITE_ENABLE

#define EXSPIFLASH_WRITE_ENABLE (0x06) /** Global write enable */

command code define.

Function Documentation

◆ tls_spifls_drv_install()

int tls_spifls_drv_install ( void )

This function is used to install gd25qxx driver.

Parameters
[in] None
Return values
TLS_FLS_STATUS_OK | if write flash success
TLS_FLS_STATUS_EPERM | if flash struct point is null
TLS_FLS_STATUS_ENODRV | if flash driver is not installed
TLS_FLS_STATUS_EINVAL | if argument is invalid
TLS_FLS_STATUS_EIO | if io error
TLS_FLS_STATUS_EEXIST | if driver is already existed
Note
None


W800 SDK APIs: doxy_out/include/driver/wm_gpio.h File Reference

  • doxy_out
  • include
  • driver
Typedefs | Enumerations | Functions
wm_gpio.h File Reference

GPIO Driver Module. More...

#include "wm_type_def.h"
#include "wm_io.h"

Go to the source code of this file.

Typedefs

typedef void(* tls_gpio_irq_callback) (void *arg)

Enumerations

enum | tls_gpio_dir { WM_GPIO_DIR_OUTPUT, WM_GPIO_DIR_INPUT }
enum | tls_gpio_attr { WM_GPIO_ATTR_FLOATING, WM_GPIO_ATTR_PULLHIGH, WM_GPIO_ATTR_PULLLOW }
enum tls_gpio_irq_trig {
WM_GPIO_IRQ_TRIG_RISING_EDGE, WM_GPIO_IRQ_TRIG_FALLING_EDGE, WM_GPIO_IRQ_TRIG_DOUBLE_EDGE, WM_GPIO_IRQ_TRIG_HIGH_LEVEL,
WM_GPIO_IRQ_TRIG_LOW_LEVEL
}

Functions

void | tls_gpio_cfg (enum tls_io_name gpio_pin, enum tls_gpio_dir dir, enum tls_gpio_attr attr)
This function is used to config gpio function. More...
u8 | tls_gpio_read (enum tls_io_name gpio_pin)
This function is used to read gpio status. More...
void | tls_gpio_write (enum tls_io_name gpio_pin, u8 value)
This function is used to modify gpio status. More...
void | tls_gpio_irq_enable (enum tls_io_name gpio_pin, enum tls_gpio_irq_trig mode)
This function is used to config gpio interrupt. More...
void | tls_gpio_irq_disable (enum tls_io_name gpio_pin)
This function is used to disable gpio interrupt. More...
u8 | tls_get_gpio_irq_status (enum tls_io_name gpio_pin)
This function is used to get gpio interrupt status. More...
void | tls_clr_gpio_irq_status (enum tls_io_name gpio_pin)
This function is used to clear gpio interrupt flag. More...
void | tls_gpio_isr_register (enum tls_io_name gpio_pin, tls_gpio_irq_callback callback, void *arg)
This function is used to register gpio interrupt. More...

Detailed Description

GPIO Driver Module.

Author
dave

Copyright (c) 2014 Winner Microelectronics Co., Ltd.

Typedef Documentation

◆ tls_gpio_irq_callback

typedef void(* tls_gpio_irq_callback) (void *arg)

gpio interrupte callback function

Enumeration Type Documentation

◆ tls_gpio_attr

enum tls_gpio_attr

Indicating gpio attribute

Enumerator
WM_GPIO_ATTR_FLOATING | floating status
WM_GPIO_ATTR_PULLHIGH | pull high
WM_GPIO_ATTR_PULLLOW | pull low

◆ tls_gpio_dir

enum tls_gpio_dir

Indicating gpio direction

Enumerator
WM_GPIO_DIR_OUTPUT | output
WM_GPIO_DIR_INPUT | input

◆ tls_gpio_irq_trig

enum tls_gpio_irq_trig

Indicating gpio interrupt trigger type

Enumerator
WM_GPIO_IRQ_TRIG_RISING_EDGE | rising edge arises the interrupt
WM_GPIO_IRQ_TRIG_FALLING_EDGE | falling edge arises the interrupt
WM_GPIO_IRQ_TRIG_DOUBLE_EDGE | both rising edge and falling edge arise the interrupt
WM_GPIO_IRQ_TRIG_HIGH_LEVEL | high power level arises the interrupt
WM_GPIO_IRQ_TRIG_LOW_LEVEL | low power level arises the interrupt


W800 SDK APIs: doxy_out/include/driver/wm_gpio_afsel.h File Reference

  • doxy_out
  • include
  • driver
Functions
wm_gpio_afsel.h File Reference

GPIO Driver Module. More...

#include "wm_gpio.h"
#include "wm_regs.h"
#include "wm_irq.h"
#include "wm_osal.h"
#include "tls_common.h"

Go to the source code of this file.

Functions

void | wm_hspi_gpio_config (uint8_t numsel)
config the pins used for highspeed spi More...
void | wm_spi_ck_config (enum tls_io_name io_name)
config the pins used for spi ck More...
void | wm_spi_cs_config (enum tls_io_name io_name)
config the pins used for spi cs More...
void | wm_spi_di_config (enum tls_io_name io_name)
config the pins used for spi di More...
void | wm_spi_do_config (enum tls_io_name io_name)
config the pins used for spi do More...
void | wm_sdio_host_config (uint8_t numsel)
config the pins used for sdio host ck dat0 dat1 dat2 dat3 More...
void | wm_sdio_slave_config (uint8_t numsel)
config the pins used for sdio slave ck dat0 dat1 dat2 dat3 More...
void | wm_psram_config (uint8_t numsel)
config the pins used for psram ck cs dat0 dat1 dat2 dat3 More...
void | wm_uart0_tx_config (enum tls_io_name io_name)
config the pins used for uart0 tx More...
void | wm_uart0_rx_config (enum tls_io_name io_name)
config the pins used for uart0 rx More...
void | wm_uart1_tx_config (enum tls_io_name io_name)
config the pins used for uart1 tx More...
void | wm_uart1_rx_config (enum tls_io_name io_name)
config the pins used for uart1 rx More...
void | wm_uart1_rts_config (enum tls_io_name io_name)
config the pins used for uart1 rts More...
void | wm_uart1_cts_config (enum tls_io_name io_name)
config the pins used for uart1 cts More...
void | wm_uart2_tx_scio_config (enum tls_io_name io_name)
config the pins used for uart2 tx or 7816-io More...
void | wm_uart2_rx_config (enum tls_io_name io_name)
config the pins used for uart2 rx More...
void | wm_uart2_rts_scclk_config (enum tls_io_name io_name)
config the pins used for uart2 rts or 7816-clk More...
void | wm_uart2_cts_config (enum tls_io_name io_name)
config the pins used for uart2 cts More...
void | wm_uart3_tx_config (enum tls_io_name io_name)
config the pins used for uart3 tx More...
void | wm_uart3_rx_config (enum tls_io_name io_name)
config the pins used for uart3 rx More...
void | wm_uart3_rts_config (enum tls_io_name io_name)
config the pins used for uart3 rts More...
void | wm_uart3_cts_config (enum tls_io_name io_name)
config the pins used for uart3 cts More...
void | wm_uart4_tx_config (enum tls_io_name io_name)
config the pins used for uart4 tx More...
void | wm_uart4_rx_config (enum tls_io_name io_name)
config the pins used for uart4 rx More...
void | wm_uart4_rts_config (enum tls_io_name io_name)
config the pins used for uart4 rts More...
void | wm_uart4_cts_config (enum tls_io_name io_name)
config the pins used for uart4 cts More...
void | wm_uart5_tx_config (enum tls_io_name io_name)
config the pins used for uart4 tx More...
void | wm_uart5_rx_config (enum tls_io_name io_name)
config the pins used for uart4 rx More...
void | wm_uart5_rts_config (enum tls_io_name io_name)
config the pins used for uart4 rts More...
void | wm_uart5_cts_config (enum tls_io_name io_name)
config the pins used for uart4 cts More...
void | wm_i2s_ck_config (enum tls_io_name io_name)
config the pins used for i2s ck More...
void | wm_i2s_ws_config (enum tls_io_name io_name)
config the pins used for i2s ws More...
void | wm_i2s_do_config (enum tls_io_name io_name)
config the pins used for i2s do More...
void | wm_i2s_di_config (enum tls_io_name io_name)
config the pins used for i2s di More...
void | wm_i2s_mclk_config (enum tls_io_name io_name)
config the pins used for i2s mclk More...
void | wm_i2s_extclk_config (enum tls_io_name io_name)
config the pins used for i2s extclk More...
void | wm_i2c_scl_config (enum tls_io_name io_name)
config the pins used for i2c scl More...
void | wm_i2c_sda_config (enum tls_io_name io_name)
config the pins used for i2c sda More...
void | wm_pwm0_config (enum tls_io_name io_name)
config the pins used for pwm0 More...
void | wm_pwm1_config (enum tls_io_name io_name)
config the pins used for pwm1 More...
void | wm_pwm2_config (enum tls_io_name io_name)
config the pins used for pwm2 More...
void | wm_pwm3_config (enum tls_io_name io_name)
config the pins used for pwm3 More...
void | wm_pwm4_config (enum tls_io_name io_name)
config the pins used for pwm4 More...
void | wm_pwmbrk_config (enum tls_io_name io_name)
config the pins used for pwm break More...
void | wm_swd_config (bool enable)
config the pins used for swd More...
void | wm_adc_config (u8 Channel)
config the pins used for adc More...
void | wm_touch_sensor_config (enum tls_io_name io_name)
config the pins used for touch sensor More...
void | wm_gpio_af_disable (void)
disable all the gpio af More...

Detailed Description

GPIO Driver Module.

Author
dave

Copyright (c) 2014 Winner Microelectronics Co., Ltd.


W800 SDK APIs: doxy_out/include/driver/wm_hostspi.h File Reference

  • doxy_out
  • include
  • driver
Data Structures | Macros | Functions
wm_hostspi.h File Reference

host spi Driver Module More...

#include "wm_type_def.h"
#include "list.h"
#include "wm_osal.h"
#include "wm_ram_config.h"

Go to the source code of this file.

Data Structures

struct | tls_spi_transfer
struct | tls_spi_message
struct | tls_spi_port

Macros

#define | SPI_USE_DMA
#define | SPI_DMA_CMD_MAX_SIZE (0x20)
#define | SPI_DMA_BUF_MAX_SIZE (8160)
#define | SPI_DMA_MAX_TRANS_SIZE (4092)
#define | TLS_SPI_STATUS_OK (0)
#define | TLS_SPI_STATUS_EINVAL (-1)
#define | TLS_SPI_STATUS_ENOMEM (-2)
#define | TLS_SPI_STATUS_EBUSY (-3)
#define | TLS_SPI_STATUS_ESHUTDOWN (-4)
#define | TLS_SPI_STATUS_EPERM (-5)
#define | TLS_SPI_STATUS_ECLKNOSUPPORT (-6)
#define | TLS_SPI_STATUS_EMODENOSUPPORT (-7)
#define | SPI_MASTER_FIFO_SIZE (32)
#define | SPI_CPHA (0x01) /** clock phase. */
#define | SPI_CPOL (0x02) /** clock polarity. */
#define | TLS_SPI_MODE_0 (0|0) /** motorola mode. */
#define | TLS_SPI_MODE_1 (0|SPI_CPHA)
#define | TLS_SPI_MODE_2 (SPI_CPOL|0)
#define | TLS_SPI_MODE_3 (SPI_CPOL|SPI_CPHA)
#define | TLS_SPI_CS_LOW 0x00 /** chipselect active low. */
#define | TLS_SPI_CS_HIGH 0x01 /** chipselect active high. */
#define | TLS_SPI_FCLK_MIN (1000) /** minimum work clock rate(Hz). */
#define | TLS_SPI_FCLK_MAX (APB_CLK/2) /** maximum work clock rate(Hz). */
#define | SPI_DEFAULT_SPEED (2000000) /** default clock rate is 2MHz. */
#define | SPI_DEFAULT_MODE (TLS_SPI_MODE_0) /** default mode MODE_0. */
#define | SPI_CS_ACTIVE_MODE (TLS_SPI_CS_LOW) /** default chipselect mode is active low. */
#define | SPI_CS_INACTIVE_MODE (TLS_SPI_CS_HIGH)
#define | SPI_MESSAGE_STATUS_IDLE (0)
#define | SPI_MESSAGE_STATUS_INPROGRESS (1)
#define | SPI_MESSAGE_STATUS_DONE (2)
#define | SPI_SLAVE_FLASH 0 /**flash */
#define | SPI_SLAVE_CARD 1 /** SD card */
#define | SPI_SLAVE_CONTROL_PIN 0
#define | SPI_BYTE_TRANSFER 0 /**byte transfer*/
#define | SPI_WORD_TRANSFER 1 /**word transfer*/
#define | SPI_DMA_TRANSFER 2 /** DMA transfer */

Functions

int | tls_spi_init (void)
This function is used to initialize the SPI master driver. More...
int | tls_spi_setup (u8 mode, u8 cs_active, u32 fclk)
This function is used to setup the spi controller. More...
int | tls_spi_write (const u8 *buf, u32 len)
This function is used to synchronous write data by SPI. More...
int | tls_spi_read (u8 *buf, u32 len)
This function is used to synchronously read data from SPI. More...
int | tls_spi_read_with_cmd (const u8 *txbuf, u32 n_tx, u8 *rxbuf, u32 n_rx)
This function is used to synchronously write command and then read data from SPI. More...
int | tls_spi_write_with_cmd (const u8 *cmd, u32 n_cmd, const u8 *txbuf, u32 n_tx)
This function is used to synchronous write 32bit command then write data from SPI. More...
void | tls_spi_trans_type (u8 type)
This function is used to set SPI transfer mode. More...

Detailed Description

host spi Driver Module

Author
dave

Copyright (c) 2015 Winner Microelectronics Co., Ltd.

Macro Definition Documentation

◆ SPI_BYTE_TRANSFER

#define SPI_BYTE_TRANSFER 0 /**byte transfer*/

transfer type

◆ SPI_CPHA

#define SPI_CPHA (0x01) /** clock phase. */

the SPI master controller's configuration data.configuration data.

◆ SPI_DEFAULT_SPEED

#define SPI_DEFAULT_SPEED (2000000) /** default clock rate is 2MHz. */

default configuration data.

◆ SPI_MESSAGE_STATUS_IDLE

#define SPI_MESSAGE_STATUS_IDLE (0)

SPI transaction message status.

◆ SPI_SLAVE_FLASH

#define SPI_SLAVE_FLASH 0 /**flash */

slave type

◆ TLS_SPI_STATUS_OK

#define TLS_SPI_STATUS_OK (0)

error code.


W800 SDK APIs: doxy_out/include/driver/wm_hspi.h File Reference

  • doxy_out
  • include
  • driver
Data Structures | Macros | Functions
wm_hspi.h File Reference

High speed spi slave Module. More...

#include "wm_type_def.h"
#include "wm_ram_config.h"

Go to the source code of this file.

Data Structures

struct | tls_hspi_tx_desc
struct | tls_hspi_rx_desc
struct | tls_slave_hspi

Macros

#define | HSPI_TX_MEM_MALLOC 0 /** tx mem dynamic malloc*/
#define | HSPI_INTERFACE_SPI 2 /** spi interface*/
#define | HSPI_INTERFACE_SDIO 3 /** sdio interface*/
#define | HSPI_RX_CMD_MSG 1
#define | HSPI_RX_DATA_MSG 2
#define | HSPI_TXBUF_NUM 2
#define | HSPI_TX_DESC_NUM HSPI_TXBUF_NUM
#define | HSPI_RXBUF_NUM 3
#define | HSPI_RX_DESC_NUM HSPI_RXBUF_NUM
#define | HSPI_TXBUF_SIZE 1500
#define | HSPI_RXBUF_SIZE 1500
#define | HSPI_TX_DESC_SIZE sizeof(struct tls_hspi_tx_desc)
#define | HSPI_RX_DESC_SIZE sizeof(struct tls_hspi_rx_desc)
#define | HSPI_TXBUF_BASE_ADDR ((u32)(SLAVE_HSPI_SDIO_ADDR))
#define | HSPI_TXBUF_TOTAL_SIZE (HSPI_TXBUF_SIZE * HSPI_TXBUF_NUM)
#define | HSPI_TX_DESC_BASE_ADDR ((u32)(HSPI_TXBUF_BASE_ADDR + HSPI_TXBUF_TOTAL_SIZE))
#define | HSPI_TX_DESC_TOTAL_SIZE (HSPI_TX_DESC_SIZE * HSPI_TX_DESC_NUM)
#define | HSPI_RXBUF_BASE_ADDR ((u32)(HSPI_TX_DESC_BASE_ADDR + HSPI_TX_DESC_TOTAL_SIZE))
#define | HSPI_RXBUF_TOTAL_SIZE (HSPI_RXBUF_NUM * HSPI_RXBUF_SIZE)
#define | HSPI_RX_DESC_BASE_ADDR ((u32)(HSPI_RXBUF_BASE_ADDR + HSPI_RXBUF_TOTAL_SIZE))
#define | HSPI_RX_DESC_TOTAL_SIZE (HSPI_RX_DESC_SIZE * HSPI_RX_DESC_NUM)
#define | SDIO_CIS_SIZE (0x80)
#define | SDIO_CMD_RXBUF_SIZE 256
#define | SDIO_CIS0_ADDR (HSPI_RX_DESC_BASE_ADDR + HSPI_RX_DESC_TOTAL_SIZE)
#define | SDIO_CIS1_ADDR (SDIO_CIS0_ADDR + SDIO_CIS_SIZE)
#define | SDIO_CMD_RXBUF_ADDR (SDIO_CIS1_ADDR + SDIO_CIS_SIZE)
#define | CIS_FUN0_ADDR ((u32)SDIO_CIS0_ADDR)
#define | CIS_FUN1_ADDR ((u32)SDIO_CIS1_ADDR)
#define | FN0_TPL_FUNCID (CIS_FUN0_ADDR + 0x00)
#define | FN0_TPL_FUNCE (CIS_FUN0_ADDR + 0x04)
#define | FN0_TPL_FUNCE_MAXBLK (CIS_FUN0_ADDR + 0x08)
#define | FN0_TPL_MANFID_MID (CIS_FUN0_ADDR + 0x0C)
#define | FN0_TPL_END (CIS_FUN0_ADDR + 0x10)
#define | FN1_TPL_FUNCID (CIS_FUN1_ADDR + 0x00)
#define | FN1_TPL_FUNCE (CIS_FUN1_ADDR + 0x04)
#define | FN1_TPL_FUNCE_VER (CIS_FUN1_ADDR + 0x08)
#define | FN1_TPL_FUNCE_NSN (CIS_FUN1_ADDR + 0x0C)
#define | FN1_TPL_FUNCE_CSASIZE (CIS_FUN1_ADDR + 0x10)
#define | FN1_TPL_FUNCE_OCR (CIS_FUN1_ADDR + 0x14)
#define | FN1_TPL_FUNCE_MINPWR (CIS_FUN1_ADDR + 0x18)
#define | FN1_TPL_FUNCE_STANDBY (CIS_FUN1_ADDR + 0x1C)
#define | FN1_TPL_FUNCE_OPTBW (CIS_FUN1_ADDR + 0x20)
#define | FN1_TPL_FUNCE_NTIMEOUT (CIS_FUN1_ADDR + 0x24)
#define | FN1_TPL_FUNCE_AVGPWR (CIS_FUN1_ADDR + 0x28)
#define | FN1_TPL_END (CIS_FUN1_ADDR + 0x30)
#define | SDIO_WP_INT_SRC_CMD_DOWN (1UL<<3)
#define | SDIO_WP_INT_SRC_CMD_UP (1UL<<2)
#define | SDIO_WP_INT_SRC_DATA_DOWN (1UL<<1)
#define | SDIO_WP_INT_SRC_DATA_UP (1UL<<0)

Functions

int | tls_slave_spi_init (void)
This function is used to initial HSPI register. More...
void | tls_set_hspi_user_mode (u8 ifenable)
This function is used to enable or disable user mode. More...
void | tls_set_high_speed_interface_type (int type)
This function is used to set high speed interface type. More...
void | tls_hspi_rx_cmd_callback_register (s16(*rx_cmd_callback)(char *buf))
This function is used to register hspi rx command interrupt. More...
void | tls_hspi_rx_data_callback_register (s16(*rx_data_callback)(char *buf))
This function is used to register hspi rx data interrupt. More...
void | tls_hspi_tx_data_callback_register (s16(*tx_data_callback)(char *buf))
This function is used to register hspi tx data interrupt. More...
int | tls_hspi_tx_data (char *txbuf, int len)
This function is used to transfer data. More...

Detailed Description

High speed spi slave Module.

Author
dave

Copyright (c) 2015 Winner Microelectronics Co., Ltd.

Macro Definition Documentation

◆ HSPI_RX_CMD_MSG

#define HSPI_RX_CMD_MSG 1

rx message

◆ HSPI_RX_DESC_BASE_ADDR

#define HSPI_RX_DESC_BASE_ADDR ((u32)(HSPI_RXBUF_BASE_ADDR + HSPI_RXBUF_TOTAL_SIZE))

HSPI rx desc zone

◆ HSPI_RXBUF_BASE_ADDR

#define HSPI_RXBUF_BASE_ADDR ((u32)(HSPI_TX_DESC_BASE_ADDR + HSPI_TX_DESC_TOTAL_SIZE))

HSPI rxbuf zone

◆ HSPI_TX_DESC_BASE_ADDR

#define HSPI_TX_DESC_BASE_ADDR ((u32)(HSPI_TXBUF_BASE_ADDR + HSPI_TXBUF_TOTAL_SIZE))

HSPI tx desc zone

◆ HSPI_TXBUF_NUM

#define HSPI_TXBUF_NUM 2

spi/sdio buffer

◆ SDIO_WP_INT_SRC_CMD_DOWN

#define SDIO_WP_INT_SRC_CMD_DOWN (1UL<<3)

SDIO interrupt bit definition


W800 SDK APIs: doxy_out/include/driver/wm_i2c.h File Reference

  • doxy_out
  • include
  • driver
Data Structures | Macros | Functions
wm_i2c.h File Reference
#include "wm_regs.h"
#include "wm_type_def.h"
#include "wm_cpu.h"
#include "wm_irq.h"

Go to the source code of this file.

Data Structures

struct I2C_T

Macros

#define | I2C ((I2C_T *)(HR_I2C_BASE_ADDR))
#define | wm_i2c_int_mask(bl) do { tls_bitband_write(HR_I2C_CTRL, 6, bl);}while(0);

Functions

void | tls_i2c_init (u32 freq)
Init the I2C module. More...
void | tls_i2c_stop (void)
send stop signal
int | tls_i2c_wait_ack (void)
Waiting for ack signal. More...
void | tls_i2c_write_byte (u8 data, u8 ifstart)
Writes the data to data register of I2C module when ifstart one the start signal will be sent followed by the data when ifstart zero only the data will be send. More...
u8 | tls_i2c_read_byte (u8 ifack, u8 ifstop)
Get the data stored in data register of I2C module. More...
void | wm_i2c_transfer_done_register (void(*done)(void))
This function is used to register i2c transfer done callback function. More...
int | wm_i2c_start_write_it (uint8_t devaddr, uint8_t wordaddr, uint8_t *buf, uint16_t len)
Start writing through int mode. More...
int | wm_i2c_start_read_it (uint8_t devaddr, uint8_t wordaddr, uint8_t *buf, uint16_t len)
Get the data stored in data register of I2C module. More...

Detailed Description

Author
Version
Date
Copyright
(c) 2014 Winner Microelectronics Co., Ltd. All rights reserved.


W800 SDK APIs: doxy_out/include/driver/wm_i2s.h Source File

  • doxy_out
  • include
  • driver
wm_i2s.h
1 #ifndef __WM_I2S_H
2 #define __WM_I2S_H
3
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7
8 #include <stdbool.h>
9 //#include "wm_regs_cm3.h"
10 #include "wm_regs.h"
11 #include "wm_debug.h"
12 #include "wm_dma.h"
13
14
15 typedef void (*tls_i2s_callback)(uint32_t *data, uint16_t *len);
16
17 typedef struct {
18 __IO uint32_t CTRL;
19 __IO uint32_t INT_MASK;
20 __IO uint32_t INT_SRC;
21 __I uint32_t INT_STATUS;
22 __O uint32_t TX;
23 __I uint32_t RX;
24 } I2S_T;
25
26
27 typedef struct {
28 uint32_t I2S_Mode_MS; //master or slave mode
29 uint32_t I2S_Mode_SS; //stereo or single channel
30 uint32_t I2S_Mode_LR; //left or right channel
31 uint32_t I2S_Trans_STD;
32 uint32_t I2S_DataFormat;
33 uint32_t I2S_AudioFreq;
34 uint32_t I2S_MclkFreq;
35 } I2S_InitDef;
36
37 typedef struct _wm_dma_desc
38 {
39 unsigned int valid;
40 unsigned int dma_ctrl;
41 unsigned int src_addr;
42 unsigned int dest_addr;
43 struct _wm_dma_desc * next;
44 }wm_dma_desc;
45
46 typedef struct _dma_handler_type
47 {
48 uint8_t channel;
49 void (* XferCpltCallback)( struct _dma_handler_type * hdma);
50 void (* XferHalfCpltCallback)( struct _dma_handler_type * hdma);
51 }wm_dma_handler_type;
52
53 #define I2S ((I2S_T *)HR_I2S_REG_BASE)
54
55 #define I2S_MODE_MASTER ((bool)0x0)
56 #define I2S_MODE_SLAVE ((bool)0x1)
57
58 #define I2S_RIGHT_CHANNEL ((bool)0x0)
59 #define I2S_LEFT_CHANNEL ((bool)0x1)
60
61 #define I2S_Standard (0x0UL)
62 #define I2S_Standard_MSB (0x1000000UL)
63 #define I2S_Standard_PCMA (0x2000000UL)
64 #define I2S_Standard_PCMB (0x3000000UL)
65
66 #define I2S_DataFormat_8 (8)
67 #define I2S_DataFormat_16 (16)
68 #define I2S_DataFormat_24 (24)
69 #define I2S_DataFormat_32 (32)
70
71 #define I2S_CTRL_CHSEL_MASK (1UL<<23)
72 #define I2S_CTRL_CHSEL_LEFT (1UL<<23)
73 #define I2S_CTRL_MONO (1UL<<22)
74 #define I2S_CTRL_STEREO (0UL<<22)
75 #define I2S_CTRL_RXDMA_EN (1UL<<21)
76 #define I2S_CTRL_TXDMA_EN (1UL<<20)
77 #define I2S_CTRL_RX_CLR (1UL<<19)
78 #define I2S_CTRL_TX_CLR (1UL<<18)
79 #define I2S_CTRL_LZCEN (1UL<<17)
80 #define I2S_CTRL_RZCEN (1UL<<16)
81 #define I2S_CTRL_RXTH(n) ((n-1)<<12)
82 #define I2S_CTRL_TXTH(n) ((n)<<9)
83 #define I2S_CTRL_SLAVE_SEL (1UL<<8)
84 #define I2S_CTRL_MUTE (1UL<<3)
85 #define I2S_CTRL_RXE (1UL<<2)
86 #define I2S_CTRL_TXE (1UL<<1)
87 #define I2S_CTRL_EN (1UL<<0)
88
89 #define I2S_INT_MASK_LZC ((uint16_t)0x200)
90 #define I2S_INT_MASK_RZC ((uint16_t)0x100)
91 #define I2S_INT_MASK_TXDONE ((uint16_t)0x080)
92 #define I2S_INT_MASK_TXTH ((uint16_t)0x040)
93 #define I2S_INT_MASK_TXOV ((uint16_t)0x020)
94 #define I2S_INT_MASK_TXUD ((uint16_t)0x010)
95 #define I2S_INT_MASK_RXDONE ((uint16_t)0x008)
96 #define I2S_INT_MASK_RXTH ((uint16_t)0x004)
97 #define I2S_INT_MASK_RXOV ((uint16_t)0x002)
98 #define I2S_INT_MASK_RXUD ((uint16_t)0x002)
99
100 #define I2S_FLAG_TX ((uint16_t)0x1000)
101 #define I2S_FLAG_RX ((uint16_t)0x0800)
102 #define I2S_FLAG_I2S ((uint16_t)0x0400)
103 #define I2S_FLAG_LZC ((uint16_t)0x0200)
104 #define I2S_FLAG_RZC ((uint16_t)0x0100)
105 #define I2S_FLAG_TXDONE ((uint16_t)0x0080)
106 #define I2S_FLAG_TXTH ((uint16_t)0x0040)
107 #define I2S_FLAG_TXOV ((uint16_t)0x0020)
108 #define I2S_FLAG_TXUD ((uint16_t)0x0010)
109 #define I2S_FLAG_RXDONE ((uint16_t)0x0008)
110 #define I2S_FLAG_RXTH ((uint16_t)0x0004)
111 #define I2S_FLAG_RXOV ((uint16_t)0x0002)
112 #define I2S_FLAG_RXUD ((uint16_t)0x0001)
113
114 #define WM_I2S_TX_DMA_CHANNEL (1)
115 #define WM_I2S_RX_DMA_CHANNEL (5)
116
117
118 typedef struct wm_i2s_buf_s {
119 volatile uint32_t *txbuf;
120 volatile uint32_t txlen;
121 volatile uint32_t txtail;
122 volatile uint32_t *rxbuf;
123 volatile uint32_t rxlen;
124 volatile uint32_t int_txlen;
125 volatile uint32_t rxhead;
126 volatile uint8_t rxdata_ready;
127 volatile uint8_t txdata_done;
128
130 void (*rx_callback)(void);
132 void (*tx_callback)(uint32_t *data, uint16_t *len);
133 } wm_i2s_buf_t;
162 void wm_i2s_register_callback(tls_i2s_callback callback);
163
171 int wm_i2s_port_init(I2S_InitDef *opts);
172
177 void wm_i2s_tx_rx_stop(void);
178
192 int wm_i2s_tx_int(int16_t *data, uint16_t len, int16_t *next_data);
193
207 int wm_i2s_tx_dma(int16_t *data, uint16_t len, int16_t *next_data);
208
224 int wm_i2s_tx_dma_link(int16_t *data, uint16_t len, int16_t *next_data);
225
237 int wm_i2s_rx_int(int16_t *data, uint16_t len);
238
250 int wm_i2s_rx_dma(int16_t *data, uint16_t len);
251
266 int wm_i2s_tx_rx_int(I2S_InitDef *opts, int16_t *data_tx, int16_t *data_rx, uint16_t len);
267
282 int wm_i2s_tx_rx_dma(I2S_InitDef *opts, int16_t *data_tx, int16_t *data_rx, uint16_t len);
283
284 int wm_i2s_transmit_dma(wm_dma_handler_type *hdma, uint16_t *data, uint16_t len);
285 int wm_i2s_receive_dma(wm_dma_handler_type *hdma, uint16_t *data, uint16_t len);
286
296 #ifdef __cplusplus
297 }
298 #endif
299
300 #endif
_dma_handler_type
Definition: wm_i2s.h:46
__IO
#define __IO
Definition: wm_regs.h:68
I2S_InitDef
Definition: wm_i2s.h:27
wm_i2s_buf_s
Definition: wm_i2s.h:118
wm_i2s_tx_rx_stop
void wm_i2s_tx_rx_stop(void)
stop i2s module
__O
#define __O
Definition: wm_regs.h:67
wm_i2s_port_init
int wm_i2s_port_init(I2S_InitDef *opts)
Initializes the I2S according to the specified parameters in the I2S_InitDef.
wm_regs.h
register & operation file
wm_dma.h
DMA Driver Module.
wm_i2s_buf_s::tx_callback
void(* tx_callback)(uint32_t *data, uint16_t *len)
Definition: wm_i2s.h:132
wm_i2s_tx_rx_int
int wm_i2s_tx_rx_int(I2S_InitDef *opts, int16_t *data_tx, int16_t *data_rx, uint16_t len)
Full-Duplex Transmit/Receive data in blocking mode using Interrupt.
_dma_handler_type::XferCpltCallback
void(* XferCpltCallback)(struct _dma_handler_type *hdma)
Definition: wm_i2s.h:49
_dma_handler_type::XferHalfCpltCallback
void(* XferHalfCpltCallback)(struct _dma_handler_type *hdma)
Definition: wm_i2s.h:50
I2S_T
Definition: wm_i2s.h:17
wm_i2s_tx_dma_link
int wm_i2s_tx_dma_link(int16_t *data, uint16_t len, int16_t *next_data)
Transmit an amount of data in blocking mode with DMA&#39;s link mode.
wm_i2s_tx_rx_dma
int wm_i2s_tx_rx_dma(I2S_InitDef *opts, int16_t *data_tx, int16_t *data_rx, uint16_t len)
Full-Duplex Transmit/Receive data in blocking mode using DMA.
wm_i2s_buf_s::rx_callback
void(* rx_callback)(void)
Definition: wm_i2s.h:130
wm_i2s_rx_dma
int wm_i2s_rx_dma(int16_t *data, uint16_t len)
Receive an amount of data in blocking mode with DMA.
wm_debug.h
debug Module APIs
wm_i2s_register_callback
void wm_i2s_register_callback(tls_i2s_callback callback)
Register a callback function.
wm_i2s_rx_int
int wm_i2s_rx_int(int16_t *data, uint16_t len)
Receive an amount of data in blocking mode with Interrupt.
wm_i2s_tx_dma
int wm_i2s_tx_dma(int16_t *data, uint16_t len, int16_t *next_data)
Transmit an amount of data in blocking mode with DMA&#39;s normal mode.
__I
#define __I
Definition: wm_regs.h:65
_wm_dma_desc
Definition: wm_i2s.h:37
wm_i2s_tx_int
int wm_i2s_tx_int(int16_t *data, uint16_t len, int16_t *next_data)
Transmit an amount of data in blocking mode with Interrupt.


W800 SDK APIs: doxy_out/include/driver/wm_internal_flash.h File Reference

  • doxy_out
  • include
  • driver
Data Structures | Macros | Typedefs | Enumerations | Functions
wm_internal_flash.h File Reference

inter flash driver More...

#include "wm_type_def.h"
#include "wm_osal.h"

Go to the source code of this file.

Data Structures

union | FLASH_ENCRYPT_CTRL_Type
struct | FLASH_TypeDef
struct | FLASH_OTP_WR_PARAM_ST
struct | tls_inside_fls

Macros

#define | M8(adr) (*((vu8 *) (adr)))
#define | M16(adr) (*((vu16*) (adr)))
#define | M32(adr) (*((vu32*) (adr)))
#define | INSIDE_FLS_SECTOR_SIZE 0x1000
#define | INSIDE_FLS_PAGE_SIZE 256
#define | INSIDE_FLS_BASE_ADDR 0x8000000UL
#define | INSIDE_FLS_SECBOOT_ADDR (INSIDE_FLS_BASE_ADDR + 0x02000)
#define | FLASH_HS 0x00000001
#define | RDPRT_KEY 0x5AA5
#define | FLASH_KEY1 0x57696E6E
#define | FLASH_KEY2 0x65724D69
#define | FLASH_KEY3 0x63726F21
#define | FLASH_PG 0x00000001
#define | FLASH_PER 0x00000002
#define | FLASH_MER 0x00000004
#define | FLASH_STRT 0x00000008
#define | FLASH_LOCK 0x00000020
#define | FLASH_ERRIE 0x00000040
#define | FLASH_EOPIE 0x00000080
#define | FLASH_BSY 0x00000001
#define | FLASH_PGERR 0x00000002
#define | FLASH_EOP 0x00000004
#define | TLS_FLS_STATUS_OK (0)
#define | TLS_FLS_STATUS_EINVAL (1)
#define | TLS_FLS_STATUS_EBUSY (2)
#define | TLS_FLS_STATUS_EPERM (3)
#define | TLS_FLS_STATUS_ENOSUPPORT (4)
#define | TLS_FLS_STATUS_EEXIST (5)
#define | TLS_FLS_STATUS_ENOMEM (6)
#define | TLS_FLS_STATUS_EOVERFLOW (7)
#define | TLS_FLS_STATUS_ENODEV (8)
#define | TLS_FLS_STATUS_EDEV (9)
#define | TLS_FLS_STATUS_EIO (10)
#define | TLS_FLS_STATUS_ENODRV (11)
#define | TLS_FLS_PARAM_TYPE_ID (0)
#define | TLS_FLS_PARAM_TYPE_SIZE (1)
#define | TLS_FLS_PARAM_TYPE_PAGE_SIZE (2)
#define | TLS_FLS_PARAM_TYPE_PROG_SIZE (3)
#define | TLS_FLS_PARAM_TYPE_SECTOR_SIZE (4)
#define | TLS_FLS_FLAG_UNDER_PROTECT (1<<0)
#define | TLS_FLS_FLAG_FAST_READ (1<<1)
#define | TLS_FLS_FLAG_AAAI (1<<2)
#define | CMD_START_Pos 8U
#define | CMD_START_Msk (1UL << CMD_START_Pos)

Typedefs

typedef volatile unsigned char | vu8
typedef volatile unsigned short | vu16
typedef volatile unsigned long | vu32

Enumerations

enum TYPE_FLASH_ID {
SPIFLASH_MID_GD = 0xC8, SPIFLASH_MID_ESMT = 0x1C, SPIFLASH_MID_PUYA = 0x85, SPIFLASH_MID_WINBOND = 0xEF,
SPIFLASH_MID_FUDANMICRO = 0xA1, SPIFLASH_MID_BOYA = 0x68, SPIFLASH_MID_XMC = 0x20, SPIFLASH_MID_XTX = 0x0B,
SPIFLASH_MID_TSINGTENG = 0xEB, SPIFLASH_MID_TSINGTENG_1MB_4MB = 0xCD
}

Functions

int | tls_flash_unlock (void)
This function is used to unlock flash protect area [0x0~0x2000]. More...
int | tls_flash_lock (void)
This function is used to lock flash protect area [0x0~0x2000]. More...
void | tls_fls_sem_lock (void)
This function is used to get the flash semaphore. More...
void | tls_fls_sem_unlock (void)
This function is used to release the flash semaphore. More...
int | tls_fls_read_unique_id (unsigned char *uuid)
This function is used to read the unique id of the internal flash. More...
int | tls_fls_init (void)
This function is used to initial flash module structer. More...
int | tls_fls_read (u32 addr, u8 *buf, u32 len)
This function is used to read data from the flash. More...
int | tls_fls_write (u32 addr, u8 *buf, u32 len)
This function is used to write data into the flash. More...
int | tls_fls_write_without_erase (u32 addr, u8 *buf, u32 len)
This function is used to write data into the flash without erase. More...
int | tls_fls_erase (u32 sector)
This function is used to erase the appointed sector. More...
void | tls_fls_sys_param_postion_init (void)
This function is used to initialize system parameter postion by flash density. More...
int | tls_fls_otp_read (u32 addr, u8 *buf, u32 len)
This function is used to read data from the security registers. More...
int | tls_fls_otp_write (u32 addr, u8 *buf, u32 len)
This function is used to write data into the security registers. More...
int | tls_fls_otp_lock (void)
This function is used to lock the security registers. More...

Detailed Description

inter flash driver

Author
dave
Copyright
(c) 2015 Winner Microelectronics Co., Ltd.

Macro Definition Documentation

◆ CMD_START_Msk

#define CMD_START_Msk (1UL << CMD_START_Pos)

CMD start Mask

◆ CMD_START_Pos

#define CMD_START_Pos 8U

CMD start position

◆ FLASH_BSY

#define FLASH_BSY 0x00000001

Flash Status Register definitions

◆ FLASH_PG

#define FLASH_PG 0x00000001

Flash Control Register definitions

◆ RDPRT_KEY

#define RDPRT_KEY 0x5AA5

Flash Keys


W800 SDK APIs: doxy_out/include/driver/wm_io.h File Reference

  • doxy_out
  • include
  • driver
Macros | Enumerations | Functions
wm_io.h File Reference

IO Driver Module. More...

Go to the source code of this file.

Macros

#define | TLS_IO_AB_OFFSET (0x40011400 - 0x40011200)
#define | WM_IO_OPTION1 1
#define | WM_IO_OPTION2 2
#define | WM_IO_OPTION3 3
#define | WM_IO_OPTION4 4
#define | WM_IO_OPTION5 5
#define | WM_IO_OPTION6 6
#define | WM_IO_OPTION7 7
#define | WM_IO_OPT1_I2C_DAT WM_IO_OPTION1
#define | WM_IO_OPT1_PWM1 WM_IO_OPTION1
#define | WM_IO_OPT1_PWM2 WM_IO_OPTION1
#define | WM_IO_OPT1_PWM3 WM_IO_OPTION1
#define | WM_IO_OPT1_PWM4 WM_IO_OPTION1
#define | WM_IO_OPT1_PWM5 WM_IO_OPTION1
#define | WM_IO_OPT1_UART0_RXD WM_IO_OPTION1
#define | WM_IO_OPT1_UART0_TXD WM_IO_OPTION1
#define | WM_IO_OPT1_PWM_BRAKE WM_IO_OPTION1
#define | WM_IO_OPT1_I2S_M_EXTCLK WM_IO_OPTION1
#define | WM_IO_OPT1_SPI_M_DO WM_IO_OPTION1
#define | WM_IO_OPT1_SPI_M_DI WM_IO_OPTION1
#define | WM_IO_OPT1_SPI_M_CS WM_IO_OPTION1
#define | WM_IO_OPT1_SPI_M_CK WM_IO_OPTION1
#define | WM_IO_OPT1_I2S_S_RL WM_IO_OPTION1
#define | WM_IO_OPT1_I2S_S_SCL WM_IO_OPTION1
#define | WM_IO_OPT1_I2S_S_SDA WM_IO_OPTION1
#define | WM_IO_OPT1_I2S_M_RL WM_IO_OPTION1
#define | WM_IO_OPT1_I2S_M_SCL WM_IO_OPTION1
#define | WM_IO_OPT1_I2S_M_SDA WM_IO_OPTION1
#define | WM_IO_OPT1_JTAG_RST WM_IO_OPTION1
#define | WM_IO_OPT1_JTAG_TDO WM_IO_OPTION1
#define | WM_IO_OPT1_JTAG_TDI WM_IO_OPTION1
#define | WM_IO_OPT1_JTAG_TCK_SWDCK WM_IO_OPTION1
#define | WM_IO_OPT1_JTAG_TMS_SWDAT WM_IO_OPTION1
#define | WM_IO_OPT1_UART1_RXD WM_IO_OPTION1
#define | WM_IO_OPT1_UART1_TXD WM_IO_OPTION1
#define | WM_IO_OPT1_UART1_RTS WM_IO_OPTION1
#define | WM_IO_OPT1_UART1_CTS WM_IO_OPTION1
#define | WM_IO_OPT1_SDIO_DAT WM_IO_OPTION1
#define | WM_IO_OPT2_PWM1 WM_IO_OPTION2
#define | WM_IO_OPT2_PWM2 WM_IO_OPTION2
#define | WM_IO_OPT2_PWM3 WM_IO_OPTION2
#define | WM_IO_OPT2_PWM4 WM_IO_OPTION2
#define | WM_IO_OPT2_PWM5 WM_IO_OPTION2
#define | WM_IO_OPT2_SPI_M_DO WM_IO_OPTION2
#define | WM_IO_OPT2_SPI_M_DI WM_IO_OPTION2
#define | WM_IO_OPT2_SPI_M_CS WM_IO_OPTION2
#define | WM_IO_OPT2_SPI_M_CK WM_IO_OPTION2
#define | WM_IO_OPT2_I2C_SCL WM_IO_OPTION2
#define | WM_IO_OPT2_I2S_M_EXTCLK WM_IO_OPTION2
#define | WM_IO_OPT2_UART1_RXD WM_IO_OPTION2
#define | WM_IO_OPT2_UART1_TXD WM_IO_OPTION2
#define | WM_IO_OPT2_UART1_RTS WM_IO_OPTION2
#define | WM_IO_OPT2_UART1_CTS WM_IO_OPTION2
#define | WM_IO_OPT2_I2C_DAT WM_IO_OPTION2
#define | WM_IO_OPT2_PWM_BRAKE WM_IO_OPTION2
#define | WM_IO_OPT2_UART0_RTS WM_IO_OPTION2
#define | WM_IO_OPT2_UART0_CTS WM_IO_OPTION2
#define | WM_IO_OPT2_SDIO_DAT WM_IO_OPTION2
#define | WM_IO_OPT2_HSPI_CK WM_IO_OPTION2
#define | WM_IO_OPT2_HSPI_INT WM_IO_OPTION2
#define | WM_IO_OPT2_HSPI_CS WM_IO_OPTION2
#define | WM_IO_OPT2_HSPI_DI WM_IO_OPTION2
#define | WM_IO_OPT2_HSPI_DO WM_IO_OPTION2
#define | WM_IO_OPT3_UART0_RXD WM_IO_OPTION3
#define | WM_IO_OPT3_UART0_TXD WM_IO_OPTION3
#define | WM_IO_OPT3_UART0_RTS WM_IO_OPTION3
#define | WM_IO_OPT3_UART0_CTS WM_IO_OPTION3
#define | WM_IO_OPT3_SPI_M_DO WM_IO_OPTION3
#define | WM_IO_OPT3_SPI_M_DI WM_IO_OPTION3
#define | WM_IO_OPT3_SPI_M_CS WM_IO_OPTION3
#define | WM_IO_OPT3_SDIO_CK WM_IO_OPTION3
#define | WM_IO_OPT3_SDIO_CMD WM_IO_OPTION3
#define | WM_IO_OPT3_SDIO_DAT WM_IO_OPTION3
#define | WM_IO_OPT4_I2S_M_MCLK WM_IO_OPTION4
#define | WM_IO_OPT4_I2S_M_RL WM_IO_OPTION4
#define | WM_IO_OPT4_I2S_M_SCL WM_IO_OPTION4
#define | WM_IO_OPT4_I2S_M_SDA WM_IO_OPTION4
#define | WM_IO_OPT5_GPIO WM_IO_OPTION5
#define | WM_IO_OPT6_ADC WM_IO_OPTION6
#define | WM_IO_OPT6_LCD_COM WM_IO_OPTION6
#define | WM_IO_OPT6_LCD_SEG WM_IO_OPTION6
#define | WM_IO_OPT7_TOUCH_SENSOR WM_IO_OPTION7

Enumerations

enum tls_io_name {
WM_IO_PA_00 = 0, WM_IO_PA_01, WM_IO_PA_02, WM_IO_PA_03,
WM_IO_PA_04, WM_IO_PA_05, WM_IO_PA_06, WM_IO_PA_07,
WM_IO_PA_08, WM_IO_PA_09, WM_IO_PA_10, WM_IO_PA_11,
WM_IO_PA_12, WM_IO_PA_13, WM_IO_PA_14, WM_IO_PA_15,
WM_IO_PB_00, WM_IO_PB_01, WM_IO_PB_02, WM_IO_PB_03,
WM_IO_PB_04, WM_IO_PB_05, WM_IO_PB_06, WM_IO_PB_07,
WM_IO_PB_08, WM_IO_PB_09, WM_IO_PB_10, WM_IO_PB_11,
WM_IO_PB_12, WM_IO_PB_13, WM_IO_PB_14, WM_IO_PB_15,
WM_IO_PB_16, WM_IO_PB_17, WM_IO_PB_18, WM_IO_PB_19,
WM_IO_PB_20, WM_IO_PB_21, WM_IO_PB_22, WM_IO_PB_23,
WM_IO_PB_24, WM_IO_PB_25, WM_IO_PB_26, WM_IO_PB_27,
WM_IO_PB_28, WM_IO_PB_29, WM_IO_PB_30, WM_IO_PB_31
}

Functions

void | tls_io_cfg_set (enum tls_io_name name, u8 option)
This function is used to config io function. More...
int | tls_io_cfg_get (enum tls_io_name name)
This function is used to get io function config. More...

Detailed Description

IO Driver Module.

Author
lilm
Copyright
(c) 2015 Winner Microelectronics Co., Ltd.

Macro Definition Documentation

◆ WM_IO_OPTION1

#define WM_IO_OPTION1 1

option 1 of the io

◆ WM_IO_OPTION2

#define WM_IO_OPTION2 2

option 2 of the io

◆ WM_IO_OPTION3

#define WM_IO_OPTION3 3

option 3 of the io

◆ WM_IO_OPTION4

#define WM_IO_OPTION4 4

option 4 of the io

◆ WM_IO_OPTION5

#define WM_IO_OPTION5 5

option 5 of the io

◆ WM_IO_OPTION6

#define WM_IO_OPTION6 6

option 6 of the io

◆ WM_IO_OPTION7

#define WM_IO_OPTION7 7

option 7 of the io

Enumeration Type Documentation

◆ tls_io_name

enum tls_io_name

io name

Enumerator
WM_IO_PA_00 | gpio a0
WM_IO_PA_01 | gpio a1
WM_IO_PA_02 | gpio a2
WM_IO_PA_03 | gpio a3
WM_IO_PA_04 | gpio a4
WM_IO_PA_05 | gpio a5
WM_IO_PA_06 | gpio a6
WM_IO_PA_07 | gpio a7
WM_IO_PA_08 | gpio a8
WM_IO_PA_09 | gpio a9
WM_IO_PA_10 | gpio a10
WM_IO_PA_11 | gpio a11
WM_IO_PA_12 | gpio a12
WM_IO_PA_13 | gpio a13
WM_IO_PA_14 | gpio a14
WM_IO_PA_15 | gpio a15
WM_IO_PB_00 | gpio b0
WM_IO_PB_01 | gpio b1
WM_IO_PB_02 | gpio b2
WM_IO_PB_03 | gpio b3
WM_IO_PB_04 | gpio b4
WM_IO_PB_05 | gpio b5
WM_IO_PB_06 | gpio b6
WM_IO_PB_07 | gpio b7
WM_IO_PB_08 | gpio b8
WM_IO_PB_09 | gpio b9
WM_IO_PB_10 | gpio b10
WM_IO_PB_11 | gpio b11
WM_IO_PB_12 | gpio b12
WM_IO_PB_13 | gpio b13
WM_IO_PB_14 | gpio b14
WM_IO_PB_15 | gpio b15
WM_IO_PB_16 | gpio b16
WM_IO_PB_17 | gpio b17
WM_IO_PB_18 | gpio b18
WM_IO_PB_19 | gpio b19
WM_IO_PB_20 | gpio b20
WM_IO_PB_21 | gpio b21
WM_IO_PB_22 | gpio b22
WM_IO_PB_23 | gpio b23
WM_IO_PB_24 | gpio b24
WM_IO_PB_25 | gpio b25
WM_IO_PB_26 | gpio b26
WM_IO_PB_27 | gpio b27
WM_IO_PB_28 | gpio b28
WM_IO_PB_29 | gpio b29
WM_IO_PB_30 | gpio b30
WM_IO_PB_31 | gpio b31

Function Documentation

◆ tls_io_cfg_get()

int tls_io_cfg_get ( enum tls_io_name name )

This function is used to get io function config.

Parameters
[in] name io name
Return values
WM_IO_OPTION1~6 Mapping io function
Note
None

◆ tls_io_cfg_set()

void tls_io_cfg_set | ( | enum tls_io_name | name,
 |  | u8 | option
 | ) |  |

This function is used to config io function.

Parameters
[in] | name | io name
[in] | option | io function option, value is WM_IO_OPT*_*, also is WM_IO_OPTION1~6
Returns
None
Note
None


W800 SDK APIs: doxy_out/include/driver/wm_irq.h File Reference

  • doxy_out
  • include
  • driver
Data Structures | Typedefs | Functions
wm_irq.h File Reference

interupt driver module More...

#include "wm_type_def.h"

Go to the source code of this file.

Data Structures

struct tls_irq_handler

Typedefs

typedef void(* | intr_handler_func) (void *)
typedef struct tls_irq_handler | tls_irq_handler_t

Functions

void | tls_irq_init (void)
This function is used to initial system interrupt. More...
void | tls_irq_register_handler (u8 vec_no, intr_handler_func handler, void *data)
This function is used to register interrupt handler function. More...
void | tls_irq_enable (u8 vec_no)
This function is used to enable interrupt. More...
void | tls_irq_disable (u8 vec_no)
This function is used to disable interrupt. More...
u8 | tls_get_isr_count (void)
This function is used to get the isr count. More...
int | csi_kernel_intrpt_enter (void)
This function is used to enter interrupt. More...
int | csi_kernel_intrpt_exit (void)
This function is used to exit from interrupt. More...
void | tls_irq_priority (u8 vec_no, u32 prio)

Detailed Description

interupt driver module

Author
dave

Copyright (c) 2015 Winner Microelectronics Co., Ltd.


W800 SDK APIs: doxy_out/include/driver/wm_lcd.h File Reference

  • doxy_out
  • include
  • driver
Data Structures | Macros | Typedefs | Enumerations | Functions
wm_lcd.h File Reference

LCD Driver Module. More...

#include "wm_regs.h"
#include <stdbool.h>

Go to the source code of this file.

Data Structures

struct | LCD_T
LCD Register Declaration. More...
struct | tls_lcd_options

Macros

#define | LCD ((LCD_T *)HR_LCD_REG_BASE)
#define | TLS_LCD_CLK_ENABLE(enable)
Enable or disable clock of LCD module. More...
#define | TLS_LCD_ENABLE(enable)
Enable or disable the LCD module. More...
#define | TLS_LCD_POWERDOWM(enable)
Enable or disable the LCD module. More...

Typedefs

typedef struct tls_lcd_options tls_lcd_options_t

Enumerations

enum | LCD_BiasDef { BIAS_STATIC = LCD_BIAS_STATIC, BIAS_ONEHALF = LCD_BIAS_ONEHALF, BIAS_ONETHIRD = LCD_BIAS_ONETHIRD, BIAS_ONEFOURTH = LCD_BIAS_ONEFOURTH }
enum | LCD_VlcdDef { VLCD27 = LCD_VLCD_27, VLCD29 = LCD_VLCD_29, VLCD31 = LCD_VLCD_31, VLCD33 = LCD_VLCD_33 }
enum LCD_DutyDef {
DUTY_STATIC = LCD_DUTY_STATIC, DUTY_ONEHALF = LCD_DUTY_ONEHALF, DUTY_ONETHIRD = LCD_DUTY_ONETHIRD, DUTY_ONEFOURTH = LCD_DUTY_ONEFOURTH,
DUTY_ONEFIFTH = LCD_DUTY_ONEFIFTH, DUTY_ONESIXTH = LCD_DUTY_ONESIXTH, DUTY_ONESEVENTH = LCD_DUTY_ONESEVENTH, DUTY_ONEEIGHTH = LCD_DUTY_ONEEIGHTH
}

Functions

void | tls_lcd_fresh_ratio (uint8_t com_num, uint16_t freq)
Initialize LCD Frame Counter. More...
void | tls_lcd_init (tls_lcd_options_t *opts)
initialize the LCD module
void | tls_lcd_fresh_rate (uint16_t freq)
Initialize LCD Frame Counter. More...
void | tls_lcd_seg_set (int com, int bit, int on_off)
Turn on or clear a segment. More...
void | tls_lcd_vlcd_sel (LCD_VlcdDef vlcd)
Select the voltage of LCD module. More...
void | tls_lcd_duty_set (LCD_DutyDef duty)
Set the duty of LCD module. More...
void | tls_lcd_bias_set (LCD_BiasDef bias)
Set the bias of LCD module. More...

Detailed Description

LCD Driver Module.

Author
dave
Copyright
(c) 2014 Winner Microelectronics Co., Ltd.

Macro Definition Documentation

◆ LCD

#define LCD ((LCD_T *)HR_LCD_REG_BASE)

LCD base pointer

Enumeration Type Documentation

◆ LCD_BiasDef

enum LCD_BiasDef
Enumerator
BIAS_STATIC | Static (2 levels)
BIAS_ONEHALF | 1/2 Bias (3 levels)
BIAS_ONETHIRD | 1/3 Bias (4 levels)
BIAS_ONEFOURTH | 1/4 Bias (4 levels)

◆ LCD_DutyDef

enum LCD_DutyDef
Enumerator
DUTY_STATIC | Static (segments can be multiplexed with LCD_COM[0])
DUTY_ONEHALF | 1/2 Duty cycle (segments can be multiplexed with LCD_COM[0:1])
DUTY_ONETHIRD | 1/3 Duty cycle (segments can be multiplexed with LCD_COM[0:2])
DUTY_ONEFOURTH | 1/4 Duty cycle (segments can be multiplexed with LCD_COM[0:3])
DUTY_ONEFIFTH | 1/5 Duty cycle (segments can be multiplexed with LCD_COM[0:4])
DUTY_ONESIXTH | 1/6 Duty cycle (segments can be multiplexed with LCD_COM[0:5])
DUTY_ONESEVENTH | 1/7 Duty cycle (segments can be multiplexed with LCD_COM[0:6])
DUTY_ONEEIGHTH | 1/8 Duty cycle (segments can be multiplexed with LCD_COM[0:7])

◆ LCD_VlcdDef

enum LCD_VlcdDef
Enumerator
VLCD27 | VLCD 2.7v
VLCD29 | VLCD 2.9v
VLCD31 | VLCD 3.1v
VLCD33 | VLCD 3.3v


W800 SDK APIs: doxy_out/include/driver/wm_pmu.h File Reference

  • doxy_out
  • include
  • driver
Typedefs | Enumerations | Functions
wm_pmu.h File Reference

pmu driver module More...

#include "wm_type_def.h"

Go to the source code of this file.

Typedefs

typedef void(* tls_pmu_irq_callback) (void *arg)

Enumerations

enum tls_peripheral_type_s {
TLS_PERIPHERAL_TYPE_I2C = (1 << 0), TLS_PERIPHERAL_TYPE_UART0 = (1 << 1), TLS_PERIPHERAL_TYPE_UART1 = (1 << 2), TLS_PERIPHERAL_TYPE_UART2 = (1 << 3),
TLS_PERIPHERAL_TYPE_UART3 = (1 << 4), TLS_PERIPHERAL_TYPE_UART4 = (1 << 5), TLS_PERIPHERAL_TYPE_UART5 = (1 << 6), TLS_PERIPHERAL_TYPE_LSPI = (1 << 7),
TLS_PERIPHERAL_TYPE_DMA = (1 << 8), TLS_PERIPHERAL_TYPE_TIMER = (1 << 10), TLS_PERIPHERAL_TYPE_GPIO = (1 << 11), TLS_PERIPHERAL_TYPE_SDADC = (1 << 12),
TLS_PERIPHERAL_TYPE_PWM = (1 << 13), TLS_PERIPHERAL_TYPE_LCD = (1 << 14), TLS_PERIPHERAL_TYPE_I2S = (1 << 15), TLS_PERIPHERAL_TYPE_RSA = (1 << 16),
TLS_PERIPHERAL_TYPE_GPSEC = (1 << 17), TLS_PERIPHERAL_TYPE_SDIO_MASTER = (1<<18), TLS_PERIPHERAL_TYPE_PSRAM = (1<<19), TLS_PERIPHERAL_TYPE_BT = (1<<20),
TLS_PERIPHERAL_TYPE_TOUCH_SENSOR = (1 << 21)
}

Functions

void | tls_pmu_timer1_isr_register (tls_pmu_irq_callback callback, void *arg)
This function is used to register pmu timer1 interrupt. More...
void | tls_pmu_timer0_isr_register (tls_pmu_irq_callback callback, void *arg)
This function is used to register pmu timer0 interrupt. More...
void | tls_pmu_gpio_isr_register (tls_pmu_irq_callback callback, void *arg)
This function is used to register pmu gpio interrupt. More...
void | tls_pmu_sdio_isr_register (tls_pmu_irq_callback callback, void *arg)
This function is used to register pmu sdio interrupt. More...
void | tls_pmu_clk_select (u8 bypass)
This function is used to select pmu clk. More...
void | tls_pmu_timer0_start (u16 second)
This function is used to start pmu timer0. More...
void | tls_pmu_timer0_stop (void)
This function is used to stop pmu timer0. More...
void | tls_pmu_timer1_start (u16 msec)
This function is used to start pmu timer1. More...
void | tls_pmu_timer1_stop (void)
This function is used to stop pmu timer1. More...
void | tls_pmu_standby_start (void)
This function is used to start pmu goto standby. More...
void | tls_pmu_sleep_start (void)
This function is used to start pmu goto sleep. More...
void | tls_close_peripheral_clock (tls_peripheral_type_s devices)
This function is used to close peripheral's clock. More...
void | tls_open_peripheral_clock (tls_peripheral_type_s devices)
This function is used to open peripheral's clock. More...

Detailed Description

pmu driver module

Author
dave

Copyright (c) 2014 Winner Microelectronics Co., Ltd.

Typedef Documentation

◆ tls_pmu_irq_callback

typedef void(* tls_pmu_irq_callback) (void *arg)

callback function of PMU interrupt

Enumeration Type Documentation

◆ tls_peripheral_type_s

enum tls_peripheral_type_s

peripheral type

Enumerator
TLS_PERIPHERAL_TYPE_I2C | peripheral type : I2C
TLS_PERIPHERAL_TYPE_UART0 | peripheral type : UART0
TLS_PERIPHERAL_TYPE_UART1 | peripheral type : UART1
TLS_PERIPHERAL_TYPE_UART2 | peripheral type : UART2
TLS_PERIPHERAL_TYPE_UART3 | peripheral type : UART3
TLS_PERIPHERAL_TYPE_UART4 | peripheral type : UART4
TLS_PERIPHERAL_TYPE_UART5 | peripheral type : UART4
TLS_PERIPHERAL_TYPE_LSPI | peripheral type : LSPI
TLS_PERIPHERAL_TYPE_DMA | peripheral type : DMA
TLS_PERIPHERAL_TYPE_TIMER | peripheral type : TIMER
TLS_PERIPHERAL_TYPE_GPIO | peripheral type : GPIO
TLS_PERIPHERAL_TYPE_SDADC | peripheral type : SDADC
TLS_PERIPHERAL_TYPE_PWM | peripheral type : PWM
TLS_PERIPHERAL_TYPE_LCD | peripheral type : LCD
TLS_PERIPHERAL_TYPE_I2S | peripheral type : I2S
TLS_PERIPHERAL_TYPE_RSA | peripheral type : RSA
TLS_PERIPHERAL_TYPE_GPSEC | peripheral type : GPSEC
TLS_PERIPHERAL_TYPE_SDIO_MASTER | peripheral type : SDIO
TLS_PERIPHERAL_TYPE_PSRAM | peripheral type : PSRAM
TLS_PERIPHERAL_TYPE_BT | peripheral type : BT
TLS_PERIPHERAL_TYPE_TOUCH_SENSOR | peripheral type : TOUCH


W800 SDK APIs: doxy_out/include/driver/wm_psram.h Source File

  • doxy_out
  • include
  • driver
wm_psram.h
1 #ifndef __WM_PSRAM_H__
2 #define __WM_PSRAM_H__
3
4 #define PSRAM_ADDR_START 0x30000000
5 #define PSRAM_SIZE_BYTE 0x00800000
6
7 typedef enum{
8 PSRAM_SPI = 0,
9 PSRAM_QPI,
10 } psram_mode_t;
40 void psram_init(psram_mode_t mode);
41
53 int memcpy_dma(unsigned char *dst, unsigned char *src, int num);
61 #endif
62
63
64
65
66
memcpy_dma
int memcpy_dma(unsigned char *dst, unsigned char *src, int num)
This function is used to Copy block of memory in dma mode .
psram_init
void psram_init(psram_mode_t mode)
This function is used to init the psram .


W800 SDK APIs: doxy_out/include/driver/wm_pwm.h File Reference

  • doxy_out
  • include
  • driver
Data Structures | Macros | Typedefs | Enumerations | Functions
wm_pwm.h File Reference

pwm driver module More...

#include "wm_type_def.h"

Go to the source code of this file.

Data Structures

struct _pwm_init_param

Macros

#define PWM_CHANNEL_MAX_NUM 5

Typedefs

typedef struct _pwm_init_param pwm_init_param

Enumerations

enum tls_pwm_out_mode {
WM_PWM_OUT_MODE_BRAKE = 0, WM_PWM_OUT_MODE_ALLSYC, WM_PWM_OUT_MODE_2SYC, WM_PWM_OUT_MODE_MC,
WM_PWM_OUT_MODE_INDPT
}
enum | tls_pwm_cap_int_type { WM_PWM_CAP_RISING_EDGE_INT, WM_PWM_CAP_FALLING_EDGE_INT, WM_PWM_CAP_RISING_FALLING_EDGE_INT, WM_PWM_CAP_DMA_INT }
enum | tls_pwm_out_en_state { WM_PWM_OUT_EN_STATE_TRI, WM_PWM_OUT_EN_STATE_OUT }
enum | tls_pwm_cnt_type { WM_PWM_CNT_TYPE_EDGE_ALLGN_CAP, WM_PWM_CNT_TYPE_EDGE_ALIGN_OUT, WM_PWM_CNT_TYPE_CENTER_ALIGN }
enum | tls_pwm_loop_type { WM_PWM_LOOP_TYPE_SINGLE, WM_PWM_LOOP_TYPE_LOOP }
enum | tls_pwm_waveform_inversion { WM_PWM_WAVEFORM_NOINVERSION, WM_PWM_WAVEFORM_INVERSION }
enum | tls_pwm_brake_out_level { WM_PWM_BRAKE_OUT_HIGH, WM_PWM_BRAKE_OUT_LOW }

Functions

void | tls_pwm_isr_register (void(*callback)(void))
This function is used to register the pwm interrupt callback function. More...
int | tls_pwm_duty_config (u8 channel, u8 duty)
This function is used to set duty radio. More...
int | tls_pwm_freq_config (u8 channel, u16 clkdiv, u8 period)
This function is used to set frequency. More...
int | tls_pwm_out_mode_config (u8 channel, enum tls_pwm_out_mode mode)
This function is used to set the output mode. More...
int | tls_pwm_cnt_type_config (u8 channel, enum tls_pwm_cnt_type cnt_type)
This function is used to set the counting mode. More...
int | tls_pwm_loop_mode_config (u8 channel, enum tls_pwm_loop_type loop_mode)
This function is used to set whether to loop. More...
int | tls_pwm_out_inverse_cmd (u8 channel, bool en)
This function is used to set whether to inverse the output. More...
int | tls_pwm_stoptime_by_period_config (u8 channel, u8 pnum)
This function is used to set the number of period to be generated. More...
int | tls_pwm_output_en_cmd (u8 channel, bool en)
This function is used to set output enable. More...
int | tls_pwm_deadzone_config (u8 channel, bool dten, u8 dtclkdiv, u8 dtcnt)
This function is used to set the dead time. More...
int | tls_pwm_capture_inverse_cmd (u8 channel, bool en)
This function is used to set whether to inverse the capture input. More...
int | tls_pwm_brake_mode_config (u8 channel, bool en, enum tls_pwm_brake_out_level brok)
This function is used to set break mode. More...
int | tls_pwm_capture_mode_config (u8 channel)
This function is used to enable the capture mode. More...
int | tls_pwm_stoptime_irq_cmd (u8 channel, bool en)
This function is used to set the interrupt about the number of period. More...
int | tls_pwm_capture_irq_type_config (u8 channel, enum tls_pwm_cap_int_type int_type)
This function is used to set the interrupt about the capture. More...
int | tls_pwm_out_init (pwm_init_param *pwm_param)
This function is used to initial pwm(out mode) More...
int | tls_pwm_cap_init (u8 channel, u16 clkdiv, bool inverse_en, enum tls_pwm_cap_int_type int_type)
This function is used to initial pwm(capture mode) More...
int | tls_pwm_start (u8 channel)
This function is used to start pwm. More...
void | tls_pwm_freq_set (u8 channel, u32 freq)
This function is used to stop pwm. More...
void | tls_pwm_duty_set (u8 channel, u8 duty)
This function is used to set duty radio. More...
int | tls_pwm_init (u8 channel, u32 freq, u8 duty, u8 pnum)
This function is used to initial pwm. More...
int | tls_pwm_stop (u8 channel)
This function is used to stop pwm. More...

Detailed Description

pwm driver module

Author
dave

Copyright (c) 2014 Winner Microelectronics Co., Ltd.

Macro Definition Documentation

◆ PWM_CHANNEL_MAX_NUM

#define PWM_CHANNEL_MAX_NUM 5

pwm channel's maximum number

Typedef Documentation

◆ pwm_init_param

typedef struct _pwm_init_param pwm_init_param

pwm initial parameters

Enumeration Type Documentation

◆ tls_pwm_brake_out_level

enum tls_pwm_brake_out_level

pwm output level in the brake mode

Enumerator
WM_PWM_BRAKE_OUT_HIGH | output high level
WM_PWM_BRAKE_OUT_LOW | output low level

◆ tls_pwm_cap_int_type

enum tls_pwm_cap_int_type

interrupt type for capture mode

Enumerator
WM_PWM_CAP_RISING_EDGE_INT | rising edge arises the interrupt
WM_PWM_CAP_FALLING_EDGE_INT | falling edge arises the interrupt
WM_PWM_CAP_RISING_FALLING_EDGE_INT | both rising edge and falling edge arise the interrupt
WM_PWM_CAP_DMA_INT | dma request

◆ tls_pwm_cnt_type

enum tls_pwm_cnt_type

pwm count mode

Enumerator
WM_PWM_CNT_TYPE_EDGE_ALLGN_CAP | edge alignment(only capture mode)
WM_PWM_CNT_TYPE_EDGE_ALIGN_OUT | edge alignment(only output mode)
WM_PWM_CNT_TYPE_CENTER_ALIGN | central alignment

◆ tls_pwm_loop_type

enum tls_pwm_loop_type

pwm cycle type

Enumerator
WM_PWM_LOOP_TYPE_SINGLE | single mode
WM_PWM_LOOP_TYPE_LOOP | auto load

◆ tls_pwm_out_en_state

enum tls_pwm_out_en_state

pwm output status

Enumerator
WM_PWM_OUT_EN_STATE_TRI | set tristate status
WM_PWM_OUT_EN_STATE_OUT | set output status

◆ tls_pwm_out_mode

enum tls_pwm_out_mode

pwm work mode for signal generate

Enumerator
WM_PWM_OUT_MODE_BRAKE | brake mode
WM_PWM_OUT_MODE_ALLSYC | all synchronous mode
WM_PWM_OUT_MODE_2SYC | two channel synchronous mode
WM_PWM_OUT_MODE_MC | complementary mode
WM_PWM_OUT_MODE_INDPT | independent mode

◆ tls_pwm_waveform_inversion

enum tls_pwm_waveform_inversion

pwm waveform inversion mode

Enumerator
WM_PWM_WAVEFORM_NOINVERSION | not inverse
WM_PWM_WAVEFORM_INVERSION | inversion


W800 SDK APIs: doxy_out/include/driver/wm_rtc.h File Reference

  • doxy_out
  • include
  • driver
Typedefs | Functions
wm_rtc.h File Reference

rtc Driver Module More...

#include <time.h>
#include "wm_type_def.h"

Go to the source code of this file.

Typedefs

typedef void(* tls_rtc_irq_callback) (void *arg)

Functions

void | tls_set_rtc (struct tm *tblock)
This function is used to set pmu rtc time. More...
void | tls_get_rtc (struct tm *tblock)
This function is used to get pmu rtc time. More...
void | tls_rtc_isr_register (tls_rtc_irq_callback callback, void *arg)
This function is used to register pmu rtc interrupt. More...
void | tls_rtc_timer_start (struct tm *tblock)
This function is used to start pmu rtc timer. More...
void | tls_rtc_timer_stop (void)
This function is used to stop pmu rtc timer. More...

Detailed Description

rtc Driver Module

Author
dave

Copyright (c) 2014 Winner Microelectronics Co., Ltd.

Typedef Documentation

◆ tls_rtc_irq_callback

typedef void(* tls_rtc_irq_callback) (void *arg)

rtc interrupt callback


W800 SDK APIs: doxy_out/include/driver/wm_sasc.h Source File

  • doxy_out
  • include
  • driver
wm_sasc.h
1 #ifndef __WM_SASC_H_
2 #define __WM_SASC_H_
3
4 #include <core_804.h>
5 #include "wm_regs.h"
6
7 #define HR_SASC_B1_BASE (DEVICE_BASE_ADDR + 0xB000)
8 #define HR_SASC_FLASH_BASE (DEVICE_BASE_ADDR + 0xB100)
9 #define HR_SASC_B2_BASE (DEVICE_BASE_ADDR + 0xB200)
10
11 #define _R1_Pos(val, rgn) ((val&0x1) << (rgn))
12 #define _R1_Msk(rgn) (0x1 << (rgn))
13 #define _R2_Pos(val, rgn) ((val&0x3) << (2*rgn))
14 #define _R2_Msk(rgn) (0x3 << (2*rgn))
15
16 typedef enum {
17 SASC_UN_SE_USER = 0,
18 SASC_UN_SE_SUPER,
19 SASC_SE_USER,
20 SASC_SE_SUPER
21 } sasc_car_e;
22
23 typedef enum {
24 SASC_AP_RW = 0,
25 SASC_AP_RO,
26 SASC_AP_WO,
27 SASC_AP_DENYALL
28 } sasc_ap_e;
29
30 typedef enum {
31 SASC_CD_DA_OF = 0,
32 SASC_CD_DA,
33 SASC_CD_OF,
34 SASC_CD_DENYALL
35 } sasc_cd_e;
36
37 typedef enum {
38 SASC_REGION_SIZE_4B = 0x5,
39 SASC_REGION_SIZE_8B,
40 SASC_REGION_SIZE_16B,
41 SASC_REGION_SIZE_32B,
42 SASC_REGION_SIZE_64B,
43 SASC_REGION_SIZE_128B,
44 SASC_REGION_SIZE_256B,
45 SASC_REGION_SIZE_512B,
46 SASC_REGION_SIZE_1KB,
47 SASC_REGION_SIZE_2KB,
48 SASC_REGION_SIZE_4KB,
49 SASC_REGION_SIZE_8KB,
50 SASC_REGION_SIZE_16KB,
51 SASC_REGION_SIZE_32KB,
52 SASC_REGION_SIZE_64KB,
53 SASC_REGION_SIZE_128KB,
54 SASC_REGION_SIZE_256KB,
55 SASC_REGION_SIZE_512KB,
56 SASC_REGION_SIZE_1MB,
57 SASC_REGION_SIZE_2MB,
58 SASC_REGION_SIZE_4MB,
59 SASC_REGION_SIZE_8MB
60 } sasc_region_size_e;
61
62 typedef struct {
63 sasc_car_e car; /* security and user or super */
64 sasc_ap_e ap; /* super user and normal user access.*/
65 sasc_cd_e cd; /* instruction fetched excution */
66 } sasc_region_attr_t;
67
68 typedef struct {
69 __IOM uint32_t CAR;
70 __IOM uint32_t CR;
71 __IOM uint32_t AP0;
72 __IOM uint32_t CD0;
73 __IOM uint32_t AP1;
74 __IOM uint32_t CD1;
75 __IOM uint32_t AP2;
76 __IOM uint32_t CD2;
77 __IOM uint32_t REGION[8];
78 } SASC_Type;
79
80 #define SASC_B1 ((SASC_Type *) HR_SASC_B1_BASE)
81 #define SASC_FLASH ((SASC_Type *) HR_SASC_FLASH_BASE)
82 #define SASC_B2 ((SASC_Type *) HR_SASC_B2_BASE)
83
114 void wm_sasc_enable_region(SASC_Type *block, uint32_t idx);
115
126 void wm_sasc_disable_region(SASC_Type *block, uint32_t idx);
127
140 void set_region_protect(uint32_t base_addr, uint32_t idx, sasc_region_size_e size, sasc_region_attr_t *attr);
141
150 #endif
SASC_Type
Definition: wm_sasc.h:68
wm_regs.h
register & operation file
wm_sasc_disable_region
void wm_sasc_disable_region(SASC_Type *block, uint32_t idx)
This function is used disable region.
set_region_protect
void set_region_protect(uint32_t base_addr, uint32_t idx, sasc_region_size_e size, sasc_region_attr_t *attr)
This function is used set region protect.
wm_sasc_enable_region
void wm_sasc_enable_region(SASC_Type *block, uint32_t idx)
This function is used enable region.
sasc_region_attr_t
Definition: wm_sasc.h:62


W800 SDK APIs: doxy_out/include/driver/wm_sdio_host.h Source File

  • doxy_out
  • include
  • driver
wm_sdio_host.h
1 #ifndef __WM_SDIO_HOST_H_
2 #define __WM_SDIO_HOST_H_
3
4 #include <core_804.h>
5 #include "wm_regs.h"
6
7 typedef struct {
8 __IOM uint32_t MMC_CTL;
9 __IOM uint32_t MMC_IO;
10 __IOM uint32_t MMC_BYTECNTL;
11 __IM uint32_t MMC_TR_BLOCKCNT;
12 __IOM uint32_t MMC_CRCCTL;
13 __IM uint32_t CMD_CRC;
14 __IM uint32_t DAT_CRCL;
15 __IM uint32_t DAT_CRCH;
16 __IOM uint32_t MMC_PORT;
17 __IOM uint32_t MMC_INT_MASK;
18 __IOM uint32_t MMC_INT_SRC;
19 __IOM uint32_t MMC_CARDSEL;
20 __IM uint32_t MMC_SIG;
21 __IOM uint32_t MMC_IO_MBCTL;
22 __IOM uint32_t MMC_BLOCKCNT;
23 __IOM uint32_t MMC_TIMEOUTCNT;
24 __IOM uint32_t CMD_BUF[16];
25 __IOM uint32_t BUF_CTL;
26 uint32_t RESERVED3[31U];
27 __IOM uint32_t DATA_BUF[128];
28 }SDIO_HOST_Type;
29
30 #define SDIO_HOST ((SDIO_HOST_Type *)HR_SDIO_HOST_BASE_ADDR)
31
32 typedef struct
33 {
34 long long CardCapacity;
35 u32 CardBlockSize;
36 u16 RCA;
37 u8 CSDVer;
38 } SD_CardInfo_t;
39 extern SD_CardInfo_t SDCardInfo;
69 int sdh_card_init(uint32_t *rca_ref);
70
81 int wm_sd_card_set_bus_width(uint32_t rca, uint8_t bus_width);
82
93 int wm_sd_card_block_read(uint32_t rca, uint32_t sd_addr, char *buf);
94
105 int wm_sd_card_block_write(uint32_t rca, uint32_t sd_addr, char *buf);
106
118 int wm_sd_card_blocks_read(uint32_t rca, uint32_t sd_addr, char *buf, uint32_t buflen);
119
131 int wm_sd_card_blocks_write(uint32_t rca, uint32_t sd_addr, char *buf, uint32_t buflen);
132
141 #endif //__WM_SDIO_HOST_H_
142
wm_sd_card_block_read
int wm_sd_card_block_read(uint32_t rca, uint32_t sd_addr, char *buf)
This function is used to read one block data from the sd card with irq mode .
SDIO_HOST_Type::BUF_CTL
__IOM uint32_t BUF_CTL
Definition: wm_sdio_host.h:25
sdh_card_init
int sdh_card_init(uint32_t *rca_ref)
This function is used to initial the sd host module .
SDIO_HOST_Type::MMC_SIG
__IM uint32_t MMC_SIG
Definition: wm_sdio_host.h:20
wm_sd_card_block_write
int wm_sd_card_block_write(uint32_t rca, uint32_t sd_addr, char *buf)
This function is used to write one block data into the sd card with irq mode .
wm_regs.h
register & operation file
wm_sd_card_blocks_write
int wm_sd_card_blocks_write(uint32_t rca, uint32_t sd_addr, char *buf, uint32_t buflen)
This function is used to write blocks of data into the sd card with dma mode .
wm_sd_card_blocks_read
int wm_sd_card_blocks_read(uint32_t rca, uint32_t sd_addr, char *buf, uint32_t buflen)
This function is used to read blocks of data from the sd card with dma mode .
SDIO_HOST_Type::MMC_CRCCTL
__IOM uint32_t MMC_CRCCTL
Definition: wm_sdio_host.h:12
wm_sd_card_set_bus_width
int wm_sd_card_set_bus_width(uint32_t rca, uint8_t bus_width)
This function is used to set the width of bus .
SDIO_HOST_Type
Definition: wm_sdio_host.h:7
SD_CardInfo_t
Definition: wm_sdio_host.h:32
SDIO_HOST_Type::MMC_PORT
__IOM uint32_t MMC_PORT
Definition: wm_sdio_host.h:16


W800 SDK APIs: doxy_out/include/driver/wm_timer.h File Reference

  • doxy_out
  • include
  • driver
Data Structures | Macros | Typedefs | Enumerations | Functions
wm_timer.h File Reference

Timer Driver Module. More...

#include "wm_type_def.h"

Go to the source code of this file.

Data Structures

struct tls_timer_cfg

Macros

#define WM_TIMER_ID_INVALID 0xFF

Typedefs

typedef void(* tls_timer_irq_callback) (void *arg)

Enumerations

enum tls_timer_unit { TLS_TIMER_UNIT_US = 0, TLS_TIMER_UNIT_MS }

Functions

u8 | tls_timer_create (struct tls_timer_cfg *cfg)
This function is used to create a timer. More...
void | tls_timer_start (u8 timer_id)
This function is used to start a timer. More...
void | tls_timer_stop (u8 timer_id)
This function is used to stop a timer. More...
void | tls_timer_change (u8 timer_id, u32 newtime)
This function is used to change a timer wait time. More...
u32 | tls_timer_read (u8 timer_id)
This function is used to read a timer's current value. More...
void | tls_timer_destroy (u8 timer_id)
This function is used to delete a timer. More...

Detailed Description

Timer Driver Module.

Author
dave

Copyright (c) 2014 Winner Microelectronics Co., Ltd.

Macro Definition Documentation

◆ WM_TIMER_ID_INVALID

#define WM_TIMER_ID_INVALID 0xFF

invalid timer id

Typedef Documentation

◆ tls_timer_irq_callback

typedef void(* tls_timer_irq_callback) (void *arg)

timer interrupt callback

Enumeration Type Documentation

◆ tls_timer_unit

enum tls_timer_unit

timer unit

Enumerator
TLS_TIMER_UNIT_US | microsecond level(us)
TLS_TIMER_UNIT_MS | millisecond level(ms)


W800 SDK APIs: doxy_out/include/driver/wm_tipc.h Source File

  • doxy_out
  • include
  • driver
wm_tipc.h
1 #ifndef __WM_TIPC_H_
2 #define __WM_TIPC_H_
3
4 #include <core_804.h>
5 #include "wm_regs.h"
6
7 #define HR_TIPC_BASE (HR_APB_BASE_ADDR + 0x2400)
8
9 typedef union {
10 struct {
11 uint32_t I2C: 1;
12 uint32_t SAR_ADC: 1;
13 uint32_t SPI_LS: 1;
14 uint32_t UART0: 1;
15 uint32_t UART1: 1;
16 uint32_t UART2: 1;
17 uint32_t UART3: 1;
18 uint32_t UART4: 1;
19 uint32_t UART5: 1;
20 uint32_t PORTA: 1;
21 uint32_t PORTB: 1;
22 uint32_t WD: 1;
23 uint32_t TIMER: 1;
24 uint32_t RFC: 1;
25 uint32_t LCD: 1;
26 uint32_t PWM: 1;
27 uint32_t I2S: 1;
28 uint32_t BT_MODEM: 1;
29 uint32_t _reserved0: 14;
30 }b;
31 uint32_t w;
32 } TIPC_VLD0_Type;
33
34 typedef union {
35 struct {
36 uint32_t SDIO_HOST: 1;
37 uint32_t FLASH: 1;
38 uint32_t PSRAM: 1;
39 uint32_t RSA: 1;
40 uint32_t DMA: 1;
41 uint32_t GPSEC: 1;
42 uint32_t BT: 1;
43 uint32_t PMU: 1;
44 uint32_t CLK_RST: 1;
45 uint32_t MMU: 1;
46 uint32_t BBP: 1;
47 uint32_t MAC: 1;
48 uint32_t SEC: 1;
49 uint32_t _reserved0: 1;
50 uint32_t SDIO_SLAVE: 1;
51 uint32_t SPI_HS: 1;
52 uint32_t SDIO_WRAPPER: 1;
53 uint32_t RF_BIST: 1;
54 uint32_t _reserved1: 14;
55 }b;
56 uint32_t w;
57 } TIPC_VLD1_Type;
58
59 typedef struct {
60 __IOM uint32_t VLD0;
61 __IOM uint32_t VLD1;
62 } TIPC_Type;
63
64 #define TIPC ((TIPC_Type *) HR_TIPC_BASE)
65
95 __STATIC_INLINE void wm_tipc_enable_i2c(void)
96 {
97 TIPC_VLD0_Type vld0;
98 vld0.w = TIPC->VLD0;
99 vld0.b.I2C = 1;
100 TIPC->VLD0 = vld0.w;
101 }
102
112 __STATIC_INLINE void wm_tipc_disable_i2c(void)
113 {
114 TIPC_VLD0_Type vld0;
115 vld0.w = TIPC->VLD0;
116 vld0.b.I2C = 0;
117 TIPC->VLD0 = vld0.w;
118 }
119
129 __STATIC_INLINE void wm_tipc_enable_uart0(void)
130 {
131 TIPC_VLD0_Type vld0;
132 vld0.w = TIPC->VLD0;
133 vld0.b.UART0 = 1;
134 TIPC->VLD0 = vld0.w;
135 }
136
146 __STATIC_INLINE void wm_tipc_disable_uart0(void)
147 {
148 TIPC_VLD0_Type vld0;
149 vld0.w = TIPC->VLD0;
150 vld0.b.UART0 = 0;
151 TIPC->VLD0 = vld0.w;
152 }
153
163 __STATIC_INLINE void wm_tipc_enable_sar_adc(void)
164 {
165 TIPC_VLD0_Type vld0;
166 vld0.w = TIPC->VLD0;
167 vld0.b.SAR_ADC = 1;
168 TIPC->VLD0 = vld0.w;
169 }
170
180 __STATIC_INLINE void wm_tipc_disable_sar_adc(void)
181 {
182 TIPC_VLD0_Type vld0;
183 vld0.w = TIPC->VLD0;
184 vld0.b.SAR_ADC = 0;
185 TIPC->VLD0 = vld0.w;
186 }
187
197 __STATIC_INLINE void wm_tipc_enable_lspi(void)
198 {
199 TIPC_VLD0_Type vld0;
200 vld0.w = TIPC->VLD0;
201 vld0.b.SPI_LS = 1;
202 TIPC->VLD0 = vld0.w;
203 }
204
214 __STATIC_INLINE void wm_tipc_disable_lspi(void)
215 {
216 TIPC_VLD0_Type vld0;
217 vld0.w = TIPC->VLD0;
218 vld0.b.SPI_LS = 0;
219 TIPC->VLD0 = vld0.w;
220 }
221
231 __STATIC_INLINE void wm_tipc_enable_uart1(void)
232 {
233 TIPC_VLD0_Type vld0;
234 vld0.w = TIPC->VLD0;
235 vld0.b.UART1 = 1;
236 TIPC->VLD0 = vld0.w;
237 }
238
248 __STATIC_INLINE void wm_tipc_disable_uart1(void)
249 {
250 TIPC_VLD0_Type vld0;
251 vld0.w = TIPC->VLD0;
252 vld0.b.UART1 = 0;
253 TIPC->VLD0 = vld0.w;
254 }
255
265 __STATIC_INLINE void wm_tipc_enable_uart2(void)
266 {
267 TIPC_VLD0_Type vld0;
268 vld0.w = TIPC->VLD0;
269 vld0.b.UART2 = 1;
270 TIPC->VLD0 = vld0.w;
271 }
272
282 __STATIC_INLINE void wm_tipc_disable_uart2(void)
283 {
284 TIPC_VLD0_Type vld0;
285 vld0.w = TIPC->VLD0;
286 vld0.b.UART2 = 0;
287 TIPC->VLD0 = vld0.w;
288 }
289
299 __STATIC_INLINE void wm_tipc_enable_uart3(void)
300 {
301 TIPC_VLD0_Type vld0;
302 vld0.w = TIPC->VLD0;
303 vld0.b.UART3 = 1;
304 TIPC->VLD0 = vld0.w;
305 }
306
316 __STATIC_INLINE void wm_tipc_disable_uart3(void)
317 {
318 TIPC_VLD0_Type vld0;
319 vld0.w = TIPC->VLD0;
320 vld0.b.UART3 = 0;
321 TIPC->VLD0 = vld0.w;
322 }
323
333 __STATIC_INLINE void wm_tipc_enable_uart4(void)
334 {
335 TIPC_VLD0_Type vld0;
336 vld0.w = TIPC->VLD0;
337 vld0.b.UART4 = 1;
338 TIPC->VLD0 = vld0.w;
339 }
340
350 __STATIC_INLINE void wm_tipc_disable_uart4(void)
351 {
352 TIPC_VLD0_Type vld0;
353 vld0.w = TIPC->VLD0;
354 vld0.b.UART4 = 0;
355 TIPC->VLD0 = vld0.w;
356 }
357
367 __STATIC_INLINE void wm_tipc_enable_uart5(void)
368 {
369 TIPC_VLD0_Type vld0;
370 vld0.w = TIPC->VLD0;
371 vld0.b.UART5 = 1;
372 TIPC->VLD0 = vld0.w;
373 }
374
384 __STATIC_INLINE void wm_tipc_disable_uart5(void)
385 {
386 TIPC_VLD0_Type vld0;
387 vld0.w = TIPC->VLD0;
388 vld0.b.UART5 = 0;
389 TIPC->VLD0 = vld0.w;
390 }
391
401 __STATIC_INLINE void wm_tipc_enable_porta(void)
402 {
403 TIPC_VLD0_Type vld0;
404 vld0.w = TIPC->VLD0;
405 vld0.b.PORTA = 1;
406 TIPC->VLD0 = vld0.w;
407 }
408
418 __STATIC_INLINE void wm_tipc_disable_porta(void)
419 {
420 TIPC_VLD0_Type vld0;
421 vld0.w = TIPC->VLD0;
422 vld0.b.PORTA = 0;
423 TIPC->VLD0 = vld0.w;
424 }
425
435 __STATIC_INLINE void wm_tipc_enable_portb(void)
436 {
437 TIPC_VLD0_Type vld0;
438 vld0.w = TIPC->VLD0;
439 vld0.b.PORTB = 1;
440 TIPC->VLD0 = vld0.w;
441 }
442
452 __STATIC_INLINE void wm_tipc_disable_portb(void)
453 {
454 TIPC_VLD0_Type vld0;
455 vld0.w = TIPC->VLD0;
456 vld0.b.PORTB = 0;
457 TIPC->VLD0 = vld0.w;
458 }
459
469 __STATIC_INLINE void wm_tipc_enable_watch_dog(void)
470 {
471 TIPC_VLD0_Type vld0;
472 vld0.w = TIPC->VLD0;
473 vld0.b.WD = 1;
474 TIPC->VLD0 = vld0.w;
475 }
476
486 __STATIC_INLINE void wm_tipc_disable_watch_dog(void)
487 {
488 TIPC_VLD0_Type vld0;
489 vld0.w = TIPC->VLD0;
490 vld0.b.WD = 0;
491 TIPC->VLD0 = vld0.w;
492 }
493
503 __STATIC_INLINE void wm_tipc_enable_timer(void)
504 {
505 TIPC_VLD0_Type vld0;
506 vld0.w = TIPC->VLD0;
507 vld0.b.TIMER = 1;
508 TIPC->VLD0 = vld0.w;
509 }
510
520 __STATIC_INLINE void wm_tipc_disable_timer(void)
521 {
522 TIPC_VLD0_Type vld0;
523 vld0.w = TIPC->VLD0;
524 vld0.b.TIMER = 0;
525 TIPC->VLD0 = vld0.w;
526 }
527
537 __STATIC_INLINE void wm_tipc_enable_rf_controler(void)
538 {
539 TIPC_VLD0_Type vld0;
540 vld0.w = TIPC->VLD0;
541 vld0.b.RFC = 1;
542 TIPC->VLD0 = vld0.w;
543 }
544
554 __STATIC_INLINE void wm_tipc_disable_rf_controler(void)
555 {
556 TIPC_VLD0_Type vld0;
557 vld0.w = TIPC->VLD0;
558 vld0.b.RFC = 0;
559 TIPC->VLD0 = vld0.w;
560 }
561
571 __STATIC_INLINE void wm_tipc_enable_lcd(void)
572 {
573 TIPC_VLD0_Type vld0;
574 vld0.w = TIPC->VLD0;
575 vld0.b.LCD = 1;
576 TIPC->VLD0 = vld0.w;
577 }
578
588 __STATIC_INLINE void wm_tipc_disable_lcd(void)
589 {
590 TIPC_VLD0_Type vld0;
591 vld0.w = TIPC->VLD0;
592 vld0.b.LCD = 0;
593 TIPC->VLD0 = vld0.w;
594 }
595
605 __STATIC_INLINE void wm_tipc_enable_pwm(void)
606 {
607 TIPC_VLD0_Type vld0;
608 vld0.w = TIPC->VLD0;
609 vld0.b.PWM = 1;
610 TIPC->VLD0 = vld0.w;
611 }
612
622 __STATIC_INLINE void wm_tipc_disable_pwm(void)
623 {
624 TIPC_VLD0_Type vld0;
625 vld0.w = TIPC->VLD0;
626 vld0.b.PWM = 0;
627 TIPC->VLD0 = vld0.w;
628 }
629
639 __STATIC_INLINE void wm_tipc_enable_i2s(void)
640 {
641 TIPC_VLD0_Type vld0;
642 vld0.w = TIPC->VLD0;
643 vld0.b.I2S = 1;
644 TIPC->VLD0 = vld0.w;
645 }
646
656 __STATIC_INLINE void wm_tipc_disable_i2s(void)
657 {
658 TIPC_VLD0_Type vld0;
659 vld0.w = TIPC->VLD0;
660 vld0.b.I2S = 0;
661 TIPC->VLD0 = vld0.w;
662 }
663
673 __STATIC_INLINE void wm_tipc_enable_bt_modem(void)
674 {
675 TIPC_VLD0_Type vld0;
676 vld0.w = TIPC->VLD0;
677 vld0.b.BT_MODEM = 1;
678 TIPC->VLD0 = vld0.w;
679 }
680
690 __STATIC_INLINE void wm_tipc_disable_bt_modem(void)
691 {
692 TIPC_VLD0_Type vld0;
693 vld0.w = TIPC->VLD0;
694 vld0.b.BT_MODEM = 0;
695 TIPC->VLD0 = vld0.w;
696 }
697
707 __STATIC_INLINE void wm_tipc_enable_sdio_host(void)
708 {
709 TIPC_VLD1_Type vld1;
710 vld1.w = TIPC->VLD1;
711 vld1.b.SDIO_HOST = 1;
712 TIPC->VLD1 = vld1.w;
713 }
714
724 __STATIC_INLINE void wm_tipc_disable_sdio_host(void)
725 {
726 TIPC_VLD1_Type vld1;
727 vld1.w = TIPC->VLD1;
728 vld1.b.SDIO_HOST = 0;
729 TIPC->VLD1 = vld1.w;
730 }
731
741 __STATIC_INLINE void wm_tipc_enable_flash(void)
742 {
743 TIPC_VLD1_Type vld1;
744 vld1.w = TIPC->VLD1;
745 vld1.b.FLASH = 1;
746 TIPC->VLD1 = vld1.w;
747 }
748
758 __STATIC_INLINE void wm_tipc_disable_flash(void)
759 {
760 TIPC_VLD1_Type vld1;
761 vld1.w = TIPC->VLD1;
762 vld1.b.FLASH = 0;
763 TIPC->VLD1 = vld1.w;
764 }
765
775 __STATIC_INLINE void wm_tipc_enable_psram(void)
776 {
777 TIPC_VLD1_Type vld1;
778 vld1.w = TIPC->VLD1;
779 vld1.b.PSRAM = 1;
780 TIPC->VLD1 = vld1.w;
781 }
782
792 __STATIC_INLINE void wm_tipc_disable_psram(void)
793 {
794 TIPC_VLD1_Type vld1;
795 vld1.w = TIPC->VLD1;
796 vld1.b.PSRAM = 0;
797 TIPC->VLD1 = vld1.w;
798 }
799
809 __STATIC_INLINE void wm_tipc_enable_rsa(void)
810 {
811 TIPC_VLD1_Type vld1;
812 vld1.w = TIPC->VLD1;
813 vld1.b.RSA = 1;
814 TIPC->VLD1 = vld1.w;
815 }
816
826 __STATIC_INLINE void wm_tipc_disable_rsa(void)
827 {
828 TIPC_VLD1_Type vld1;
829 vld1.w = TIPC->VLD1;
830 vld1.b.RSA = 0;
831 TIPC->VLD1 = vld1.w;
832 }
833
843 __STATIC_INLINE void wm_tipc_enable_dma(void)
844 {
845 TIPC_VLD1_Type vld1;
846 vld1.w = TIPC->VLD1;
847 vld1.b.DMA = 1;
848 TIPC->VLD1 = vld1.w;
849 }
850
860 __STATIC_INLINE void wm_tipc_disable_dma(void)
861 {
862 TIPC_VLD1_Type vld1;
863 vld1.w = TIPC->VLD1;
864 vld1.b.DMA = 0;
865 TIPC->VLD1 = vld1.w;
866 }
867
877 __STATIC_INLINE void wm_tipc_enable_gpsec(void)
878 {
879 TIPC_VLD1_Type vld1;
880 vld1.w = TIPC->VLD1;
881 vld1.b.GPSEC = 1;
882 TIPC->VLD1 = vld1.w;
883 }
884
894 __STATIC_INLINE void wm_tipc_disable_gpsec(void)
895 {
896 TIPC_VLD1_Type vld1;
897 vld1.w = TIPC->VLD1;
898 vld1.b.GPSEC = 0;
899 TIPC->VLD1 = vld1.w;
900 }
901
911 __STATIC_INLINE void wm_tipc_enable_bt(void)
912 {
913 TIPC_VLD1_Type vld1;
914 vld1.w = TIPC->VLD1;
915 vld1.b.BT = 1;
916 TIPC->VLD1 = vld1.w;
917 }
918
928 __STATIC_INLINE void wm_tipc_disable_bt(void)
929 {
930 TIPC_VLD1_Type vld1;
931 vld1.w = TIPC->VLD1;
932 vld1.b.BT = 0;
933 TIPC->VLD1 = vld1.w;
934 }
935
945 __STATIC_INLINE void wm_tipc_enable_pmu(void)
946 {
947 TIPC_VLD1_Type vld1;
948 vld1.w = TIPC->VLD1;
949 vld1.b.PMU = 1;
950 TIPC->VLD1 = vld1.w;
951 }
952
962 __STATIC_INLINE void wm_tipc_disable_pmu(void)
963 {
964 TIPC_VLD1_Type vld1;
965 vld1.w = TIPC->VLD1;
966 vld1.b.PMU = 0;
967 TIPC->VLD1 = vld1.w;
968 }
969
979 __STATIC_INLINE void wm_tipc_enable_clk_rst(void)
980 {
981 TIPC_VLD1_Type vld1;
982 vld1.w = TIPC->VLD1;
983 vld1.b.CLK_RST = 1;
984 TIPC->VLD1 = vld1.w;
985 }
986
996 __STATIC_INLINE void wm_tipc_disable_clk_rst(void)
997 {
998 TIPC_VLD1_Type vld1;
999 vld1.w = TIPC->VLD1;
1000 vld1.b.CLK_RST = 0;
1001 TIPC->VLD1 = vld1.w;
1002 }
1003
1013 __STATIC_INLINE void wm_tipc_enable_mmu(void)
1014 {
1015 TIPC_VLD1_Type vld1;
1016 vld1.w = TIPC->VLD1;
1017 vld1.b.MMU = 1;
1018 TIPC->VLD1 = vld1.w;
1019 }
1020
1030 __STATIC_INLINE void wm_tipc_disable_mmu(void)
1031 {
1032 TIPC_VLD1_Type vld1;
1033 vld1.w = TIPC->VLD1;
1034 vld1.b.MMU = 0;
1035 TIPC->VLD1 = vld1.w;
1036 }
1037
1047 __STATIC_INLINE void wm_tipc_enable_bbp(void)
1048 {
1049 TIPC_VLD1_Type vld1;
1050 vld1.w = TIPC->VLD1;
1051 vld1.b.BBP = 1;
1052 TIPC->VLD1 = vld1.w;
1053 }
1054
1064 __STATIC_INLINE void wm_tipc_disable_bbp(void)
1065 {
1066 TIPC_VLD1_Type vld1;
1067 vld1.w = TIPC->VLD1;
1068 vld1.b.BBP = 0;
1069 TIPC->VLD1 = vld1.w;
1070 }
1071
1081 __STATIC_INLINE void wm_tipc_enable_mac(void)
1082 {
1083 TIPC_VLD1_Type vld1;
1084 vld1.w = TIPC->VLD1;
1085 vld1.b.MAC = 1;
1086 TIPC->VLD1 = vld1.w;
1087 }
1088
1098 __STATIC_INLINE void wm_tipc_disable_mac(void)
1099 {
1100 TIPC_VLD1_Type vld1;
1101 vld1.w = TIPC->VLD1;
1102 vld1.b.MAC = 0;
1103 TIPC->VLD1 = vld1.w;
1104 }
1105
1115 __STATIC_INLINE void wm_tipc_enable_sec(void)
1116 {
1117 TIPC_VLD1_Type vld1;
1118 vld1.w = TIPC->VLD1;
1119 vld1.b.SEC = 1;
1120 TIPC->VLD1 = vld1.w;
1121 }
1122
1132 __STATIC_INLINE void wm_tipc_disable_sec(void)
1133 {
1134 TIPC_VLD1_Type vld1;
1135 vld1.w = TIPC->VLD1;
1136 vld1.b.SEC = 0;
1137 TIPC->VLD1 = vld1.w;
1138 }
1139
1149 __STATIC_INLINE void wm_tipc_enable_sdio_slave(void)
1150 {
1151 TIPC_VLD1_Type vld1;
1152 vld1.w = TIPC->VLD1;
1153 vld1.b.SDIO_SLAVE = 1;
1154 TIPC->VLD1 = vld1.w;
1155 }
1156
1166 __STATIC_INLINE void wm_tipc_disable_sdio_slave(void)
1167 {
1168 TIPC_VLD1_Type vld1;
1169 vld1.w = TIPC->VLD1;
1170 vld1.b.SDIO_SLAVE = 0;
1171 TIPC->VLD1 = vld1.w;
1172 }
1173
1183 __STATIC_INLINE void wm_tipc_enable_hspi(void)
1184 {
1185 TIPC_VLD1_Type vld1;
1186 vld1.w = TIPC->VLD1;
1187 vld1.b.SPI_HS = 1;
1188 TIPC->VLD1 = vld1.w;
1189 }
1190
1200 __STATIC_INLINE void wm_tipc_disable_hspi(void)
1201 {
1202 TIPC_VLD1_Type vld1;
1203 vld1.w = TIPC->VLD1;
1204 vld1.b.SPI_HS = 0;
1205 TIPC->VLD1 = vld1.w;
1206 }
1207
1217 __STATIC_INLINE void wm_tipc_enable_sdio_wrapper(void)
1218 {
1219 TIPC_VLD1_Type vld1;
1220 vld1.w = TIPC->VLD1;
1221 vld1.b.SDIO_WRAPPER = 1;
1222 TIPC->VLD1 = vld1.w;
1223 }
1224
1234 __STATIC_INLINE void wm_tipc_disable_sdio_wrapper(void)
1235 {
1236 TIPC_VLD1_Type vld1;
1237 vld1.w = TIPC->VLD1;
1238 vld1.b.SDIO_WRAPPER = 0;
1239 TIPC->VLD1 = vld1.w;
1240 }
1241
1251 __STATIC_INLINE void wm_tipc_enable_rf_bist(void)
1252 {
1253 TIPC_VLD1_Type vld1;
1254 vld1.w = TIPC->VLD1;
1255 vld1.b.RF_BIST = 1;
1256 TIPC->VLD1 = vld1.w;
1257 }
1258
1268 __STATIC_INLINE void wm_tipc_disable_rf_bist(void)
1269 {
1270 TIPC_VLD1_Type vld1;
1271 vld1.w = TIPC->VLD1;
1272 vld1.b.RF_BIST = 0;
1273 TIPC->VLD1 = vld1.w;
1274 }
1275
1284 #endif
wm_tipc_enable_pwm
__STATIC_INLINE void wm_tipc_enable_pwm(void)
This function is used enable pwm.
Definition: wm_tipc.h:605
wm_tipc_enable_watch_dog
__STATIC_INLINE void wm_tipc_enable_watch_dog(void)
This function is used enable watch dog.
Definition: wm_tipc.h:469
TIPC_VLD0_Type::BT_MODEM
uint32_t BT_MODEM
Definition: wm_tipc.h:28
TIPC_VLD1_Type::MMU
uint32_t MMU
Definition: wm_tipc.h:45
wm_tipc_disable_bbp
__STATIC_INLINE void wm_tipc_disable_bbp(void)
This function is used disable bbp.
Definition: wm_tipc.h:1064
wm_tipc_disable_lcd
__STATIC_INLINE void wm_tipc_disable_lcd(void)
This function is used disable lcd.
Definition: wm_tipc.h:588
wm_tipc_disable_gpsec
__STATIC_INLINE void wm_tipc_disable_gpsec(void)
This function is used disable gpsec.
Definition: wm_tipc.h:894
wm_tipc_disable_timer
__STATIC_INLINE void wm_tipc_disable_timer(void)
This function is used disable timer.
Definition: wm_tipc.h:520
TIPC_VLD0_Type::SAR_ADC
uint32_t SAR_ADC
Definition: wm_tipc.h:12
wm_tipc_disable_portb
__STATIC_INLINE void wm_tipc_disable_portb(void)
This function is used disable portb.
Definition: wm_tipc.h:452
TIPC_VLD1_Type::SDIO_HOST
uint32_t SDIO_HOST
Definition: wm_tipc.h:36
wm_tipc_enable_pmu
__STATIC_INLINE void wm_tipc_enable_pmu(void)
This function is used enable pmu.
Definition: wm_tipc.h:945
wm_tipc_disable_uart4
__STATIC_INLINE void wm_tipc_disable_uart4(void)
This function is used disable uart4.
Definition: wm_tipc.h:350
TIPC_VLD1_Type::BT
uint32_t BT
Definition: wm_tipc.h:42
wm_tipc_enable_sdio_slave
__STATIC_INLINE void wm_tipc_enable_sdio_slave(void)
This function is used enable sdio slave.
Definition: wm_tipc.h:1149
wm_tipc_enable_mac
__STATIC_INLINE void wm_tipc_enable_mac(void)
This function is used enable mac.
Definition: wm_tipc.h:1081
wm_tipc_disable_pwm
__STATIC_INLINE void wm_tipc_disable_pwm(void)
This function is used disable pwm.
Definition: wm_tipc.h:622
TIPC_VLD0_Type::UART4
uint32_t UART4
Definition: wm_tipc.h:18
wm_tipc_disable_uart2
__STATIC_INLINE void wm_tipc_disable_uart2(void)
This function is used disable uart2.
Definition: wm_tipc.h:282
TIPC_VLD0_Type::UART2
uint32_t UART2
Definition: wm_tipc.h:16
TIPC_VLD1_Type::GPSEC
uint32_t GPSEC
Definition: wm_tipc.h:41
wm_tipc_disable_uart5
__STATIC_INLINE void wm_tipc_disable_uart5(void)
This function is used disable uart5.
Definition: wm_tipc.h:384
wm_tipc_enable_sec
__STATIC_INLINE void wm_tipc_enable_sec(void)
This function is used enable sec.
Definition: wm_tipc.h:1115
wm_tipc_enable_bt_modem
__STATIC_INLINE void wm_tipc_enable_bt_modem(void)
This function is used enable bt modem.
Definition: wm_tipc.h:673
TIPC_VLD0_Type::TIMER
uint32_t TIMER
Definition: wm_tipc.h:23
wm_tipc_enable_flash
__STATIC_INLINE void wm_tipc_enable_flash(void)
This function is used enable flash.
Definition: wm_tipc.h:741
wm_tipc_disable_sec
__STATIC_INLINE void wm_tipc_disable_sec(void)
This function is used disable sec.
Definition: wm_tipc.h:1132
TIPC_VLD1_Type::PMU
uint32_t PMU
Definition: wm_tipc.h:43
wm_tipc_disable_sdio_slave
__STATIC_INLINE void wm_tipc_disable_sdio_slave(void)
This function is used disable sdio slave.
Definition: wm_tipc.h:1166
wm_tipc_enable_gpsec
__STATIC_INLINE void wm_tipc_enable_gpsec(void)
This function is used enable gpsec.
Definition: wm_tipc.h:877
wm_tipc_enable_clk_rst
__STATIC_INLINE void wm_tipc_enable_clk_rst(void)
This function is used enable clock reset.
Definition: wm_tipc.h:979
wm_tipc_disable_i2c
__STATIC_INLINE void wm_tipc_disable_i2c(void)
This function is used disable i2c.
Definition: wm_tipc.h:112
TIPC_Type
Definition: wm_tipc.h:59
TIPC_VLD1_Type
Definition: wm_tipc.h:34
TIPC_VLD0_Type::WD
uint32_t WD
Definition: wm_tipc.h:22
wm_tipc_disable_hspi
__STATIC_INLINE void wm_tipc_disable_hspi(void)
This function is used disable high speed spi.
Definition: wm_tipc.h:1200
TIPC_VLD0_Type::I2S
uint32_t I2S
Definition: wm_tipc.h:27
wm_tipc_disable_dma
__STATIC_INLINE void wm_tipc_disable_dma(void)
This function is used disable dma.
Definition: wm_tipc.h:860
wm_tipc_disable_rsa
__STATIC_INLINE void wm_tipc_disable_rsa(void)
This function is used disable rsa.
Definition: wm_tipc.h:826
wm_tipc_enable_timer
__STATIC_INLINE void wm_tipc_enable_timer(void)
This function is used enable timer.
Definition: wm_tipc.h:503
wm_tipc_disable_pmu
__STATIC_INLINE void wm_tipc_disable_pmu(void)
This function is used disable pmu.
Definition: wm_tipc.h:962
wm_tipc_disable_porta
__STATIC_INLINE void wm_tipc_disable_porta(void)
This function is used disable porta.
Definition: wm_tipc.h:418
wm_regs.h
register & operation file
wm_tipc_disable_uart0
__STATIC_INLINE void wm_tipc_disable_uart0(void)
This function is used disable uart0.
Definition: wm_tipc.h:146
TIPC_VLD1_Type::_reserved0
uint32_t _reserved0
Definition: wm_tipc.h:49
TIPC_VLD1_Type::SDIO_WRAPPER
uint32_t SDIO_WRAPPER
Definition: wm_tipc.h:52
wm_tipc_enable_lspi
__STATIC_INLINE void wm_tipc_enable_lspi(void)
This function is used enable low speed spi.
Definition: wm_tipc.h:197
TIPC_VLD0_Type::I2C
uint32_t I2C
Definition: wm_tipc.h:11
wm_tipc_disable_sdio_wrapper
__STATIC_INLINE void wm_tipc_disable_sdio_wrapper(void)
This function is used disable sdio wrapper.
Definition: wm_tipc.h:1234
TIPC_VLD1_Type::SEC
uint32_t SEC
Definition: wm_tipc.h:48
TIPC_VLD0_Type::PORTA
uint32_t PORTA
Definition: wm_tipc.h:20
wm_tipc_enable_uart4
__STATIC_INLINE void wm_tipc_enable_uart4(void)
This function is used enable uart4.
Definition: wm_tipc.h:333
wm_tipc_enable_sar_adc
__STATIC_INLINE void wm_tipc_enable_sar_adc(void)
This function is used enable sar adc.
Definition: wm_tipc.h:163
wm_tipc_disable_sar_adc
__STATIC_INLINE void wm_tipc_disable_sar_adc(void)
This function is used disable sar adc.
Definition: wm_tipc.h:180
TIPC_VLD0_Type::UART1
uint32_t UART1
Definition: wm_tipc.h:15
wm_tipc_enable_uart3
__STATIC_INLINE void wm_tipc_enable_uart3(void)
This function is used enable uart3.
Definition: wm_tipc.h:299
wm_tipc_enable_mmu
__STATIC_INLINE void wm_tipc_enable_mmu(void)
This function is used enable mmu.
Definition: wm_tipc.h:1013
TIPC_VLD1_Type::DMA
uint32_t DMA
Definition: wm_tipc.h:40
wm_tipc_enable_rf_controler
__STATIC_INLINE void wm_tipc_enable_rf_controler(void)
This function is used enable rf controler.
Definition: wm_tipc.h:537
wm_tipc_enable_i2s
__STATIC_INLINE void wm_tipc_enable_i2s(void)
This function is used enable i2s.
Definition: wm_tipc.h:639
wm_tipc_enable_rf_bist
__STATIC_INLINE void wm_tipc_enable_rf_bist(void)
This function is used enable rf bist.
Definition: wm_tipc.h:1251
wm_tipc_enable_sdio_host
__STATIC_INLINE void wm_tipc_enable_sdio_host(void)
This function is used enable sdio host.
Definition: wm_tipc.h:707
TIPC_VLD0_Type
Definition: wm_tipc.h:9
wm_tipc_enable_bbp
__STATIC_INLINE void wm_tipc_enable_bbp(void)
This function is used enable bbp.
Definition: wm_tipc.h:1047
wm_tipc_disable_uart3
__STATIC_INLINE void wm_tipc_disable_uart3(void)
This function is used disable uart3.
Definition: wm_tipc.h:316
wm_tipc_enable_uart0
__STATIC_INLINE void wm_tipc_enable_uart0(void)
This function is used enable uart0.
Definition: wm_tipc.h:129
wm_tipc_enable_portb
__STATIC_INLINE void wm_tipc_enable_portb(void)
This function is used enable portb.
Definition: wm_tipc.h:435
wm_tipc_disable_watch_dog
__STATIC_INLINE void wm_tipc_disable_watch_dog(void)
This function is used disable watch dog.
Definition: wm_tipc.h:486
wm_tipc_disable_rf_bist
__STATIC_INLINE void wm_tipc_disable_rf_bist(void)
This function is used disable rf bist.
Definition: wm_tipc.h:1268
wm_tipc_enable_hspi
__STATIC_INLINE void wm_tipc_enable_hspi(void)
This function is used enable high speed spi.
Definition: wm_tipc.h:1183
TIPC_VLD1_Type::RSA
uint32_t RSA
Definition: wm_tipc.h:39
wm_tipc_enable_rsa
__STATIC_INLINE void wm_tipc_enable_rsa(void)
This function is used enable rsa.
Definition: wm_tipc.h:809
wm_tipc_disable_clk_rst
__STATIC_INLINE void wm_tipc_disable_clk_rst(void)
This function is used disable clock reset.
Definition: wm_tipc.h:996
TIPC_VLD1_Type::RF_BIST
uint32_t RF_BIST
Definition: wm_tipc.h:53
wm_tipc_enable_porta
__STATIC_INLINE void wm_tipc_enable_porta(void)
This function is used enable porta.
Definition: wm_tipc.h:401
wm_tipc_disable_bt
__STATIC_INLINE void wm_tipc_disable_bt(void)
This function is used disable bt.
Definition: wm_tipc.h:928
TIPC_VLD0_Type::UART5
uint32_t UART5
Definition: wm_tipc.h:19
wm_tipc_enable_uart2
__STATIC_INLINE void wm_tipc_enable_uart2(void)
This function is used enable uart2.
Definition: wm_tipc.h:265
wm_tipc_enable_dma
__STATIC_INLINE void wm_tipc_enable_dma(void)
This function is used enable dma.
Definition: wm_tipc.h:843
wm_tipc_disable_lspi
__STATIC_INLINE void wm_tipc_disable_lspi(void)
This function is used disable low speed spi.
Definition: wm_tipc.h:214
wm_tipc_disable_i2s
__STATIC_INLINE void wm_tipc_disable_i2s(void)
This function is used disable i2s.
Definition: wm_tipc.h:656
TIPC_VLD0_Type::SPI_LS
uint32_t SPI_LS
Definition: wm_tipc.h:13
wm_tipc_enable_bt
__STATIC_INLINE void wm_tipc_enable_bt(void)
This function is used enable bt.
Definition: wm_tipc.h:911
TIPC_VLD0_Type::PWM
uint32_t PWM
Definition: wm_tipc.h:26
TIPC_VLD1_Type::PSRAM
uint32_t PSRAM
Definition: wm_tipc.h:38
wm_tipc_disable_uart1
__STATIC_INLINE void wm_tipc_disable_uart1(void)
This function is used disable uart1.
Definition: wm_tipc.h:248
TIPC_VLD0_Type::LCD
uint32_t LCD
Definition: wm_tipc.h:25
wm_tipc_enable_lcd
__STATIC_INLINE void wm_tipc_enable_lcd(void)
This function is used enable lcd.
Definition: wm_tipc.h:571
wm_tipc_disable_bt_modem
__STATIC_INLINE void wm_tipc_disable_bt_modem(void)
This function is used disable bt modem.
Definition: wm_tipc.h:690
wm_tipc_disable_flash
__STATIC_INLINE void wm_tipc_disable_flash(void)
This function is used disable flash.
Definition: wm_tipc.h:758
wm_tipc_enable_uart1
__STATIC_INLINE void wm_tipc_enable_uart1(void)
This function is used enable uart1.
Definition: wm_tipc.h:231
TIPC_VLD0_Type::UART0
uint32_t UART0
Definition: wm_tipc.h:14
wm_tipc_disable_rf_controler
__STATIC_INLINE void wm_tipc_disable_rf_controler(void)
This function is used disable rf controler.
Definition: wm_tipc.h:554
wm_tipc_enable_sdio_wrapper
__STATIC_INLINE void wm_tipc_enable_sdio_wrapper(void)
This function is used enable sdio wrapper.
Definition: wm_tipc.h:1217
wm_tipc_disable_sdio_host
__STATIC_INLINE void wm_tipc_disable_sdio_host(void)
This function is used disable sdio host.
Definition: wm_tipc.h:724
wm_tipc_enable_i2c
__STATIC_INLINE void wm_tipc_enable_i2c(void)
This function is used enable i2c.
Definition: wm_tipc.h:95
wm_tipc_enable_psram
__STATIC_INLINE void wm_tipc_enable_psram(void)
This function is used enable psram.
Definition: wm_tipc.h:775
TIPC_VLD0_Type::RFC
uint32_t RFC
Definition: wm_tipc.h:24
TIPC_VLD1_Type::FLASH
uint32_t FLASH
Definition: wm_tipc.h:37
TIPC_VLD0_Type::UART3
uint32_t UART3
Definition: wm_tipc.h:17
wm_tipc_disable_psram
__STATIC_INLINE void wm_tipc_disable_psram(void)
This function is used disable psram.
Definition: wm_tipc.h:792
TIPC_VLD1_Type::SDIO_SLAVE
uint32_t SDIO_SLAVE
Definition: wm_tipc.h:50
TIPC_VLD1_Type::MAC
uint32_t MAC
Definition: wm_tipc.h:47
TIPC_VLD1_Type::BBP
uint32_t BBP
Definition: wm_tipc.h:46
wm_tipc_disable_mmu
__STATIC_INLINE void wm_tipc_disable_mmu(void)
This function is used disable mmu.
Definition: wm_tipc.h:1030
wm_tipc_enable_uart5
__STATIC_INLINE void wm_tipc_enable_uart5(void)
This function is used enable uart5.
Definition: wm_tipc.h:367
wm_tipc_disable_mac
__STATIC_INLINE void wm_tipc_disable_mac(void)
This function is used disable mac.
Definition: wm_tipc.h:1098
TIPC_VLD0_Type::PORTB
uint32_t PORTB
Definition: wm_tipc.h:21
TIPC_VLD1_Type::CLK_RST
uint32_t CLK_RST
Definition: wm_tipc.h:44
TIPC_VLD1_Type::SPI_HS
uint32_t SPI_HS
Definition: wm_tipc.h:51


W800 SDK APIs: doxy_out/include/driver/wm_touchsensor.h File Reference

  • doxy_out
  • include
  • driver
Functions
wm_touchsensor.h File Reference

touchsensor Driver Module More...

#include "wm_type_def.h"

Go to the source code of this file.

Functions

int | tls_touchsensor_init_config (u32 sensorno, u8 scan_period, u8 window, u32 enable)
This function is used to initialize touch sensor. More...
int | tls_touchsensor_chan_config (u32 sensorno)
This function is used to initialize touch scan channel. More...
int | tls_touchsensor_scan_config (u8 scanperiod, u8 window, u8 bias)
This function is used to initialize touch general configuration. More...
int | tls_touchsensor_scan_start (void)
This function is used to start touch scan. More...
int | tls_touchsensor_scan_stop (void)
This function is used to stop touch scan. More...
int | tls_touchsensor_deinit (u32 sensorno)
This function is used to deinit touch sensor's selection and disable touch. More...
int | tls_touchsensor_threshold_config (u32 sensorno, u8 threshold)
This function is used to set threshold per touch sensor. More...
int | tls_touchsensor_countnum_get (u32 sensorno)
This function is used to get touch sensor's count number. More...
int | tls_touchsensor_irq_enable (u32 sensorno)
This function is used to enable touch sensor's irq. More...
int | tls_touchsensor_irq_disable (u32 sensorno)
This function is used to disable touch sensor's irq. More...
void | tls_touchsensor_irq_register (void(*callback)(u32 status))
This function is used to register touch sensor's irq callback. More...
int | tls_touchsensor_irq_status_get (u32 sensorno)
This function is used to get touch sensor's irq status. More...

Detailed Description

touchsensor Driver Module

Author

Copyright (c) 2021 Winner Microelectronics Co., Ltd.

Function Documentation

◆ tls_touchsensor_chan_config()

int tls_touchsensor_chan_config ( u32 sensorno )

This function is used to initialize touch scan channel.

Parameters
[in] sensorno is the touch sensor number from 1-15
Return values
0:success
Note
if use touch sensor, user must configure the IO multiplex by API wm_touch_sensor_config.

◆ tls_touchsensor_countnum_get()

int tls_touchsensor_countnum_get ( u32 sensorno )

This function is used to get touch sensor's count number.

Parameters
[in] sensorno is the touch sensor number from 1 to 15.
Return values
sensorno's count number .
Note
None

◆ tls_touchsensor_deinit()

int tls_touchsensor_deinit ( u32 sensorno )

This function is used to deinit touch sensor's selection and disable touch.

Parameters
[in] sensorno is the touch sensor number from 1-15
Return values
0:success
Note
if do not use touch sensor, user can deinit by this interface and configure this touch sensor as GPIO.

◆ tls_touchsensor_init_config()

int tls_touchsensor_init_config | ( | u32 | sensorno,
 |  | u8 | scan_period,
 |  | u8 | window,
 |  | u32 | enable
 | ) |  |

This function is used to initialize touch sensor.

Parameters
[in] | sensorno | is the touch sensor number from 1-15
[in] | scan_period | is scan period for per touch sensor ,unit:16ms, >0
[in] | window | is count window, window must be greater than 2.Real count window is window - 2.
[in] | enable | is touch sensor enable bit.
Return values
0:success
Note
if use touch sensor, user must configure the IO multiplex by API wm_touch_sensor_config.

◆ tls_touchsensor_irq_disable()

int tls_touchsensor_irq_disable ( u32 sensorno )

This function is used to disable touch sensor's irq.

Parameters
[in] sensorno is the touch sensor number from 1 to 15.
Return values
0:successfully disable irq, -1:parameter wrong.
Note
None

◆ tls_touchsensor_irq_enable()

int tls_touchsensor_irq_enable ( u32 sensorno )

This function is used to enable touch sensor's irq.

Parameters
[in] sensorno is the touch sensor number from 1 to 15.
Return values
0:successfully enable irq, -1:parameter wrong.
Note
None

◆ tls_touchsensor_irq_register()

void tls_touchsensor_irq_register ( void(*)(u32 status) callback )

This function is used to register touch sensor's irq callback.

Parameters
[in] callback is call back for user's application.
Return values
None.
Note
None

◆ tls_touchsensor_irq_status_get()

int tls_touchsensor_irq_status_get ( u32 sensorno )

This function is used to get touch sensor's irq status.

Parameters
[in] sensorno is the touch sensor number from 1 to 15.
Return values
>=0:irq status, -1:parameter wrong.
Note
None

◆ tls_touchsensor_scan_config()

int tls_touchsensor_scan_config | ( | u8 | scanperiod,
 |  | u8 | window,
 |  | u8 | bias
 | ) |  |

This function is used to initialize touch general configuration.

Parameters
[in] | scanperiod | is scan period for per touch sensor ,unit:16ms, >0
[in] | window | is count window, window must be greater than 2.Real count window is window - 2.
[in] | bias | is touch sensor bias current
Return values
0:success
Note
if use touch sensor, user must configure the IO multiplex by API wm_touch_sensor_config.

◆ tls_touchsensor_scan_start()

int tls_touchsensor_scan_start ( void )

This function is used to start touch scan.

Return values
0:success
Note
if use touch sensor, user must configure the IO multiplex by API wm_touch_sensor_config.

◆ tls_touchsensor_scan_stop()

int tls_touchsensor_scan_stop ( void )

This function is used to stop touch scan.

Return values
0:success
Note
if use touch sensor, user must configure the IO multiplex by API wm_touch_sensor_config.

◆ tls_touchsensor_threshold_config()

int tls_touchsensor_threshold_config | ( | u32 | sensorno,
 |  | u8 | threshold
 | ) |  |

This function is used to set threshold per touch sensor.

Parameters
[in] | sensorno | is the touch sensor number from 1-15
[in] | threshold | is the sensorno's touch sensor threshold,max value is 127.
Return values
0:success. minus value: parameter wrong.
Note
None


W800 SDK APIs: doxy_out/include/driver/wm_uart.h File Reference

  • doxy_out
  • include
  • driver
Data Structures | Macros | Typedefs | Enumerations | Functions
wm_uart.h File Reference

uart Driver Module More...

#include "list.h"
#include "wm_type_def.h"
#include "wm_osal.h"

Go to the source code of this file.

Data Structures

struct | tls_uart_baud_rate
struct | tls_uart_icount
struct | tls_uart_options
struct | tls_uart_circ_buf
struct | TLS_UART_REGS
struct | tls_uart_port
struct | tls_uart_tx_msg

Macros

#define | TLS_UART_RX_BUF_SIZE 4096
#define | TLS_UART_TX_BUF_SIZE 4096
#define | WAKEUP_CHARS 256
#define | MBOX_MSG_UART_RX 1
#define | MBOX_MSG_UART_TX 2
#define | UART_BAUDRATE_B600 600
#define | UART_BAUDRATE_B1200 1200
#define | UART_BAUDRATE_B1800 1800
#define | UART_BAUDRATE_B2400 2400
#define | UART_BAUDRATE_B4800 4800
#define | UART_BAUDRATE_B9600 9600
#define | UART_BAUDRATE_B19200 19200
#define | UART_BAUDRATE_B38400 38400
#define | UART_BAUDRATE_B57600 57600
#define | UART_BAUDRATE_B115200 115200
#define | UART_BAUDRATE_B230400 230400
#define | UART_BAUDRATE_B460800 460800
#define | UART_BAUDRATE_B921600 921600
#define | UART_BAUDRATE_B1000000 1000000
#define | UART_BAUDRATE_B1250000 1250000
#define | UART_BAUDRATE_B1500000 1500000
#define | UART_BAUDRATE_B2000000 2000000
#define | UART_RX_INT_FLAG
#define | UART_RX_ERR_INT_FLAG
#define | UART_TX_INT_FLAG (UIS_TX_FIFO | UIS_TX_FIFO_EMPTY)
#define | CIRC_CNT(head, tail, size) (((head) - (tail)) & ((size)-1))
#define | CIRC_SPACE(head, tail, size) CIRC_CNT((tail),((head)+1),(size))
#define | CIRC_CNT_TO_END(head, tail, size)
#define | CIRC_SPACE_TO_END(head, tail, size)
#define | CIRC_SPACE_TO_END_FULL(head, tail, size)
#define | uart_circ_empty(circ) ((circ)->head == (circ)->tail)
#define | uart_circ_chars_pending(circ) (CIRC_CNT((circ)->head, (circ)->tail, TLS_UART_TX_BUF_SIZE))

Typedefs

typedef enum TLS_UART_PMODE | TLS_UART_PMODE_T
typedef enum TLS_UART_CHSIZE | TLS_UART_CHSIZE_T
typedef enum TLS_UART_FLOW_CTRL_MODE | TLS_UART_FLOW_CTRL_MODE_T
typedef enum TLS_UART_RX_FLOW_CTRL_FLAG | TLS_UART_RX_FLOW_CTRL_FLAG_T
typedef enum TLS_UART_STOPBITS | TLS_UART_STOPBITS_T
typedef enum TLS_UART_STATUS | TLS_UART_STATUS_T
typedef enum TLS_UART_MODE | TLS_UART_MODE_T
typedef struct tls_uart_options | tls_uart_options_t
typedef struct tls_uart_circ_buf | tls_uart_circ_buf_t
typedef struct TLS_UART_REGS | TLS_UART_REGS_T
typedef struct tls_uart_port | tls_uart_port_t
typedef struct tls_uart_tx_msg | tls_uart_tx_msg_t

Enumerations

enum {
TLS_UART_0 = 0, TLS_UART_1 = 1, TLS_UART_2 = 2, TLS_UART_3 = 3,
TLS_UART_4 = 4, TLS_UART_5 = 5, TLS_UART_MAX = 6
}
enum TLS_UART_PMODE {
TLS_UART_PMODE_DISABLED = 0, TLS_UART_PMODE_ODD = 1, TLS_UART_PMODE_EVEN = 2, TLS_UART_PMODE_MARK = 3,
TLS_UART_PMODE_SPACE = 4
}
enum | TLS_UART_CHSIZE { TLS_UART_CHSIZE_5BIT = (0x00 << 0), TLS_UART_CHSIZE_6BIT = (0x01 << 0), TLS_UART_CHSIZE_7BIT = (0x02 << 0), TLS_UART_CHSIZE_8BIT = (0x03 << 0) }
enum | TLS_UART_FLOW_CTRL_MODE { TLS_UART_FLOW_CTRL_NONE, TLS_UART_FLOW_CTRL_HARDWARE }
enum | TLS_UART_RX_FLOW_CTRL_FLAG { TLS_UART_RX_DISABLE, TLS_UART_RX_ENABLE }
enum | TLS_UART_STOPBITS { TLS_UART_ONE_STOPBITS, TLS_UART_TWO_STOPBITS }
enum | TLS_UART_STATUS { TLS_UART_STATUS_OK, TLS_UART_STATUS_ERROR }
enum | TLS_UART_MODE { TLS_UART_MODE_POLL, TLS_UART_MODE_INT }

Functions

int | tls_uart_port_init (u16 uart_no, tls_uart_options_t *opts, u8 modeChoose)
This function is used to initial uart port. More...
void | tls_uart_rx_callback_register (u16 uart_no, s16(*rx_callback)(u16 len, void *user_data), void *user_data)
This function is used to register uart rx interrupt. More...
void | tls_uart_rx_byte_callback_flag (u16 uart_no, u8 flag)
void | tls_uart_tx_callback_register (u16 uart_no, s16(*tx_callback)(struct tls_uart_port *port))
This function is used to register uart tx interrupt. More...
int | tls_uart_read (u16 uart_no, u8 *buf, u16 readsize)
This function is used to copy circular buffer data to user buffer. More...
int | tls_uart_try_read (u16 uart_no, int32_t read_size)
This function is used to check the available data in the cache buffer. More...
int | tls_uart_write (u16 uart_no, char *buf, u16 writesize)
This function is used to transfer data synchronously. More...
int | tls_uart_dma_write (char *buf, u16 writesize, void(*cmpl_callback)(void *p), u16 uart_no)
This function is used to transfer data with DMA. More...
int | tls_uart_set_parity (u16 uart_no, TLS_UART_PMODE_T paritytype)
This function is used to set uart parity. More...
int | tls_uart_set_baud_rate (u16 uart_no, u32 baudrate)
This function is used to set uart baudrate. More...
int | tls_uart_set_stop_bits (u16 uart_no, TLS_UART_STOPBITS_T stopbits)
This function is used to set uart stop bits. More...
void | tls_uart_push (int uart_no, u8 *data, int length)
int | tls_uart_write_async (u16 uart_no, char *buf, u16 writesize)
This function is used to transfer data asynchronously. More...
void | tls_uart_tx_sent_callback_register (u16 uart_no, s16(*tx_callback)(struct tls_uart_port *port))
This function is used to register uart tx sent callback function. More...

Detailed Description

uart Driver Module

Author
dave

Copyright (c) 2015 Winner Microelectronics Co., Ltd.

Macro Definition Documentation

◆ CIRC_CNT

#define CIRC_CNT | ( | head,
 |  | tail,
 |  | size
 | ) | (((head) - (tail)) & ((size)-1))

return count in buffer.

◆ CIRC_CNT_TO_END

#define CIRC_CNT_TO_END | ( | head,
 |  | tail,
 |  | size
 | ) |
Value:
({int end = (size) - (tail); \
int n = ((head) + end) & ((size)-1); \
n < end ? n : end;})

Return count up to the end of the buffer. Carefully avoid accessing head and tail more than once, so they can change underneath us without returning inconsistent results.

◆ CIRC_SPACE

#define CIRC_SPACE | ( | head,
 |  | tail,
 |  | size
 | ) | CIRC_CNT((tail),((head)+1),(size))

Return space available, 0..size-1. We always leave one free char as a completely full buffer has head == tail, which is the same as empty.

◆ CIRC_SPACE_TO_END

#define CIRC_SPACE_TO_END | ( | head,
 |  | tail,
 |  | size
 | ) |
Value:
({int end = (size) - 1 - (head); \
int n = (end + (tail)) & ((size)-1); \
n <= end ? n : end+1;})

Return space available up to the end of the buffer.

◆ CIRC_SPACE_TO_END_FULL

#define CIRC_SPACE_TO_END_FULL | ( | head,
 |  | tail,
 |  | size
 | ) |
Value:
({int end = (size) - 1 - (head); \
int n = (end + (tail)) & ((size)-1); \
n < end ? n : end+1;})

◆ UART_BAUDRATE_B600

#define UART_BAUDRATE_B600 600

baud rate definition

◆ UART_RX_ERR_INT_FLAG

#define UART_RX_ERR_INT_FLAG
Value:
(UIS_BREAK | UIS_FRM_ERR | \
UIS_PARITY_ERR)

◆ UART_RX_INT_FLAG

#define UART_RX_INT_FLAG
Value:
(UIS_RX_FIFO | UIS_RX_FIFO_TIMEOUT | UIS_BREAK |\
UIS_OVERRUN | UIS_FRM_ERR | UIS_PARITY_ERR)

Enumeration Type Documentation

◆ TLS_UART_CHSIZE

enum TLS_UART_CHSIZE
Enumerator
TLS_UART_CHSIZE_5BIT | Character size: 5 bit
TLS_UART_CHSIZE_6BIT | Character size: 6 bit
TLS_UART_CHSIZE_7BIT | Character size: 7 bit
TLS_UART_CHSIZE_8BIT | Character size: 8 bit

◆ TLS_UART_MODE

enum TLS_UART_MODE
Enumerator
TLS_UART_MODE_POLL | uart operation mode: poll
TLS_UART_MODE_INT | uart operation mode: interrupt mode

◆ TLS_UART_PMODE

enum TLS_UART_PMODE
Enumerator
TLS_UART_PMODE_DISABLED | No Parity
TLS_UART_PMODE_ODD | Odd Parity
TLS_UART_PMODE_EVEN | Even Parity
TLS_UART_PMODE_MARK | The parity bit is always 1.
TLS_UART_PMODE_SPACE | The parity bit is always 0.

Function Documentation

◆ tls_uart_tx_sent_callback_register()

void tls_uart_tx_sent_callback_register | ( | u16 | uart_no,
 |  | s16(*)(struct tls_uart_port *port) | tx_callback
 | ) |  |

This function is used to register uart tx sent callback function.

Parameters
[in] | uart_no | is the uart numer.
[in] | callback | is the uart tx sent out call back function.
Return values

◆ tls_uart_write_async()

int tls_uart_write_async | ( | u16 | uart_no,
 |  | char * | buf,
 |  | u16 | writesize
 | ) |  |

This function is used to transfer data asynchronously.

Parameters
[in] | uart_no | is the uart number
[in] | buf | is a buf for saving user data
[in] | writesize | is the user data length
Return values
WM_SUCCESS | tx success
WM_FAILED | tx failed
Note
None


W800 SDK APIs: doxy_out/include/driver/wm_watchdog.h File Reference

  • doxy_out
  • include
  • driver
Functions
wm_watchdog.h File Reference

watchdog Driver Module More...

Go to the source code of this file.

Functions

void | tls_watchdog_clr (void)
This function is used to feed the dog. More...
void | tls_watchdog_init (u32 usec)
This function is used to init and start the watchdog. More...
void | tls_watchdog_deinit (void)
This function is used to deinit watchdog. More...
void | tls_sys_reset (void)
This function is used to reset the system. More...
void | tls_sys_set_reboot_reason (u32 reason)
This function is used to set reboot reason. More...
int | tls_sys_get_reboot_reason (void)
This function is used to get reboot reason. More...

Detailed Description

watchdog Driver Module

Author
dave

Copyright (c) 2014 Winner Microelectronics Co., Ltd.


W800 SDK APIs: doxy_out/include/net Directory Reference

  • doxy_out
  • include
  • net
net Directory Reference

Files

file | wm_socket.h [code]
socket Module
file | wm_socket2.1.3.h [code]
socket2.1.3 apis
file | wm_sockets.h [code]
socket apis
file | wm_sockets2.1.3.h [code]
sockets2.1.3 apis


W800 SDK APIs: doxy_out/include/net/wm_socket.h File Reference

  • doxy_out
  • include
  • net
wm_socket.h File Reference

socket Module More...

#include "wm_config.h"
#include "wm_socket2.1.3.h"

Go to the source code of this file.

Detailed Description

socket Module

Author
dave

Copyright (c) 2014 Winner Microelectronics Co., Ltd.


W800 SDK APIs: doxy_out/include/net/wm_socket2.1.3.h File Reference

  • doxy_out
  • include
  • net
Data Structures | Macros | Typedefs | Enumerations | Functions
wm_socket2.1.3.h File Reference

socket2.1.3 apis More...

#include "wm_type_def.h"
#include "wm_netif.h"
#include "lwip/err.h"
#include "lwip/pbuf.h"

Go to the source code of this file.

Data Structures

struct | tls_socket_desc
struct | tls_skt_status_ext_t
struct | tls_skt_status_t

Macros

#define | NETCONN_STATE_NONE 0
#define | NETCONN_STATE_WAITING 1
#define | NETCONN_STATE_CONNECTED 2
#define | NETCONN_STATE_CLOSED 3
#define | NET_EVENT_TCP_JOINED 0
#define | NET_EVENT_TCP_DISCONNECT 1
#define | NET_EVENT_TCP_CONNECTED 2
#define | NET_EVENT_TCP_CONNECT_FAILED 3
#define | NET_EVENT_UDP_START 4
#define | NET_EVENT_UDP_START_FAILED 5
#define | TLS_MAX_SOCKET_NUM 4
#define | TLS_MAX_NETCONN_NUM 20

Typedefs

typedef void(* | socket_err_fn) (u8 skt_num, err_t err)
This Function prototype for tcp error callback functions. Called when receives a RST or is unexpectedly closed for any other reason. The corresponding socket is already freed when this callback is called! More...
typedef err_t(* | socket_recv_fn) (u8 skt_num, struct pbuf *p, err_t err)
This Function prototype for socket receive callback functions. Called when data has been received. More...
typedef err_t(* | socket_recv_ip_rpt_fn) (u8 skt_num, u16 datalen, u8 *ipsrc, u16 port, err_t err)
This Function prototype for socket srce ip callback functions. Called when data has been received. More...
typedef err_t(* | socket_connected_fn) (u8 skt_num, err_t err)
This Function prototype for tcp connected callback functions. Called when connected to the remote side. More...
typedef err_t(* | socket_poll_fn) (u8 skt_num)
This Function prototype for tcp poll callback functions. Called periodically. More...
typedef err_t(* | socket_accept_fn) (u8 skt_num, err_t err)
This Function prototype for tcp accept callback functions. Called when a new connection can be accepted on a listening tcp. More...
typedef void(* | socket_state_changed_fn) (u8 skt_num, u8 event, u8 state)
This Function prototype for socket state changed callback functions. Called when socket the sockte's state changed. More...

Enumerations

enum | tls_socket_protocol { SOCKET_PROTO_TCP, SOCKET_PROTO_UDP }
enum | tls_socket_cs_mode { SOCKET_CS_MODE_CLIENT, SOCKET_CS_MODE_SERVER }

Functions

int | tls_socket_create (struct tls_socket_desc *skd)
This function is called by your application code to create a socket. More...
int | tls_socket_send (u8 skt_num, void *pdata, u16 len)
This function is called by your application code to send data by the socket. More...
int | tls_socket_close (u8 skt_num)
This function is called by your application code to close the socket, and the related resources would be released. More...
int | tls_socket_get_status (u8 skt_num, u8 *buf, u32 bufsize)
This function is called by your application code to get the socket status of specified socket num. More...
int | tls_socket_udp_sendto (u16 localport, u8 *ip_addr, u16 port, void *pdata, u16 len)
This function is called by your application code to send data by udp socket. More...

Detailed Description

socket2.1.3 apis

Author
winnermicro
Copyright
(c) 2014 Winner Microelectronics Co., Ltd.

Typedef Documentation

◆ socket_accept_fn

typedef err_t(* socket_accept_fn) (u8 skt_num, err_t err)

This Function prototype for tcp accept callback functions. Called when a new connection can be accepted on a listening tcp.

Parameters
[in] | skt_num | Is the socket number that returned by tls_socket_create function.
[in] | err | An error code if there has been an error accepting.
Return values
ERR_OK | Return this value after handling your logic.
ERR_ABRT | Only return ERR_ABRT if you want to abort the socket from within the callback function!

◆ socket_connected_fn

typedef err_t(* socket_connected_fn) (u8 skt_num, err_t err)

This Function prototype for tcp connected callback functions. Called when connected to the remote side.

Parameters
[in] | skt_num | Is the socket number that returned by tls_socket_create function.
[in] | err | An unused error code, always ERR_OK currently.
Return values
ERR_OK | Return this value after handling your logic.
ERR_ABRT | Only return ERR_ABRT if you want to abort the socket from within the callback function!

◆ socket_err_fn

typedef void(* socket_err_fn) (u8 skt_num, err_t err)

This Function prototype for tcp error callback functions. Called when receives a RST or is unexpectedly closed for any other reason. The corresponding socket is already freed when this callback is called!

Parameters
[in] | skt_num | Is the socket number that returned by tls_socket_create function.
[in] | err | Error code to indicate why the socket has been closed ERR_ABRT: aborted through returning ERR_ABRT from within others callback functions ERR_RST: the connection was reset by the remote host

◆ socket_poll_fn

typedef err_t(* socket_poll_fn) (u8 skt_num)

This Function prototype for tcp poll callback functions. Called periodically.

Parameters
[in] skt_num Is the socket number that returned by tls_socket_create function.
Return values
ERR_OK | Try to do something periodically.
ERR_ABRT | Only return ERR_ABRT if you want to abort the socket from within the callback function!

◆ socket_recv_fn

typedef err_t(* socket_recv_fn) (u8 skt_num, struct pbuf *p, err_t err)

This Function prototype for socket receive callback functions. Called when data has been received.

Parameters
[in] | skt_num | Is the socket number that returned by tls_socket_create function.
[in] | p | The received data (or NULL when the connection has been closed!)
[in] | err | An error code if there has been an error receiving, always be ERR_OK when cs mode is udp.
Return values
The return value is only valid for tcp receive, for upd it means nothing. ERR_OK: Return this value after handling the received data. ERR_ABRT: Only return ERR_ABRT if you want to abort the socket from within the callback function!

◆ socket_recv_ip_rpt_fn

typedef err_t(* socket_recv_ip_rpt_fn) (u8 skt_num, u16 datalen, u8 *ipsrc, u16 port, err_t err)

This Function prototype for socket srce ip callback functions. Called when data has been received.

Parameters
[in] | skt_num | Is the socket number that returned by tls_socket_create function.
[in] | datalen | The received data length
[in] | ipsrc | source ip addr
[in] | port | source port
[in] | err | An error code if there has been an error receiving, always be ERR_OK when cs mode is udp.
Return values
The return value is only valid for UDP receive, for udp it means nothing. ERR_OK: Return this value after handling the received data. ERR_ABRT: Only return ERR_ABRT if you want to abort the socket from within the callback function!

◆ socket_state_changed_fn

typedef void(* socket_state_changed_fn) (u8 skt_num, u8 event, u8 state)

This Function prototype for socket state changed callback functions. Called when socket the sockte's state changed.

Parameters
[in] | skt_num | Is the socket number that returned by tls_socket_create function.
[in] | event | Is the event number, see socket event defination.
[in] | state | Is the socket state, see socket state defination.

Function Documentation

◆ tls_socket_close()

int tls_socket_close ( u8 skt_num )

This function is called by your application code to close the socket, and the related resources would be released.

Parameters
[in] skt_num Is the socket number that returned by tls_socket_create function.
Return values
ERR_OK If close socket successfully. negative number If an error was detected.

◆ tls_socket_create()

int tls_socket_create ( struct tls_socket_desc * skd )

This function is called by your application code to create a socket.

Parameters
[in] skd Is a pointer to an tls_socket_desc.
Return values
ERR_OK If create socket successfully. negative number If an error was detected.

◆ tls_socket_get_status()

int tls_socket_get_status | ( | u8 | skt_num,
 |  | u8 * | buf,
 |  | u32 | bufsize
 | ) |  |

This function is called by your application code to get the socket status of specified socket num.

Parameters
[in] | skt_num | Is the socket number that returned by tls_socket_create function.
[in] | buf | Is a pointer to the data contains the socket status, if the socket is server, also contains it's client's status.
[in] | len | The buf's length. At least, the len should be bigger than sizeof(struct tls_skt_status_t).
Return values
ERR_OK If send data successfully. negative number If an error was detected.

◆ tls_socket_send()

int tls_socket_send | ( | u8 | skt_num,
 |  | void * | pdata,
 |  | u16 | len
 | ) |  |

This function is called by your application code to send data by the socket.

Parameters
[in] | skt_num | Is the socket number that returned by tls_socket_create function.
[in] | pdata | Is a pointer to the data which need to be send by the socket.
[in] | len | The data's length.
Return values
ERR_OK If send data successfully. negative number If an error was detected.

◆ tls_socket_udp_sendto()

int tls_socket_udp_sendto | ( | u16 | localport,
 |  | u8 * | ip_addr,
 |  | u16 | port,
 |  | void * | pdata,
 |  | u16 | len
 | ) |  |

This function is called by your application code to send data by udp socket.

Parameters
[in] | localport | This function will search all created sockets, if there is a socket whose localport equals this value and it's protocol is udp, then send the data by this socket, otherwise, nothing to send.
[in] | ip_addr | Is the remote ip address.
[in] | port | Is the remote port which upd send to.
[in] | pdata | Is a pointer to the data which need to be send by the socket.
[in] | len | The data's length.
Return values
ERR_OK If send data successfully. negative number If an error was detected.


W800 SDK APIs: doxy_out/include/net/wm_sockets.h File Reference

  • doxy_out
  • include
  • net
wm_sockets.h File Reference

socket apis More...

#include "wm_config.h"
#include "wm_sockets2.1.3.h"

Go to the source code of this file.

Detailed Description

socket apis

Author
winnermicro

Copyright (c) 2014 Winner Microelectronics Co., Ltd.


W800 SDK APIs: doxy_out/include/net/wm_sockets2.1.3.h File Reference

  • doxy_out
  • include
  • net
Functions
wm_sockets2.1.3.h File Reference

sockets2.1.3 apis More...

#include <stdio.h>
#include "wm_type_def.h"
#include "wm_config.h"
#include <time.h>
#include "lwip/ip_addr.h"
#include "lwip/sockets.h"
#include "lwip/netdb.h"

Go to the source code of this file.

Functions

void | print_ipaddr (ip_addr_t *ip)
struct netif * | wm_ip4_route_src (const ip4_addr_t *dest, const ip4_addr_t *src)

Detailed Description

sockets2.1.3 apis

Author
winnermicro
Copyright
(c) 2014 Winner Microelectronics Co., Ltd.


W800 SDK APIs: doxy_out/include/os Directory Reference

  • doxy_out
  • include
  • os
os Directory Reference

Files

file | wm_os_config.h [code]
WM OS select freertos or ucos.
file | wm_osal.h [code]
WM OS adapter layer.


W800 SDK APIs: doxy_out/include/os/wm_os_config.h File Reference

  • doxy_out
  • include
  • os
Macros
wm_os_config.h File Reference

WM OS select freertos or ucos. More...

Go to the source code of this file.

Macros

#define | OS_CFG_ON 1
#define | OS_CFG_OFF 0
#define | TLS_OS_FREERTOS OS_CFG_ON /*FreeRTOS need to modify wm_config.inc*/

Detailed Description

WM OS select freertos or ucos.

Author
winnermicro

Copyright (c) 2015 Winner Microelectronics Co., Ltd.


W800 SDK APIs: doxy_out/include/os/wm_osal.h File Reference

  • doxy_out
  • include
  • os
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
wm_osal.h File Reference

WM OS adapter layer. More...

#include <stdio.h>
#include <stdlib.h>
#include "wm_config.h"
#include <core_804.h>
#include "wm_type_def.h"

Go to the source code of this file.

Data Structures

struct os_time

Macros

#define | TLS_OS_TIMER_OPT_ONE_SHORT 1u
#define | TLS_OS_TIMER_OPT_PERIOD 2u

Typedefs

typedef long | os_time_t
typedef unsigned int | OS_STK
typedef unsigned int | OS_CPU_SR
typedef void * | tls_os_task_t
typedef void | tls_os_timer_t
typedef void | tls_os_sem_t
typedef void | tls_os_queue_t
typedef void | tls_os_mailbox_t
typedef void | tls_os_mutex_t
typedef void(* | TLS_OS_TIMER_CALLBACK) (void *ptmr, void *parg)
typedef enum tls_os_status | tls_os_status_t

Enumerations

enum | TLS_OS_TYPE { OS_UCOSII = 0, OS_FREERTOS = 1, OS_MAX_NUM }
enum | tls_os_status { TLS_OS_SUCCESS = 0, TLS_OS_ERROR, TLS_OS_ERR_TIMEOUT }

Functions

void | tls_os_timer_init (void)
This function is used to register OS tick timer irq. More...
void | tls_os_time_tick (void *p)
This function is used to tick handler. More...
void | tls_os_init (void *arg)
This function is used to initialize OS common resource. More...
void | tls_os_start_scheduler (void)
This function is used to start task scheduler. More...
int | tls_os_get_type (void)
This function is used to get OS type. More...
tls_os_status_t | tls_os_task_create (tls_os_task_t *task, const char *name, void(*entry)(void *param), void *param, u8 *stk_start, u32 stk_size, u32 prio, u32 flag)
This function is used to create a task. Tasks can either be created prior to the start of multitasking or by a running task. A task cannot be created in an ISR. More...
tls_os_status_t | tls_os_task_del (u8 prio, void(*freefun)(void))
This function allows you to delete a task. The calling task can delete itself by its own priority number. The deleted task is returned to the dormant state and can be re-activated by creating the deleted task again. More...
tls_os_status_t | tls_os_task_del_by_task_handle (void *handle, void(*freefun)(void))
This function allows you to delete a task. The calling task can delete itself by taks's handler. The deleted task is returned to the dormant state and can be re-activated by creating the deleted task again. More...
tls_os_task_t | tls_os_task_id ()
u8 | tls_os_task_schedule_state ()
tls_os_status_t | tls_os_mutex_create (u8 prio, tls_os_mutex_t **mutex)
This function creates a mutual exclusion semaphore. More...
tls_os_status_t | tls_os_mutex_delete (tls_os_mutex_t *mutex)
This function deletes a mutual exclusion semaphore and readies all tasks pending on the it. More...
tls_os_status_t | tls_os_mutex_acquire (tls_os_mutex_t *mutex, u32 wait_time)
This function waits for a mutual exclusion semaphore. More...
tls_os_status_t | tls_os_mutex_release (tls_os_mutex_t *mutex)
This function releases a mutual exclusion semaphore. More...
tls_os_status_t | tls_os_sem_create (tls_os_sem_t **sem, u32 cnt)
This function creates a semaphore. More...
tls_os_status_t | tls_os_sem_delete (tls_os_sem_t *sem)
This function deletes a semaphore and readies all tasks pending on this semaphore. More...
tls_os_status_t | tls_os_sem_acquire (tls_os_sem_t *sem, u32 wait_time)
This function waits for a semaphore. More...
tls_os_status_t | tls_os_sem_release (tls_os_sem_t *sem)
This function signals a semaphore. More...
tls_os_status_t | tls_os_sem_set (tls_os_sem_t *sem, u16 cnt)
This function sets the semaphore count to the value specified as an argument.Typically,this value would be 0.You would typically use this function when a semaphore is used as a signaling mechanism and, you want to reset the count value. More...
u16 | tls_os_sem_get_count (tls_os_sem_t *sem)
tls_os_status_t | tls_os_queue_create (tls_os_queue_t **queue, u32 queue_size)
This function creates a message queue if free event cont rol blocks are available. More...
tls_os_status_t | tls_os_queue_delete (tls_os_queue_t *queue)
This function deletes a message queue and readies all tasks pending on the queue. More...
tls_os_status_t | tls_os_queue_send (tls_os_queue_t *queue, void *msg, u32 msg_size)
This function sends a message to a queue. More...
tls_os_status_t | tls_os_queue_send_to_front (tls_os_queue_t *queue, void *msg, u32 msg_size)
This function sends a message to a head of the queue. More...
tls_os_status_t | tls_os_queue_send_to_back (tls_os_queue_t *queue, void *msg, u32 msg_size)
This function sends a message to a tail of the queue. More...
tls_os_status_t | tls_os_queue_flush (tls_os_queue_t *queue)
This function is used to flush the contents of the message queue. More...
tls_os_status_t | tls_os_queue_receive (tls_os_queue_t *queue, void **msg, u32 msg_size, u32 wait_time)
This function waits for a message to be sent to a queue. More...
u8 | tls_os_queue_is_empty (tls_os_queue_t *queue)
u32 | tls_os_queue_space_available (tls_os_queue_t *queue)
Return the number of free spaces available in a queue. This is equal to the number of items that can be sent to the queue before the queue becomes full if no items are removed. More...
tls_os_status_t | tls_os_queue_remove (tls_os_queue_t *queue, void *msg, u32 msg_size)
tls_os_status_t | tls_os_mailbox_create (tls_os_mailbox_t **mailbox, u32 mailbox_size)
This function creates a message mailbox if free event control blocks are available. More...
tls_os_status_t | tls_os_mailbox_delete (tls_os_mailbox_t *mailbox)
This function deletes a mailbox and readies all of the tasks pending on the this mailbox. More...
tls_os_status_t | tls_os_mailbox_send (tls_os_mailbox_t *mailbox, void *msg)
This function sends a message to a mailbox. More...
tls_os_status_t | tls_os_mailbox_receive (tls_os_mailbox_t *mailbox, void **msg, u32 wait_time)
This function waits for a message to be sent to a mailbox. More...
u32 | tls_os_get_time (void)
This function is used by your application to obtain the current value of the 32-bit counter which keeps track of the number of clock ticks since the system starts. More...
u32 | tls_os_set_critical (void)
This function is used to disable interrupts by preserving the state of interrupts. More...
void | tls_os_release_critical (u32 cpu_sr)
This function is used to enable interrupts by preserving the state of interrupts. More...
tls_os_status_t | tls_os_timer_create (tls_os_timer_t **timer, TLS_OS_TIMER_CALLBACK callback, void *callback_arg, u32 period, bool repeat, u8 *name)
This function is called by your application code to create a timer. More...
void | tls_os_timer_start (tls_os_timer_t *timer)
This function is called by your application code to start a timer. More...
void | tls_os_timer_change (tls_os_timer_t *timer, u32 ticks)
void | tls_os_timer_stop (tls_os_timer_t *timer)
This function is called by your application code to stop a timer. More...
tls_os_status_t | tls_os_timer_delete (tls_os_timer_t *timer)
This function is called by your application code to delete a timer. More...
void | tls_os_time_delay (u32 ticks)
This function is called to delay execution of the currently running task until the specified number of system ticks expires. This, of course, directly equates to delaying the current task for some time to expire. There will be no delay if the specified delay is 0. If the specified delay is greater than 0 then, a context switch will executed. More...
u8 | tls_os_timer_active (tls_os_timer_t *timer)
u32 | tls_os_timer_expirytime (tls_os_timer_t *timer)
void | tls_os_disp_task_stat_info (void)
This function is used to display all the tasks' detail status. More...
u8 | tls_get_isr_count (void)

Variables

const unsigned int HZ

Detailed Description

WM OS adapter layer.

Author
winnermicro

Copyright (c) 2015 Winner Microelectronics Co., Ltd.

Macro Definition Documentation

◆ TLS_OS_TIMER_OPT_ONE_SHORT

#define TLS_OS_TIMER_OPT_ONE_SHORT 1u

MACRO definition of TIMER ONE times

◆ TLS_OS_TIMER_OPT_PERIOD

#define TLS_OS_TIMER_OPT_PERIOD 2u

MACRO definition of TIMER PERIOD

Typedef Documentation

◆ OS_CPU_SR

typedef unsigned int OS_CPU_SR

TYPE definition of OS_CPU_SR

◆ OS_STK

typedef unsigned int OS_STK

TYPE definition of OS_STK

◆ os_time_t

typedef long os_time_t

Type definition of os_time_t

◆ tls_os_mailbox_t

typedef void tls_os_mailbox_t

TYPE definition of tls_os_mailbox_t

◆ tls_os_mutex_t

typedef void tls_os_mutex_t

TYPE definition of tls_os_mutex_t

◆ tls_os_queue_t

typedef void tls_os_queue_t

TYPE definition of tls_os_queue_t

◆ tls_os_sem_t

typedef void tls_os_sem_t

TYPE definition of tls_os_sem_t

◆ tls_os_status_t

typedef enum tls_os_status tls_os_status_t

ENUMERATION definition of OS STATUS

◆ tls_os_task_t

typedef void* tls_os_task_t

TYPE definition of tls_os_task_t

◆ TLS_OS_TIMER_CALLBACK

typedef void(* TLS_OS_TIMER_CALLBACK) (void *ptmr, void *parg)

TYPE definition of TLS_OS_TIMER_CALLBACK

◆ tls_os_timer_t

typedef void tls_os_timer_t

TYPE definition of tls_os_timer_t

Enumeration Type Documentation

◆ tls_os_status

enum tls_os_status

ENUMERATION definition of OS STATUS

◆ TLS_OS_TYPE

enum TLS_OS_TYPE

ENUMERATION of OS

Variable Documentation

◆ HZ

const unsigned int HZ

OS TICK Frequency ,this value needs to keep the same as OS self-defined tick value


W800 SDK APIs: doxy_out/include/platform Directory Reference

  • doxy_out
  • include
  • platform
platform Directory Reference

Files

file | aes.h [code]
AES functions.
file | wm_crypto_hard.h [code]
hard crypto module
file | wm_fwup.h [code]
Firmware upgrade.
file | wm_params.h [code]
param manager Module
file | wm_wl_mbox.h [code]
mailbox (mbox) APIs
file | wm_wl_task.h [code]
task APIs
file | wm_wl_timers.h [code]
task APIs


W800 SDK APIs: doxy_out/include/platform/aes.h File Reference

  • doxy_out
  • include
  • platform
Functions
aes.h File Reference

AES functions. More...

#include <stddef.h>
#include "wm_type_def.h"

Go to the source code of this file.

Functions

int | aes_128_cbc_encrypt (const u8 *key, const u8 *iv, u8 *data, size_t data_len)
int | aes_128_cbc_decrypt (const u8 *key, const u8 *iv, u8 *data, size_t data_len)

Detailed Description

AES functions.

Copyright
(c) 2003-2006, Jouni Malinen jkmal.nosp@m.ine@.nosp@m.cc.hu.nosp@m.t.fi
Note
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

Alternatively, this software may be distributed under the terms of BSD license.

See README and COPYING for more details.


W800 SDK APIs: doxy_out/include/platform/wm_crypto_hard.h File Reference

  • doxy_out
  • include
  • platform
Data Structures | Macros | Typedefs | Enumerations | Functions
wm_crypto_hard.h File Reference

hard crypto module More...

#include "wm_type_def.h"
#include "wm_osal.h"

Go to the source code of this file.

Data Structures

struct | psCrcContext_t
struct | hstm_int
struct | psSha1_t
struct | psMd5_t
struct | psDigestContext_t
struct | psAesKey_t
struct | psAesCbc_t
struct | psArc4_t
struct | psDes3Key_t
struct | psDes3_t
union | psCipherContext_t
struct | wm_crypto_ctx

Macros

#define | min(a, b) (((a) < (b)) ? (a) : (b))
#define | HR_CRYPTO_BASE_ADDR 0x40000600
#define | HR_CRYPTO_SRC_ADDR (HR_CRYPTO_BASE_ADDR + 0x00)
#define | HR_CRYPTO_DEST_ADDR (HR_CRYPTO_BASE_ADDR + 0x04)
#define | HR_CRYPTO_SEC_CFG (HR_CRYPTO_BASE_ADDR + 0x08)
#define | HR_CRYPTO_SEC_CTRL (HR_CRYPTO_BASE_ADDR + 0x0C)
#define | HR_CRYPTO_KEY0 (HR_CRYPTO_BASE_ADDR + 0x10)
#define | HR_CRYPTO_KEY1 (HR_CRYPTO_BASE_ADDR + 0x14)
#define | HR_CRYPTO_KEY2 (HR_CRYPTO_BASE_ADDR + 0x18)
#define | HR_CRYPTO_KEY3 (HR_CRYPTO_BASE_ADDR + 0x1C)
#define | HR_CRYPTO_KEY4 (HR_CRYPTO_BASE_ADDR + 0x20)
#define | HR_CRYPTO_KEY5 (HR_CRYPTO_BASE_ADDR + 0x24)
#define | HR_CRYPTO_KEY6 (HR_CRYPTO_BASE_ADDR + 0x4c)
#define | HR_CRYPTO_KEY7 (HR_CRYPTO_BASE_ADDR + 0x50)
#define | HR_CRYPTO_IV0 (HR_CRYPTO_BASE_ADDR + 0x28)
#define | HR_CRYPTO_IV1 (HR_CRYPTO_BASE_ADDR + 0x20)
#define | HR_CRYPTO_SEC_STS (HR_CRYPTO_BASE_ADDR + 0x30)
#define | HR_CRYPTO_SHA1_DIGEST0 (HR_CRYPTO_BASE_ADDR + 0x34)
#define | HR_CRYPTO_SHA1_DIGEST1 (HR_CRYPTO_BASE_ADDR + 0x38)
#define | HR_CRYPTO_SHA1_DIGEST2 (HR_CRYPTO_BASE_ADDR + 0x3C)
#define | HR_CRYPTO_SHA1_DIGEST3 (HR_CRYPTO_BASE_ADDR + 0x40)
#define | HR_CRYPTO_SHA1_DIGEST4 (HR_CRYPTO_BASE_ADDR + 0x44)
#define | HR_CRYPTO_RNG_RESULT (HR_CRYPTO_BASE_ADDR + 0x48)
#define | HR_CRYPTO_TRNG_CR (HR_CRYPTO_BASE_ADDR + 0x54)
#define | HR_CRYPTO_CRC_KEY HR_CRYPTO_SHA1_DIGEST4
#define | HR_CRYPTO_CRC_RESULT HR_CRYPTO_SHA1_DIGEST4
#define | ERR_CRY_OK 0
No error, everything OK.
#define | ERR_FAILURE -1 /* failure */
#define | ERR_ARG_FAIL -6 /* Failure due to bad function param */
#define | PS_SUCCESS 0
#define | PS_FAILURE -1
#define | PS_FAIL PS_FAILURE/* Just another name */
#define | PS_ARG_FAIL -6 /* Failure due to bad function param */
#define | PS_PLATFORM_FAIL -7 /* Failure as a result of system call error */
#define | PS_MEM_FAIL -8 /* Failure to allocate requested memory */
#define | PS_LIMIT_FAIL -9 /* Failure on sanity/limit tests */
#define | PS_UNSUPPORTED_FAIL -10 /* Unimplemented feature error */
#define | PS_DISABLED_FEATURE_FAIL -11 /* Incorrect #define toggle for feature */
#define | PS_PROTOCOL_FAIL -12 /* A protocol error occurred */
#define | PS_TIMEOUT_FAIL -13 /* A timeout occurred and MAY be an error */
#define | PS_INTERRUPT_FAIL -14 /* An interrupt occurred and MAY be an error */
#define | PS_PENDING -15 /* In process. Not necessarily an error */
#define | PS_EAGAIN -16 /* Try again later. Not necessarily an error */
#define | PS_OUTPUT_LENGTH
#define | PS_HOSTNAME_RESOLUTION -18 /* Cannot resolve host name. */
#define | PS_CONNECT -19 /* Cannot connect to remote host. */
#define | PS_INSECURE_PROTOCOL
#define | PS_VERIFICATION_FAILED -21 /* Signature verification failed. */
#define | OUTPUT_REFLECT 1
#define | INPUT_REFLECT 2
#define | AES_BLOCKLEN 16
#define | AES_IVLEN AES_BLOCKLEN
#define | AES128_KEYLEN 16
#define | AES192_KEYLEN 24
#define | AES256_KEYLEN 32
#define | DES3_BLOCKLEN 8
#define | DES3_IVLEN DES3_BLOCKLEN
#define | DES3_KEYLEN 24

Typedefs

typedef enum __CRYPTO_METHOD | CRYPTO_METHOD
typedef enum __CRYPTO_WAY | CRYPTO_WAY
typedef enum __CRYPTO_RNG_SWITCH | CRYPTO_RNG_SWITCH
typedef enum __CRYPTO_MODE | CRYPTO_MODE
typedef enum __CRYPTO_CRC_TYPE | CRYPTO_CRC_TYPE
typedef u32 | hstm_digit

Enumerations

enum __CRYPTO_METHOD {
CRYPTO_METHOD_RSV =0, CRYPTO_METHOD_RC4, CRYPTO_METHOD_SHA1, CRYPTO_METHOD_AES,
CRYPTO_METHOD_DES, CRYPTO_METHOD_3DES, CRYPTO_METHOD_CRC, CRYPTO_METHOD_MD5
}
enum | __CRYPTO_WAY { CRYPTO_WAY_ENCRYPT =0, CRYPTO_WAY_DECRYPT }
enum | __CRYPTO_RNG_SWITCH { CRYPTO_RNG_SWITCH_16 = 0, CRYPTO_RNG_SWITCH_32 }
enum | __CRYPTO_MODE { CRYPTO_MODE_ECB =0, CRYPTO_MODE_CBC, CRYPTO_MODE_CTR, CRYPTO_MODE_CMAC }
enum | __CRYPTO_CRC_TYPE { CRYPTO_CRC_TYPE_8 =0, CRYPTO_CRC_TYPE_16_MODBUS, CRYPTO_CRC_TYPE_16_CCITT, CRYPTO_CRC_TYPE_32 }

Functions

int | tls_crypto_random_stop (void)
This function is used to stop random produce. More...
int | tls_crypto_random_init (u32 seed, CRYPTO_RNG_SWITCH rng_switch)
This function initializes random digit seed and BIT number. More...
int | tls_crypto_random_bytes (unsigned char *out, u32 len)
This function is used to get random digit content. More...
int | tls_crypto_trng (unsigned char *out, u32 len)
This function is used to generate true random number. More...
int | tls_crypto_rc4_init (psCipherContext_t *ctx, const unsigned char *key, u32 keylen)
This function initializes a RC4 encryption algorithm,
i.e. fills the psCipherContext_t structure pointed to by ctx with necessary data. More...
int | tls_crypto_rc4 (psCipherContext_t *ctx, unsigned char *in, unsigned char *out, u32 len)
This function encrypts a variable length data stream according to RC4. The RC4 algorithm it generates a "keystream" which is simply XORed with the plaintext to produce the ciphertext stream. Decryption is exactly the same as encryption. This function also decrypts a variable length data stream according to RC4. More...
int | tls_crypto_aes_init (psCipherContext_t *ctx, const unsigned char *IV, const unsigned char *key, u32 keylen, CRYPTO_MODE cbc)
This function initializes a AES encryption algorithm, i.e. fills the psCipherContext_t structure pointed to by ctx with necessary data. More...
int | tls_crypto_aes_encrypt_decrypt (psCipherContext_t *ctx, unsigned char *in, unsigned char *out, u32 len, CRYPTO_WAY dec)
This function encrypts or decrypts a variable length data stream according to AES. More...
int | tls_crypto_3des_init (psCipherContext_t *ctx, const unsigned char *IV, const unsigned char *key, u32 keylen, CRYPTO_MODE cbc)
This function initializes a 3DES encryption algorithm, i.e. fills the psCipherContext_t structure pointed to by ctx with necessary data. More...
int | tls_crypto_3des_encrypt_decrypt (psCipherContext_t *ctx, unsigned char *in, unsigned char *out, u32 len, CRYPTO_WAY dec)
This function encrypts or decrypts a variable length data stream according to 3DES. More...
int | tls_crypto_des_init (psCipherContext_t *ctx, const unsigned char *IV, const unsigned char *key, u32 keylen, CRYPTO_MODE cbc)
This function initializes a DES encryption algorithm, i.e. fills the psCipherContext_t structure pointed to by ctx with necessary data. More...
int | tls_crypto_des_encrypt_decrypt (psCipherContext_t *ctx, unsigned char *in, unsigned char *out, u32 len, CRYPTO_WAY dec)
This function encrypts or decrypts a variable length data stream according to DES. More...
int | tls_crypto_crc_init (psCrcContext_t *ctx, u32 key, CRYPTO_CRC_TYPE crc_type, u8 mode)
This function initializes a CRC algorithm, i.e. fills the psCrcContext_t structure pointed to by ctx with necessary data. More...
int | tls_crypto_crc_update (psCrcContext_t *ctx, unsigned char *in, u32 len)
This function updates the CRC value with a variable length bytes. This function may be called as many times as necessary, so the message may be processed in blocks. More...
int | tls_crypto_crc_final (psCrcContext_t *ctx, u32 *crc_val)
This function ends a CRC operation and produces a CRC value. More...
void | tls_crypto_sha1_init (psDigestContext_t *md)
This function initializes Message-Diggest context for usage in SHA1 algorithm, starts a new SHA1 operation and writes a new Digest Context. More...
void | tls_crypto_sha1_update (psDigestContext_t *md, const unsigned char *buf, u32 len)
Process a message block using SHA1 algorithm. This function performs a SHA1 block update operation. It continues an SHA1 message-digest operation, by processing InputLen-byte length message block pointed to by buf, and by updating the SHA1 context pointed to by md. This function may be called as many times as necessary, so the message may be processed in blocks. More...
int | tls_crypto_sha1_final (psDigestContext_t *md, unsigned char *hash)
This function ends a SHA1 operation and produces a Message-Digest. This function finalizes SHA1 algorithm, i.e. ends an SHA1 Message-Digest operation, writing the Message-Digest in the 20-byte buffer pointed to by hash in according to the information stored in context. More...
void | tls_crypto_md5_init (psDigestContext_t *md)
This function initializes Message-Diggest context for usage in MD5 algorithm, starts a new MD5 operation and writes a new Digest Context. This function begins a MD5 Message-Diggest Algorithm, i.e. fills the psDigestContext_t structure pointed to by md with necessary data. MD5 is the algorithm which takes as input a message of arbitrary length and produces as output a 128-bit "fingerprint" or "message digest" of the input. It is conjectured that it is computationally infeasible to produce two messages having the same message digest, or to produce any message having a given prespecified target message digest. More...
void | tls_crypto_md5_update (psDigestContext_t *md, const unsigned char *buf, u32 len)
Process a message block using MD5 algorithm. This function performs a MD5 block update operation. It continues an MD5 message-digest operation, by processing InputLen-byte length message block pointed to by buf, and by updating the MD5 context pointed to by md. This function may be called as many times as necessary, so the message may be processed in blocks. More...
int | tls_crypto_md5_final (psDigestContext_t *md, unsigned char *hash)
This function ends a MD5 operation and produces a Message-Digest. This function finalizes MD5 algorithm, i.e. ends an MD5 Message-Digest operation, writing the Message-Digest in the 16-byte buffer pointed to by hash in according to the information stored in context. More...
int | tls_crypto_exptmod (hstm_int *a, hstm_int *e, hstm_int *n, hstm_int *res)
This function implements the large module power multiplication algorithm. res = a**e (mod n) More...
int | tls_crypto_init (void)
This function initializes the encryption module. More...

Detailed Description

hard crypto module

Author
dave

Copyright (c) 2014 Winner Microelectronics Co., Ltd.

Macro Definition Documentation

◆ HR_CRYPTO_BASE_ADDR

#define HR_CRYPTO_BASE_ADDR 0x40000600

The base address of the registers of encryption/decryption module.

◆ HR_CRYPTO_CRC_KEY

#define HR_CRYPTO_CRC_KEY HR_CRYPTO_SHA1_DIGEST4

The address of the CRC in register.

◆ HR_CRYPTO_CRC_RESULT

#define HR_CRYPTO_CRC_RESULT HR_CRYPTO_SHA1_DIGEST4

The address of the CRC output register.

◆ HR_CRYPTO_DEST_ADDR

#define HR_CRYPTO_DEST_ADDR (HR_CRYPTO_BASE_ADDR + 0x04)

The address of the encrypted/decrypted text address register.

◆ HR_CRYPTO_IV0

#define HR_CRYPTO_IV0 (HR_CRYPTO_BASE_ADDR + 0x28)

The address of the IV0 register.

◆ HR_CRYPTO_IV1

#define HR_CRYPTO_IV1 (HR_CRYPTO_BASE_ADDR + 0x20)

The address of the IV1 register.

◆ HR_CRYPTO_KEY0

#define HR_CRYPTO_KEY0 (HR_CRYPTO_BASE_ADDR + 0x10)

The address of the key0 register.

◆ HR_CRYPTO_KEY1

#define HR_CRYPTO_KEY1 (HR_CRYPTO_BASE_ADDR + 0x14)

The address of the key1 register.

◆ HR_CRYPTO_KEY2

#define HR_CRYPTO_KEY2 (HR_CRYPTO_BASE_ADDR + 0x18)

The address of the key2 register.

◆ HR_CRYPTO_KEY3

#define HR_CRYPTO_KEY3 (HR_CRYPTO_BASE_ADDR + 0x1C)

The address of the key3 register.

◆ HR_CRYPTO_KEY4

#define HR_CRYPTO_KEY4 (HR_CRYPTO_BASE_ADDR + 0x20)

The address of the key4 register.

◆ HR_CRYPTO_KEY5

#define HR_CRYPTO_KEY5 (HR_CRYPTO_BASE_ADDR + 0x24)

The address of the key5 register.

◆ HR_CRYPTO_KEY6

#define HR_CRYPTO_KEY6 (HR_CRYPTO_BASE_ADDR + 0x4c)

The address of the key6 register.

◆ HR_CRYPTO_KEY7

#define HR_CRYPTO_KEY7 (HR_CRYPTO_BASE_ADDR + 0x50)

The address of the key7 register.

◆ HR_CRYPTO_RNG_RESULT

#define HR_CRYPTO_RNG_RESULT (HR_CRYPTO_BASE_ADDR + 0x48)

The address of the RNG RESULT register.

◆ HR_CRYPTO_SEC_CFG

#define HR_CRYPTO_SEC_CFG (HR_CRYPTO_BASE_ADDR + 0x08)

The address of the configuration register.

◆ HR_CRYPTO_SEC_CTRL

#define HR_CRYPTO_SEC_CTRL (HR_CRYPTO_BASE_ADDR + 0x0C)

The address of the control register.

◆ HR_CRYPTO_SEC_STS

#define HR_CRYPTO_SEC_STS (HR_CRYPTO_BASE_ADDR + 0x30)

The address of the encrypted/decrypted status register.

◆ HR_CRYPTO_SHA1_DIGEST0

#define HR_CRYPTO_SHA1_DIGEST0 (HR_CRYPTO_BASE_ADDR + 0x34)

The address of the SHA1/MD5 digest0 register.

◆ HR_CRYPTO_SHA1_DIGEST1

#define HR_CRYPTO_SHA1_DIGEST1 (HR_CRYPTO_BASE_ADDR + 0x38)

The address of the SHA1/MD5 digest1 register.

◆ HR_CRYPTO_SHA1_DIGEST2

#define HR_CRYPTO_SHA1_DIGEST2 (HR_CRYPTO_BASE_ADDR + 0x3C)

The address of the SHA1/MD5 digest2 register.

◆ HR_CRYPTO_SHA1_DIGEST3

#define HR_CRYPTO_SHA1_DIGEST3 (HR_CRYPTO_BASE_ADDR + 0x40)

The address of the SHA1/MD5 digest3 register.

◆ HR_CRYPTO_SHA1_DIGEST4

#define HR_CRYPTO_SHA1_DIGEST4 (HR_CRYPTO_BASE_ADDR + 0x44)

The address of the SHA1 digest4 and CRC in/output register.

◆ HR_CRYPTO_SRC_ADDR

#define HR_CRYPTO_SRC_ADDR (HR_CRYPTO_BASE_ADDR + 0x00)

The address of the source text address register.

◆ HR_CRYPTO_TRNG_CR

#define HR_CRYPTO_TRNG_CR (HR_CRYPTO_BASE_ADDR + 0x54)

The address of the TRNG CR register.

◆ PS_INSECURE_PROTOCOL

#define PS_INSECURE_PROTOCOL
Value:
-20 /* The operation needs to use insecure protocol.
The caller needs to accept use of insecure
protocol. */

◆ PS_OUTPUT_LENGTH

#define PS_OUTPUT_LENGTH
Value:
-17 /* Output length negotiation:
output buffer is too small. */

Typedef Documentation

◆ CRYPTO_CRC_TYPE

typedef enum __CRYPTO_CRC_TYPE CRYPTO_CRC_TYPE

The enum of the CRC type.

◆ CRYPTO_MODE

typedef enum __CRYPTO_MODE CRYPTO_MODE

The enum of the encryption/decryption mode, only for (aes des 3des).

◆ CRYPTO_WAY

typedef enum __CRYPTO_WAY CRYPTO_WAY

The enum of the encryption/decryption way.

Enumeration Type Documentation

◆ __CRYPTO_CRC_TYPE

enum __CRYPTO_CRC_TYPE

The enum of the CRC type.

Enumerator
CRYPTO_CRC_TYPE_8 | 8 bits CRC
CRYPTO_CRC_TYPE_16_MODBUS | 16 bits Modbus CRC
CRYPTO_CRC_TYPE_16_CCITT | 16 bits CCITT CRC
CRYPTO_CRC_TYPE_32 | 32 bits CRC

◆ __CRYPTO_METHOD

enum __CRYPTO_METHOD
Enumerator
CRYPTO_METHOD_CRC | CRC.
CRYPTO_METHOD_MD5 | MD5.

◆ __CRYPTO_MODE

enum __CRYPTO_MODE

The enum of the encryption/decryption mode, only for (aes des 3des).

Enumerator
CRYPTO_MODE_ECB | ECB.
CRYPTO_MODE_CBC | CBC.
CRYPTO_MODE_CTR | CTR, only for AES.
CRYPTO_MODE_CMAC | MAC, only for AES.

◆ __CRYPTO_WAY

enum __CRYPTO_WAY

The enum of the encryption/decryption way.

Enumerator
CRYPTO_WAY_ENCRYPT | Encryption.
CRYPTO_WAY_DECRYPT | Decryption.


W800 SDK APIs: doxy_out/include/platform/wm_crypto_hard_mbed.h Source File

  • doxy_out
  • include
  • platform
wm_crypto_hard_mbed.h
1
2 #ifndef WM_CRYPTO_HARD_MBED_H
3 #define WM_CRYPTO_HARD_MBED_H
4
5 #include "mbedtls/bignum.h"
6
7 #define MAX_HARD_EXPTMOD_BITLEN (2048)
8
9 int tls_crypto_mbedtls_exptmod( mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *E, const mbedtls_mpi *N);
10
11
12 #endif
13


W800 SDK APIs: doxy_out/include/platform/wm_fwup.h File Reference

  • doxy_out
  • include
  • platform
Data Structures | Macros | Typedefs | Enumerations | Functions
wm_fwup.h File Reference

Firmware upgrade. More...

#include "wm_osal.h"
#include "list.h"

Go to the source code of this file.

Data Structures

union | Img_Attr_Type
struct | IMAGE_HEADER_PARAM
struct | tls_fwup_image_hdr
struct | tls_fwup_block
struct | tls_fwup_request
struct | tls_fwup

Macros

#define | TLS_FWUP_STATUS_OK (0)
#define | TLS_FWUP_STATUS_EINVALID (1)
#define | TLS_FWUP_STATUS_EMEM (2)
#define | TLS_FWUP_STATUS_EPERM (3)
#define | TLS_FWUP_STATUS_EBUSY (4)
#define | TLS_FWUP_STATUS_ESESSIONID (5)
#define | TLS_FWUP_STATUS_EIO (6)
#define | TLS_FWUP_STATUS_ESIGNATURE (7)
#define | TLS_FWUP_STATUS_ECRC (8)
#define | TLS_FWUP_STATUS_EUNDEF (9)
#define | TLS_FWUP_BLK_SIZE 512
#define | TLS_FWUP_REQ_STATUS_IDLE (0)
#define | TLS_FWUP_REQ_STATUS_BUSY (1)
#define | TLS_FWUP_REQ_STATUS_SUCCESS (2)
#define | TLS_FWUP_REQ_STATUS_FIO (3)
#define | TLS_FWUP_REQ_STATUS_FSIGNATURE (4)
#define | TLS_FWUP_REQ_STATUS_FMEM (5)
#define | TLS_FWUP_REQ_STATUS_FCRC (6)
#define | TLS_FWUP_REQ_STATUS_FCOMPLETE (7)
#define | TLS_FWUP_STATE_UNDEF (0xffff)
#define | TLS_FWUP_STATE_BUSY (1 << 0)
#define | TLS_FWUP_STATE_COMPLETE (1 << 1)
#define | TLS_FWUP_STATE_ERROR_IO (1 << 2)
#define | TLS_FWUP_STATE_ERROR_SIGNATURE (1 << 3)
#define | TLS_FWUP_STATE_ERROR_MEM (1 << 4)
#define | TLS_FWUP_STATE_ERROR_CRC (1 << 5)
#define | TLS_FWUP_STATE_ERROR (TLS_FWUP_STATE_ERROR_IO | TLS_FWUP_STATE_ERROR_SIGNATURE | TLS_FWUP_STATE_ERROR_MEM | TLS_FWUP_STATE_ERROR_CRC)
#define | TLS_FWUP_DEST_SPECIFIC_FIRMWARE (0)
#define | TLS_FWUP_DEST_SPECIFIC_DATA (1)

Typedefs

typedef struct IMAGE_HEADER_PARAM IMAGE_HEADER_PARAM_ST

Enumerations

enum | IMAGE_TYPE_ENUM { IMG_TYPE_SECBOOT = 0x0, IMG_TYPE_FLASHBIN0 = 0x1, IMG_TYPE_CPFT = 0xE }
enum | { NOT_ZIP_FILE = 0, ZIP_FILE = 1 }
enum | tls_fwup_image_src { TLS_FWUP_IMAGE_SRC_LUART = 0, TLS_FWUP_IMAGE_SRC_HUART, TLS_FWUP_IMAGE_SRC_HSPI, TLS_FWUP_IMAGE_SRC_WEB }

Functions

int | tls_fwup_init (void)
This function is used to initialize firmware update task. More...
u32 | tls_fwup_enter (enum tls_fwup_image_src image_src)
This function is used to enter firmware update progress. More...
int | tls_fwup_exit (u32 session_id)
This function is used to exit firmware update progress. More...
int | tls_fwup_request_sync (u32 session_id, u8 *data, u32 data_len)
This function is used to start update progress. More...
u16 | tls_fwup_current_state (u32 session_id)
This function is used to get current update status. More...
int | tls_fwup_reset (u32 session_id)
This function is used to reset the update information. More...
int | tls_fwup_clear_error (u32 session_id)
This function is used to clear error update state. More...
int | tls_fwup_set_crc_error (u32 session_id)
This function is used to set update state to TLS_FWUP_STATE_ERROR_CRC. More...
int | tls_fwup_get_status (void)
This function is used to get progress's status. More...
int | tls_fwup_set_update_numer (int number)
This function is used to set update packet number. More...
int | tls_fwup_get_current_update_numer (void)
This function is used to get received update packet number. More...
int | tls_fwup_get_current_session_id (void)
This function is used to get current session id. More...
int | tls_fwup_img_header_check (IMAGE_HEADER_PARAM_ST *img_param)
This function is used to check image header. More...

Detailed Description

Firmware upgrade.

Author
winnermicro

Copyright (c) 2015 Winner Microelectronics Co., Ltd.

Macro Definition Documentation

◆ TLS_FWUP_BLK_SIZE

#define TLS_FWUP_BLK_SIZE 512

firmware block size for one time

◆ TLS_FWUP_DEST_SPECIFIC_FIRMWARE

#define TLS_FWUP_DEST_SPECIFIC_FIRMWARE (0)

update type 0:firmware, 1: data

◆ TLS_FWUP_REQ_STATUS_IDLE

#define TLS_FWUP_REQ_STATUS_IDLE (0)

firmware update request status

◆ TLS_FWUP_STATE_UNDEF

#define TLS_FWUP_STATE_UNDEF (0xffff)

firmware update state

◆ TLS_FWUP_STATUS_OK

#define TLS_FWUP_STATUS_OK (0)

firmware update status

Enumeration Type Documentation

◆ tls_fwup_image_src

enum tls_fwup_image_src

Enumeration for image soure when firmware update

Enumerator
TLS_FWUP_IMAGE_SRC_LUART | LOW SPEED UART
TLS_FWUP_IMAGE_SRC_HUART | HIGH SPEED UART
TLS_FWUP_IMAGE_SRC_HSPI | HIGH SPEED SPI
TLS_FWUP_IMAGE_SRC_WEB | WEB SERVER


W800 SDK APIs: doxy_out/include/platform/wm_mem.h Source File

  • doxy_out
  • include
  • platform
wm_mem.h
1 /*****************************************************************************
2 *
3 * File Name : wm_mem.h
4 *
5 * Description: memory manager Module
6 *
7 * Copyright (c) 2014 Winner Micro Electronic Design Co., Ltd.
8 * All rights reserved.
9 *
10 * Author : dave
11 *
12 * Date : 2014-6-12
13 *****************************************************************************/
14
15
16 #ifndef WM_MEM_H
17 #define WM_MEM_H
18
19 #include "csi_config.h"
20 #include "wm_type_def.h"
21
22 #if 1//for doxygen
23 //#ifdef CONFIG_KERNEL_FREERTOS
24 //#define WM_MEM_DEBUG 1
25 #if WM_MEM_DEBUG
26
27 #include "../list.h"
28
29 #define MEM_HEADER_PATTERN 0x76028412
30 #define MEM_TAILER_PATTERN 0x83395627
31 #define MEM_FREED_PATTERN 0x82962503
32
33 extern u32 alloc_heap_mem_bytes;
34 extern u32 alloc_heap_mem_blk_cnt;
35 extern u32 alloc_heap_mem_max_size;
36
37 //
38 // Note: it's important that the size of MP_MEMORY_BLOCK structure
39 // be multiple of 16 bytes.
40 //
41 typedef struct _MEMORY_BLOCK {
42
43 struct dl_list list;
44 char *file;
45 u32 pad;
46 u32 line;
47 u32 length;
48 u32 header_pattern;
49 } MEMORY_BLOCK, *PMEMORY_BLOCK;
50 typedef struct _MEMORY_PATTERN{
51 u32 pattern0;
52 //u32 pattern1;
53 //u32 pattern2;
54 //u32 pattern3;
55 }MEMORY_PATTERN, *PMEMORY_PATTERN;
56 void mem_free_debug(void *p, char* file, int line);
57 #define tls_mem_free(p) mem_free_debug( p, __FILE__, __LINE__)
58 void *mem_alloc_debug(u32 size, char* file, int line);
59 void mem_free_allocated_blocks(void);
60 #define tls_mem_alloc(size) mem_alloc_debug(size, __FILE__, __LINE__)
61 void * mem_realloc_debug(void *mem_address, u32 size, char* file, int line);
62 #define tls_mem_realloc(mem_address, size) mem_realloc_debug(mem_address, size, __FILE__, __LINE__)
63
64 void *mem_calloc_debug(u32 n,u32 size,char * file,int line);
65 #define tls_mem_calloc(n, size) mem_calloc_debug(n, size, __FILE__, __LINE__)
66 void tls_mem_alloc_info(void);
67 int is_safe_addr_debug(void* p, u32 len, char* file, int line);
68 #define tls_is_safe_addr(p, len) is_safe_addr_debug(p, len, __FILE__, __LINE__)
69 #if 1
70 #define MEMCPY memcpy
71 #define SMEMCPY MEMCPY
72 #else
73 #define MEMCPY(dst,src,len) do { \
74 if(tls_is_safe_addr(dst, len)){ \
75 memcpy(dst,src,len);}}while(0)
76
77 #define SMEMCPY(dst,src,len) do { \
78 if(tls_is_safe_addr(dst, len)){ \
79 memcpy(dst,src,len);}}while(0)
80 #endif
81 #else /* WM_MEM_DEBUG */
82
83 void * mem_alloc_debug(u32 size);
84 void mem_free_debug(void *p);
85 void * mem_realloc_debug(void *mem_address, u32 size);
86 void *mem_calloc_debug(u32 length, u32 size);
87
118 #define tls_mem_alloc(size) mem_alloc_debug(size)
119
129 #define tls_mem_free mem_free_debug
130
141 #define tls_mem_realloc mem_realloc_debug
142
153 #define tls_mem_calloc mem_calloc_debug
154
166 #define MEMCPY(dst,src,len) memcpy(dst,src,len)
167 //#define MEMCPY(dst,src,len) do{extern void delay_cnt(int count); delay_cnt(10); memcpy(dst,src,len); delay_cnt(100); }while(0)
168
180 #define SMEMCPY(dst,src,len) memcpy(dst,src,len)
181
190 #endif /* WM_MEM_DEBUG */
191 #else /* CONFIG_KERNEL_FREERTOS */
192 #define tls_mem_alloc(size) malloc(size)
193 #define tls_mem_free free
194 #define tls_mem_realloc realloc
195 #define tls_mem_calloc calloc
196 #define MEMCPY(dst,src,len) memcpy(dst,src,len)
197 #define SMEMCPY(dst,src,len) memcpy(dst,src,len)
198 #endif /* CONFIG_KERNEL_FREERTOS */
199
200 #endif /* TLS_MEM_H */
201
dl_list
Definition: list.h:22
wm_type_def.h
WM type redefine.


W800 SDK APIs: doxy_out/include/platform/wm_params.h File Reference

  • doxy_out
  • include
  • platform
Data Structures | Macros | Typedefs | Functions
wm_params.h File Reference

param manager Module More...

#include "wm_type_def.h"

Go to the source code of this file.

Data Structures

struct | tls_param_hardware_version
struct | tls_param_bssid
struct | tls_param_ssid
struct | tls_param_tem_offset
struct | tls_param_key
struct | tls_param_original_key
struct | tls_param_sha1
struct | tls_param_bgr
struct | tls_param_ip
struct | tls_param_uart
struct | tls_param_socket
struct | tls_param_wps
struct | tls_param_oray_client
struct | tls_webs_cfg
struct | tls_user_param
struct | bt_adapter_t
struct | bt_remote_device_t

Macros

#define | TLS_PARAM_STATUS_OK (0)
#define | TLS_PARAM_STATUS_EINVALID (1)
#define | TLS_PARAM_STATUS_EMEM (2)
#define | TLS_PARAM_STATUS_EIO (3)
#define | TLS_PARAM_STATUS_EPERM (4)
#define | TLS_PARAM_STATUS_EINVALIDID (5)
#define | TLS_PARAM_INIT_MAGIC (0xffffffff)
#define | TLS_PARAM_MAGIC (0x4947414d)
#define | TLS_PARAM_PARTITION_NUM (2)
#define | TLS_PARAM_ID_ALL (-1)
#define | TLS_PARAM_ID_SSID (0)
#define | TLS_PARAM_ID_ENCRY (1)
#define | TLS_PARAM_ID_KEY (2)
#define | TLS_PARAM_ID_IP (3)
#define | TLS_PARAM_ID_AUTOMODE (4)
#define | TLS_PARAM_ID_DEFSOCKET (5)
#define | TLS_PARAM_ID_BSSID (6)
#define | TLS_PARAM_ID_CHANNEL (7)
#define | TLS_PARAM_ID_CHANNEL_EN (8)
#define | TLS_PARAM_ID_COUNTRY_REGION (9)
#define | TLS_PARAM_ID_WPROTOCOL (10)
#define | TLS_PARAM_ID_ADHOC_AUTOCREATE (11)
#define | TLS_PARAM_ID_ROAMING (12)
#define | TLS_PARAM_ID_AUTO_RETRY_CNT (13)
#define | TLS_PARAM_ID_WBGR (14)
#define | TLS_PARAM_ID_USRINTF (15)
#define | TLS_PARAM_ID_AUTO_TRIGGER_LENGTH (16)
#define | TLS_PARAM_ID_DEBUG_MODE (17)
#define | TLS_PARAM_ID_HARDVERSION (18)
#define | TLS_PARAM_ID_BRDSSID (19)
#define | TLS_PARAM_ID_DNSNAME (20)
#define | TLS_PARAM_ID_DEVNAME (21)
#define | TLS_PARAM_ID_PSM (22)
#define | TLS_PARAM_ID_ORAY_CLIENT (23)
#define | TLS_PARAM_ID_UPNP (24)
#define | TLS_PARAM_ID_UART (26)
#define | TLS_PARAM_ID_WPS (27)
#define | TLS_PARAM_ID_AUTO_TRIGGER_PERIOD (28)
#define | TLS_PARAM_ID_ESCAPE_CHAR (29)
#define | TLS_PARAM_ID_ESCAPE_PERIOD (30)
#define | TLS_PARAM_ID_IO_MODE (31)
#define | TLS_PARAM_ID_CMD_MODE (32)
#define | TLS_PARAM_ID_PASSWORD (33)
#define | TLS_PARAM_ID_CHANNEL_LIST (34)
#define | TLS_PARAM_ID_WEBS_CONFIG (35)
#define | TLS_PARAM_ID_ONESHOT_CFG (36)
#define | TLS_PARAM_ID_SHA1 (37)
#define | TLS_PARAM_ID_ORIGIN_KEY (38)
#define | TLS_PARAM_ID_ORIGIN_SSID (39)
#define | TLS_PARAM_ID_AUTO_RECONNECT (40)
#define | TLS_PARAM_ID_QUICK_CONNECT (41)
#define | TLS_PARAM_ID_KEY_CHANGE (42)
#define | TLS_PARAM_ID_SSID_CHANGE (43)
#define | TLS_PARAM_ID_SOFTAP_SSID (44)
#define | TLS_PARAM_ID_SOFTAP_PSK (45)
#define | TLS_PARAM_ID_SOFTAP_ENCRY (46)
#define | TLS_PARAM_ID_SOFTAP_KEY (47)
#define | TLS_PARAM_ID_SOFTAP_IP (48)
#define | TLS_PARAM_ID_SOFTAP_CHANNEL (49)
#define | TLS_PARAM_ID_SOFTAP_WBGR (50)
#define | TLS_PARAM_ID_SNTP_SERVER1 (51)
#define | TLS_PARAM_ID_SNTP_SERVER2 (52)
#define | TLS_PARAM_ID_SNTP_SERVER3 (53)
#define | TLS_PARAM_ID_TEM_OFFSET (54)
#define | TLS_PARAM_ID_BT_ADAPTER (55)
#define | TLS_PARAM_ID_BT_REMOTE_DEVICE_1 (56)
#define | TLS_PARAM_ID_BT_REMOTE_DEVICE_2 (57)
#define | TLS_PARAM_ID_BT_REMOTE_DEVICE_3 (58)
#define | TLS_PARAM_ID_BT_REMOTE_DEVICE_4 (59)
#define | TLS_PARAM_ID_BT_REMOTE_DEVICE_5 (60)
#define | TLS_PARAM_ID_BT_REMOTE_DEVICE_6 (61)
#define | TLS_PARAM_ID_BT_REMOTE_DEVICE_7 (62)
#define | TLS_PARAM_ID_BT_REMOTE_DEVICE_8 (63)
#define | TLS_PARAM_ID_BT_REMOTE_DEVICE_9 (64)
#define | TLS_PARAM_ID_BT_REMOTE_DEVICE_10 (65)
#define | TLS_PARAM_ID_MAX (66)
#define | TLS_PARAM_PHY_11BG_MIXED (0)
#define | TLS_PARAM_PHY_11B (1)
#define | TLS_PARAM_PHY_11BGN_MIXED (2)
#define | TLS_PARAM_TX_RATEIDX_1M (0)
#define | TLS_PARAM_TX_RATEIDX_2M (1)
#define | TLS_PARAM_TX_RATEIDX_5_5M (2)
#define | TLS_PARAM_TX_RATEIDX_11M (3)
#define | TLS_PARAM_TX_RATEIDX_6M (4)
#define | TLS_PARAM_TX_RATEIDX_9M (5)
#define | TLS_PARAM_TX_RATEIDX_12M (6)
#define | TLS_PARAM_TX_RATEIDX_18M (7)
#define | TLS_PARAM_TX_RATEIDX_24M (8)
#define | TLS_PARAM_TX_RATEIDX_36M (9)
#define | TLS_PARAM_TX_RATEIDX_48M (10)
#define | TLS_PARAM_TX_RATEIDX_54M (11)
#define | TLS_PARAM_TX_RATEIDX_MCS0 (12)
#define | TLS_PARAM_TX_RATEIDX_MCS1 (13)
#define | TLS_PARAM_TX_RATEIDX_MCS2 (14)
#define | TLS_PARAM_TX_RATEIDX_MCS3 (15)
#define | TLS_PARAM_TX_RATEIDX_MCS4 (16)
#define | TLS_PARAM_TX_RATEIDX_MCS5 (17)
#define | TLS_PARAM_TX_RATEIDX_MCS6 (18)
#define | TLS_PARAM_TX_RATEIDX_MCS7 (19)
#define | TLS_PARAM_TX_RATEIDX_MCS8 (20)
#define | TLS_PARAM_TX_RATEIDX_MCS9 (21)
#define | TLS_PARAM_TX_RATEIDX_MCS10 (22)
#define | TLS_PARAM_TX_RATEIDX_MCS11 (23)
#define | TLS_PARAM_TX_RATEIDX_MCS12 (24)
#define | TLS_PARAM_TX_RATEIDX_MCS13 (25)
#define | TLS_PARAM_TX_RATEIDX_MCS14 (26)
#define | TLS_PARAM_TX_RATEIDX_MCS15 (27)
#define | TLS_PARAM_TX_RATEIDX_MCS32 (28)
#define | TLS_PARAM_SSIDBRD_DISABLE (0)
#define | TLS_PARAM_SSIDBRD_ENABLE (1)
#define | TLS_PARAM_ROAM_DISABLE (0)
#define | TLS_PARAM_ROAM_ENABLE (1)
#define | TLS_PARAM_PSM_DISABLE (0)
#define | TLS_PARAM_PSM_ENABLE (1)
#define | TLS_PARAM_DDNS_DISABLE (0)
#define | TLS_PARAM_DDNS_ENABLE (1)
#define | TLS_PARAM_AUTO_CREATE_ADHOC_DISABLE (0)
#define | TLS_PARAM_AUTO_CREATE_ADHOC_ENABLE (1)
#define | TLS_PARAM_WPS_DISABLE (0)
#define | TLS_PARAM_WPS_ENABLE (1)
#define | TLS_PARAM_WPS_MODE_PIN (0)
#define | TLS_PARAM_WPS_MODE_PBC (1)
#define | TLS_PARAM_WPS_FLAG_NEGOTIATED (1 << 0)
#define | TLS_PARAM_UPNP_DISABLE (0)
#define | TLS_PARAM_UPNP_ENABLE (1)
#define | TLS_PARAM_IEEE80211_INFRA (1)
#define | TLS_PARAM_IEEE80211_ADHOC (2)
#define | TLS_PARAM_IEEE80211_SOFTAP (4)
#define | TLS_PARAM_MANUAL_MODE (0)
#define | TLS_PARAM_AUTO_MODE (1)
#define | TLS_PARAM_ALWAYS_ONLINE_ENABLE (1)
#define | TLS_PARAM_ALWAYS_ONLINE_DISABLE (0)
#define | TLS_PARAM_DHCP_ENABLE (1)
#define | TLS_PARAM_DHCP_DISABLE (0)
#define | TLS_PARAM_REGION_0_BG_BAND (0) /* 1-11 */
#define | TLS_PARAM_REGION_1_BG_BAND (1) /* 1-13 */
#define | TLS_PARAM_REGION_2_BG_BAND (2) /* 10-11 */
#define | TLS_PARAM_REGION_3_BG_BAND (3) /* 10-13 */
#define | TLS_PARAM_REGION_4_BG_BAND (4) /* 14 */
#define | TLS_PARAM_REGION_5_BG_BAND (5) /* 1-14 */
#define | TLS_PARAM_REGION_6_BG_BAND (6) /* 3-9 */
#define | TLS_PARAM_REGION_7_BG_BAND (7) /* 5-13 */
#define | TLS_PARAM_REGION_MAXIMUM_BG_BAND TLS_PARAM_REGION_7_BG_BAND
#define | TLS_PARAM_ENCRY_OPEN (0)
#define | TLS_PARAM_ENCRY_WEP64 (1)
#define | TLS_PARAM_ENCRY_WEP128 (2)
#define | TLS_PARAM_ENCRY_WPA_PSK_TKIP (3)
#define | TLS_PARAM_ENCRY_WPA_PSK_AES (4)
#define | TLS_PARAM_ENCRY_WPA2_PSK_TKIP (5)
#define | TLS_PARAM_ENCRY_WPA2_PSK_AES (6)
#define | TLS_PARAM_USR_INTF_LUART (0)
#define | TLS_PARAM_USR_INTF_HUART (1)
#define | TLS_PARAM_USR_INTF_HSPI (2)
#define | TLS_PARAM_USR_INTF_HSDIO (3)
#define | TLS_PARAM_UART_BAUDRATE_B600 (600)
#define | TLS_PARAM_UART_BAUDRATE_B1200 (1200)
#define | TLS_PARAM_UART_BAUDRATE_B1800 (1800)
#define | TLS_PARAM_UART_BAUDRATE_B2400 (2400)
#define | TLS_PARAM_UART_BAUDRATE_B4800 (4800)
#define | TLS_PARAM_UART_BAUDRATE_B9600 (9600)
#define | TLS_PARAM_UART_BAUDRATE_B19200 (19200)
#define | TLS_PARAM_UART_BAUDRATE_B38400 (38400)
#define | TLS_PARAM_UART_BAUDRATE_B57600 (57600)
#define | TLS_PARAM_UART_BAUDRATE_B115200 (115200)
#define | TLS_PARAM_HUART_BAUDRATE_B230400 (230400)
#define | TLS_PARAM_HUART_BAUDRATE_B460800 (460800)
#define | TLS_PARAM_HUART_BAUDRATE_B921600 (921600)
#define | TLS_PARAM_HUART_BAUDRATE_B1000000 (1000000)
#define | TLS_PARAM_HUART_BAUDRATE_B1250000 (1250000)
#define | TLS_PARAM_HUART_BAUDRATE_B1500000 (1500000)
#define | TLS_PARAM_HUART_BAUDRATE_B2000000 (2000000)
#define | TLS_PARAM_UART_PARITY_NONE (0)
#define | TLS_PARAM_UART_PARITY_EVEN (1)
#define | TLS_PARAM_UART_PARITY_ODD (2)
#define | TLS_PARAM_UART_PARITY_MARK (3)
#define | TLS_PARAM_UART_PARITY_SPACE (4)
#define | TLS_PARAM_UART_STOPBITS_1BITS (0)
#define | TLS_PARAM_UART_STOPBITS_2BITS (1)
#define | TLS_PARAM_UART_FLOW_DISABLE (0)
#define | TLS_PARAM_UART_FLOW_ENABLE (1)
#define | TLS_PARAM_HSPI_MAX_SCLK (33000000)
#define | TLS_PARAM_SOCKET_TCP (0)
#define | TLS_PARAM_SOCKET_UDP (1)
#define | TLS_PARAM_SOCKET_CLIENT (0)
#define | TLS_PARAM_SOCKET_SERVER (1)
#define | TLS_PARAM_SOCKET_DEFAULT_PORT (60000)

Typedefs

typedef struct tls_user_param ST_Wm_User_Param

Functions

int | tls_param_init (void)
This function is used to initialize parameter's manage module. More...
void | tls_param_load_factory_default (void)
This function is used to load the system's default parameters. More...
int | tls_param_set (int id, void *argv, bool to_flash)
This function is used to set one system parameter by its id. More...
int | tls_param_get (int id, void *argv, bool from_flash)
This function is used to get one system parameter by its id. More...
int | tls_param_to_flash (int id)
This function is used to write parameter into flash. More...
void | tls_restore_param_from_backup (void)
This function is used to recovery the parameters from the backup area to the parameter area,and load them into ram. More...
int | tls_param_to_default (void)
This function is used to load default parametes into ram. More...
int | tls_param_save_user_default (void)
This function is used to write user's parameters into the flash. More...
int | tls_param_save_user (struct tls_user_param *user_param)
This function is used to modify user's default parameters, then write them into flash. More...
u8 | tls_param_get_updp_mode (void)
This function is used to get updp mode.(updp:update user default parameters) More...
void | tls_param_set_updp_mode (u8 mode)
This function is used to set updp mode. More...
int | tls_param_get_program_param (u32 *pBase)
This function is used to get program param. More...
int | tls_param_set_program_param (u32 base, u32 totallen, u32 checksum)
This function is used to set program base,image len,and checksum. More...
int | tls_param_get_bt_param_address (int id, int from_flash)
This function is used to get bt param offset located in system param area. More...

Detailed Description

param manager Module

Author
winnermicro

Copyright (c) 2015 Winner Microelectronics Co., Ltd.

Macro Definition Documentation

◆ TLS_PARAM_DHCP_ENABLE

#define TLS_PARAM_DHCP_ENABLE (1)

MACRO of DHCP ENABLE or DISABLE

◆ TLS_PARAM_ENCRY_OPEN

#define TLS_PARAM_ENCRY_OPEN (0)

MACRO of ENCRYPT TYPE

◆ TLS_PARAM_ID_ALL

#define TLS_PARAM_ID_ALL (-1)

MACRO of parameter identity

◆ TLS_PARAM_ID_BT_ADAPTER

#define TLS_PARAM_ID_BT_ADAPTER (55)

BT&BLE param

◆ TLS_PARAM_IEEE80211_INFRA

#define TLS_PARAM_IEEE80211_INFRA (1)

MACRO of IEEE802.11 Work MODE

◆ TLS_PARAM_INIT_MAGIC

#define TLS_PARAM_INIT_MAGIC (0xffffffff)

MACRO of Magic number initial value

◆ TLS_PARAM_MAGIC

#define TLS_PARAM_MAGIC (0x4947414d)

MACRO of Magic number valid value

◆ TLS_PARAM_MANUAL_MODE

#define TLS_PARAM_MANUAL_MODE (0)

MACRO of Command or Transparent Mode

◆ TLS_PARAM_PARTITION_NUM

#define TLS_PARAM_PARTITION_NUM (2)

MACRO of parameter partition number

◆ TLS_PARAM_PHY_11BG_MIXED

#define TLS_PARAM_PHY_11BG_MIXED (0)

MACRO of Physical moe of Ieee802.11

◆ TLS_PARAM_PSM_DISABLE

#define TLS_PARAM_PSM_DISABLE (0)

MACRO of Power Saving Mode

◆ TLS_PARAM_REGION_0_BG_BAND

#define TLS_PARAM_REGION_0_BG_BAND (0) /* 1-11 */

MACRO of COUNTRY CODE for channel number

◆ TLS_PARAM_SOCKET_TCP

#define TLS_PARAM_SOCKET_TCP (0)

MACRO of SOCKET PARAMETER

◆ TLS_PARAM_SSIDBRD_DISABLE

#define TLS_PARAM_SSIDBRD_DISABLE (0)

MACRO of SSID Broadcast

◆ TLS_PARAM_TX_RATEIDX_1M

#define TLS_PARAM_TX_RATEIDX_1M (0)

MACRO of Ieee802.11 Tx Rate for parameter set

◆ TLS_PARAM_UART_BAUDRATE_B600

#define TLS_PARAM_UART_BAUDRATE_B600 (600)

MACRO of UART BAUDRATE

◆ TLS_PARAM_UART_FLOW_DISABLE

#define TLS_PARAM_UART_FLOW_DISABLE (0)

MACRO of UART FLOW CONTROL

◆ TLS_PARAM_UART_PARITY_NONE

#define TLS_PARAM_UART_PARITY_NONE (0)

MACRO of UART PARITY

◆ TLS_PARAM_UART_STOPBITS_1BITS

#define TLS_PARAM_UART_STOPBITS_1BITS (0)

MACRO of UART STOP BITS

◆ TLS_PARAM_USR_INTF_LUART

#define TLS_PARAM_USR_INTF_LUART (0)

MACRO of USER INTERFACE TYPE

Typedef Documentation

◆ ST_Wm_User_Param

typedef struct tls_user_param ST_Wm_User_Param

Structure of user default parameter


W800 SDK APIs: doxy_out/include/platform/wm_wl_mbox.h File Reference

  • doxy_out
  • include
  • platform
Macros | Typedefs | Functions
wm_wl_mbox.h File Reference

mailbox (mbox) APIs More...

#include "wm_type_def.h"
#include "wm_osal.h"

Go to the source code of this file.

Macros

#define SYS_ARCH_TIMEOUT 0xffffffffUL

Typedefs

typedef tls_os_queue_t * tls_mbox_t

Functions

s8 | tls_mbox_new (tls_mbox_t *mbox, int size)
Create a malibox. More...
int | tls_mbox_valid (tls_mbox_t mbox)
Check if an mbox is valid/allocated. More...
void | tls_mbox_post (tls_mbox_t mbox, void *msg)
Sends a message to a mailbox. More...
s8 | tls_mbox_trypost (tls_mbox_t mbox, void *msg)
Posts the msg to the mailbox. More...
u32 | tls_arch_mbox_fetch (tls_mbox_t mbox, void **msg, u32 timeout)
Waits for a message within specified time. More...

Detailed Description

mailbox (mbox) APIs

Author
dave

Copyright (c) 2015 Winner Microelectronics Co., Ltd.

Macro Definition Documentation

◆ SYS_ARCH_TIMEOUT

#define SYS_ARCH_TIMEOUT 0xffffffffUL

max value of time out

Typedef Documentation

◆ tls_mbox_t

typedef tls_os_queue_t* tls_mbox_t

pointer to the mailbox

Function Documentation

◆ tls_arch_mbox_fetch()

u32 tls_arch_mbox_fetch | ( | tls_mbox_t | mbox,
 |  | void ** | msg,
 |  | u32 | timeout
 | ) |  |

Waits for a message within specified time.

Parameters
[in] | mbox | pointer to the mailbox
[out] | **msg | pointer to the message to be received
[in] | timeout | the specified time
Return values
SYS_ARCH_TIMEOUT | time out
other | time of elapsed
Note
None

◆ tls_mbox_new()

s8 tls_mbox_new | ( | tls_mbox_t * | mbox,
 |  | int | size
 | ) |  |

Create a malibox.

Parameters
[out] | *mbox | pointer to the mailbox
[in] | size | size of mailbox
Return values
TLS_OS_SUCCESS | success
TLS_OS_ERROR | failed
Note
None

◆ tls_mbox_post()

void tls_mbox_post | ( | tls_mbox_t | mbox,
 |  | void * | msg
 | ) |  |

Sends a message to a mailbox.

Parameters
[in] | mbox | pointer to the mailbox
[in] | *msg | pointer to the message to be post
Returns
None
Note
None

◆ tls_mbox_trypost()

s8 tls_mbox_trypost | ( | tls_mbox_t | mbox,
 |  | void * | msg
 | ) |  |

Posts the msg to the mailbox.

Parameters
[in] | mbox | pointer to the mailbox
[in] | *msg | pointer to the message to be post
Return values
TLS_OS_SUCCESS | success
TLS_OS_ERROR | failed
Note
this function have to block until the "msg" is really posted.

◆ tls_mbox_valid()

int tls_mbox_valid ( tls_mbox_t mbox )

Check if an mbox is valid/allocated.

Parameters
[in] mbox pointer to the mailbox
Return values
0 | invalid
1 | valid
Note
None


W800 SDK APIs: doxy_out/include/platform/wm_wl_task.h File Reference

  • doxy_out
  • include
  • platform
Data Structures | Macros | Typedefs | Enumerations | Functions
wm_wl_task.h File Reference

task APIs More...

#include "wm_type_def.h"
#include "wm_wl_mbox.h"
#include "wm_wl_timers.h"

Go to the source code of this file.

Data Structures

struct | task_msg
struct | task_parameter

Macros

#define | TLS_TASK_START_PRIO 0
#define | TASK_WL_PRIO 9
#define | TASK_WL_PRIO_MAX 12
#define | TLS_SUPPLICANT_TASK_PRIO (TASK_WL_PRIO_MAX + 1)
#define | TLS_SUPPLICANT_TIMER_TASK_PRIO (TASK_WL_PRIO_MAX + 2)
#define | TLS_LWIP_TASK_PRIO (TASK_WL_PRIO_MAX + 3)
#define | TLS_SYS_TASK_PRIO (TASK_WL_PRIO_MAX + 5)
#define | TLS_HOSTIF_TASK_PRIO (TASK_WL_PRIO_MAX + 6)
#define | TLS_SPI_SCHEDULER_TASK_PRIO (TASK_WL_PRIO_MAX + 7)
#define | TLS_FWUP_TASK_PRIO (TASK_WL_PRIO_MAX + 8)
#define | TLS_HTTP_CLIENT_TASK_PRIO (TASK_WL_PRIO_MAX + 9)
#define | AP_SOCKET_S_TASK_PRIO (TASK_WL_PRIO_MAX + 10)
#define | TLS_UPNP_TASK_PRIO (TASK_WL_PRIO_MAX + 11)
#define | TLS_ONESHOT_TASK_PRIO (TASK_WL_PRIO_MAX + 15)
#define | TLS_ONESHOT_SPEC_TASK_PRIO (TASK_WL_PRIO_MAX + 16)
#define | TLS_MBOX_ALL_COUNT 8
#define | TLS_MBOX_ID_WL_TASK 0
#define | TLS_MBOX_ID_HOSTIF_TASK 1
#define | TLS_MBOX_ID_JDCLOUD_SERVER 2
#define | TLS_MBOX_ID_JDCLOUD_DATA 3
#define | TLS_MBOX_ID_UPNP_HD 4
#define | TLS_MBOX_ID_UPNP_COMMON 5
#define | TLS_MBOX_ID_UPNP_GENA 6
#define | TLS_MBOX_ID_UPNP_MINISERVER 7
#define | TLS_TIMEO_ALL_COUONT 9
#define | TLS_TIMEO_ID_NULL 0
#define | TLS_TIMEO_ID_WL_TASK 1
#define | TLS_TIMEO_ID_HOSTIF_TASK 2
#define | TLS_TIMEO_ID_JDCLOUD_SERVER 3
#define | TLS_TIMEO_ID_JDCLOUD_DATA 4
#define | TLS_TIMEO_ID_UPNP_HD 5
#define | TLS_TIMEO_ID_UPNP_COMMON 6
#define | TLS_TIMEO_ID_UPNP_GENA 7
#define | TLS_TIMEO_ID_UPNP_MINISERVER 8
#define | TLS_MSG_ALL_COUONT 9
#define | TLS_MSG_ID_TX_MGMT_CMPLT 0
#define | TLS_MSG_ID_MLME_TASK 1
#define | TLS_MSG_ID_UART_SENT_FREE 2
#define | TLS_MSG_ID_UART0_RX 3
#define | TLS_MSG_ID_HSPI_RX_CMD 4
#define | TLS_MSG_ID_HSPI_RX_DATA 5
#define | TLS_MSG_ID_HSPI_TX_DATA 6
#define | TLS_MSG_ID_TX_DATA_CMPLT 7
#define | TLS_MSG_ID_UART1_RX 8

Typedefs

typedef tls_os_sem_t * | tls_sem_t
typedef void *(* | start_routine) (void *arg)

Enumerations

enum task_msg_type {
TASK_MSG_TIMEOUT, TASK_MSG_UNTIMEOUT, TASK_MSG_CALLBACK_WITH_BLOCK, TASK_MSG_CALLBACK,
TASK_MSG_CALLBACK_STATIC, TASK_MSG_NULL
}

Functions

s8 | tls_wl_task_init (void)
Task initialized. More...
s8 | tls_wl_task_run (struct task_parameter *task_param)
Running the task. More...
s8 | tls_wl_task_callback_static (struct task_parameter *task_param, start_routine function, void *ctx, u8 block, u8 msg_id)
Running the callback function. More...
s8 | tls_wl_task_callback (struct task_parameter *task_param, start_routine function, void *ctx, u8 block)
Running the callback function. More...
s8 | tls_wl_task_add_timeout (struct task_parameter *task_param, u32 msecs, tls_timeout_handler h, void *arg)
Add a timer to the task. More...
s8 | tls_wl_task_untimeout (struct task_parameter *task_param, tls_timeout_handler h, void *arg)
Stop or delay the timer to expire. More...

Detailed Description

task APIs

Author
dave

Copyright (c) 2015 Winner Microelectronics Co., Ltd.

Typedef Documentation

◆ start_routine

typedef void*(* start_routine) (void *arg)

Thread start routine

◆ tls_sem_t

typedef tls_os_sem_t* tls_sem_t

pointer to the semaphore

Enumeration Type Documentation

◆ task_msg_type

enum task_msg_type

message type of task

Function Documentation

◆ tls_wl_task_add_timeout()

s8 tls_wl_task_add_timeout | ( | struct task_parameter * | task_param,
 |  | u32 | msecs,
 |  | tls_timeout_handler | h,
 |  | void * | arg
 | ) |  |

Add a timer to the task.

Parameters
[in] | *task_param | pointer to the task parameters
[in] | msecs | timer value
[in] | h | the callback function
[in] | *arg | parameter of the callback function
Return values
TLS_OS_SUCCESS | success
TLS_OS_ERROR | failed
Note
None

◆ tls_wl_task_callback()

s8 tls_wl_task_callback | ( | struct task_parameter * | task_param,
 |  | start_routine | function,
 |  | void * | ctx,
 |  | u8 | block
 | ) |  |

Running the callback function.

Parameters
[in] | *task_param | pointer to the task parameters
[in] | function | the callback function
[in] | *ctx | parameter of the callback function
[in] | block
Return values
TLS_OS_SUCCESS | success
TLS_OS_ERROR | failed
Note
None

◆ tls_wl_task_callback_static()

s8 tls_wl_task_callback_static | ( | struct task_parameter * | task_param,
 |  | start_routine | function,
 |  | void * | ctx,
 |  | u8 | block,
 |  | u8 | msg_id
 | ) |  |

Running the callback function.

Parameters
[in] | *task_param | pointer to the task parameters
[in] | function | the callback function
[in] | *ctx | parameter of the callback function
[in] | block
[in] | msg_id
Return values
TLS_OS_SUCCESS | success
TLS_OS_ERROR | failed
Note
None

◆ tls_wl_task_init()

s8 tls_wl_task_init ( void )

Task initialized.

Parameters
None
Return values
0 | success
other | failed
Note
None

◆ tls_wl_task_run()

s8 tls_wl_task_run ( struct task_parameter * task_param )

Running the task.

Parameters
[in] *task_param pointer to the task parameters
Return values
0 | success
other | failed
Note
None

◆ tls_wl_task_untimeout()

s8 tls_wl_task_untimeout | ( | struct task_parameter * | task_param,
 |  | tls_timeout_handler | h,
 |  | void * | arg
 | ) |  |

Stop or delay the timer to expire.

Parameters
[in] | *task_param | pointer to the task parameters
[in] | h | the callback function
[in] | *arg | parameter of the callback function
Return values
TLS_OS_SUCCESS | success
TLS_OS_ERROR | failed
Note
None


W800 SDK APIs: doxy_out/include/platform/wm_wl_timers.h File Reference

  • doxy_out
  • include
  • platform
Typedefs | Functions
wm_wl_timers.h File Reference

task APIs More...

#include "wm_type_def.h"
#include "wm_wl_mbox.h"

Go to the source code of this file.

Typedefs

typedef void(* tls_timeout_handler) (void *arg)

Functions

void | tls_timeout_p (u8 timeo_assigned, u32 msecs, tls_timeout_handler handler, void *arg)
Create a one-shot timer (aka timeout) More...
void | tls_untimeout_p (u8 timeo_assigned, tls_timeout_handler handler, void *arg)
Go through timeout list (for this task only) and remove the first matching entry, even though the timeout has not been triggered yet. More...
void | tls_timeouts_mbox_fetch_p (u8 timeo_assigned, tls_mbox_t mbox, void **msg)
Wait (forever) for a message to arrive in an mbox. While waiting, timeouts are processed. More...
s8 | tls_wl_timer_init (void)
Initialize the timer. More...

Detailed Description

task APIs

Author
dave

Copyright (c) 2015 Winner Microelectronics Co., Ltd.

Typedef Documentation

◆ tls_timeout_handler

typedef void(* tls_timeout_handler) (void *arg)

callback function of time out

Function Documentation

◆ tls_timeout_p()

void tls_timeout_p | ( | u8 | timeo_assigned,
 |  | u32 | msecs,
 |  | tls_timeout_handler | handler,
 |  | void * | arg
 | ) |  |

Create a one-shot timer (aka timeout)

Parameters
[in] | timeo_assigned | timer NO. by assigned
[in] | msecs | time in milliseconds after that the timer should expire
[in] | handler | callback function that would be called by the timeout
[in] | *arg | callback argument that would be passed to handler
Returns
None
Note
While waiting for a message using sys_timeouts_mbox_fetch()

◆ tls_timeouts_mbox_fetch_p()

void tls_timeouts_mbox_fetch_p | ( | u8 | timeo_assigned,
 |  | tls_mbox_t | mbox,
 |  | void ** | msg
 | ) |  |

Wait (forever) for a message to arrive in an mbox. While waiting, timeouts are processed.

Parameters
[in] | timeo_assigned | timer NO. by assigned
[in] | mbox | the mbox to fetch the message from
[out] | **msg | the place to store the message
Returns
None
Note
None

◆ tls_untimeout_p()

void tls_untimeout_p | ( | u8 | timeo_assigned,
 |  | tls_timeout_handler | handler,
 |  | void * | arg
 | ) |  |

Go through timeout list (for this task only) and remove the first matching entry, even though the timeout has not been triggered yet.

Parameters
[in] | timeo_assigned | timer NO. by assigned
[in] | handler | callback function that would be called by the timeout
[in] | *arg | callback argument that would be passed to handler
Returns
None
Note
None

◆ tls_wl_timer_init()

s8 tls_wl_timer_init ( void )

Initialize the timer.

Parameters
None
Return values
0 | success
other | failed
Note
None


W800 SDK APIs: doxy_out/include/wifi Directory Reference

  • doxy_out
  • include
  • wifi
wifi Directory Reference

Files

file | wm_ieee80211.h [code]
IEEE802.11 protocol type define.
file | wm_wifi.h [code]
Wi-Fi API.


W800 SDK APIs: doxy_out/include/wifi/litepoint.h Source File

  • doxy_out
  • include
  • wifi
litepoint.h
1 #ifndef __LITEPOINT_H
2 #define __LITEPOINT_H
3 #include "wm_type_def.h"
4 typedef struct _ltpt_rx_info
5 {
6 volatile int cnt_total;
7 volatile int cnt_good;
8 volatile int cnt_bad;
9 volatile unsigned char valid;
10 volatile unsigned char snr;
11 volatile unsigned char rcpi;
12 volatile unsigned char rate;
13 volatile unsigned char channel;
14 volatile unsigned char bandwidth;
15 volatile unsigned char bprocess;
16 }ltpt_rx_info;
17
18 typedef struct _ltpt_tx_info
19 {
20 volatile int cnt_total;
21 volatile int packetcount;
22 volatile int psdulen;
23 /* input parameters */
24 volatile unsigned char txgain;
25 volatile unsigned char datarate;
26 volatile unsigned char gimode;
27 volatile unsigned char greenfield;
28 volatile unsigned char rifs;
29 volatile unsigned char bprocess;
30 volatile unsigned char channel;
31 volatile unsigned char longpreamble;
32 }ltpt_tx_info;
33
34
35 enum Rate
36 {
37 S2M = 0x0000,
38 S5M5 = 0x0001,
39 S11M = 0x0002,
40 L1M = 0x0003,
41 L2M = 0x0004,
42 L5M5 = 0x0005,
43 L11M = 0x0006,
44 R06M = 0x0100,
45 R09M = 0x0101,
46 R12M = 0x0102,
47 R18M = 0x0103,
48 R24M = 0x0104,
49 R36M = 0x0105,
50 R48M = 0x0106,
51 R54M = 0x0107,
52 MCS0 = 0x0200,
53 MCS1 = 0x0201,
54 MCS2 = 0x0202,
55 MCS3 = 0x0203,
56 MCS4 = 0x0204,
57 MCS5 = 0x0205,
58 MCS6 = 0x0206,
59 MCS7 = 0x0207,
60 MCS8 = 0x0208,
61 MCS9 = 0x0209,
62 MCS10 = 0x0210,
63 MCS11 = 0x0211,
64 MCS12 = 0x0212,
65 MCS13 = 0x0213,
66 MCS14 = 0x0214,
67 MCS15 = 0x0215,
68 MCS32 = 0x0232,
69 };
70
71 extern volatile int g_ltpt_testmode;
72 extern ltpt_rx_info *g_ltpt_rxinfo;
73 extern ltpt_tx_info *g_ltpt_txinfo;
74 extern unsigned char hed_rf_txgainmap[];
75 extern const unsigned int hed_bbp_value[];
76
77 void tls_litepoint_start(void);
78 void tls_tx_send_litepoint(void);
79 void tls_set_test_channel(u8 channel, u8 bandwidth);
80 void tls_tx_litepoint_test_start(u32 tempcomp,u32 Packetcnt, u16 Psdulen, u32 Gain, u32 TxRate, u8 GiMode, u8 Gf, u8 Rifs);
81 void tls_txrx_litepoint_test_stop(void);
82 void tls_txrx_litepoint_clear_data(void);
83 int tls_tx_litepoint_test_get_totalsnd(void);
84 void tls_rx_litepoint_test_start(u32 Channel, u32 BandWidth);
85 void tls_rx_litepoint_test_result(u32 *total, u32 *goodcnt, u32 *badcnt);
86 void tls_tx_litepoint_param_update(u8 Gain, u8 TxRate);
87 void tls_rx_litepoint_test_rate(u8 rate);
88 void tls_rx_litepoint_pwr_result(u32 *valid, u32 *snr, u32 *rcpi);
89 void tls_tx_litepoint_period(u32 period);
90 u32 tls_get_tx_litepoint_period(void);
91 void tls_set_tx_litepoint_period(u32 period);
92 void tls_lp_notify_lp_tx_data(void);
93 #endif
_ltpt_tx_info
Definition: litepoint.h:18
_ltpt_rx_info
Definition: litepoint.h:4
wm_type_def.h
WM type redefine.


W800 SDK APIs: doxy_out/include/wifi/wm_ieee80211.h File Reference

  • doxy_out
  • include
  • wifi
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
wm_ieee80211.h File Reference

IEEE802.11 protocol type define. More...

Go to the source code of this file.

Data Structures

struct | ieee802_11_elems
struct | ieee80211_hdr
struct | ieee80211_hdr_3addr
struct | ieee80211_qos_hdr
struct | ieee80211_quiet_ie
struct | ieee80211_msrment_ie
struct | ieee80211_channel_sw_ie
struct | ieee80211_tim_ie
struct | ieee80211_rann_ie
struct | ieee80211_mgmt
struct | ieee80211_mmie
struct | ieee80211_rts
struct | ieee80211_cts
struct | ieee80211_pspoll
struct | ieee80211_bar
struct | ieee80211_mcs_info
struct | ieee80211_ht_cap
struct | ieee80211_ht_info
struct | ieee80211_country_ie_triplet

Macros

#define | FCS_LEN 4
#define | IEEE80211_FCTL_VERS 0x0003
#define | IEEE80211_FCTL_FTYPE 0x000c
#define | IEEE80211_FCTL_STYPE 0x00f0
#define | IEEE80211_FCTL_TODS 0x0100
#define | IEEE80211_FCTL_FROMDS 0x0200
#define | IEEE80211_FCTL_MOREFRAGS 0x0400
#define | IEEE80211_FCTL_RETRY 0x0800
#define | IEEE80211_FCTL_PM 0x1000
#define | IEEE80211_FCTL_MOREDATA 0x2000
#define | IEEE80211_FCTL_PROTECTED 0x4000
#define | IEEE80211_FCTL_ORDER 0x8000
#define | IEEE80211_SCTL_FRAG 0x000F
#define | IEEE80211_SCTL_SEQ 0xFFF0
#define | IEEE80211_FTYPE_MGMT 0x0000
#define | IEEE80211_FTYPE_CTL 0x0004
#define | IEEE80211_FTYPE_DATA 0x0008
#define | IEEE80211_STYPE_ASSOC_REQ 0x0000
#define | IEEE80211_STYPE_ASSOC_RESP 0x0010
#define | IEEE80211_STYPE_REASSOC_REQ 0x0020
#define | IEEE80211_STYPE_REASSOC_RESP 0x0030
#define | IEEE80211_STYPE_PROBE_REQ 0x0040
#define | IEEE80211_STYPE_PROBE_RESP 0x0050
#define | IEEE80211_STYPE_BEACON 0x0080
#define | IEEE80211_STYPE_ATIM 0x0090
#define | IEEE80211_STYPE_DISASSOC 0x00A0
#define | IEEE80211_STYPE_AUTH 0x00B0
#define | IEEE80211_STYPE_DEAUTH 0x00C0
#define | IEEE80211_STYPE_ACTION 0x00D0
#define | IEEE80211_STYPE_BACK_REQ 0x0080
#define | IEEE80211_STYPE_BACK 0x0090
#define | IEEE80211_STYPE_PSPOLL 0x00A0
#define | IEEE80211_STYPE_RTS 0x00B0
#define | IEEE80211_STYPE_CTS 0x00C0
#define | IEEE80211_STYPE_ACK 0x00D0
#define | IEEE80211_STYPE_CFEND 0x00E0
#define | IEEE80211_STYPE_CFENDACK 0x00F0
#define | IEEE80211_STYPE_DATA 0x0000
#define | IEEE80211_STYPE_DATA_CFACK 0x0010
#define | IEEE80211_STYPE_DATA_CFPOLL 0x0020
#define | IEEE80211_STYPE_DATA_CFACKPOLL 0x0030
#define | IEEE80211_STYPE_NULLFUNC 0x0040
#define | IEEE80211_STYPE_CFACK 0x0050
#define | IEEE80211_STYPE_CFPOLL 0x0060
#define | IEEE80211_STYPE_CFACKPOLL 0x0070
#define | IEEE80211_STYPE_QOS_DATA 0x0080
#define | IEEE80211_STYPE_QOS_DATA_CFACK 0x0090
#define | IEEE80211_STYPE_QOS_DATA_CFPOLL 0x00A0
#define | IEEE80211_STYPE_QOS_DATA_CFACKPOLL 0x00B0
#define | IEEE80211_STYPE_QOS_NULLFUNC 0x00C0
#define | IEEE80211_STYPE_QOS_CFACK 0x00D0
#define | IEEE80211_STYPE_QOS_CFPOLL 0x00E0
#define | IEEE80211_STYPE_QOS_CFACKPOLL 0x00F0
#define | IEEE80211_STA_DEFAULT_LISTEN_INTERVAL 3
#define | IEEE80211_STA_MIN_LISTEN_INTERVAL 1
#define | IEEE80211_MAX_FRAG_THRESHOLD 2352
#define | IEEE80211_MAX_RTS_THRESHOLD 2353
#define | IEEE80211_MAX_AID 2007
#define | IEEE80211_MAX_TIM_LEN 251
#define | IEEE80211_MAX_DATA_LEN 2304
#define | IEEE80211_MAX_FRAME_LEN 2352
#define | IEEE80211_MAX_SSID_LEN 32
#define | IEEE80211_MAX_MESH_ID_LEN 32
#define | IEEE80211_QOS_CTL_LEN 2
#define | IEEE80211_QOS_CTL_TID_MASK 0x000F
#define | IEEE80211_QOS_CTL_TAG1D_MASK 0x0007
#define | IEEE80211_HT_CTL_LEN 4
#define | IEEE80211_WMM_IE_AP_QOSINFO_UAPSD (1<<7)
#define | IEEE80211_WMM_IE_STA_QOSINFO_AC_VO (1<<0)
#define | IEEE80211_WMM_IE_STA_QOSINFO_AC_VI (1<<1)
#define | IEEE80211_WMM_IE_STA_QOSINFO_AC_BK (1<<2)
#define | IEEE80211_WMM_IE_STA_QOSINFO_AC_BE (1<<3)
#define | IEEE80211_WMM_IE_STA_QOSINFO_AC_MASK 0x0f
#define | IEEE80211_WMM_IE_STA_QOSINFO_SP_ALL 0x00
#define | IEEE80211_WMM_IE_STA_QOSINFO_SP_2 0x01
#define | IEEE80211_WMM_IE_STA_QOSINFO_SP_4 0x02
#define | IEEE80211_WMM_IE_STA_QOSINFO_SP_6 0x03
#define | IEEE80211_WMM_IE_STA_QOSINFO_SP_MASK 0x03
#define | IEEE80211_WMM_IE_STA_QOSINFO_SP_SHIFT 5
#define | IEEE80211_HDRLEN (sizeof(struct ieee80211_hdr_3addr))
#define | WLAN_SA_QUERY_TR_ID_LEN 2
#define | IEEE80211_BAR_CTRL_ACK_POLICY_NORMAL 0x0000
#define | IEEE80211_BAR_CTRL_CBMTID_COMPRESSED_BA 0x0004
#define | IEEE80211_HT_MCS_MASK_LEN 10
#define | IEEE80211_HT_MCS_RX_HIGHEST_MASK 0x3ff
#define | IEEE80211_HT_MCS_TX_DEFINED 0x01
#define | IEEE80211_HT_MCS_TX_RX_DIFF 0x02
#define | IEEE80211_HT_MCS_TX_MAX_STREAMS_MASK 0x0C
#define | IEEE80211_HT_MCS_TX_MAX_STREAMS_SHIFT 2
#define | IEEE80211_HT_MCS_TX_MAX_STREAMS 4
#define | IEEE80211_HT_MCS_TX_UNEQUAL_MODULATION 0x10
#define | IEEE80211_HT_MCS_UNEQUAL_MODULATION_START 33
#define | IEEE80211_HT_MCS_UNEQUAL_MODULATION_START_BYTE (IEEE80211_HT_MCS_UNEQUAL_MODULATION_START / 8)
#define | IEEE80211_HT_CAP_LDPC_CODING 0x0001
#define | IEEE80211_HT_CAP_SUP_WIDTH_20_40 0x0002
#define | IEEE80211_HT_CAP_SM_PS 0x000C
#define | IEEE80211_HT_CAP_SM_PS_SHIFT 2
#define | IEEE80211_HT_CAP_SM_PS_STATIC 0
#define | IEEE80211_HT_CAP_SM_PS_DYNAMIC 1
#define | IEEE80211_HT_CAP_SM_PS_INVALID 2
#define | IEEE80211_HT_CAP_SM_PS_DISABLED 3
#define | IEEE80211_HT_CAP_GRN_FLD 0x0010
#define | IEEE80211_HT_CAP_SGI_20 0x0020
#define | IEEE80211_HT_CAP_SGI_40 0x0040
#define | IEEE80211_HT_CAP_TX_STBC 0x0080
#define | IEEE80211_HT_CAP_RX_STBC 0x0300
#define | IEEE80211_HT_CAP_RX_STBC_SHIFT 8
#define | IEEE80211_HT_CAP_RX_STBC_DISABLE 0
#define | IEEE80211_HT_CAP_RX_STBC_1 1
#define | IEEE80211_HT_CAP_RX_STBC_2 2
#define | IEEE80211_HT_CAP_RX_STBC_3 3
#define | IEEE80211_HT_CAP_DELAY_BA 0x0400
#define | IEEE80211_HT_CAP_MAX_AMSDU 0x0800
#define | IEEE80211_HT_CAP_DSSSCCK40 0x1000
#define | IEEE80211_HT_CAP_RESERVED 0x2000
#define | IEEE80211_HT_CAP_40MHZ_INTOLERANT 0x4000
#define | IEEE80211_HT_CAP_LSIG_TXOP_PROT 0x8000
#define | IEEE80211_HT_AMPDU_PARM_FACTOR 0x03
#define | IEEE80211_HT_AMPDU_PARM_DENSITY 0x1C
#define | IEEE80211_HT_AMPDU_PARM_DENSITY_SHIFT 2
#define | IEEE80211_HT_EXT_CAP_HTC 0x0400
#define | IEEE80211_HT_EXT_CAP_RD 0x0800
#define | IEEE80211_HT_MAX_AMPDU_FACTOR 13
#define | IEEE80211_HT_MPDU_DENSITY_SHIFT 2
#define | IEEE80211_HT_PARAM_CHA_SEC_OFFSET 0x03
#define | IEEE80211_HT_PARAM_CHA_SEC_NONE 0x00
#define | IEEE80211_HT_PARAM_CHA_SEC_ABOVE 0x01
#define | IEEE80211_HT_PARAM_CHA_SEC_BELOW 0x03
#define | IEEE80211_HT_PARAM_CHAN_WIDTH_ANY 0x04
#define | IEEE80211_HT_PARAM_RIFS_MODE 0x08
#define | IEEE80211_HT_PARAM_SPSMP_SUPPORT 0x10
#define | IEEE80211_HT_PARAM_SERV_INTERVAL_GRAN 0xE0
#define | IEEE80211_HT_OP_MODE_PROTECTION 0x0003
#define | IEEE80211_HT_OP_MODE_PROTECTION_NONE 0
#define | IEEE80211_HT_OP_MODE_PROTECTION_NONMEMBER 1
#define | IEEE80211_HT_OP_MODE_PROTECTION_20MHZ 2
#define | IEEE80211_HT_OP_MODE_PROTECTION_NONHT_MIXED 3
#define | IEEE80211_HT_OP_MODE_NON_GF_STA_PRSNT 0x0004
#define | IEEE80211_HT_OP_MODE_NON_HT_STA_PRSNT 0x0010
#define | IEEE80211_HT_STBC_PARAM_DUAL_BEACON 0x0040
#define | IEEE80211_HT_STBC_PARAM_DUAL_CTS_PROT 0x0080
#define | IEEE80211_HT_STBC_PARAM_STBC_BEACON 0x0100
#define | IEEE80211_HT_STBC_PARAM_LSIG_TXOP_FULLPROT 0x0200
#define | IEEE80211_HT_STBC_PARAM_PCO_ACTIVE 0x0400
#define | IEEE80211_HT_STBC_PARAM_PCO_PHASE 0x0800
#define | IEEE80211_ADDBA_PARAM_POLICY_MASK 0x0002
#define | IEEE80211_ADDBA_PARAM_TID_MASK 0x003C
#define | IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK 0xFFA0
#define | IEEE80211_DELBA_PARAM_TID_MASK 0xF000
#define | IEEE80211_DELBA_PARAM_INITIATOR_MASK 0x0800
#define | IEEE80211_MIN_AMPDU_BUF 0x8
#define | IEEE80211_MAX_AMPDU_BUF 0x40
#define | WLAN_HT_CAP_SM_PS_STATIC 0
#define | WLAN_HT_CAP_SM_PS_DYNAMIC 1
#define | WLAN_HT_CAP_SM_PS_INVALID 2
#define | WLAN_HT_CAP_SM_PS_DISABLED 3
#define | WLAN_HT_SMPS_CONTROL_DISABLED 0
#define | WLAN_HT_SMPS_CONTROL_STATIC 1
#define | WLAN_HT_SMPS_CONTROL_DYNAMIC 3
#define | WLAN_AUTH_OPEN 0
#define | WLAN_AUTH_SHARED_KEY 1
#define | WLAN_AUTH_FT 2
#define | WLAN_AUTH_LEAP 128
#define | WLAN_AUTH_CHALLENGE_LEN 128
#define | WLAN_CAPABILITY_ESS (1<<0)
#define | WLAN_CAPABILITY_IBSS (1<<1)
#define | WLAN_CAPABILITY_CF_POLLABLE (1<<2)
#define | WLAN_CAPABILITY_CF_POLL_REQUEST (1<<3)
#define | WLAN_CAPABILITY_PRIVACY (1<<4)
#define | WLAN_CAPABILITY_SHORT_PREAMBLE (1<<5)
#define | WLAN_CAPABILITY_PBCC (1<<6)
#define | WLAN_CAPABILITY_CHANNEL_AGILITY (1<<7)
#define | WLAN_CAPABILITY_SPECTRUM_MGMT (1<<8)
#define | WLAN_CAPABILITY_QOS (1<<9)
#define | WLAN_CAPABILITY_SHORT_SLOT_TIME (1<<10)
#define | WLAN_CAPABILITY_DSSS_OFDM (1<<13)
#define | IEEE80211_SPCT_MSR_RPRT_MODE_LATE (1<<0)
#define | IEEE80211_SPCT_MSR_RPRT_MODE_INCAPABLE (1<<1)
#define | IEEE80211_SPCT_MSR_RPRT_MODE_REFUSED (1<<2)
#define | IEEE80211_SPCT_MSR_RPRT_TYPE_BASIC 0
#define | IEEE80211_SPCT_MSR_RPRT_TYPE_CCA 1
#define | IEEE80211_SPCT_MSR_RPRT_TYPE_RPI 2
#define | WLAN_ERP_NON_ERP_PRESENT (1<<0)
#define | WLAN_ERP_USE_PROTECTION (1<<1)
#define | WLAN_ERP_BARKER_PREAMBLE (1<<2)
#define | IEEE80211_COUNTRY_IE_MIN_LEN 6
#define | IEEE80211_COUNTRY_EXTENSION_ID 201
#define | IEEE80211_QOS_CONTROL_A_MSDU_PRESENT 0x0080
#define | WLAN_CIPHER_SUITE_USE_GROUP 0x000FAC00
#define | WLAN_CIPHER_SUITE_WEP40 0x000FAC01
#define | WLAN_CIPHER_SUITE_TKIP 0x000FAC02
#define | WLAN_CIPHER_SUITE_CCMP 0x000FAC04
#define | WLAN_CIPHER_SUITE_WEP104 0x000FAC05
#define | WLAN_CIPHER_SUITE_AES_CMAC 0x000FAC06
#define | WLAN_AKM_SUITE_8021X 0x000FAC01
#define | WLAN_AKM_SUITE_PSK 0x000FAC02
#define | WLAN_MAX_KEY_LEN 32
#define | WLAN_PMKID_LEN 16
#define | ieee80211_hr_chan_to_freq(chan) ieee80211_dsss_chan_to_freq(chan)
#define | ieee80211_freq_to_hr_chan(freq) ieee80211_freq_to_dsss_chan(freq)
#define | ieee80211_erp_chan_to_freq(chan) ieee80211_hr_chan_to_freq(chan)
#define | ieee80211_freq_to_erp_chan(freq) ieee80211_freq_to_hr_chan(freq)

Typedefs

typedef enum _phy_type phy_type

Enumerations

enum _phy_type {
phy_80211_b, phy_80211_bg, phy_80211_bgn, phy_80211_n,
phy_80211_max
}
enum | ieee80211_max_ampdu_length_exp { IEEE80211_HT_MAX_AMPDU_8K = 0, IEEE80211_HT_MAX_AMPDU_16K = 1, IEEE80211_HT_MAX_AMPDU_32K = 2, IEEE80211_HT_MAX_AMPDU_64K = 3 }
enum ieee80211_min_mpdu_spacing {
IEEE80211_HT_MPDU_DENSITY_NONE = 0, IEEE80211_HT_MPDU_DENSITY_0_25 = 1, IEEE80211_HT_MPDU_DENSITY_0_5 = 2, IEEE80211_HT_MPDU_DENSITY_1 = 3,
IEEE80211_HT_MPDU_DENSITY_2 = 4, IEEE80211_HT_MPDU_DENSITY_4 = 5, IEEE80211_HT_MPDU_DENSITY_8 = 6, IEEE80211_HT_MPDU_DENSITY_16 = 7
}
enum | { WLAN_ERP_PREAMBLE_SHORT = 0, WLAN_ERP_PREAMBLE_LONG = 1 }
enum ieee80211_statuscode {
WLAN_STATUS_SUCCESS = 0, WLAN_STATUS_UNSPECIFIED_FAILURE = 1, WLAN_STATUS_CAPS_UNSUPPORTED = 10, WLAN_STATUS_REASSOC_NO_ASSOC = 11,
WLAN_STATUS_ASSOC_DENIED_UNSPEC = 12, WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG = 13, WLAN_STATUS_UNKNOWN_AUTH_TRANSACTION = 14, WLAN_STATUS_CHALLENGE_FAIL = 15,
WLAN_STATUS_AUTH_TIMEOUT = 16, WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA = 17, WLAN_STATUS_ASSOC_DENIED_RATES = 18, WLAN_STATUS_ASSOC_DENIED_NOSHORTPREAMBLE = 19,
WLAN_STATUS_ASSOC_DENIED_NOPBCC = 20, WLAN_STATUS_ASSOC_DENIED_NOAGILITY = 21, WLAN_STATUS_ASSOC_DENIED_NOSPECTRUM = 22, WLAN_STATUS_ASSOC_REJECTED_BAD_POWER = 23,
WLAN_STATUS_ASSOC_REJECTED_BAD_SUPP_CHAN = 24, WLAN_STATUS_ASSOC_DENIED_NOSHORTTIME = 25, WLAN_STATUS_ASSOC_DENIED_NODSSSOFDM = 26, WLAN_STATUS_ASSOC_DENIED_NO_HT = 27,
WLAN_STATUS_ASSOC_REJECTED_TEMPORARILY = 30, WLAN_STATUS_ROBUST_MGMT_FRAME_POLICY_VIOLATION = 31, WLAN_STATUS_INVALID_IE = 40, WLAN_STATUS_INVALID_GROUP_CIPHER = 41,
WLAN_STATUS_INVALID_PAIRWISE_CIPHER = 42, WLAN_STATUS_INVALID_AKMP = 43, WLAN_STATUS_UNSUPP_RSN_VERSION = 44, WLAN_STATUS_INVALID_RSN_IE_CAP = 45,
WLAN_STATUS_CIPHER_SUITE_REJECTED = 46, WLAN_STATUS_UNSPECIFIED_QOS = 32, WLAN_STATUS_ASSOC_DENIED_NOBANDWIDTH = 33, WLAN_STATUS_ASSOC_DENIED_LOWACK = 34,
WLAN_STATUS_ASSOC_DENIED_UNSUPP_QOS = 35, WLAN_STATUS_REQUEST_DECLINED = 37, WLAN_STATUS_INVALID_QOS_PARAM = 38, WLAN_STATUS_CHANGE_TSPEC = 39,
WLAN_STATUS_WAIT_TS_DELAY = 47, WLAN_STATUS_NO_DIRECT_LINK = 48, WLAN_STATUS_STA_NOT_PRESENT = 49, WLAN_STATUS_STA_NOT_QSTA = 50,
WLAN_STATUS_ASSOC_DENIED_LISTEN_INT_TOO_LARGE = 51
}
enum ieee80211_reasoncode {
WLAN_REASON_UNSPECIFIED = 1, WLAN_REASON_PREV_AUTH_NOT_VALID = 2, WLAN_REASON_DEAUTH_LEAVING = 3, WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY = 4,
WLAN_REASON_DISASSOC_AP_BUSY = 5, WLAN_REASON_CLASS2_FRAME_FROM_NONAUTH_STA = 6, WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA = 7, WLAN_REASON_DISASSOC_STA_HAS_LEFT = 8,
WLAN_REASON_STA_REQ_ASSOC_WITHOUT_AUTH = 9, WLAN_REASON_DISASSOC_BAD_POWER = 10, WLAN_REASON_DISASSOC_BAD_SUPP_CHAN = 11, WLAN_REASON_INVALID_IE = 13,
WLAN_REASON_MIC_FAILURE = 14, WLAN_REASON_4WAY_HANDSHAKE_TIMEOUT = 15, WLAN_REASON_GROUP_KEY_HANDSHAKE_TIMEOUT = 16, WLAN_REASON_IE_DIFFERENT = 17,
WLAN_REASON_INVALID_GROUP_CIPHER = 18, WLAN_REASON_INVALID_PAIRWISE_CIPHER = 19, WLAN_REASON_INVALID_AKMP = 20, WLAN_REASON_UNSUPP_RSN_VERSION = 21,
WLAN_REASON_INVALID_RSN_IE_CAP = 22, WLAN_REASON_IEEE8021X_FAILED = 23, WLAN_REASON_CIPHER_SUITE_REJECTED = 24, WLAN_REASON_DISASSOC_UNSPECIFIED_QOS = 32,
WLAN_REASON_DISASSOC_QAP_NO_BANDWIDTH = 33, WLAN_REASON_DISASSOC_LOW_ACK = 34, WLAN_REASON_DISASSOC_QAP_EXCEED_TXOP = 35, WLAN_REASON_QSTA_LEAVE_QBSS = 36,
WLAN_REASON_QSTA_NOT_USE = 37, WLAN_REASON_QSTA_REQUIRE_SETUP = 38, WLAN_REASON_QSTA_TIMEOUT = 39, WLAN_REASON_QSTA_CIPHER_NOT_SUPP = 45
}
enum ieee80211_eid {
WLAN_EID_SSID = 0, WLAN_EID_SUPP_RATES = 1, WLAN_EID_FH_PARAMS = 2, WLAN_EID_DS_PARAMS = 3,
WLAN_EID_CF_PARAMS = 4, WLAN_EID_TIM = 5, WLAN_EID_IBSS_PARAMS = 6, WLAN_EID_CHALLENGE = 16,
WLAN_EID_COUNTRY = 7, WLAN_EID_HP_PARAMS = 8, WLAN_EID_HP_TABLE = 9, WLAN_EID_REQUEST = 10,
WLAN_EID_QBSS_LOAD = 11, WLAN_EID_EDCA_PARAM_SET = 12, WLAN_EID_TSPEC = 13, WLAN_EID_TCLAS = 14,
WLAN_EID_SCHEDULE = 15, WLAN_EID_TS_DELAY = 43, WLAN_EID_TCLAS_PROCESSING = 44, WLAN_EID_QOS_CAPA = 46,
WLAN_EID_MESH_CONFIG = 113, WLAN_EID_MESH_ID = 114, WLAN_EID_LINK_METRIC_REPORT = 115, WLAN_EID_CONGESTION_NOTIFICATION = 116,
WLAN_EID_PEER_LINK = 55, WLAN_EID_PEER_MGMT = 117, WLAN_EID_CHAN_SWITCH_PARAM = 118, WLAN_EID_MESH_AWAKE_WINDOW = 119,
WLAN_EID_BEACON_TIMING = 120, WLAN_EID_MCCAOP_SETUP_REQ = 121, WLAN_EID_MCCAOP_SETUP_RESP = 122, WLAN_EID_MCCAOP_ADVERT = 123,
WLAN_EID_MCCAOP_TEARDOWN = 124, WLAN_EID_GANN = 125, WLAN_EID_RANN = 126, WLAN_EID_PREQ = 130,
WLAN_EID_PREP = 131, WLAN_EID_PERR = 132, WLAN_EID_PXU = 137, WLAN_EID_PXUC = 138,
WLAN_EID_AUTH_MESH_PEER_EXCH = 139, WLAN_EID_MIC = 140, WLAN_EID_PWR_CONSTRAINT = 32, WLAN_EID_PWR_CAPABILITY = 33,
WLAN_EID_TPC_REQUEST = 34, WLAN_EID_TPC_REPORT = 35, WLAN_EID_SUPPORTED_CHANNELS = 36, WLAN_EID_CHANNEL_SWITCH = 37,
WLAN_EID_MEASURE_REQUEST = 38, WLAN_EID_MEASURE_REPORT = 39, WLAN_EID_QUIET = 40, WLAN_EID_IBSS_DFS = 41,
WLAN_EID_ERP_INFO = 42, WLAN_EID_EXT_SUPP_RATES = 50, WLAN_EID_HT_CAPABILITY = 45, WLAN_EID_HT_INFORMATION = 61,
WLAN_EID_RSN = 48, WLAN_EID_MMIE = 76, WLAN_EID_WPA = 221, WLAN_EID_GENERIC = 221,
WLAN_EID_VENDOR_SPECIFIC = 221, WLAN_EID_QOS_PARAMETER = 222, WLAN_EID_AP_CHAN_REPORT = 51, WLAN_EID_NEIGHBOR_REPORT = 52,
WLAN_EID_RCPI = 53, WLAN_EID_BSS_AVG_ACCESS_DELAY = 63, WLAN_EID_ANTENNA_INFO = 64, WLAN_EID_RSNI = 65,
WLAN_EID_MEASUREMENT_PILOT_TX_INFO = 66, WLAN_EID_BSS_AVAILABLE_CAPACITY = 67, WLAN_EID_BSS_AC_ACCESS_DELAY = 68, WLAN_EID_RRM_ENABLED_CAPABILITIES = 70,
WLAN_EID_MULTIPLE_BSSID = 71, WLAN_EID_BSS_COEX_2040 = 72, WLAN_EID_OVERLAP_BSS_SCAN_PARAM = 74, WLAN_EID_EXT_CAPABILITY = 127,
WLAN_EID_MOBILITY_DOMAIN = 54, WLAN_EID_FAST_BSS_TRANSITION = 55, WLAN_EID_TIMEOUT_INTERVAL = 56, WLAN_EID_RIC_DATA = 57,
WLAN_EID_RIC_DESCRIPTOR = 75, WLAN_EID_DSE_REGISTERED_LOCATION = 58, WLAN_EID_SUPPORTED_REGULATORY_CLASSES = 59, WLAN_EID_EXT_CHANSWITCH_ANN = 60,
WLAN_EID_TIME_ZONE = 98, WLAN_EID_LINK_ID = 101, WLAN_EID_INTERWORKING = 107, WLAN_EID_ADV_PROTO = 108,
WLAN_EID_ROAMING_CONSORTIUM = 111, WLAN_EID_EXT_CAPAB = 127
}
enum ieee80211_category {
WLAN_CATEGORY_SPECTRUM_MGMT = 0, WLAN_CATEGORY_QOS = 1, WLAN_CATEGORY_DLS = 2, WLAN_CATEGORY_BACK = 3,
WLAN_CATEGORY_PUBLIC = 4, WLAN_CATEGORY_HT = 7, WLAN_CATEGORY_SA_QUERY = 8, WLAN_CATEGORY_PROTECTED_DUAL_OF_ACTION = 9,
WLAN_CATEGORY_WMM = 17, WLAN_CATEGORY_VENDOR_SPECIFIC_PROTECTED = 126, WLAN_CATEGORY_VENDOR_SPECIFIC = 127
}
enum ieee80211_spectrum_mgmt_actioncode {
WLAN_ACTION_SPCT_MSR_REQ = 0, WLAN_ACTION_SPCT_MSR_RPRT = 1, WLAN_ACTION_SPCT_TPC_REQ = 2, WLAN_ACTION_SPCT_TPC_RPRT = 3,
WLAN_ACTION_SPCT_CHL_SWITCH = 4
}
enum ieee80211_ht_actioncode {
WLAN_HT_ACTION_NOTIFY_CHANWIDTH = 0, WLAN_HT_ACTION_SMPS = 1, WLAN_HT_ACTION_PSMP = 2, WLAN_HT_ACTION_PCO_PHASE = 3,
WLAN_HT_ACTION_CSI = 4, WLAN_HT_ACTION_NONCOMPRESSED_BF = 5, WLAN_HT_ACTION_COMPRESSED_BF = 6, WLAN_HT_ACTION_ASEL_IDX_FEEDBACK = 7
}
enum ieee80211_key_len {
WLAN_KEY_LEN_WEP40 = 5, WLAN_KEY_LEN_WEP104 = 13, WLAN_KEY_LEN_CCMP = 16, WLAN_KEY_LEN_TKIP = 32,
WLAN_KEY_LEN_AES_CMAC = 16
}
enum | ieee80211_timeout_interval_type { WLAN_TIMEOUT_REASSOC_DEADLINE = 1, WLAN_TIMEOUT_KEY_LIFETIME = 2, WLAN_TIMEOUT_ASSOC_COMEBACK = 3 }
enum | ieee80211_back_actioncode { WLAN_ACTION_ADDBA_REQ = 0, WLAN_ACTION_ADDBA_RESP = 1, WLAN_ACTION_DELBA = 2 }
enum | ieee80211_back_parties { WLAN_BACK_RECIPIENT = 0, WLAN_BACK_INITIATOR = 1, WLAN_BACK_TIMER = 2 }
enum | ieee80211_sa_query_action { WLAN_ACTION_SA_QUERY_REQUEST = 0, WLAN_ACTION_SA_QUERY_RESPONSE = 1 }

Functions

static __inline int | ieee80211_has_tods (u16 fc)
check if IEEE80211_FCTL_TODS is set More...
static __inline int | ieee80211_has_fromds (u16 fc)
check if IEEE80211_FCTL_FROMDS is set More...
static __inline int | ieee80211_has_a4 (u16 fc)
check if IEEE80211_FCTL_TODS and IEEE80211_FCTL_FROMDS are set More...
static __inline int | ieee80211_has_morefrags (u16 fc)
check if IEEE80211_FCTL_MOREFRAGS is set More...
static __inline int | ieee80211_has_retry (u16 fc)
check if IEEE80211_FCTL_RETRY is set More...
static __inline int | ieee80211_has_pm (u16 fc)
check if IEEE80211_FCTL_PM is set More...
static __inline int | ieee80211_has_moredata (u16 fc)
check if IEEE80211_FCTL_MOREDATA is set More...
static __inline int | ieee80211_has_protected (u16 fc)
check if IEEE80211_FCTL_PROTECTED is set More...
static __inline int | ieee80211_has_order (u16 fc)
check if IEEE80211_FCTL_ORDER is set More...
static __inline int | ieee80211_is_mgmt (u16 fc)
check if type is IEEE80211_FTYPE_MGMT More...
static __inline int | ieee80211_is_ctl (u16 fc)
check if type is IEEE80211_FTYPE_CTL More...
static __inline int | ieee80211_is_data (u16 fc)
check if type is IEEE80211_FTYPE_DATA More...
static __inline int | ieee80211_is_data_qos (u16 fc)
check if type is IEEE80211_FTYPE_DATA and IEEE80211_STYPE_QOS_DATA is set More...
static __inline int | ieee80211_is_data_present (u16 fc)
check if type is IEEE80211_FTYPE_DATA and has data More...
static __inline int | ieee80211_is_assoc_req (u16 fc)
check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_ASSOC_REQ More...
static __inline int | ieee80211_is_assoc_resp (u16 fc)
check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_ASSOC_RESP More...
static __inline int | ieee80211_is_reassoc_req (u16 fc)
check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_REASSOC_REQ More...
static __inline int | ieee80211_is_reassoc_resp (u16 fc)
check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_REASSOC_RESP More...
static __inline int | ieee80211_is_probe_req (u16 fc)
check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_PROBE_REQ More...
static __inline int | ieee80211_is_probe_resp (u16 fc)
check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_PROBE_RESP More...
static __inline int | ieee80211_is_beacon (u16 fc)
check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_BEACON More...
static __inline int | ieee80211_is_atim (u16 fc)
check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_ATIM More...
static __inline int | ieee80211_is_disassoc (u16 fc)
check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_DISASSOC More...
static __inline int | ieee80211_is_auth (u16 fc)
check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_AUTH More...
static __inline int | ieee80211_is_deauth (u16 fc)
check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_DEAUTH More...
static __inline int | ieee80211_is_action (u16 fc)
check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_ACTION More...
static __inline int | ieee80211_is_back_req (u16 fc)
check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_BACK_REQ More...
static __inline int | ieee80211_is_back (u16 fc)
check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_BACK More...
static __inline int | ieee80211_is_pspoll (u16 fc)
check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_PSPOLL More...
static __inline int | ieee80211_is_rts (u16 fc)
check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_RTS More...
static __inline int | ieee80211_is_cts (u16 fc)
check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_CTS More...
static __inline int | ieee80211_is_ack (u16 fc)
check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_ACK More...
static __inline int | ieee80211_is_cfend (u16 fc)
check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_CFEND More...
static __inline int | ieee80211_is_cfendack (u16 fc)
check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_CFENDACK More...
static __inline int | ieee80211_is_nullfunc (u16 fc)
check if frame is a regular (non-QoS) nullfunc frame More...
static __inline int | ieee80211_is_qos_nullfunc (u16 fc)
check if frame is a QoS nullfunc frame More...
struct ieee80211_mgmt | __attribute__ ((packed))
static __inline u8 * | ieee80211_get_qos_ctl (struct ieee80211_hdr *hdr)
get pointer to qos control bytes More...
static __inline u8 * | ieee80211_get_SA (struct ieee80211_hdr *hdr)
get pointer to SA More...
static __inline u8 * | ieee80211_get_DA (struct ieee80211_hdr *hdr)
get pointer to DA More...
static __inline bool | ieee80211_is_robust_mgmt_frame (struct ieee80211_hdr *hdr)
check if frame is a robust management frame More...
static __inline int | ieee80211_fhss_chan_to_freq (int channel)
get channel frequency More...
static __inline int | ieee80211_freq_to_fhss_chan (int freq)
get channel More...
static __inline int | ieee80211_dsss_chan_to_freq (int channel)
get channel center frequency More...
static __inline int | ieee80211_freq_to_dsss_chan (int freq)
get channel More...
static __inline int | ieee80211_ofdm_chan_to_freq (int s_freq, int channel)
get channel center frequency More...
static __inline int | ieee80211_freq_to_ofdm_chan (int s_freq, int freq)
get channel More...
static __inline unsigned long | ieee80211_tu_to_usec (unsigned long tu)
convert time units (TU) to microseconds More...
static __inline bool | ieee80211_check_tim (struct ieee80211_tim_ie *tim, u8 tim_len, u16 aid)
check if AID bit is set in TIM More...

Variables

u16 | auth_alg
u16 | auth_transaction
u16 | status_code
u8 | variable [0]
u16 | reason_code
u16 | capab_info
u16 | aid
u16 | listen_interval
u8 | current_ap [6]
u64 | timestamp
u16 | beacon_int
u8 | action_code
u8 | dialog_token
u8 | element_id
u8 | length
struct ieee80211_channel_sw_ie | sw_elem
u8 | channel_width
struct ieee80211_msrment_ie | msr_elem
u16 | capab
u16 | timeout
u16 | start_seq_num
u16 | status
u16 | params
u16 | aux
u8 | action
u8 | trans_id [WLAN_SA_QUERY_TR_ID_LEN]
u8 | smps_control
u8 | category
union {
} u
u16 | frame_control
u16 | duration
u8 | da [6]
u8 | sa [6]
u8 | bssid [6]
u16 | seq_ctrl
u16 | key_id
u8 | sequence_number [6]
u8 | mic [8]
u8 | ra [6]
u8 | ta [6]
u16 | control
u8 | rx_mask [IEEE80211_HT_MCS_MASK_LEN]
u16 | rx_highest
u8 | tx_params
u8 | reserved [3]
u16 | cap_info
u8 | ampdu_params_info
struct ieee80211_mcs_info | mcs
u16 | extended_ht_cap_info
u32 | tx_BF_cap_info
u8 | antenna_selection_info
enum ieee80211_max_ampdu_length_exp | __attribute__

Detailed Description

IEEE802.11 protocol type define.

Author
winnermicro

Copyright (c) 2014 Winner Microelectronics Co., Ltd.

Macro Definition Documentation

◆ ieee80211_erp_chan_to_freq

#define ieee80211_erp_chan_to_freq ( chan ) ieee80211_hr_chan_to_freq(chan)

Convert IEEE802.11 ERP channel to frequency (MHz). Ref IEEE 802.11-2007 section 19.4.2

◆ ieee80211_freq_to_erp_chan

#define ieee80211_freq_to_erp_chan ( freq ) ieee80211_freq_to_hr_chan(freq)

Convert IEEE802.11 frequency (MHz) to ERP channel. Ref IEEE 802.11-2007 section 19.4.2

◆ ieee80211_freq_to_hr_chan

#define ieee80211_freq_to_hr_chan ( freq ) ieee80211_freq_to_dsss_chan(freq)

Convert IEEE802.11 frequency (MHz) to HR DSSS channel. Ref IEEE 802.11-2007 section 18.4.6.2. The channels and frequencies are the same as those defined for DSSS.

◆ ieee80211_hr_chan_to_freq

#define ieee80211_hr_chan_to_freq ( chan ) ieee80211_dsss_chan_to_freq(chan)

Convert IEEE802.11 HR DSSS channel to frequency (MHz). Ref IEEE 802.11-2007 section 18.4.6.2. The channels and frequencies are the same as those defined for DSSS.

Function Documentation

◆ ieee80211_check_tim()

static __inline bool ieee80211_check_tim | ( | struct ieee80211_tim_ie * | tim,
 |  | u8 | tim_len,
 |  | u16 | aid
 | ) |  |
static

check if AID bit is set in TIM

Parameters
[in] | *tim | the TIM IE
[in] | tim_len | length of the TIM IE
[in] | aid | the AID to look for
Return values
0 | AID bit not is set in TIM
other | AID bit is set im TIM
Note
None

◆ ieee80211_dsss_chan_to_freq()

static __inline int ieee80211_dsss_chan_to_freq ( int channel )
static

get channel center frequency

Parameters
[in] channel the DSSS channel
Return values
-1 | failed
other | frequency
Note
Convert IEEE802.11 DSSS channel to the center frequency (MHz). Ref IEEE 802.11-2007 section 15.6

◆ ieee80211_fhss_chan_to_freq()

static __inline int ieee80211_fhss_chan_to_freq ( int channel )
static

get channel frequency

Parameters
[in] channel the FHSS channel
Return values
-1 | failed
other | frequency
Note
Convert IEEE802.11 FHSS channel to frequency (MHz) Ref IEEE 802.11-2007 section 14.6

◆ ieee80211_freq_to_dsss_chan()

static __inline int ieee80211_freq_to_dsss_chan ( int freq )
static

get channel

Parameters
[in] freq the frequency
Return values
-1 | failed
other | channel
Note
Convert frequency (MHz) to IEEE802.11 DSSS channel Ref IEEE 802.11-2007 section 15.6 This routine selects the channel with the closest center frequency.

◆ ieee80211_freq_to_fhss_chan()

static __inline int ieee80211_freq_to_fhss_chan ( int freq )
static

get channel

Parameters
[in] freq the channels frequency
Return values
-1 | failed
other | channel
Note
Convert frequency (MHz) to IEEE802.11 FHSS channel Ref IEEE 802.11-2007 section 14.6

◆ ieee80211_freq_to_ofdm_chan()

static __inline int ieee80211_freq_to_ofdm_chan | ( | int | s_freq,
 |  | int | freq
 | ) |  |
static

get channel

Parameters
[in] | s_freq | starting frequency == (dotChannelStartingFactor/2) MHz
[in] | freq | the frequency
Return values
-1 | failed
other | channel
Note
Convert frequency (MHz) to IEEE802.11 OFDM channel Ref IEEE 802.11-2007 section 17.3.8.3.2 This routine selects the channel with the closest center frequency.

◆ ieee80211_get_DA()

static __inline u8* ieee80211_get_DA ( struct ieee80211_hdr * hdr )
static

get pointer to DA

Parameters
[in] *hdr the frame
Returns
DA address
Note
Given an 802.11 frame, this function returns the offset to the destination address (DA). It does not verify that the header is long enough to contain the address, and the header must be long enough to contain the frame control field.

◆ ieee80211_get_qos_ctl()

static __inline u8* ieee80211_get_qos_ctl ( struct ieee80211_hdr * hdr )
static

get pointer to qos control bytes

Parameters
[in] *hdr the frame
Returns
pointer to qos control bytes
Note
The qos ctrl bytes come after the frame_control, duration, seq_num and 3 or 4 addresses of length ETH_ALEN. 3 addr: 2 + 2 + 2 + 3*6 = 24 4 addr: 2 + 2 + 2 + 4*6 = 30

◆ ieee80211_get_SA()

static __inline u8* ieee80211_get_SA ( struct ieee80211_hdr * hdr )
static

get pointer to SA

Parameters
[in] *hdr the frame
Returns
SA address
Note
Given an 802.11 frame, this function returns the offset to the source address (SA). It does not verify that the header is long enough to contain the address, and the header must be long enough to contain the frame control field.

◆ ieee80211_has_a4()

static __inline int ieee80211_has_a4 ( u16 fc )
static

check if IEEE80211_FCTL_TODS and IEEE80211_FCTL_FROMDS are set

Parameters
[in] fc frame control bytes in little-endian byteorder
Return values
0 | no a4
other | has a4
Note
None

◆ ieee80211_has_fromds()

static __inline int ieee80211_has_fromds ( u16 fc )
static

check if IEEE80211_FCTL_FROMDS is set

Parameters
[in] fc frame control bytes in little-endian byteorder
Return values
0 | no fromds
other | has fromds
Note
None

◆ ieee80211_has_moredata()

static __inline int ieee80211_has_moredata ( u16 fc )
static

check if IEEE80211_FCTL_MOREDATA is set

Parameters
[in] fc frame control bytes in little-endian byteorder
Return values
0 | no moredata
other | has moredata
Note
None

◆ ieee80211_has_morefrags()

static __inline int ieee80211_has_morefrags ( u16 fc )
static

check if IEEE80211_FCTL_MOREFRAGS is set

Parameters
[in] fc frame control bytes in little-endian byteorder
Return values
0 | no morefrags
other | has morefrags
Note
None

◆ ieee80211_has_order()

static __inline int ieee80211_has_order ( u16 fc )
static

check if IEEE80211_FCTL_ORDER is set

Parameters
[in] fc frame control bytes in little-endian byteorder
Return values
0 | no order
other | has order
Note
None

◆ ieee80211_has_pm()

static __inline int ieee80211_has_pm ( u16 fc )
static

check if IEEE80211_FCTL_PM is set

Parameters
[in] fc frame control bytes in little-endian byteorder
Return values
0 | no pm
other | has pm
Note
None

◆ ieee80211_has_protected()

static __inline int ieee80211_has_protected ( u16 fc )
static

check if IEEE80211_FCTL_PROTECTED is set

Parameters
[in] fc frame control bytes in little-endian byteorder
Return values
0 | no protected
other | has protected
Note
None

◆ ieee80211_has_retry()

static __inline int ieee80211_has_retry ( u16 fc )
static

check if IEEE80211_FCTL_RETRY is set

Parameters
[in] fc frame control bytes in little-endian byteorder
Return values
0 | no retry
other | has retry
Note
None

◆ ieee80211_has_tods()

static __inline int ieee80211_has_tods ( u16 fc )
static

check if IEEE80211_FCTL_TODS is set

Parameters
[in] fc frame control bytes in little-endian byteorder
Return values
0 | no tods
other | has tods
Note
None

◆ ieee80211_is_ack()

static __inline int ieee80211_is_ack ( u16 fc )
static

check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_ACK

Parameters
[in] fc frame control bytes in little-endian byteorder
Return values
0 | not is ack
other | is ack
Note
None

◆ ieee80211_is_action()

static __inline int ieee80211_is_action ( u16 fc )
static

check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_ACTION

Parameters
[in] fc frame control bytes in little-endian byteorder
Return values
0 | not is action
other | is action
Note
None

◆ ieee80211_is_assoc_req()

static __inline int ieee80211_is_assoc_req ( u16 fc )
static

check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_ASSOC_REQ

Parameters
[in] fc frame control bytes in little-endian byteorder
Return values
0 | not is assoc req
other | is assoc req
Note
None

◆ ieee80211_is_assoc_resp()

static __inline int ieee80211_is_assoc_resp ( u16 fc )
static

check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_ASSOC_RESP

Parameters
[in] fc frame control bytes in little-endian byteorder
Return values
0 | not is assoc resp
other | is assoc resp
Note
None

◆ ieee80211_is_atim()

static __inline int ieee80211_is_atim ( u16 fc )
static

check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_ATIM

Parameters
[in] fc frame control bytes in little-endian byteorder
Return values
0 | not is atim
other | is atim
Note
None

◆ ieee80211_is_auth()

static __inline int ieee80211_is_auth ( u16 fc )
static

check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_AUTH

Parameters
[in] fc frame control bytes in little-endian byteorder
Return values
0 | not is auth
other | is auth
Note
None

◆ ieee80211_is_back()

static __inline int ieee80211_is_back ( u16 fc )
static

check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_BACK

Parameters
[in] fc frame control bytes in little-endian byteorder
Return values
0 | not is back
other | is back
Note
None

◆ ieee80211_is_back_req()

static __inline int ieee80211_is_back_req ( u16 fc )
static

check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_BACK_REQ

Parameters
[in] fc frame control bytes in little-endian byteorder
Return values
0 | not is back req
other | is back req
Note
None

◆ ieee80211_is_beacon()

static __inline int ieee80211_is_beacon ( u16 fc )
static

check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_BEACON

Parameters
[in] fc frame control bytes in little-endian byteorder
Return values
0 | not is beacon
other | is beacon
Note
None

◆ ieee80211_is_cfend()

static __inline int ieee80211_is_cfend ( u16 fc )
static

check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_CFEND

Parameters
[in] fc frame control bytes in little-endian byteorder
Return values
0 | not is cfend
other | is cfend
Note
None

◆ ieee80211_is_cfendack()

static __inline int ieee80211_is_cfendack ( u16 fc )
static

check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_CFENDACK

Parameters
[in] fc frame control bytes in little-endian byteorder
Return values
0 | not is cfendack
other | is cfendack
Note
None

◆ ieee80211_is_ctl()

static __inline int ieee80211_is_ctl ( u16 fc )
static

check if type is IEEE80211_FTYPE_CTL

Parameters
[in] fc frame control bytes in little-endian byteorder
Return values
0 | not is ctl
other | is ctl
Note
None

◆ ieee80211_is_cts()

static __inline int ieee80211_is_cts ( u16 fc )
static

check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_CTS

Parameters
[in] fc frame control bytes in little-endian byteorder
Return values
0 | not is cts
other | is cts
Note
None

◆ ieee80211_is_data()

static __inline int ieee80211_is_data ( u16 fc )
static

check if type is IEEE80211_FTYPE_DATA

Parameters
[in] fc frame control bytes in little-endian byteorder
Return values
0 | not is data
other | is data
Note
None

◆ ieee80211_is_data_present()

static __inline int ieee80211_is_data_present ( u16 fc )
static

check if type is IEEE80211_FTYPE_DATA and has data

Parameters
[in] fc frame control bytes in little-endian byteorder
Return values
0 | not is present data
other | is present data
Note
None

◆ ieee80211_is_data_qos()

static __inline int ieee80211_is_data_qos ( u16 fc )
static

check if type is IEEE80211_FTYPE_DATA and IEEE80211_STYPE_QOS_DATA is set

Parameters
[in] fc frame control bytes in little-endian byteorder
Return values
0 | not is qos data
other | is qos data
Note
None

◆ ieee80211_is_deauth()

static __inline int ieee80211_is_deauth ( u16 fc )
static

check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_DEAUTH

Parameters
[in] fc frame control bytes in little-endian byteorder
Return values
0 | not is deauth
other | is deauth
Note
None

◆ ieee80211_is_disassoc()

static __inline int ieee80211_is_disassoc ( u16 fc )
static

check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_DISASSOC

Parameters
[in] fc frame control bytes in little-endian byteorder
Return values
0 | not is disassoc
other | is disassoc
Note
None

◆ ieee80211_is_mgmt()

static __inline int ieee80211_is_mgmt ( u16 fc )
static

check if type is IEEE80211_FTYPE_MGMT

Parameters
[in] fc frame control bytes in little-endian byteorder
Return values
0 | not is mgmt
other | is mgmt
Note
None

◆ ieee80211_is_nullfunc()

static __inline int ieee80211_is_nullfunc ( u16 fc )
static

check if frame is a regular (non-QoS) nullfunc frame

Parameters
[in] fc frame control bytes in little-endian byteorder
Return values
0 | not is nullfunc
other | is nullfunc
Note
None

◆ ieee80211_is_probe_req()

static __inline int ieee80211_is_probe_req ( u16 fc )
static

check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_PROBE_REQ

Parameters
[in] fc frame control bytes in little-endian byteorder
Return values
0 | not is probe req
other | is probe req
Note
None

◆ ieee80211_is_probe_resp()

static __inline int ieee80211_is_probe_resp ( u16 fc )
static

check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_PROBE_RESP

Parameters
[in] fc frame control bytes in little-endian byteorder
Return values
0 | not is probe resp
other | is probe resp
Note
None

◆ ieee80211_is_pspoll()

static __inline int ieee80211_is_pspoll ( u16 fc )
static

check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_PSPOLL

Parameters
[in] fc frame control bytes in little-endian byteorder
Return values
0 | not is pspoll
other | is pspoll
Note
None

◆ ieee80211_is_qos_nullfunc()

static __inline int ieee80211_is_qos_nullfunc ( u16 fc )
static

check if frame is a QoS nullfunc frame

Parameters
[in] fc frame control bytes in little-endian byteorder
Return values
0 | not is qos nullfunc
other | is qos nullfunc
Note
None

◆ ieee80211_is_reassoc_req()

static __inline int ieee80211_is_reassoc_req ( u16 fc )
static

check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_REASSOC_REQ

Parameters
[in] fc frame control bytes in little-endian byteorder
Return values
0 | not is reassoc req
other | is reassoc req
Note
None

◆ ieee80211_is_reassoc_resp()

static __inline int ieee80211_is_reassoc_resp ( u16 fc )
static

check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_REASSOC_RESP

Parameters
[in] fc frame control bytes in little-endian byteorder
Return values
0 | not is reassoc resp
other | is reassoc resp
Note
None

◆ ieee80211_is_robust_mgmt_frame()

static __inline bool ieee80211_is_robust_mgmt_frame ( struct ieee80211_hdr * hdr )
static

check if frame is a robust management frame

Parameters
[in] *hdr the frame (buffer must include at least the first octet of payload)
Return values
TRUE | yes
FALSE | no
Note
None

◆ ieee80211_is_rts()

static __inline int ieee80211_is_rts ( u16 fc )
static

check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_RTS

Parameters
[in] fc frame control bytes in little-endian byteorder
Return values
0 | not is rts
other | is rts
Note
None

◆ ieee80211_ofdm_chan_to_freq()

static __inline int ieee80211_ofdm_chan_to_freq | ( | int | s_freq,
 |  | int | channel
 | ) |  |
static

get channel center frequency

Parameters
[in] | s_freq | starting frequency == (dotChannelStartingFactor/2) MHz
[in] | channel | the OFDM channel
Return values
-1 | failed
other | frequency
Note
Convert IEEE802.11 OFDM channel to center frequency (MHz) Ref IEEE 802.11-2007 section 17.3.8.3.2

◆ ieee80211_tu_to_usec()

static __inline unsigned long ieee80211_tu_to_usec ( unsigned long tu )
static

convert time units (TU) to microseconds

Parameters
[in] tu the TUs
Returns
microseconds value
Note
None


W800 SDK APIs: doxy_out/include/wifi/wm_wifi.h File Reference

  • doxy_out
  • include
  • wifi
Data Structures | Macros | Typedefs | Enumerations | Functions
wm_wifi.h File Reference

Wi-Fi API. More...

Go to the source code of this file.

Data Structures

struct | tls_curr_bss_t
struct | tls_key_info_t
struct | tls_softap_info_t
struct | tls_ip_info_t
struct | tls_ibss_info_t
struct | tls_ibssip_info_t
struct | tls_bss_info_t
struct | tls_scan_bss_t
struct | tls_bss_info_format2_t
struct | tls_scan_bss_format2_t
struct | tls_sta_info_t
struct | tls_wifi_ext_t
struct | tls_wifi_hdr_mac_t
struct | tls_wifi_tx_rate_t
struct | tls_wifi_scan_param_t

Macros

#define | WM_WIFI_ERR_SSID -1
#define | WM_WIFI_ERR_KEY -2
#define | WM_WIFI_WPS_BUSY -3
#define | WM_WIFI_SCANNING_BUSY -4
#define | WM_WIFI_STA_BUSY -5
#define | WM_WIFI_ENOERR 0
#define | WM_WIFI_ENOAP 1
#define | WM_WIFI_EKEY 2
#define | WM_WIFI_ELSI 3
#define | ETH_ALEN 6
#define | IEEE80211_MODE_INFRA 1
#define | IEEE80211_MODE_IBSS 2
#define | IEEE80211_MODE_AP 4
#define | IEEE80211_ENCRYT_NONE 0
#define | IEEE80211_ENCRYT_WEP40 1
#define | IEEE80211_ENCRYT_WEP104 2
#define | IEEE80211_ENCRYT_TKIP_WPA 3
#define | IEEE80211_ENCRYT_CCMP_WPA 4
#define | IEEE80211_ENCRYT_TKIP_WPA2 5
#define | IEEE80211_ENCRYT_CCMP_WPA2 6
#define | IEEE80211_ENCRYT_AUTO_WPA 7
#define | IEEE80211_ENCRYT_AUTO_WPA2 8
#define | WIFI_AUTO_CNT_FLAG_SET 1
#define | WIFI_AUTO_CNT_FLAG_GET 0
#define | WIFI_AUTO_CNT_OFF 0x0
#define | WIFI_AUTO_CNT_ON 0x1
#define | WIFI_AUTO_CNT_TMP_OFF 0x3
#define | WIFI_JOIN_SUCCESS 0x1
#define | WIFI_JOIN_FAILED 0x2
#define | WIFI_DISCONNECTED 0x3
#define | WIFI_SOFTAP_SUCCESS 0x4
#define | WIFI_SOFTAP_FAILED 0x5
#define | WIFI_SOFTAP_CLOSED 0x6

Typedefs

typedef void(* | tls_wifi_data_recv_callback) (u8 *data, u32 data_len)
typedef void(* | tls_wifi_psm_prechipsleep_callback) (void)
typedef void(* | tls_wifi_psm_chipsleep_callback) (u32 sleeptime)
typedef void(* | tls_wifi_psm_postchipsleep_callback) (void)
typedef int(* | net_rx_data_cb) (const u8 *bssid, u8 *buf, u32 buf_len)
typedef void(* | tls_wifi_data_ext_recv_callback) (u8 *data, u32 data_len, struct tls_wifi_ext_t *ext)
typedef void(* | tls_wifi_oneshot_result_callback) (enum tls_wifi_oneshot_result_type type)
typedef void(* | tls_wifi_client_event_callback) (u8 *mac, enum tls_wifi_client_event_type event)

Enumerations

enum tls_wifi_auth_mode {
WM_WIFI_AUTH_MODE_OPEN = 0, WM_WIFI_AUTH_MODE_WEP_AUTO = 3, WM_WIFI_AUTH_MODE_WPA_PSK_TKIP = 4, WM_WIFI_AUTH_MODE_WPA_PSK_CCMP = 8,
WM_WIFI_AUTH_MODE_WPA_PSK_AUTO = (WM_WIFI_AUTH_MODE_WPA_PSK_TKIP | WM_WIFI_AUTH_MODE_WPA_PSK_CCMP), WM_WIFI_AUTH_MODE_WPA2_PSK_TKIP = 16, WM_WIFI_AUTH_MODE_WPA2_PSK_CCMP = 32, WM_WIFI_AUTH_MODE_WPA2_PSK_AUTO = (WM_WIFI_AUTH_MODE_WPA2_PSK_TKIP | WM_WIFI_AUTH_MODE_WPA2_PSK_CCMP),
WM_WIFI_AUTH_MODE_WPA_WPA2_PSK_TKIP = (WM_WIFI_AUTH_MODE_WPA_PSK_TKIP | WM_WIFI_AUTH_MODE_WPA2_PSK_TKIP), WM_WIFI_AUTH_MODE_WPA_WPA2_PSK_CCMP = (WM_WIFI_AUTH_MODE_WPA_PSK_CCMP | WM_WIFI_AUTH_MODE_WPA2_PSK_CCMP), WM_WIFI_AUTH_MODE_WPA_WPA2_PSK_AUTO = (WM_WIFI_AUTH_MODE_WPA_PSK_AUTO | WM_WIFI_AUTH_MODE_WPA2_PSK_AUTO), WM_WIFI_AUTH_MODE_UNKNOWN = 128
}
enum tls_wifi_encrypt_mode {
WM_WIFI_ECN_MODE_OPEN = 0, WM_WIFI_ECN_MODE_WEP = 1, WM_WIFI_ECN_MODE_WPA_PSK = 2, WM_WIFI_ECN_MODE_WPA2_PSK = 3,
WM_WIFI_ECN_MODE_WPA_WPA2_PSK = 4, WM_WIFI_ECN_MODE_UNKNOWN = 5
}
enum tls_wifi_cipher_mode {
WM_WIFI_CIPHER_NONE = 0, WM_WIFI_CIPHER_WEP40 = 1, WM_WIFI_CIPHER_WEP104 = 2, WM_WIFI_CIPHER_TKIP = 3,
WM_WIFI_CIPHER_CCMP = 4, WM_WIFI_CIPHER_TKIP_AND_CCMP = 5, WM_WIFI_CIPHER_AES_CMAC_128 = 6
}
enum | tls_wifi_states { WM_WIFI_DISCONNECTED, WM_WIFI_SCANNING, WM_WIFI_JOINING, WM_WIFI_JOINED }
enum tls_wifi_mgmt_type {
WM_WIFI_MGMT_TYPE_ASSOC_REQ = 0x0000, WM_WIFI_MGMT_TYPE_ASSOC_RESP = 0x0010, WM_WIFI_MGMT_TYPE_REASSOC_REQ = 0x0020, WM_WIFI_MGMT_TYPE_REASSOC_RESP = 0x0030,
WM_WIFI_MGMT_TYPE_PROBE_REQ = 0x0040, WM_WIFI_MGMT_TYPE_PROBE_RESP = 0x0050, WM_WIFI_MGMT_TYPE_BEACON = 0x0080, WM_WIFI_MGMT_TYPE_ATIM = 0x0090,
WM_WIFI_MGMT_TYPE_DISASSOC = 0x00A0, WM_WIFI_MGMT_TYPE_AUTH = 0x00B0, WM_WIFI_MGMT_TYPE_DEAUTH = 0x00C0, WM_WIFI_MGMT_TYPE_ACTION = 0x00D0
}
enum tls_wifi_tx_rate {
WM_WIFI_TX_RATEIDX_1M = 0, WM_WIFI_TX_RATEIDX_2M, WM_WIFI_TX_RATEIDX_5_5M, WM_WIFI_TX_RATEIDX_11M,
WM_WIFI_TX_RATEIDX_6M, WM_WIFI_TX_RATEIDX_9M, WM_WIFI_TX_RATEIDX_12M, WM_WIFI_TX_RATEIDX_18M,
WM_WIFI_TX_RATEIDX_24M, WM_WIFI_TX_RATEIDX_36M, WM_WIFI_TX_RATEIDX_48M, WM_WIFI_TX_RATEIDX_54M,
WM_WIFI_TX_RATEIDX_MCS0, WM_WIFI_TX_RATEIDX_MCS1, WM_WIFI_TX_RATEIDX_MCS2, WM_WIFI_TX_RATEIDX_MCS3,
WM_WIFI_TX_RATEIDX_MCS4, WM_WIFI_TX_RATEIDX_MCS5, WM_WIFI_TX_RATEIDX_MCS6, WM_WIFI_TX_RATEIDX_MCS7,
WM_WIFI_TX_RATEIDX_MCS8, WM_WIFI_TX_RATEIDX_MCS9, WM_WIFI_TX_RATEIDX_MCS10, WM_WIFI_TX_RATEIDX_MCS11,
WM_WIFI_TX_RATEIDX_MCS12, WM_WIFI_TX_RATEIDX_MCS13, WM_WIFI_TX_RATEIDX_MCS14, WM_WIFI_TX_RATEIDX_MCS15,
WM_WIFI_TX_RATEIDX_MCS32
}
enum | tls_wifi_oneshot_result_type { WM_WIFI_ONESHOT_TYPE_SSIDPWD, WM_WIFI_ONESHOT_TYPE_CUSTOMDATA }
enum | tls_wifi_client_event_type { WM_WIFI_CLIENT_EVENT_ONLINE, WM_WIFI_CLIENT_EVENT_OFFLINE }
enum | tls_wifi_op_mode { STATION_MODE = 1, SOFTAP_MODE, STATIONAP_MODE }

Functions

void | tls_wifi_set_listen_mode (u8 enable)
This function is used to enable/disable listen mode. More...
u8 | tls_wifi_get_listen_mode (void)
This function is used to get listen mode. More...
u8 | tls_filter_mcast_mac (u8 *mac, u8 receive)
This function is used to filter multicast frames. More...
void | tls_wifi_set_bcast_mac_filter (u8 *mac, u8 receive, u8 clear)
This function is used to set mac filter. More...
void | tls_wifi_restore_bcast_mac_filter (void)
This function is used to restore mac filter to normal mode. More...
void | tls_wifi_data_recv_cb_register (tls_wifi_data_recv_callback callback)
This function is used to register recv wifi data callback function. More...
void | tls_wifi_data_ext_recv_cb_register (tls_wifi_data_ext_recv_callback callback)
This function is used to register recv wifi extended data callback function. More...
void | tls_wifi_mgmt_ext_recv_cb_register (tls_wifi_data_ext_recv_callback callback)
This function is used to register recv wifi management frame callback function. More...
void | tls_wifi_psm_chipsleep_cb_register (tls_wifi_psm_chipsleep_callback sleepcallback, tls_wifi_psm_prechipsleep_callback precallback, tls_wifi_psm_postchipsleep_callback postcallback)
This function is used to register chipsleep callback function when using chip sleep for powersaving. More...
void | tls_wifi_set_psm_chipsleep_flag (u32 flag)
This function is used to set chipsleep valid flag. More...
u32 | tls_wifi_get_psm_chipsleep_flag (void)
This function is used to get chipsleep valid flag. More...
int | tls_wifi_set_oneshot_flag (u8 flag)
This function is used to set oneshot config flag. More...
int | tls_wifi_get_oneshot_flag (void)
This function is used to get one shot flag. More...
void | tls_wifi_oneshot_result_cb_register (tls_wifi_oneshot_result_callback callback)
before calling tls_wifi_get_oneshot_ssidpwd or tls_wifi_get_oneshot_customdata, application should call this function to register the call back function More...
void | tls_wifi_get_oneshot_ssidpwd (u8 *ssid, u8 *pwd)
This function is used to get one shot ssid and password information. More...
void | tls_wifi_get_oneshot_customdata (u8 *data)
This function is used to get one shot custom data. More...
void | tls_wifi_change_chanel (u32 chanid)
This function is used to change channel actively. More...
int | tls_wifi_scan (void)
This function is used to trigger scan AP. More...
int | tls_wifi_passive_scan (void)
This function is used to trigger scan AP. More...
int | tls_wifi_scan_by_param (struct tls_wifi_scan_param_t *scan_param)
scan AP ,user can set channellist,scan times and switch interval per channel More...
void | tls_wifi_scan_result_cb_register (void(*callback)(void))
Before calling tls_wifi_scan() , application should call this function to register the call back function;. More...
int | tls_wifi_get_scan_rslt (u8 *buf, u32 buffer_size)
This function is used to get scan result. More...
int | tls_wifi_get_scan_rslt_format2 (u8 *buf, u32 buffer_size)
int | tls_wifi_softap_create (struct tls_softap_info_t *apinfo, struct tls_ip_info_t *ipinfo)
This function is used to create soft ap. More...
void | tls_wifi_softap_destroy (void)
This function is used to destroy soft ap. More...
enum tls_wifi_states | tls_wifi_softap_get_state (void)
This function is used to get soft ap's state. More...
void | tls_wifi_softap_client_event_register (tls_wifi_client_event_callback callback)
This function is used to register client event. More...
void | tls_wifi_get_authed_sta_info (u32 *sta_num, u8 *buf, u32 buf_size)
This function is used to get the authed sta list. More...
int | tls_wifi_ibss_create (struct tls_ibss_info_t *ibssinfo, struct tls_ibssip_info_t *ipinfo)
This function is used to create or join ibss. More...
void | tls_wifi_disconnect (void)
This function is used to destroy or leave Wi-Fi network. More...
int | tls_wifi_faslink_connect (void *connectinfo)
int | tls_wifi_get_fastlink_info (void *connectinfo)
int | tls_wifi_connect (u8 *ssid, u8 ssid_len, u8 *pwd, u8 pwd_len)
This function is used to connect AP. More...
int | tls_wifi_connect_by_bssid (u8 *bssid, u8 *pwd, u8 pwd_len)
This function is used to connect AP by BSSID. More...
int | tls_wifi_connect_by_ssid_bssid (u8 *ssid, u8 ssid_len, u8 *bssid, u8 *pwd, u8 pwd_len)
This function is used to connect AP by SSID an BSSID. More...
int | tls_wifi_auto_connect_flag (u8 opt, u8 *mode)
Set auto connect mode: Enable/Disable. Get auto connect mode parameter. More...
void | tls_wifi_status_change_cb_register (void(*callback)(u8 status))
This function is used to register wifi status changed callback function. More...
void | tls_wifi_get_current_bss (struct tls_curr_bss_t *bss)
This function is used to get AP's info. More...
void | tls_ethernet_data_rx_callback (net_rx_data_cb callback)
This function is used to register ETHERNET data rx callback function. More...
void | tls_wifi_set_psflag (bool enable, bool alwaysflag)
This function is used to set powersave flag. More...
u32 | tls_wifi_get_psflag (void)
This function is used to get current powersave flag. More...
void | tls_wifi_send_oneshotdata (u8 *dst, const u8 *ssid, u8 ssid_len)
This function is used to send oneshot data to other sta. More...
u8 | tls_wifi_get_tx_gain_max (enum tls_wifi_tx_rate tx_rate)
This function is used to get max gain by rate index. More...
int | tls_wifi_send_mgmt (enum tls_wifi_mgmt_type type, struct tls_wifi_hdr_mac_t *mac, u8 *ie, u16 ie_len, struct tls_wifi_tx_rate_t *tx)
This function is used to send 802.11 management packet. More...
int | tls_wifi_send_data (struct tls_wifi_hdr_mac_t *mac, u8 *data, u16 data_len, struct tls_wifi_tx_rate_t *tx)
This function is used to send an 802.11 frame. More...
enum tls_wifi_states | tls_wifi_get_state (void)
This function is used to get current Wi-Fi State. More...
int | tls_wifi_get_errno (void)
This function is used to get current error number during joining AP. More...
void | tls_wifi_perror (const char *info)
This function is used to print current error during joining AP. More...
const char * | tls_wifi_get_errinfo (int eno)
This function is used to get wifi error. More...
int | tls_wifi_mem_cfg (u32 startmem, u8 txcnt, u8 rxcnt)
This function is used to customize wifi tx&rx memory. More...
int | tls_wifi_softap_set_sta_num (unsigned char ap_sta_num)
This function is used to set max sta num. More...
int | tls_wifi_softap_del_station (unsigned char *hwaddr)
This function is used to deauth sta connected to softap. More...
int | tls_wifi_softap_add_blacksta (unsigned char *hwaddr)
This function used to add sta to black list for softap. More...
int | tls_wifi_softap_del_blacksta (unsigned char *hwaddr)
This function used to accept sta joining softap that sta in balck list. More...
int | tls_wifi_softap_get_blackinfo (u32 *sta_num, u8 *buf, u32 buf_size)
This function used to get stations from blacklist. More...
void | tls_wifi_enable_log (bool enable)
This function is used to set some information display in the process of wifi networking. More...
void | tls_wifi_set_tempcomp_flag (int flag)
This function is used to set temperature compensation flag. More...
u8 | tls_wifi_get_tempcomp_flag (void)
This function is used to get temperature compensation flag. More...
void | tls_wifi_set_fixed_rate (u32 fixrateindex, u32 retrycnt)
This function is used to get temperature compensation flag. More...
int | tls_wifi_cfg_listen_interval (u16 listen_interval)
This function is used to set listen_interval (dummy interface) More...
int | tls_wifi_cfg_connect_timeout (u16 timeout)
This function is used to set connect timeout. More...
int | tls_wifi_cfg_connect_scan_mode (u32 mode)
This function is used to configure scan mode. More...
int | tls_wifi_cfg_connect_pci (u32 pci_en)
This function is used to set pci flag. More...
int | tls_wifi_set_11b_digital_gain (u8 value)
This function is used to set 11b's digital gain. More...
u8 | tls_wifi_get_11b_digital_gain (void)
This function is used to get 11b's gain value. More...
int | tls_wifi_set_11n_digital_gain (u8 value)
This function is used to set 11n's digital gain. More...
u8 | tls_wifi_get_11n_digital_gain (void)
This function is used to get 11n's gain value. More...
int | tls_wl_get_isr_count (void)

Detailed Description

Wi-Fi API.

Author
WinnerMicro

Copyright (c) 2015 Winner Microelectronics Co., Ltd.

Macro Definition Documentation

◆ ETH_ALEN

#define ETH_ALEN 6

mac address length

◆ IEEE80211_ENCRYT_AUTO_WPA

#define IEEE80211_ENCRYT_AUTO_WPA 7

authenticate mode : WPA_PSK_TKIP&AES

◆ IEEE80211_ENCRYT_AUTO_WPA2

#define IEEE80211_ENCRYT_AUTO_WPA2 8

authenticate mode : WPA2_PSK_TKIP&AES

◆ IEEE80211_ENCRYT_CCMP_WPA

#define IEEE80211_ENCRYT_CCMP_WPA 4

authenticate mode : WPA_PSK_CCMP

◆ IEEE80211_ENCRYT_CCMP_WPA2

#define IEEE80211_ENCRYT_CCMP_WPA2 6

authenticate mode : WPA2_PSK_CCMP

◆ IEEE80211_ENCRYT_NONE

#define IEEE80211_ENCRYT_NONE 0

authenticate mode : open

◆ IEEE80211_ENCRYT_TKIP_WPA

#define IEEE80211_ENCRYT_TKIP_WPA 3

authenticate mode : WPA_PSK_TKIP

◆ IEEE80211_ENCRYT_TKIP_WPA2

#define IEEE80211_ENCRYT_TKIP_WPA2 5

authenticate mode : WPA2_PSK_TKIP

◆ IEEE80211_ENCRYT_WEP104

#define IEEE80211_ENCRYT_WEP104 2

authenticate mode : WEP104

◆ IEEE80211_ENCRYT_WEP40

#define IEEE80211_ENCRYT_WEP40 1

authenticate mode : WEP40

◆ IEEE80211_MODE_AP

#define IEEE80211_MODE_AP 4

softap mode

◆ IEEE80211_MODE_IBSS

#define IEEE80211_MODE_IBSS 2

ibss mode

◆ IEEE80211_MODE_INFRA

#define IEEE80211_MODE_INFRA 1

station mode

◆ WIFI_AUTO_CNT_FLAG_GET

#define WIFI_AUTO_CNT_FLAG_GET 0

get auto connecting flag

◆ WIFI_AUTO_CNT_FLAG_SET

#define WIFI_AUTO_CNT_FLAG_SET 1

set auto connecting flag

◆ WIFI_AUTO_CNT_OFF

#define WIFI_AUTO_CNT_OFF 0x0

disable Wi-Fi auto connecting

◆ WIFI_AUTO_CNT_ON

#define WIFI_AUTO_CNT_ON 0x1

enable Wi-Fi auto connecting

◆ WIFI_AUTO_CNT_TMP_OFF

#define WIFI_AUTO_CNT_TMP_OFF 0x3

disable Wi-Fi auto connecting temporary

◆ WIFI_DISCONNECTED

#define WIFI_DISCONNECTED 0x3

Wi-Fi disconnected

◆ WIFI_JOIN_FAILED

#define WIFI_JOIN_FAILED 0x2

Wi-Fi join net failed

◆ WIFI_JOIN_SUCCESS

#define WIFI_JOIN_SUCCESS 0x1

Wi-Fi join net successfully

◆ WIFI_SOFTAP_CLOSED

#define WIFI_SOFTAP_CLOSED 0x6

Wi-Fi close softap

◆ WIFI_SOFTAP_FAILED

#define WIFI_SOFTAP_FAILED 0x5

Wi-Fi create softap failure

◆ WIFI_SOFTAP_SUCCESS

#define WIFI_SOFTAP_SUCCESS 0x4

Wi-Fi create ap successfully

◆ WM_WIFI_EKEY

#define WM_WIFI_EKEY 2

pre-shared key may be incorrect

◆ WM_WIFI_ELSI

#define WM_WIFI_ELSI 3

Low signal intensity

◆ WM_WIFI_ENOAP

#define WM_WIFI_ENOAP 1

ap not exist

◆ WM_WIFI_ENOERR

#define WM_WIFI_ENOERR 0

no error

◆ WM_WIFI_ERR_KEY

#define WM_WIFI_ERR_KEY -2

invalid key

◆ WM_WIFI_ERR_SSID

#define WM_WIFI_ERR_SSID -1

invalid SSID

◆ WM_WIFI_SCANNING_BUSY

#define WM_WIFI_SCANNING_BUSY -4

scan is busing

◆ WM_WIFI_STA_BUSY

#define WM_WIFI_STA_BUSY -5

station is connecting

◆ WM_WIFI_WPS_BUSY

#define WM_WIFI_WPS_BUSY -3

wps is busing

Typedef Documentation

◆ net_rx_data_cb

typedef int(* net_rx_data_cb) (const u8 *bssid, u8 *buf, u32 buf_len)

callback function of receive ETHERNET data

◆ tls_wifi_data_ext_recv_callback

typedef void(* tls_wifi_data_ext_recv_callback) (u8 *data, u32 data_len, struct tls_wifi_ext_t *ext)

callback function of receive Wi-Fi data with some information of the physical layer

◆ tls_wifi_data_recv_callback

typedef void(* tls_wifi_data_recv_callback) (u8 *data, u32 data_len)

callback function of receive Wi-Fi data

◆ tls_wifi_psm_chipsleep_callback

typedef void(* tls_wifi_psm_chipsleep_callback) (u32 sleeptime)

callback function of Wi-Fi PSMode Using chipsleep function

◆ tls_wifi_psm_postchipsleep_callback

typedef void(* tls_wifi_psm_postchipsleep_callback) (void)

callback function of Wi-Fi PSMode Postprocess after chip wakeup

◆ tls_wifi_psm_prechipsleep_callback

typedef void(* tls_wifi_psm_prechipsleep_callback) (void)

callback function of Wi-Fi PSMode Preprocess when enter chipsleep function

Enumeration Type Documentation

◆ tls_wifi_auth_mode

enum tls_wifi_auth_mode
Enumerator
WM_WIFI_AUTH_MODE_OPEN | authenticate mode : open
WM_WIFI_AUTH_MODE_WEP_AUTO | authenticate mode : wep (open or/and shared...)
WM_WIFI_AUTH_MODE_WPA_PSK_TKIP | authenticate mode : wpa psk rc4
WM_WIFI_AUTH_MODE_WPA_PSK_CCMP | authenticate mode : wpa psk aes
WM_WIFI_AUTH_MODE_WPA_PSK_AUTO | authenticate mode : wpa psk, tkip and aes
WM_WIFI_AUTH_MODE_WPA2_PSK_TKIP | authenticate mode : wpa2 psk rc4
WM_WIFI_AUTH_MODE_WPA2_PSK_CCMP | authenticate mode : wpa2 psk aes
WM_WIFI_AUTH_MODE_WPA2_PSK_AUTO | authenticate mode : wpa2 psk, tkip and aes
WM_WIFI_AUTH_MODE_WPA_WPA2_PSK_AUTO | authenticate mode : wpa and wpa2, tkip and aes

◆ tls_wifi_cipher_mode

enum tls_wifi_cipher_mode

Wi-Fi group/pairwise cipher enumu

◆ tls_wifi_encrypt_mode

enum tls_wifi_encrypt_mode

Wi-Fi encryption enum

Enumerator
WM_WIFI_ECN_MODE_OPEN | encrypt mode : open
WM_WIFI_ECN_MODE_WEP | encrypt mode : wep
WM_WIFI_ECN_MODE_WPA_PSK | encrypt mode : wpa psk
WM_WIFI_ECN_MODE_WPA2_PSK | encrypt mode : wpa2 psk
WM_WIFI_ECN_MODE_WPA_WPA2_PSK | encrypt mode : wpa and wpa2 psk
WM_WIFI_ECN_MODE_UNKNOWN | encrypt mode : unknown

◆ tls_wifi_mgmt_type

enum tls_wifi_mgmt_type

frame type of the manager

Enumerator
WM_WIFI_MGMT_TYPE_ASSOC_REQ | association request frame
WM_WIFI_MGMT_TYPE_ASSOC_RESP | association response frame
WM_WIFI_MGMT_TYPE_REASSOC_REQ | reassociation request frame
WM_WIFI_MGMT_TYPE_REASSOC_RESP | reassociation response frame
WM_WIFI_MGMT_TYPE_PROBE_REQ | probe request frame
WM_WIFI_MGMT_TYPE_PROBE_RESP | probe response frame
WM_WIFI_MGMT_TYPE_BEACON | beacon frame
WM_WIFI_MGMT_TYPE_ATIM | ATIM frame
WM_WIFI_MGMT_TYPE_DISASSOC | disassociation frame
WM_WIFI_MGMT_TYPE_AUTH | authentication frame
WM_WIFI_MGMT_TYPE_DEAUTH | deauthentication frame
WM_WIFI_MGMT_TYPE_ACTION | action frame

◆ tls_wifi_states

enum tls_wifi_states

Wi-Fi states

Enumerator
WM_WIFI_DISCONNECTED | Disconnected state
WM_WIFI_SCANNING | Scanning for a network
WM_WIFI_JOINING | Trying to join with a BSS/SSID
WM_WIFI_JOINED | All authentication completed

◆ tls_wifi_tx_rate

enum tls_wifi_tx_rate

Wi-Fi ransport rate

Enumerator
WM_WIFI_TX_RATEIDX_1M | 11b, 1M
WM_WIFI_TX_RATEIDX_2M | 11b, 2M
WM_WIFI_TX_RATEIDX_5_5M | 11b, 5.5M
WM_WIFI_TX_RATEIDX_11M | 11b, 11M
WM_WIFI_TX_RATEIDX_6M | 11g, 6M
WM_WIFI_TX_RATEIDX_9M | 11g, 9M
WM_WIFI_TX_RATEIDX_12M | 11g, 12M
WM_WIFI_TX_RATEIDX_18M | 11g, 18M
WM_WIFI_TX_RATEIDX_24M | 11g, 24M
WM_WIFI_TX_RATEIDX_36M | 11g, 36M
WM_WIFI_TX_RATEIDX_48M | 11g, 48M
WM_WIFI_TX_RATEIDX_54M | 11g, 54M
WM_WIFI_TX_RATEIDX_MCS0 | 11n-20MHz, mcs0
WM_WIFI_TX_RATEIDX_MCS1 | 11n-20MHz, mcs1
WM_WIFI_TX_RATEIDX_MCS2 | 11n-20MHz, mcs2
WM_WIFI_TX_RATEIDX_MCS3 | 11n-20MHz, mcs3
WM_WIFI_TX_RATEIDX_MCS4 | 11n-20MHz, mcs4
WM_WIFI_TX_RATEIDX_MCS5 | 11n-20MHz, mcs5
WM_WIFI_TX_RATEIDX_MCS6 | 11n-20MHz, mcs6
WM_WIFI_TX_RATEIDX_MCS7 | 11n-20MHz, mcs7
WM_WIFI_TX_RATEIDX_MCS8 | 11n-40MHz, mcs8
WM_WIFI_TX_RATEIDX_MCS9 | 11n-40MHz, mcs9
WM_WIFI_TX_RATEIDX_MCS10 | 11n-40MHz, mcs10
WM_WIFI_TX_RATEIDX_MCS11 | 11n-40MHz, mcs11
WM_WIFI_TX_RATEIDX_MCS12 | 11n-40MHz, mcs12
WM_WIFI_TX_RATEIDX_MCS13 | 11n-40MHz, mcs13
WM_WIFI_TX_RATEIDX_MCS14 | 11n-40MHz, mcs14
WM_WIFI_TX_RATEIDX_MCS15 | 11n-40MHz, mcs15
WM_WIFI_TX_RATEIDX_MCS32 | invalid rate


W800 SDK APIs: doxy_out/include/list.h Source File

  • doxy_out
  • include
list.h
1 /*
2 * @file list.h
3 * @brief Doubly-linked list
4 * @copyright (c) 2009, Jouni Malinen <j@w1.fi>
5 *
6 * @note This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * Alternatively, this software may be distributed under the terms of BSD
11 * license.
12 *
13 * See README and COPYING for more details.
14 */
15
16 #ifndef COMMON_LIST_H
17 #define COMMON_LIST_H
18
19 #include <stdio.h>
20
22 struct dl_list {
23 struct dl_list *next;
24 struct dl_list *prev;
25 };
26
56 static __inline void dl_list_init(struct dl_list *list)
57 {
58 list->next = list;
59 list->prev = list;
60 }
61
72 static __inline void dl_list_add(struct dl_list *list, struct dl_list *item)
73 {
74 item->next = list->next;
75 item->prev = list;
76 list->next->prev = item;
77 list->next = item;
78 }
79
90 static __inline void dl_list_add_tail(struct dl_list *list, struct dl_list *item)
91 {
92 dl_list_add(list->prev, item);
93 }
94
104 static __inline void dl_list_del(struct dl_list *item)
105 {
106 item->next->prev = item->prev;
107 item->prev->next = item->next;
108 item->next = NULL;
109 item->prev = NULL;
110 }
111
122 static __inline int dl_list_empty(struct dl_list *list)
123 {
124 return list->next == list;
125 }
126
136 static __inline unsigned int dl_list_len(struct dl_list *list)
137 {
138 struct dl_list *item;
139 int count = 0;
140 for (item = list->next; item != list; item = item->next)
141 count++;
142 return count;
143 }
144
153 #ifndef offsetof
154
155 #define offsetof(type, member) ((long) &((type *) 0)->member)
156 #endif
157
169 #define dl_list_entry(item, type, member) \
170 ((type *) ((char *) item - offsetof(type, member)))
171
183 #define dl_list_first(list, type, member) \
184 (dl_list_empty((list)) ? NULL : \
185 dl_list_entry((list)->next, type, member))
186
198 #define dl_list_last(list, type, member) \
199 (dl_list_empty((list)) ? NULL : \
200 dl_list_entry((list)->prev, type, member))
201
214 #define dl_list_for_each(item, list, type, member) \
215 for (item = dl_list_entry((list)->next, type, member); \
216 &item->member != (list); \
217 item = dl_list_entry(item->member.next, type, member))
218
232 #define dl_list_for_each_safe(item, n, list, type, member) \
233 for (item = dl_list_entry((list)->next, type, member), \
234 n = dl_list_entry(item->member.next, type, member); \
235 &item->member != (list); \
236 item = n, n = dl_list_entry(n->member.next, type, member))
237
250 #define dl_list_for_each_reverse(item, list, type, member) \
251 for (item = dl_list_entry((list)->prev, type, member); \
252 &item->member != (list); \
253 item = dl_list_entry(item->member.prev, type, member))
254
256 #define DEFINE_DL_LIST(name) \
257 struct dl_list name = { &(name), &(name) }
258
270 #define __dl_list_for_each(item, list, member) \
271 for (item = dl_list_entry((list)->next, typeof(*(item)), member); \
272 &item->member != (list); \
273 item = dl_list_entry(item->member.next, typeof(*(item)), member))
274
287 #define __dl_list_for_each_safe(item, n, list, member) \
288 for (item = dl_list_entry((list)->next, typeof(*(item)), member), \
289 n = dl_list_entry(item->member.next, typeof(*(item)), member); \
290 &item->member != (list); \
291 item = n, n = dl_list_entry(n->member.next, typeof(*(item)), member))
292
304 #define __dl_list_for_each_reverse(item, list, member) \
305 for (item = dl_list_entry((list)->prev, typeof(*(item)), member); \
306 &item->member != (list); \
307 item = dl_list_entry(item->member.prev, typeof(*(item)), member))
308
317 #endif /* LIST_H */
dl_list_del
static __inline void dl_list_del(struct dl_list *item)
deletes entry from list
Definition: list.h:104
dl_list_empty
static __inline int dl_list_empty(struct dl_list *list)
tests whether a list is empty
Definition: list.h:122
dl_list::prev
struct dl_list * prev
Definition: list.h:24
dl_list
Definition: list.h:22
dl_list_init
static __inline void dl_list_init(struct dl_list *list)
reinitialize the list
Definition: list.h:56
dl_list_len
static __inline unsigned int dl_list_len(struct dl_list *list)
count length of the list
Definition: list.h:136
dl_list_add
static __inline void dl_list_add(struct dl_list *list, struct dl_list *item)
Insert a new entry after the specified head.
Definition: list.h:72
dl_list::next
struct dl_list * next
Definition: list.h:23
dl_list_add_tail
static __inline void dl_list_add_tail(struct dl_list *list, struct dl_list *item)
Insert a new entry before the specified head.
Definition: list.h:90


W800 SDK APIs: doxy_out/include/random.h Source File

  • doxy_out
  • include
random.h
1 /*
2 * @file random.h
3 * @brief Random number generator
4 * @copyright (c) 2010-2011, Jouni Malinen <j@w1.fi>
5 *
6 *
7 * @note This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * @note Alternatively, this software may be distributed under the terms of BSD
12 * license.
13 *
14 * @note See README and COPYING for more details.
15 */
16
17 #ifndef RANDOM_H
18 #define RANDOM_H
19
30 void random_add_randomness(const void *buf, size_t len);
43 int random_get_bytes(void *buf, size_t len);
44
45 #define random_mark_pool_ready() do { } while (0)
46
47 #define random_pool_ready() 1
48
49 #endif /* RANDOM_H */
50


W800 SDK APIs: doxy_out/include/wm_bt_config.h File Reference

  • doxy_out
  • include
Macros
wm_bt_config.h File Reference

WM bluetooth model configure. More...

#include "wm_config.h"

Go to the source code of this file.

Macros

#define | WM_BTA_AV_SINK_INCLUDED CFG_ON
#define | WM_BTA_HFP_HSP_INCLUDED CFG_ON
#define | WM_BTA_SPPS_INCLUDED CFG_ON
#define | WM_BTA_SPPC_INCLUDED CFG_OFF
#define | WM_AUDIO_BOARD_INCLUDED CFG_OFF
#define | WM_BLE_PERIPHERAL_INCLUDED CFG_OFF
#define | WM_BLE_CENTRAL_INCLUDED CFG_OFF
#define | WM_MESH_INCLUDED CFG_OFF
#define | WM_BT_INCLUDED CFG_ON
#define | WM_BLE_INCLUDED CFG_OFF
#define | WM_NIMBLE_INCLUDE CFG_OFF
#define | WM_BLE_MAX_CONNECTION 1

Detailed Description

WM bluetooth model configure.

Author
winnermicro

Copyright (c) 2015 Winner Microelectronics Co., Ltd.


W800 SDK APIs: doxy_out/include/wm_config.h File Reference

  • doxy_out
  • include
Macros
wm_config.h File Reference

w800 chip inferface configure More...

#include <csi_config.h>
#include "wm_os_config.h"
#include "wm_wifi_config.h"
#include "wm_ram_config.h"

Go to the source code of this file.

Macros

#define | CFG_ON 1
#define | CFG_OFF 0
#define | WM_CONFIG_DEBUG_UART1 CFG_OFF/*PRINTF PORT USE UART1*/
#define | TLS_CONFIG_HS_SPI CFG_ON /*High Speed SPI*/
#define | TLS_CONFIG_LS_SPI CFG_ON /*Low Speed SPI*/
#define | TLS_CONFIG_UART CFG_ON /*UART*/
#define | TLS_CONFIG_ONLY_FACTORY_ATCMD CFG_OFF
#define | TLS_CONFIG_HOSTIF CFG_ON
#define | TLS_CONFIG_AT_CMD (CFG_ON && TLS_CONFIG_HOSTIF)
#define | TLS_CONFIG_RI_CMD (CFG_ON && TLS_CONFIG_HOSTIF)
#define | TLS_CONFIG_RMMS (CFG_ON && TLS_CONFIG_HOSTIF)
#define | TLS_CONFIG_IPV4 CFG_ON
#define | TLS_CONFIG_IPV6 CFG_OFF
#define | TLS_CONFIG_DHCP_OPTION60 "Winnermicro:W800_01"
#define | TLS_CONFIG_SOCKET_STD CFG_ON
#define | TLS_CONFIG_SOCKET_RAW CFG_ON
#define | TLS_CONFIG_CMD_USE_RAW_SOCKET (CFG_ON && TLS_CONFIG_SOCKET_RAW)
#define | TLS_CONFIG_CMD_NET_USE_LIST_FTR CFG_ON
#define | TLS_CONFIG_HARD_CRYPTO CFG_ON
#define | TLS_CONFIG_NTO CFG_ON
#define | TLS_CONFIG_CRYSTAL_24M CFG_OFF
#define | TLS_CONFIG_HTTP_CLIENT (CFG_ON)
#define | TLS_CONFIG_HTTP_CLIENT_PROXY CFG_OFF
#define | TLS_CONFIG_HTTP_CLIENT_AUTH_BASIC CFG_OFF
#define | TLS_CONFIG_HTTP_CLIENT_AUTH_DIGEST CFG_OFF
#define | TLS_CONFIG_HTTP_CLIENT_AUTH (TLS_CONFIG_HTTP_CLIENT_AUTH_BASIC || TLS_CONFIG_HTTP_CLIENT_AUTH_DIGEST)
#define | TLS_CONFIG_HTTP_CLIENT_SECURE (CFG_ON && (TLS_CONFIG_USE_POLARSSL || TLS_CONFIG_USE_MBEDTLS))
#define | TLS_CONFIG_HTTP_CLIENT_TASK (CFG_ON && TLS_CONFIG_HTTP_CLIENT)
#define | TLS_CONFIG_USE_POLARSSL CFG_OFF
#define | TLS_CONFIG_USE_MBEDTLS CFG_ON
#define | TLS_CONFIG_SERVER_SIDE_SSL (CFG_ON && TLS_CONFIG_HTTP_CLIENT_SECURE && TLS_CONFIG_USE_MBEDTLS) /*MUST configure TLS_CONFIG_HTTP_CLIENT_SECURE CFG_ON */
#define | TLS_CONFIG_IGMP CFG_ON
#define | TLS_CONFIG_NTP CFG_ON
#define | TLS_CONFIG_BLE CFG_OFF
#define | TLS_CONFIG_BR_EDR CFG_ON
#define | TLS_CONFIG_BT (TLS_CONFIG_BR_EDR || TLS_CONFIG_BLE)

Detailed Description

w800 chip inferface configure

Author
dave
Copyright
(c) 2014 Winner Microelectronics Co., Ltd.

Macro Definition Documentation

◆ TLS_CONFIG_HOSTIF

#define TLS_CONFIG_HOSTIF CFG_ON

Host Interface&Command

◆ TLS_CONFIG_HS_SPI

#define TLS_CONFIG_HS_SPI CFG_ON /*High Speed SPI*/

Driver Support

◆ TLS_CONFIG_HTTP_CLIENT

#define TLS_CONFIG_HTTP_CLIENT (CFG_ON)

HTTP CLIENT

◆ TLS_CONFIG_IGMP

#define TLS_CONFIG_IGMP CFG_ON

IGMP

◆ TLS_CONFIG_ONLY_FACTORY_ATCMD

#define TLS_CONFIG_ONLY_FACTORY_ATCMD CFG_OFF

Only Factory Test At Command

◆ TLS_CONFIG_SOCKET_STD

#define TLS_CONFIG_SOCKET_STD CFG_ON

SOCKET CONFIG


W800 SDK APIs: doxy_out/include/wm_debug.h File Reference

  • doxy_out
  • include
Macros
wm_debug.h File Reference

debug Module APIs More...

#include <stdio.h>
#include <stdlib.h>
#include "wm_config.h"
#include "wm_osal.h"

Go to the source code of this file.

Macros

#define | TLS_DBG_ON 1
#define | TLS_DBG_OFF 0
#define | TLS_DBG_SIMPLE 1
#define | TLS_DBG_LEVEL_INFO TLS_DBG_OFF
#define | TLS_DBG_LEVEL_WARNING TLS_DBG_OFF
#define | TLS_DBG_LEVEL_ERR TLS_DBG_OFF
#define | TLS_DBG_LEVEL_DUMP TLS_DBG_OFF
#define | TLS_GENERAL_DBG TLS_DBG_OFF
#define | __TLS_DBGPRT_INFO(fmt, ...) printf(fmt, ##__VA_ARGS__)
#define | __TLS_DBGPRT_WARNING(fmt, ...) printf(fmt, ##__VA_ARGS__)
#define | __TLS_DBGPRT_ERR(fmt, ...) printf(fmt, ##__VA_ARGS__)
#define | TLS_DBGPRT_INFO(f, a...)
#define | TLS_DBGPRT_WARNING(f, a...)
#define | TLS_DBGPRT_ERR(f, a...)
#define | TLS_DBGPRT_DUMP(p, len)

Detailed Description

debug Module APIs

Author
dave

Copyright (c) 2014 Winner Microelectronics Co., Ltd.

Macro Definition Documentation

◆ TLS_DBG_LEVEL_DUMP

#define TLS_DBG_LEVEL_DUMP TLS_DBG_OFF

Define the debugging level: dump

◆ TLS_DBG_LEVEL_ERR

#define TLS_DBG_LEVEL_ERR TLS_DBG_OFF

Define the debugging level: error

◆ TLS_DBG_LEVEL_INFO

#define TLS_DBG_LEVEL_INFO TLS_DBG_OFF

Define the debugging level: info

◆ TLS_DBG_LEVEL_WARNING

#define TLS_DBG_LEVEL_WARNING TLS_DBG_OFF

Define the debugging level: warning

◆ TLS_DBG_OFF

#define TLS_DBG_OFF 0

Define the debugging switch: off

◆ TLS_DBG_ON

#define TLS_DBG_ON 1

Define the debugging switch: on

◆ TLS_GENERAL_DBG

#define TLS_GENERAL_DBG TLS_DBG_OFF

general debug info switch, default: off


W800 SDK APIs: doxy_out/include/wm_include.h File Reference

  • doxy_out
  • include
wm_include.h File Reference

the configuration file of sdk More...

#include <stdio.h>
#include <stdlib.h>
#include "wm_type_def.h"
#include "wm_uart.h"
#include "wm_gpio.h"
#include "wm_hostspi.h"
#include "wm_socket.h"
#include "wm_sockets.h"
#include "wm_wifi.h"
#include "wm_hspi.h"
#include "wm_pwm.h"
#include "wm_params.h"
#include "wm_osal.h"
#include "wm_netif.h"
#include "wm_efuse.h"
#include "wm_mem.h"
#include "wm_demo.h"
#include "wm_regs.h"

Go to the source code of this file.

Detailed Description

the configuration file of sdk

Author
winnermicro

Copyright (c) 2014 Winner Microelectronics Co., Ltd.


W800 SDK APIs: doxy_out/include/wm_ram_config.h File Reference

  • doxy_out
  • include
Macros | Enumerations | Variables
wm_ram_config.h File Reference

WM ram model configure. More...

#include "wm_config.h"

Go to the source code of this file.

Macros

#define | SLAVE_HSPI_SDIO_ADDR ((unsigned int)(&__heap_end))
#define | SLAVE_HSPI_MAX_SIZE (0x2000)
#define | WIFI_MEM_START_ADDR (SLAVE_HSPI_SDIO_ADDR + SLAVE_HSPI_MAX_SIZE)
#define | SYS_REBOOT_REASON_ADDRESS (0x20047EFC)

Enumerations

enum SYS_REBOOT_REASON {
REBOOT_REASON_POWER_ON = 0, REBOOT_REASON_STANDBY = 1, REBOOT_REASON_EXCEPTION = 2, REBOOT_REASON_WDG_TIMEOUT = 3,
REBOOT_REASON_ACTIVE = 4, REBOOT_REASON_MAX
}

Variables

unsigned int | __heap_end
unsigned int | __heap_start

Detailed Description

WM ram model configure.

Author
winnermicro

Copyright (c) 2015 Winner Microelectronics Co., Ltd.


W800 SDK APIs: doxy_out/include/wm_regs.h File Reference

  • doxy_out
  • include
Macros | Typedefs | Enumerations | Functions
wm_regs.h File Reference

register & operation file More...

#include "wm_type_def.h"

Go to the source code of this file.

Macros

#define | M8(adr) (*((vu8 *) (adr)))
#define | M16(adr) (*((vu16*) (adr)))
#define | M32(adr) (*((vu32*) (adr)))
#define | ATTRIBUTE_ISR __attribute__((isr))
#define | __I volatile const
#define | __O volatile
#define | __IO volatile
#define | BIT(x) (1UL << (x))
#define | APB_CLK (40000000) /* 40MHz */
#define | DEVICE_BASE_ADDR 0x40000000
#define | HR_SDIO_BASE_ADDR (DEVICE_BASE_ADDR + 0x2400)
#define | HR_SDIO_CIS0 (HR_SDIO_BASE_ADDR + 0x008)
#define | HR_SDIO_CIS1 (HR_SDIO_BASE_ADDR + 0x00C)
#define | HR_SDIO_CSA (HR_SDIO_BASE_ADDR + 0x010)
#define | HR_SDIO_READ (HR_SDIO_BASE_ADDR + 0x014)
#define | HR_SDIO_WRITE (HR_SDIO_BASE_ADDR + 0x018)
#define | HR_SDIO_INTEN (HR_SDIO_BASE_ADDR + 0x030)
#define | HR_SDIO_OCR (HR_SDIO_BASE_ADDR + 0x034)
#define | HR_SDIO_CIA (HR_SDIO_BASE_ADDR + 0x024)
#define | HR_SDIO_PROG (HR_SDIO_BASE_ADDR + 0x028)
#define | HR_SDIO_HOST_BASE_ADDR (DEVICE_BASE_ADDR + 0xA00)
#define | HR_SDIO_HOST_MMC_CTRL (HR_SDIO_HOST_BASE_ADDR + 0x0)
#define | HR_HSPI_BASE_ADDR (DEVICE_BASE_ADDR + 0x2600)
#define | HR_HSPI_CLEAR_FIFO (HR_HSPI_BASE_ADDR)
#define | HR_HSPI_SPI_CFG (HR_HSPI_BASE_ADDR + 0x04)
#define | HR_HSPI_MODE_CFG (HR_HSPI_BASE_ADDR + 0x08)
#define | HR_HSPI_INT_MASK (HR_HSPI_BASE_ADDR + 0x0C)
#define | HR_HSPI_INT_STTS (HR_HSPI_BASE_ADDR + 0x10)
#define | HR_HSPI_RXDAT_LEN (HR_HSPI_BASE_ADDR + 0x18)
#define | HR_FLASH_BASE_ADDR (DEVICE_BASE_ADDR + 0x2000)
#define | HR_FLASH_CMD_ADDR (HR_FLASH_BASE_ADDR + 0x000)
#define | HR_FLASH_CMD_START (HR_FLASH_BASE_ADDR + 0x004)
#define | HR_FLASH_CR (HR_FLASH_BASE_ADDR + 0x008)
#define | HR_FLASH_ADDR (HR_FLASH_BASE_ADDR + 0x010)
#define | HR_FLASH_ENCRYPT_CTRL (HR_FLASH_BASE_ADDR + 0x014)
#define | HR_FLASH_KEY_STATUS (HR_FLASH_BASE_ADDR + 0x018)
#define | HR_SDIO_WRAPPER_BASE_ADDR (DEVICE_BASE_ADDR + 0x2800)
#define | HR_SDIO_INT_SRC (HR_SDIO_WRAPPER_BASE_ADDR + 0x000)
#define | HR_SDIO_INT_MASK (HR_SDIO_WRAPPER_BASE_ADDR + 0x004)
#define | HR_SDIO_UPCMDVALID (HR_SDIO_WRAPPER_BASE_ADDR + 0x008)
#define | HR_SDIO_DOWNCMDVALID (HR_SDIO_WRAPPER_BASE_ADDR + 0x00C)
#define | HR_SDIO_TXBD_LINKEN (HR_SDIO_WRAPPER_BASE_ADDR + 0x010)
#define | HR_SDIO_TXBD_ADDR (HR_SDIO_WRAPPER_BASE_ADDR + 0x014)
#define | HR_SDIO_TXEN (HR_SDIO_WRAPPER_BASE_ADDR + 0x018)
#define | HR_SDIO_TX_STTS (HR_SDIO_WRAPPER_BASE_ADDR + 0x01C)
#define | HR_SDIO_RXBD_LINKEN (HR_SDIO_WRAPPER_BASE_ADDR + 0x020)
#define | HR_SDIO_RXBD_ADDR (HR_SDIO_WRAPPER_BASE_ADDR + 0x024)
#define | HR_SDIO_RXEN (HR_SDIO_WRAPPER_BASE_ADDR + 0x028)
#define | HR_SDIO_RX_STTS (HR_SDIO_WRAPPER_BASE_ADDR + 0x02C)
#define | HR_SDIO_CMD_ADDR (HR_SDIO_WRAPPER_BASE_ADDR + 0x030)
#define | HR_SDIO_CMD_SIZE (HR_SDIO_WRAPPER_BASE_ADDR + 0x034)
#define | SDIO_WP_INT_SRC_CMD_DOWN (1UL<<3)
#define | SDIO_WP_INT_SRC_CMD_UP (1UL<<2)
#define | SDIO_WP_INT_SRC_DATA_DOWN (1UL<<1)
#define | SDIO_WP_INT_SRC_DATA_UP (1UL<<0)
#define | HR_DMA_BASE_ADDR (DEVICE_BASE_ADDR + 0x800)
#define | HR_DMA_INT_MASK (HR_DMA_BASE_ADDR + 0x0)
#define | HR_DMA_INT_SRC (HR_DMA_BASE_ADDR + 0x4)
#define | HR_DMA_CHNL_SEL (HR_DMA_BASE_ADDR + 0x08)
#define | HR_DMA_CHNL0_SRC_ADDR (HR_DMA_BASE_ADDR + 0x10)
#define | HR_DMA_CHNL0_DEST_ADDR (HR_DMA_BASE_ADDR + 0x14)
#define | HR_DMA_CHNL0_SRC_WRAP_ADDR (HR_DMA_BASE_ADDR + 0x18)
#define | HR_DMA_CHNL0_DEST_WRAP_ADDR (HR_DMA_BASE_ADDR + 0x1C)
#define | HR_DMA_CHNL0_WRAP_SIZE (HR_DMA_BASE_ADDR + 0x20)
#define | HR_DMA_CHNL0_CHNL_CTRL (HR_DMA_BASE_ADDR + 0x24)
#define | HR_DMA_CHNL0_DMA_MODE (HR_DMA_BASE_ADDR + 0x28)
#define | HR_DMA_CHNL0_DMA_CTRL (HR_DMA_BASE_ADDR + 0x2C)
#define | HR_DMA_CHNL0_DMA_STATUS (HR_DMA_BASE_ADDR + 0x30)
#define | HR_DMA_CHNL0_LINK_DEST_ADDR (HR_DMA_BASE_ADDR + 0x34)
#define | HR_DMA_CHNL0_CURRENT_DEST_ADDR (HR_DMA_BASE_ADDR + 0x38)
#define | DMA_STARTADDRESS HR_DMA_BASE_ADDR
#define | DMA_INTMASK_REG (*(volatile unsigned int*)(DMA_STARTADDRESS+0x000))
#define | DMA_INTSRC_REG (*(volatile unsigned int*)(DMA_STARTADDRESS+0x004))
#define | DMA_CHANNEL_SEL (*(volatile unsigned int*)(DMA_STARTADDRESS+0x008))
#define | DMA_CHNL_REG_BASE (DMA_STARTADDRESS+0x010)
#define | DMA_SRCADDR_REG(ch) (*(volatile unsigned int*)(DMA_CHNL_REG_BASE + 0x30 * (ch /*- 1*/) +0x00))
#define | DMA_DESTADDR_REG(ch) (*(volatile unsigned int*)(DMA_CHNL_REG_BASE + 0x30 * (ch /*- 1*/) +0x04))
#define | DMA_SRCWRAPADDR_REG(ch) (*(volatile unsigned int*)(DMA_CHNL_REG_BASE + 0x30 * (ch /*- 1*/) +0x08))
#define | DMA_DESTWRAPADDR_REG(ch) (*(volatile unsigned int*)(DMA_CHNL_REG_BASE + 0x30 * (ch /*- 1*/) +0x0C))
#define | DMA_WRAPSIZE_REG(ch) (*(volatile unsigned int*)(DMA_CHNL_REG_BASE + 0x30 * (ch /*- 1*/) +0x10))
#define | DMA_CHNLCTRL_REG(ch) (*(volatile unsigned int*)(DMA_CHNL_REG_BASE + 0x30 * (ch /*- 1*/) +0x14))
#define | DMA_MODE_REG(ch) (*(volatile unsigned int*)(DMA_CHNL_REG_BASE + 0x30 * (ch /*- 1*/) +0x18))
#define | DMA_CTRL_REG(ch) (*(volatile unsigned int*)(DMA_CHNL_REG_BASE + 0x30 * (ch /*- 1*/) +0x1C))
#define | DMA_STATUS_REG(ch) (*(volatile unsigned int*)(DMA_CHNL_REG_BASE + 0x30 * (ch /*- 1*/) +0x20))
#define | DMA_DESC_ADDR_REG(ch) (*(volatile unsigned int*)(DMA_CHNL_REG_BASE + 0x30 * (ch /*- 1*/) +0x24))
#define | DMA_CURRDESTADDR_REG(ch) (*(volatile unsigned int*)(DMA_CHNL_REG_BASE + 0x30 * (ch /*- 1*/) +0x28))
#define | DMA_CHNL_CTRL_CHNL_ON (1<<0)
#define | DMA_CHNL_CTRL_CHNL_OFF (1<<1)
#define | DMA_MODE_HARD_MODE (1<<0)
#define | DMA_MODE_CHAIN_MODE (1<<1)
#define | DMA_MODE_SEL_MASK (0xF<<2)
#define | DMA_MODE_SEL_UART_RX (0<<2)
#define | DMA_MODE_SEL_UART_TX (1<<2)
#define | DMA_MODE_SEL_PWM0 (2<<2)
#define | DMA_DODE_SEL_PWM1 (3<<2)
#define | DMA_MODE_SEL_LSSPI_RX (4<<2)
#define | DMA_MODE_SEL_LSSPI_TX (5<<2)
#define | DMA_MODE_SEL_SDADC_CH0 (6<<2)
#define | DMA_MODE_SEL_SDADC_CH1 (7<<2)
#define | DMA_MODE_SEL_SDADC_CH2 (8<<2)
#define | DMA_MODE_SEL_SDADC_CH3 (9<<2)
#define | DMA_MODE_SEL_I2S_RX (10<<2)
#define | DMA_MODE_SEL_I2S_TX (11<<2)
#define | DMA_MODE_SEL_SDIOHOST (12<<2)
#define | DMA_MODE_CHAIN_LINK_EN (1<<6)
#define | DMA_CTRL_AUTO_RELOAD (1<<0)
#define | DMA_CTRL_SRC_ADDR_INC (1<<1)
#define | DMA_CTRL_SRC_ADDR_CIR (3<<1)
#define | DMA_CTRL_DEST_ADDR_INC (1<<3)
#define | DMA_CTRL_DEST_ADDR_CIR (3<<3)
#define | DMA_CTRL_DATA_SIZE_BYTE (0<<5)
#define | DMA_CTRL_DATA_SIZE_SHORT (1<<5)
#define | DMA_CTRL_DATA_SIZE_WORD (2<<5)
#define | DMA_CTRL_BURST_SIZE1 (0<<7)
#define | DMA_CTRL_BURST_SIZE4 (1<<7)
#define | DMA_CTRL_TOTAL_MASK (0xFFF<<8)
#define | DMA_CTRL_TOTAL_SIZE(n) (n<<8)
#define | HR_PMU_BASE_ADDR (DEVICE_BASE_ADDR + 0xD00)
#define | HR_PMU_PS_CR (HR_PMU_BASE_ADDR + 0x00)
#define | HR_PMU_TIMER0 (HR_PMU_BASE_ADDR + 0x04)
#define | HR_PMU_TIMER1 (HR_PMU_BASE_ADDR + 0x08)
#define | HR_PMU_RTC_CTRL1 (HR_PMU_BASE_ADDR + 0x0C)
#define | HR_PMU_RTC_CTRL2 (HR_PMU_BASE_ADDR + 0x10)
#define | HR_PMU_INTERRUPT_SRC (HR_PMU_BASE_ADDR + 0x14)
#define | HR_PMU_INTERRUPT_MASK (HR_PMU_BASE_ADDR + 0x18)
#define | HR_PMU_WLAN_STTS (HR_PMU_BASE_ADDR + 0x1C)
#define | HR_PMU_BK_REG (HR_PMU_BASE_ADDR + 0x20)
#define | PMU_TIMER0_NTERRUPT_SRC (1UL << 0)
#define | PMU_TIMER1_NTERRUPT_SRC (1UL << 1)
#define | PMU_GPIO_NTERRUPT_SRC (1UL << 2)
#define | HR_CLK_BASE_ADDR (DEVICE_BASE_ADDR + 0xE00)
#define | HR_CLK_GATE_EN HR_CLK_BASE_ADDR
#define | HR_CLK_SOFT_CLK_MASK (HR_CLK_BASE_ADDR + 0x04)
#define | HR_CLK_BBP_CLT_CTRL (HR_CLK_BASE_ADDR + 0x08)
#define | HR_CLK_RST_CTL (HR_CLK_BASE_ADDR + 0x0c)
#define | HR_CLK_DIV_CTL (HR_CLK_BASE_ADDR + 0x10)
#define | HR_CLK_SEL_CTL (HR_CLK_BASE_ADDR + 0x14)
#define | HR_OSC_32K_REG (HR_CLK_BASE_ADDR + 0x14)
#define | HR_CLK_I2S_CTL (HR_CLK_BASE_ADDR + 0x18)
#define | HR_CLK_RST_STA (HR_CLK_BASE_ADDR + 0x1C)
#define | HR_MEM_BASE_ADDR (DEVICE_BASE_ADDR + 0xF00)
#define | HR_MEM_TXBUF_BASE_ADDR (HR_MEM_BASE_ADDR + 0x00)
#define | HR_MEM_RXBUF_BASE_ADDR (HR_MEM_BASE_ADDR + 0x04)
#define | HR_MEM_BUF_NUM_CFG (HR_MEM_BASE_ADDR + 0x08)
#define | HR_MEM_BUF_SIZE_CFG (HR_MEM_BASE_ADDR + 0x0C)
#define | HR_MEM_AGGR_CFG (HR_MEM_BASE_ADDR + 0x10)
#define | HR_MEM_BUF_EN (HR_MEM_BASE_ADDR + 0x14)
#define | HR_PSRRAM_BASE_ADDR (DEVICE_BASE_ADDR + 0x2200)
#define | HR_PSRAM_CTRL_ADDR (HR_PSRRAM_BASE_ADDR+ 0x00)
#define | HR_PSRAM_OVERTIMER_ADDR (HR_PSRRAM_BASE_ADDR+ 0x04)
#define | HR_APB_BASE_ADDR 0x40010000
#define | HR_I2C_BASE_ADDR (HR_APB_BASE_ADDR)
#define | HR_I2C_PRER_LO (HR_I2C_BASE_ADDR + 0x0)
#define | HR_I2C_PRER_HI (HR_I2C_BASE_ADDR + 0x04)
#define | HR_I2C_CTRL (HR_I2C_BASE_ADDR + 0x08)
#define | HR_I2C_TX_RX (HR_I2C_BASE_ADDR + 0x0C)
#define | HR_I2C_CR_SR (HR_I2C_BASE_ADDR + 0x10)
#define | HR_I2C_TXR (HR_I2C_BASE_ADDR + 0x14)
#define | HR_I2C_CR (HR_I2C_BASE_ADDR + 0x18)
#define | I2C_CTRL_INT_DISABLE (0x1UL<<6)
#define | I2C_CTRL_ENABLE (0x1UL<<7)
#define | I2C_CR_STA (0x1UL<<7)
#define | I2C_CR_STO (0x1UL<<6)
#define | I2C_CR_RD (0x1UL<<5)
#define | I2C_CR_WR (0x1UL<<4)
#define | I2C_CR_NAK (0x1UL<<3)
#define | I2C_CR_IACK (0x1UL)
#define | I2C_SR_NAK (0x1UL<<7)
#define | I2C_SR_BUSY (0x1UL<<6)
#define | I2C_SR_TIP (0x1UL<<1)
#define | I2C_SR_IF (0x1UL)
#define | HR_SD_ADC_BASE_ADDR (HR_APB_BASE_ADDR + 0x200)
#define | HR_SD_ADC_RESULT_REG ((HR_SD_ADC_BASE_ADDR+0x000))
#define | HR_SD_ADC_ANA_CTRL ((HR_SD_ADC_BASE_ADDR+0x004))
#define | HR_SD_ADC_PGA_CTRL ((HR_SD_ADC_BASE_ADDR+0x008))
#define | HR_SD_ADC_TEMP_CTRL ((HR_SD_ADC_BASE_ADDR+0x00C))
#define | HR_SD_ADC_CTRL ((HR_SD_ADC_BASE_ADDR+0x010))
#define | HR_SD_ADC_INT_STATUS ((HR_SD_ADC_BASE_ADDR+0x014))
#define | HR_SD_ADC_CMP_VALUE ((HR_SD_ADC_BASE_ADDR+0x018))
#define | HR_SPI_BASE_ADDR (HR_APB_BASE_ADDR + 0x400)
#define | HR_SPI_CHCFG_REG (HR_SPI_BASE_ADDR + 0x000)
#define | HR_SPI_SPICFG_REG (HR_SPI_BASE_ADDR + 0x004)
#define | HR_SPI_CLKCFG_REG (HR_SPI_BASE_ADDR + 0x008)
#define | HR_SPI_MODECFG_REG (HR_SPI_BASE_ADDR + 0x00C)
#define | HR_SPI_INT_MASK_REG (HR_SPI_BASE_ADDR + 0x010)
#define | HR_SPI_INT_STATUS_REG (HR_SPI_BASE_ADDR + 0x014)
#define | HR_SPI_STATUS_REG (HR_SPI_BASE_ADDR + 0x018)
#define | HR_SPI_TIMEOUT_REG (HR_SPI_BASE_ADDR + 0x01C)
#define | HR_SPI_TXDATA_REG (HR_SPI_BASE_ADDR + 0x020)
#define | HR_SPI_TRANSLEN_REG (HR_SPI_BASE_ADDR + 0x024)
#define | HR_SPI_SLV_XMIT_LEN_REG (HR_SPI_BASE_ADDR + 0x028)
#define | HR_SPI_RXDATA_REG (HR_SPI_BASE_ADDR + 0x030)
#define | SPIM_STARTADDRESS (HR_APB_BASE_ADDR + 0x400)
#define | SPIM_CHCFG_REG (*(volatile unsigned int*)(SPIM_STARTADDRESS+0x000))
#define | SPIM_SPICFG_REG (*(volatile unsigned int*)(SPIM_STARTADDRESS+0x004))
#define | SPIM_CLKCFG_REG (*(volatile unsigned int*)(SPIM_STARTADDRESS+0x008))
#define | SPIM_MODECFG_REG (*(volatile unsigned int*)(SPIM_STARTADDRESS+0x00C))
#define | SPIM_INTEN_REG (*(volatile unsigned int*)(SPIM_STARTADDRESS+0x010))
#define | SPIM_INTSRC_REG (*(volatile unsigned int*)(SPIM_STARTADDRESS+0x014))
#define | SPIM_SPISTATUS_REG (*(volatile unsigned int*)(SPIM_STARTADDRESS+0x018))
#define | SPIM_SPITIMEOUT_REG (*(volatile unsigned int*)(SPIM_STARTADDRESS+0x01C))
#define | SPIM_TXDATA_REG (*(volatile unsigned int*)(SPIM_STARTADDRESS+0x020))
#define | SPIM_TRANSLEN_REG (*(volatile unsigned int*)(SPIM_STARTADDRESS+0x024))
#define | SPIM_RXDATA_REG (*(volatile unsigned int*)(SPIM_STARTADDRESS+0x030))
#define | RSA_BASE_ADDRESS 0x40000000
#define | RSAXBUF (*((volatile unsigned long *) (RSA_BASE_ADDRESS + 0x0 )))
#define | RSAYBUF (*((volatile unsigned long *) (RSA_BASE_ADDRESS + 0x100 )))
#define | RSAMBUF (*((volatile unsigned long *) (RSA_BASE_ADDRESS + 0x200 )))
#define | RSADBUF (*((volatile unsigned long *) (RSA_BASE_ADDRESS + 0x300 )))
#define | RSACON (*((volatile unsigned long *) (RSA_BASE_ADDRESS + 0x400 )))
#define | RSAMC (*((volatile unsigned long *) (RSA_BASE_ADDRESS + 0x404 )))
#define | RSAN (*((volatile unsigned long *) (RSA_BASE_ADDRESS + 0x408 )))
#define | SPI_RX_INVALID_BITS(n) ((n) << 23)
#define | SPI_CLEAR_FIFOS (1U << 22)
#define | SPI_CONTINUE_MODE (1U << 21)
#define | SPI_RX_CHANNEL_ON (1U << 20)
#define | SPI_RX_CHANNEL_OFF (0U << 20)
#define | SPI_TX_CHANNEL_ON (1U << 19)
#define | SPI_TX_CHANNEL_OFF (0U << 19)
#define | SPI_VALID_CLKS_NUM(n) ((n) << 3)
#define | SPI_CS_LOW (0U << 2)
#define | SPI_CS_HIGH (1U << 2)
#define | SPI_FORCE_SPI_CS_OUT (1U << 1)
#define | SPI_START (1U << 0)
#define | SPI_FRAME_FORMAT_MOTO (0U << 17)
#define | SPI_FRAME_FORMAT_TI (1U << 17)
#define | SPI_FRAME_FORMAT_MICROWAIRE (2U << 17)
#define | SPI_TX_PIN_ALWS_DRIVER (1U << 16)
#define | SPI_CS_HOLD(n) ((n) << 12)
#define | CS_HOLD_1_CLKS 0
#define | CS_HOLD_2_CLKS 1
#define | CS_HOLD_4_CLKS 2
#define | CS_HOLD_8_CLKS 3
#define | CS_HOLD_16_CLKS 4
#define | CS_HOLD_32_CLKS 5
#define | CS_HOLD_64_CLKS 6
#define | CS_HOLD_127_CLKS 7
#define | SPI_CS_SETUP(n) ((n) << 9)
#define | CS_SETUP_1_CLKS 0
#define | CS_SETUP_2_CLKS 1
#define | CS_SETUP_4_CLKS 2
#define | CS_SETUP_8_CLKS 3
#define | CS_SETUP_16_CLKS 4
#define | CS_SETUP_32_CLKS 5
#define | CS_SETUP_64_CLKS 6
#define | CS_SETUP_127_CLKS 7
#define | SPI_DATA_OUT_DELAY(n) ((n) << 7)
#define | DATA_OUT_DELAY_1_CLKS 0
#define | DATA_OUT_DELAY_2_CLKS 1
#define | DATA_OUT_DELAY_3_CLKS 2
#define | DATA_OUT_DELAY_0_CLKS 3
#define | SPI_FRAME_DELAY(n) ((n) << 4)
#define | FRAME_DELAY_1_CLKS 0
#define | FRAME_DELAY_2_CLKS 1
#define | FRAME_DELAY_4_CLKS 2
#define | FRAME_DELAY_8_CLKS 3
#define | FRAME_DELAY_16_CLKS 4
#define | FRAME_DELAY_32_CLKS 5
#define | FRAME_DELAY_64_CLKS 6
#define | FRAME_DELAY_127_CLKS 7
#define | SPI_LITTLE_ENDIAN (0 << 3)
#define | SPI_BIG_ENDIAN (1 << 3)
#define | SPI_SET_MASTER_SLAVE(mode) ((mode) << 2)
#define | SPI_MASTER 1
#define | SPI_SLAVE 0
#define | SPI_SET_CPHA(n) ((n) << 1)
#define | SPI_SET_CPOL(n) ((n) << 0)
#define | SPI_GET_SCLK_DIVIDER(clk) ((APB_CLK)/((clk) * 2) - 1)/*In HZ*/
#define | SPI_SCLK_DIVIDER(n) ((n) << 0)
#define | SPI_RX_TRIGGER_LEVEL(n) ((n) << 6)
#define | SPI_TX_TRIGGER_LEVEL(n) ((n) << 2)
#define | SPI_RX_DMA_ON (1 << 1)
#define | SPI_RX_DMA_OFF (0 << 1)
#define | SPI_TX_DMA_ON (1 << 0)
#define | SPI_TX_DMA_OFF (0 << 0)
#define | SPI_INT_MASK_ALL 0xffU
#define | SPI_INT_CLEAR_ALL 0xffU
#define | SPI_INT_TIMEOUT (1U << 7)
#define | SPI_INT_TRANSFER_DONE (1U << 6)
#define | SPI_INT_RX_OVERRUN (1U << 5)
#define | SPI_INT_RX_UNDERRUN (1U << 4)
#define | SPI_INT_TX_OVERRUN (1U << 3)
#define | SPI_INT_TX_UNDERRUN (1U << 2)
#define | SPI_INT_RX_FIFO_RDY (1U << 1)
#define | SPI_INT_TX_FIFO_RDY (1U << 0)
#define | SPI_IS_BUSY(value) ((((value) & (1 << 12)) != 0) ? 1 : 0)
#define | SPI_GET_RX_FIFO_CNT(value) (((value) & 0xFC0) >> 6)
#define | SPI_GET_TX_FIFO_CNT(value) ((value) & 0x3F)
#define | SPI_TIMER_EN (1U << 31)
#define | SPI_TIME_OUT(n) (((((n) * (APB_CLK)) / 1000) & ~(0x01U << 31)) << 0)
#define | HR_UART0_BASE_ADDR (HR_APB_BASE_ADDR + 0x600)
#define | HR_UART1_BASE_ADDR (HR_APB_BASE_ADDR + 0x800)
#define | HR_UART2_BASE_ADDR (HR_APB_BASE_ADDR + 0xA00)
#define | HR_UART3_BASE_ADDR (HR_APB_BASE_ADDR + 0xC00)
#define | HR_UART4_BASE_ADDR (HR_APB_BASE_ADDR + 0xE00)
#define | HR_UART0_LINE_CTRL (HR_UART0_BASE_ADDR + 0x0)
#define | HR_UART0_FLOW_CTRL (HR_UART0_BASE_ADDR + 0x04)
#define | HR_UART0_DMA_CTRL (HR_UART0_BASE_ADDR + 0x08)
#define | HR_UART0_FIFO_CTRL (HR_UART0_BASE_ADDR + 0x0C)
#define | HR_UART0_BAUD_RATE_CTRL (HR_UART0_BASE_ADDR + 0x10)
#define | HR_UART0_INT_MASK (HR_UART0_BASE_ADDR + 0x14)
#define | HR_UART0_INT_SRC (HR_UART0_BASE_ADDR + 0x18)
#define | HR_UART0_FIFO_STATUS (HR_UART0_BASE_ADDR + 0x1C)
#define | HR_UART0_TX_WIN (HR_UART0_BASE_ADDR + 0x20)
#define | HR_UART0_RX_WIN (HR_UART0_BASE_ADDR + 0x30)
#define | HR_UART1_LINE_CTRL (HR_UART1_BASE_ADDR + 0x0)
#define | HR_UART1_FLOW_CTRL (HR_UART1_BASE_ADDR + 0x04)
#define | HR_UART1_DMA_CTRL (HR_UART1_BASE_ADDR + 0x08)
#define | HR_UART1_FIFO_CTRL (HR_UART1_BASE_ADDR + 0x0C)
#define | HR_UART1_BAUD_RATE_CTRL (HR_UART1_BASE_ADDR + 0x10)
#define | HR_UART1_INT_MASK (HR_UART1_BASE_ADDR + 0x14)
#define | HR_UART1_INT_SRC (HR_UART1_BASE_ADDR + 0x18)
#define | HR_UART1_FIFO_STATUS (HR_UART1_BASE_ADDR + 0x1C)
#define | HR_UART1_TX_WIN (HR_UART1_BASE_ADDR + 0x20)
#define | HR_UART1_RX_WIN (HR_UART1_BASE_ADDR + 0x30)
#define | HR_UART2_LINE_CTRL (HR_UART2_BASE_ADDR + 0x0)
#define | HR_UART2_FLOW_CTRL (HR_UART2_BASE_ADDR + 0x04)
#define | HR_UART2_DMA_CTRL (HR_UART2_BASE_ADDR + 0x08)
#define | HR_UART2_FIFO_CTRL (HR_UART2_BASE_ADDR + 0x0C)
#define | HR_UART2_BAUD_RATE_CTRL (HR_UART2_BASE_ADDR + 0x10)
#define | HR_UART2_INT_MASK (HR_UART2_BASE_ADDR + 0x14)
#define | HR_UART2_INT_SRC (HR_UART2_BASE_ADDR + 0x18)
#define | HR_UART2_FIFO_STATUS (HR_UART2_BASE_ADDR + 0x1C)
#define | HR_UART2_TX_WIN (HR_UART2_BASE_ADDR + 0x20)
#define | HR_UART2_RX_WIN (HR_UART2_BASE_ADDR + 0x30)
#define | HR_UART2_GUARD_TIME (HR_UART2_BASE_ADDR + 0x40)
#define | HR_UART2_WAIT_TIME (HR_UART2_BASE_ADDR + 0x44)
#define | HR_UART2_GT (HR_UART2_BASE_ADDR + 0x40)
#define | HR_UART2_WT (HR_UART2_BASE_ADDR + 0x44)
#define | HR_UART3_LINE_CTRL (HR_UART3_BASE_ADDR + 0x0)
#define | HR_UART3_FLOW_CTRL (HR_UART3_BASE_ADDR + 0x04)
#define | HR_UART3_DMA_CTRL (HR_UART3_BASE_ADDR + 0x08)
#define | HR_UART3_FIFO_CTRL (HR_UART3_BASE_ADDR + 0x0C)
#define | HR_UART3_BAUD_RATE_CTRL (HR_UART3_BASE_ADDR + 0x10)
#define | HR_UART3_INT_MASK (HR_UART3_BASE_ADDR + 0x14)
#define | HR_UART3_INT_SRC (HR_UART3_BASE_ADDR + 0x18)
#define | HR_UART3_FIFO_STATUS (HR_UART3_BASE_ADDR + 0x1C)
#define | HR_UART3_TX_WIN (HR_UART3_BASE_ADDR + 0x20)
#define | HR_UART3_RX_WIN (HR_UART3_BASE_ADDR + 0x30)
#define | HR_UART4_LINE_CTRL (HR_UART4_BASE_ADDR + 0x0)
#define | HR_UART4_FLOW_CTRL (HR_UART4_BASE_ADDR + 0x04)
#define | HR_UART4_DMA_CTRL (HR_UART4_BASE_ADDR + 0x08)
#define | HR_UART4_FIFO_CTRL (HR_UART4_BASE_ADDR + 0x0C)
#define | HR_UART4_BAUD_RATE_CTRL (HR_UART4_BASE_ADDR + 0x10)
#define | HR_UART4_INT_MASK (HR_UART4_BASE_ADDR + 0x14)
#define | HR_UART4_INT_SRC (HR_UART4_BASE_ADDR + 0x18)
#define | HR_UART4_FIFO_STATUS (HR_UART4_BASE_ADDR + 0x1C)
#define | HR_UART4_TX_WIN (HR_UART4_BASE_ADDR + 0x20)
#define | HR_UART4_RX_WIN (HR_UART4_BASE_ADDR + 0x30)
#define | ULCON_WL5 0x00
#define | ULCON_WL6 0x01
#define | ULCON_WL7 0x02
#define | ULCON_WL8 0x03
#define | ULCON_WL_MASK 0x03
#define | ULCON_STOP_2 0x04 /* 2 stop bit */
#define | ULCON_PMD_MASK 0x18
#define | ULCON_PMD_EN 0x08 /* no parity */
#define | ULCON_PMD_ODD 0x18 /* odd parity */
#define | ULCON_PMD_EVEN 0x08 /* even parity */
#define | ULCON_TX_EN 0x40
#define | ULCON_RX_EN 0x80
#define | ULCON_INFRA_RED 0x80
#define | UFC_ENABLE 0x01
#define | UFC_SW_RTS_SET 0x02
#define | UFC_RTS_TRIGGER_LVL_4_BYTE (0<<2)
#define | UFC_RTS_TRIGGER_LVL_8_BYTE (1<<2)
#define | UFC_RTS_TRIGGER_LVL_12_BYTE (2<<2)
#define | UFC_RTS_TRIGGER_LVL_16_BYTE (3<<2)
#define | UFC_RTS_TRIGGER_LVL_20_BYTE (4<<2)
#define | UFC_RTS_TRIGGER_LVL_24_BYTE (5<<2)
#define | UFC_RTS_TRIGGER_LVL_28_BYTE (6<<2)
#define | UFC_RTS_TRIGGER_LVL_31_BYTE (7<<2)
#define | UFC_TX_FIFO_RESET 0x01
#define | UFC_RX_FIFO_RESET 0x02
#define | UFC_TX_FIFO_LVL_ZERO (0<<2)
#define | UFC_TX_FIFO_LVL_4_BYTE (1<<2)
#define | UFC_TX_FIFO_LVL_8_BYTE (2<<2)
#define | UFC_TX_FIFO_LVL_16_BYTE (3<<2)
#define | UFC_RX_FIFO_LVL_ZERO (0<<4)
#define | UFC_RX_FIFO_LVL_4_BYTE (1<<4)
#define | UFC_RX_FIFO_LVL_8_BYTE (2<<4)
#define | UFC_RX_FIFO_LVL_16_BYTE (3<<4)
#define | UDMA_RX_FIFO_TIMEOUT (1<<2)
#define | UDMA_RX_FIFO_TIMEOUT_SHIFT (3)
#define | UIS_TX_FIFO_EMPTY (1UL<<0)
#define | UIS_TX_FIFO (1UL<<1)
#define | UIS_RX_FIFO (1UL<<2)
#define | UIS_RX_FIFO_TIMEOUT (1UL<<3)
#define | UIS_CTS_CHNG (1UL<<4)
#define | UIS_BREAK (1UL<<5)
#define | UIS_FRM_ERR (1UL<<6)
#define | UIS_PARITY_ERR (1UL<<7)
#define | UIS_OVERRUN (1UL<<8)
#define | UFS_TX_FIFO_CNT_MASK 0x3F
#define | UFS_RX_FIFO_CNT_MASK 0x3C0
#define | UFS_CST_STS (1UL<<12)
#define | HR_GPIO_BASE_ADDR (HR_APB_BASE_ADDR + 0x1200)
#define | HR_GPIO_DATA (HR_GPIO_BASE_ADDR + 0x0)
#define | HR_GPIO_DATA_EN (HR_GPIO_BASE_ADDR + 0x04)
#define | HR_GPIO_DIR (HR_GPIO_BASE_ADDR + 0x08)
#define | HR_GPIO_PULLUP_EN (HR_GPIO_BASE_ADDR + 0x0C)
#define | HR_GPIO_AF_SEL (HR_GPIO_BASE_ADDR + 0x10)
#define | HR_GPIO_AF_S1 (HR_GPIO_BASE_ADDR + 0x14)
#define | HR_GPIO_AF_S0 (HR_GPIO_BASE_ADDR + 0x18)
#define | HR_GPIO_PULLDOWN_EN (HR_GPIO_BASE_ADDR + 0x1C)
#define | HR_GPIO_IS (HR_GPIO_BASE_ADDR + 0x20)
#define | HR_GPIO_IBE (HR_GPIO_BASE_ADDR + 0x24)
#define | HR_GPIO_IEV (HR_GPIO_BASE_ADDR + 0x28)
#define | HR_GPIO_IE (HR_GPIO_BASE_ADDR + 0x2c)
#define | HR_GPIO_RIS (HR_GPIO_BASE_ADDR + 0x30)
#define | HR_GPIO_MIS (HR_GPIO_BASE_ADDR + 0x34)
#define | HR_GPIO_IC (HR_GPIO_BASE_ADDR + 0x38)
#define | HR_GPIOA_BASE_ADDR (HR_APB_BASE_ADDR + 0x1200)
#define | HR_GPIOA_DATA (HR_GPIOA_BASE_ADDR + 0x0)
#define | HR_GPIOA_DATA_EN (HR_GPIOA_BASE_ADDR + 0x04)
#define | HR_GPIOA_DATA_DIR (HR_GPIOA_BASE_ADDR + 0x08)
#define | HR_GPIOA_DATA_PULLEN (HR_GPIOA_BASE_ADDR + 0x0c)
#define | HR_GPIOA_AFSEL (HR_GPIOA_BASE_ADDR + 0x10)
#define | HR_GPIOA_AFS1 (HR_GPIOA_BASE_ADDR + 0x14)
#define | HR_GPIOA_AFS0 (HR_GPIOA_BASE_ADDR + 0x18)
#define | HR_GPIOA_IS (HR_GPIOA_BASE_ADDR + 0x20)
#define | HR_GPIOA_IBE (HR_GPIOA_BASE_ADDR + 0x24)
#define | HR_GPIOA_IEV (HR_GPIOA_BASE_ADDR + 0x28)
#define | HR_GPIOA_IE (HR_GPIOA_BASE_ADDR + 0x2C)
#define | HR_GPIOA_RIS (HR_GPIOA_BASE_ADDR + 0x30)
#define | HR_GPIOA_MIS (HR_GPIOA_BASE_ADDR + 0x34)
#define | HR_GPIOA_IC (HR_GPIOA_BASE_ADDR + 0x38)
#define | HR_GPIOB_BASE_ADDR (HR_APB_BASE_ADDR + 0x1400)
#define | HR_GPIOB_DATA (HR_GPIOB_BASE_ADDR + 0x0)
#define | HR_GPIOB_DATA_EN (HR_GPIOB_BASE_ADDR + 0x04)
#define | HR_GPIOB_DATA_DIR (HR_GPIOB_BASE_ADDR + 0x08)
#define | HR_GPIOB_DATA_PULLEN (HR_GPIOB_BASE_ADDR + 0x0c)
#define | HR_GPIOB_AFSEL (HR_GPIOB_BASE_ADDR + 0x10)
#define | HR_GPIOB_AFS1 (HR_GPIOB_BASE_ADDR + 0x14)
#define | HR_GPIOB_AFS0 (HR_GPIOB_BASE_ADDR + 0x18)
#define | HR_GPIOB_IS (HR_GPIOB_BASE_ADDR + 0x20)
#define | HR_GPIOB_IBE (HR_GPIOB_BASE_ADDR + 0x24)
#define | HR_GPIOB_IEV (HR_GPIOB_BASE_ADDR + 0x28)
#define | HR_GPIOB_IE (HR_GPIOB_BASE_ADDR + 0x2C)
#define | HR_GPIOB_RIS (HR_GPIOB_BASE_ADDR + 0x30)
#define | HR_GPIOB_MIS (HR_GPIOB_BASE_ADDR + 0x34)
#define | HR_GPIOB_IC (HR_GPIOB_BASE_ADDR + 0x38)
#define | IO_PA_BASE_ADDR (HR_APB_BASE_ADDR + 0x1200)
#define | IO_PA_DATA (*(volatile unsigned int*)(IO_PA_BASE_ADDR + 0x0))
#define | IO_PA_EN (*(volatile unsigned int*)(IO_PA_BASE_ADDR + 0x4))
#define | IO_PA_DIR (*(volatile unsigned int*)(IO_PA_BASE_ADDR + 0x8))
#define | IO_PA_REN (*(volatile unsigned int*)(IO_PA_BASE_ADDR + 0xC))
#define | IO_PA_AFSEL (*(volatile unsigned int*)(IO_PA_BASE_ADDR + 0x10))
#define | IO_PA_AFS1 (*(volatile unsigned int*)(IO_PA_BASE_ADDR + 0x14))
#define | IO_PA_AFS0 (*(volatile unsigned int*)(IO_PA_BASE_ADDR + 0x18))
#define | IO_PB_BASE_ADDR (HR_APB_BASE_ADDR + 0x1400)
#define | IO_PB_DATA (*(volatile unsigned int*)(IO_PB_BASE_ADDR + 0x0))
#define | IO_PB_EN (*(volatile unsigned int*)(IO_PB_BASE_ADDR + 0x4))
#define | IO_PB_DIR (*(volatile unsigned int*)(IO_PB_BASE_ADDR + 0x8))
#define | IO_PB_REN (*(volatile unsigned int*)(IO_PB_BASE_ADDR + 0xC))
#define | IO_PB_AFSEL (*(volatile unsigned int*)(IO_PB_BASE_ADDR + 0x10))
#define | IO_PB_AFS1 (*(volatile unsigned int*)(IO_PB_BASE_ADDR + 0x14))
#define | IO_PB_AFS0 (*(volatile unsigned int*)(IO_PB_BASE_ADDR + 0x18))
#define | HR_TIMER_BASE_ADDR (HR_APB_BASE_ADDR + 0x1800)
#define | HR_TIMER_CFG (HR_TIMER_BASE_ADDR + 0x0)
#define | HR_TIMER0_5_CSR (HR_TIMER_BASE_ADDR + 0x04)
#define | HR_TIMER0_PRD (HR_TIMER_BASE_ADDR + 0x08)
#define | HR_TIMER1_PRD (HR_TIMER_BASE_ADDR + 0x0C)
#define | HR_TIMER2_PRD (HR_TIMER_BASE_ADDR + 0x10)
#define | HR_TIMER3_PRD (HR_TIMER_BASE_ADDR + 0x14)
#define | HR_TIMER4_PRD (HR_TIMER_BASE_ADDR + 0x18)
#define | HR_TIMER5_PRD (HR_TIMER_BASE_ADDR + 0x1C)
#define | HR_TIMER0_CNT (HR_TIMER_BASE_ADDR + 0x20)
#define | HR_TIMER1_CNT (HR_TIMER_BASE_ADDR + 0x24)
#define | HR_TIMER2_CNT (HR_TIMER_BASE_ADDR + 0x28)
#define | HR_TIMER3_CNT (HR_TIMER_BASE_ADDR + 0x2C)
#define | HR_TIMER4_CNT (HR_TIMER_BASE_ADDR + 0x30)
#define | HR_TIMER5_CNT (HR_TIMER_BASE_ADDR + 0x34)
#define | TLS_TIMER_MS_UNIT(n) (1UL<<(0+5*n))
#define | TLS_TIMER_ONE_TIME(n) (1UL<<(1+5*n))
#define | TLS_TIMER_EN(n) (1UL<<(2+5*n))
#define | TLS_TIMER_INT_EN(n) (1UL<<(3+5*n))
#define | TLS_TIMER_INT_CLR(n) (1UL<<(4+5*n))
#define | HR_WDG_BASE_ADDR (HR_APB_BASE_ADDR + 0x1600)
#define | HR_WDG_LOAD_VALUE (HR_WDG_BASE_ADDR + 0x00)
#define | HR_WDG_CUR_VALUE (HR_WDG_BASE_ADDR + 0x04)
#define | HR_WDG_CTRL (HR_WDG_BASE_ADDR + 0x08)
#define | HR_WDG_INT_CLR (HR_WDG_BASE_ADDR + 0x0C)
#define | HR_WDG_INT_SRC (HR_WDG_BASE_ADDR + 0x10)
#define | HR_WDG_INT_MIS (HR_WDG_BASE_ADDR + 0x14)
#define | HR_WDG_LOCK (HR_WDG_BASE_ADDR + 0x40)
#define | HR_CLK_LCD_GATE_Pos (14)
#define | HR_LCD_REG_BASE (HR_APB_BASE_ADDR + 0x1C00)
#define | HR_LCD_CR (HR_LCD_REG_BASE+0x000)
#define | HR_LCD_FRAME_CNT (HR_LCD_REG_BASE+0x004)
#define | HR_LCD_COM0_SEG (HR_LCD_REG_BASE+0x008)
#define | HR_LCD_COM1_SEG (HR_LCD_REG_BASE+0x00C)
#define | HR_LCD_COM2_SEG (HR_LCD_REG_BASE+0x010)
#define | HR_LCD_COM3_SEG (HR_LCD_REG_BASE+0x014)
#define | HR_LCD_COM4_SEG (HR_LCD_REG_BASE+0x018)
#define | HR_LCD_COM5_SEG (HR_LCD_REG_BASE+0x01C)
#define | HR_LCD_COM6_SEG (HR_LCD_REG_BASE+0x020)
#define | HR_LCD_COM7_SEG (HR_LCD_REG_BASE+0x024)
#define | HR_LCD_COM_EN (HR_LCD_REG_BASE+0x028)
#define | HR_LCD_SEG_EN (HR_LCD_REG_BASE+0x02C)
#define | LCD_CR_EN_Pos (8)
#define | LCD_CR_PD_Pos (9)
#define | LCD_VDD_ON (1UL<<9)
#define | LCD_VDD_OFF (0UL<<9)
#define | LCD_EN (1UL<<8)
#define | LCD_BIAS_MASK (3UL<<6)
#define | LCD_BIAS_MASK_Pos (6)
#define | LCD_BIAS_ONEFOURTH (0UL<<6)
#define | LCD_BIAS_ONEHALF (1UL<<6)
#define | LCD_BIAS_ONETHIRD (2UL<<6)
#define | LCD_BIAS_STATIC (3UL<<6)
#define | LCD_VLCD_MASK (7UL<<3)
#define | LCD_VLCD_MASK_Pos (3)
#define | LCD_VLCD_27 (0UL<<3)
#define | LCD_VLCD_29 (1UL<<3)
#define | LCD_VLCD_31 (2UL<<3)
#define | LCD_VLCD_33 (3UL<<3)
#define | LCD_DUTY_MASK (7UL<<0)
#define | LCD_DUTY_MASK_Pos (0)
#define | LCD_DUTY_STATIC (0UL<<0)
#define | LCD_DUTY_ONEHALF (1UL<<0)
#define | LCD_DUTY_ONETHIRD (2UL<<0)
#define | LCD_DUTY_ONEFOURTH (3UL<<0)
#define | LCD_DUTY_ONEFIFTH (4UL<<0)
#define | LCD_DUTY_ONESIXTH (5UL<<0)
#define | LCD_DUTY_ONESEVENTH (6UL<<0)
#define | LCD_DUTY_ONEEIGHTH (7UL<<0)
#define | HR_CLK_I2S_GATE_Pos (10)
#define | HR_I2S_REG_BASE (HR_APB_BASE_ADDR+0x2000)
#define | HR_I2S_CTRL (HR_I2S_REG_BASE+0x000)
#define | HR_I2S_INT_MASK (HR_I2S_REG_BASE+0x004)
#define | HR_I2S_INT_SRC (HR_I2S_REG_BASE+0x008)
#define | HR_I2S_STATUS (HR_I2S_REG_BASE+0x00C)
#define | HR_I2S_TX (HR_I2S_REG_BASE+0x010)
#define | HR_I2S_RX (HR_I2S_REG_BASE+0x014)
#define | APB2SPI_REG_BASE (HR_APB_BASE_ADDR+ 0x2200)
#define | APB2SPI_REG_CFG (APB2SPI_REG_BASE+ 0x0000)
#define | APB2SPI_REG_PS_CR (APB2SPI_REG_BASE+ 0x0004)
#define | APB2SPI_REG_TX_DATA (APB2SPI_REG_BASE+ 0x0008)
#define | APB2SPI_REG_RX_DATA (APB2SPI_REG_BASE+ 0x000C)
#define | HR_PWM_REG_BASE (HR_APB_BASE_ADDR+0x1E00)
#define | HR_PWM_CLKDIV01 (HR_PWM_REG_BASE+0x0000)
#define | HR_PWM_CLKDIV23 (HR_PWM_REG_BASE+0x0004)
#define | HR_PWM_CTL (HR_PWM_REG_BASE+0x0008)
#define | HR_PWM_PERIOD (HR_PWM_REG_BASE+0x000C)
#define | HR_PWM_PNUM (HR_PWM_REG_BASE+0x0010)
#define | HR_PWM_CMPDAT (HR_PWM_REG_BASE+0x0014)
#define | HR_PWM_DTCTL (HR_PWM_REG_BASE+0x0018)
#define | HR_PWM_INTEN (HR_PWM_REG_BASE+0x001C)
#define | HR_PWM_INTSTS (HR_PWM_REG_BASE+0x0020)
#define | HR_PWM_CAPDAT (HR_PWM_REG_BASE+0x0024)
#define | HR_PWM_BRKCTL (HR_PWM_REG_BASE+0x0028)
#define | HR_PWM_CH4_REG1 (HR_PWM_REG_BASE+0x002C)
#define | HR_PWM_CH4_REG2 (HR_PWM_REG_BASE+0x0030)
#define | HR_PWM_CAP2DAT (HR_PWM_REG_BASE+0x0034)
#define | HR_PWM_CAP2CTL (HR_PWM_REG_BASE+0x0038)
#define | HR_TC_REG_BASE (HR_APB_BASE_ADDR+0x2400)
#define | HR_TC_CONFIG (HR_TC_REG_BASE+0x0000)
#define | SCAN_PERID_SHIFT_BIT (26)
#define | CAPDET_CNT_SHIFT_BIT (20)
#define | TOUCH_SENSOR_SEL_SHIFT_BIT (4)
#define | TOUCH_SENSOR_EN_BIT (0)
#define | HR_TC1_TRESHOLD_REG (HR_TC_REG_BASE+0x0004)
#define | HR_TC1_COUNT_REG (HR_TC_REG_BASE+0x0004)
#define | HR_TC2_TRESHOLD_REG (HR_TC_REG_BASE+0x0008)
#define | HR_TC2_COUNT_REG (HR_TC_REG_BASE+0x0008)
#define | HR_TC3_TRESHOLD_REG (HR_TC_REG_BASE+0x000C)
#define | HR_TC3_COUNT_REG (HR_TC_REG_BASE+0x000C)
#define | HR_TC4_TRESHOLD_REG (HR_TC_REG_BASE+0x0010)
#define | HR_TC4_COUNT_REG (HR_TC_REG_BASE+0x0010)
#define | HR_TC5_TRESHOLD_REG (HR_TC_REG_BASE+0x0014)
#define | HR_TC5_COUNT_REG (HR_TC_REG_BASE+0x0014)
#define | HR_TC6_TRESHOLD_REG (HR_TC_REG_BASE+0x0018)
#define | HR_TC6_COUNT_REG (HR_TC_REG_BASE+0x0018)
#define | HR_TC7_TRESHOLD_REG (HR_TC_REG_BASE+0x001C)
#define | HR_TC7_COUNT_REG (HR_TC_REG_BASE+0x001C)
#define | HR_TC8_TRESHOLD_REG (HR_TC_REG_BASE+0x0020)
#define | HR_TC8_COUNT_REG (HR_TC_REG_BASE+0x0020)
#define | HR_TC9_TRESHOLD_REG (HR_TC_REG_BASE+0x0024)
#define | HR_TC9_COUNT_REG (HR_TC_REG_BASE+0x0024)
#define | HR_TC10_TRESHOLD_REG (HR_TC_REG_BASE+0x0028)
#define | HR_TC10_COUNT_REG (HR_TC_REG_BASE+0x0028)
#define | HR_TC11_TRESHOLD_REG (HR_TC_REG_BASE+0x002C)
#define | HR_TC11_COUNT_REG (HR_TC_REG_BASE+0x002C)
#define | HR_TC12_TRESHOLD_REG (HR_TC_REG_BASE+0x0030)
#define | HR_TC12_COUNT_REG (HR_TC_REG_BASE+0x0030)
#define | HR_TC13_TRESHOLD_REG (HR_TC_REG_BASE+0x0034)
#define | HR_TC13_COUNT_REG (HR_TC_REG_BASE+0x0034)
#define | HR_TC14_TRESHOLD_REG (HR_TC_REG_BASE+0x0038)
#define | HR_TC14_COUNT_REG (HR_TC_REG_BASE+0x0038)
#define | HR_TC15_TRESHOLD_REG (HR_TC_REG_BASE+0x003C)
#define | HR_TC15_COUNT_REG (HR_TC_REG_BASE+0x003C)
#define | HR_TC16_TRESHOLD_REG (HR_TC_REG_BASE+0x0040)
#define | HR_TC16_COUNT_REG (HR_TC_REG_BASE+0x0040)
#define | HR_TC_INT_EN (HR_TC_REG_BASE+0x0044) /*bit 31:16*/
#define | HR_TC_INT_STATUS (HR_TC_REG_BASE+0x0044) /*bit 15:0*/

Typedefs

typedef volatile unsigned char | vu8
typedef volatile unsigned short | vu16
typedef volatile unsigned long | vu32
typedef enum IRQn | IRQn_Type
typedef volatile unsigned int | TLS_REG

Enumerations

enum IRQn {
SDIO_IRQn = 0, MAC_IRQn = 1, RF_CFG_IRQn = 2, SEC_IRQn = 3,
DMA_Channel0_IRQn = 4, DMA_Channel1_IRQn = 5, DMA_Channel2_IRQn = 6, DMA_Channel3_IRQn = 7,
DMA_Channel4_7_IRQn = 8, DMA_BRUST_IRQn = 9, I2C_IRQn = 10, ADC_IRQn = 11,
SPI_LS_IRQn = 12, SPI_HS_IRQn = 13, GPIOA_IRQn = 14, GPIOB_IRQn = 15,
UART0_IRQn = 16, UART1_IRQn = 17, TOUCH_IRQn = 18, UART24_IRQn = 19,
BLE_IRQn = 20, BT_IRQn = 21, PWM_IRQn = 22, I2S_IRQn = 23,
SIDO_HOST_IRQn = 24, SYS_TICK_IRQn = 25, RSA_IRQn = 26, CRYPTION_IRQn = 27,
FLASH_IRQn = 28, PMU_IRQn = 29, TIMER_IRQn = 30, WDG_IRQn = 31
}
enum FunctionalState { DISABLE = 0, ENABLE = !DISABLE }

Functions

static __inline void | tls_reg_write32 (unsigned int reg, unsigned int val)
This function is used to write value to register or memory. More...
static __inline unsigned int | tls_reg_read32 (unsigned int reg)
This function is used to read value from register or memory. More...
static __inline void | tls_bitband_write (volatile unsigned int addr, unsigned int bit, unsigned int val)
This function is used to write specified bit through bit-band alias region. More...
static __inline unsigned int | tls_bitband_read (volatile unsigned int addr, unsigned int bit)
This function is used to read a single bit from address by bit-band alias region. More...

Detailed Description

register & operation file

Author
winnermicro

Copyright (c) 2015 Winner Microelectronics Co., Ltd.

Macro Definition Documentation

◆ __I

#define __I volatile const

Defines 'read only' permissions

◆ __IO

#define __IO volatile

Defines 'read / write' permissions

◆ __O

#define __O volatile

Defines 'write only' permissions

◆ HR_CLK_I2S_GATE_Pos

#define HR_CLK_I2S_GATE_Pos (10)

I2S Reg

◆ HR_CLK_LCD_GATE_Pos

#define HR_CLK_LCD_GATE_Pos (14)

bit field of the lcd gate control in CLK gating register

◆ HR_LCD_REG_BASE

#define HR_LCD_REG_BASE (HR_APB_BASE_ADDR + 0x1C00)

LCD Reg

Enumeration Type Documentation

◆ IRQn

enum IRQn
Enumerator
SDIO_IRQn | SDIO Receiver/Transmit/Command Receiver/SDIO Command Transmit Interrupt
MAC_IRQn | MAC Interrupt
RF_CFG_IRQn | RF_CFG Interrupt
SEC_IRQn | SEC RX/TX_MNGT/TX_DATA Interrupt
DMA_Channel0_IRQn | DMA Channel 0 global Interrupt
DMA_Channel1_IRQn | DMA Channel 1 global Interrupt
DMA_Channel2_IRQn | DMA Channel 2 global Interrupt
DMA_Channel3_IRQn | DMA Channel 3 global Interrupt
DMA_Channel4_7_IRQn | DMA Channel 4~7 global Interrupt
DMA_BRUST_IRQn | DMA Burst global Interrupt
I2C_IRQn | I2C Interrupts
ADC_IRQn | ADC Convert Interrupts
SPI_LS_IRQn | Low Speed SPI Interrupt
SPI_HS_IRQn | High Speed SPI Interrupt
GPIOA_IRQn | GPIO A Interrupt
GPIOB_IRQn | GPIO B Interrupt
UART0_IRQn | UART0 Interrupts
UART1_IRQn | UART1 Interrupt
TOUCH_IRQn | Touch Sensor Iterrupt
UART24_IRQn | UART2/3/4/5 Interrupt
BLE_IRQn | BLE Interrupt
BT_IRQn | BT Interrupt
PWM_IRQn | PWM Interrupt
I2S_IRQn | I2S Interrupts
SIDO_HOST_IRQn | SDIO Host Interrupts
SYS_TICK_IRQn | SYS Tick Interrupts
RSA_IRQn | RSA Interrupts
CRYPTION_IRQn | GPSEC Interrupts
FLASH_IRQn | Flash Interrupt
PMU_IRQn | PMU Interrupt
TIMER_IRQn | Timer0~5 Trigger
WDG_IRQn | Watch Dog Interrupt


W800 SDK APIs: doxy_out/include/wm_type_def.h File Reference

  • doxy_out
  • include
Macros | Typedefs
wm_type_def.h File Reference

WM type redefine. More...

#include <stdbool.h>

Go to the source code of this file.

Macros

#define | TRUE 1
#define | FALSE 0
#define | true 1
#define | false 0
#define | WM_SUCCESS 0
#define | WM_FAILED -1
#define | IGNORE_PARAMETER(x) ((x) = (x))

Typedefs

typedef unsigned char | u_char
typedef unsigned char | INT8U
typedef signed char | INT8S
typedef unsigned char | u8
typedef signed char | s8
typedef unsigned short | u16
typedef signed short | s16
typedef unsigned int | u32
typedef signed int | s32
typedef unsigned long long | u64
typedef long long | s64
typedef int | int32
typedef unsigned int | uint32
typedef short | int16
typedef unsigned short | uint16
typedef unsigned long | ULONG
typedef unsigned char | u8_t
typedef unsigned char | uint8_t
typedef unsigned short | u16_t
typedef unsigned short | uint16_t
typedef unsigned int | u32_t
typedef signed char | s8_t
typedef signed short | s16_t
typedef signed int | s32_t
typedef unsigned int | size_t
typedef signed char | err_t
typedef unsigned int | mem_ptr_t

Detailed Description

WM type redefine.

Author
winnermicro

Copyright (c) 2015 Winner Microelectronics Co., Ltd.


W800 SDK APIs: doxy_out/include/wm_wifi_config.h File Reference

  • doxy_out
  • include
Macros
wm_wifi_config.h File Reference

WM wifi model configure. More...

Go to the source code of this file.

Macros

#define | CFG_WIFI_ON 1
#define | CFG_WIFI_OFF 0
#define | TLS_CONFIG_AP CFG_WIFI_ON
#define | TLS_CONFIG_11N CFG_WIFI_ON
#define | TLS_CONFIG_USE_VENDOR_IE CFG_WIFI_OFF
#define | TLS_CONFIG_SOFTAP_11N (CFG_WIFI_ON&& TLS_CONFIG_AP)
#define | TLS_CONFIG_AP_BEACON_SOFT (CFG_OFF && TLS_CONFIG_AP)
#define | TLS_CONFIG_AP_OPT_PS (CFG_ON && TLS_CONFIG_AP)/* SOFTAP POWER SAVE */
#define | TLS_CONFIG_AP_OPT_FWD (CFG_ON && TLS_CONFIG_AP)/* IP PACKET FORWARD */
#define | TLS_CONFIG_WPS CFG_WIFI_OFF /* WPS&EAPOL should be enabled together */
#define | TLS_IEEE8021X_EAPOL CFG_WIFI_OFF
#define | TLS_CONFIG_1SSID_MULTI_PWD CFG_WIFI_ON
#define | TLS_CONFIG_FAST_JOIN_NET CFG_WIFI_ON
#define | TLS_CONFIG_LOG_PRINT CFG_WIFI_ON
#define | TLS_SCAN_TASK_DYNAMIC_CREATE_FTR CFG_WIFI_ON
#define | TLS_BSS_MGMT_TASK_DYNAMIC_CREATE_FTR CFG_WIFI_ON

Detailed Description

WM wifi model configure.

Author
winnermicro

Copyright (c) 2015 Winner Microelectronics Co., Ltd.


W800 SDK APIs: Globals

Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- _ -

  • __CRYPTO_CRC_TYPE : wm_crypto_hard.h
  • __CRYPTO_METHOD : wm_crypto_hard.h
  • __CRYPTO_MODE : wm_crypto_hard.h
  • __CRYPTO_WAY : wm_crypto_hard.h
  • __I : wm_regs.h
  • __IO : wm_regs.h
  • __O : wm_regs.h
  • _HTTP_AUTH_SCHEMA : wm_http_client.h
  • _HTTP_VERB : wm_http_client.h


W800 SDK APIs: Globals

Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- a -

  • ADC_IRQn : wm_regs.h
  • aes_128_cbc_decrypt() : wm_crypto.h
  • aes_128_cbc_encrypt() : wm_crypto.h


W800 SDK APIs: Globals

Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- b -

  • BIAS_ONEFOURTH : wm_lcd.h
  • BIAS_ONEHALF : wm_lcd.h
  • BIAS_ONETHIRD : wm_lcd.h
  • BIAS_STATIC : wm_lcd.h
  • BLE_IRQn : wm_regs.h
  • BT_IRQn : wm_regs.h


W800 SDK APIs: Globals

Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- c -

  • CIRC_CNT : wm_uart.h
  • CIRC_CNT_TO_END : wm_uart.h
  • CIRC_SPACE : wm_uart.h
  • CIRC_SPACE_TO_END : wm_uart.h
  • CMD_START_Msk : wm_internal_flash.h
  • CMD_START_Pos : wm_internal_flash.h
  • CODE_RUN_START_ADDR : wm_flash_map.h
  • CODE_UPD_START_ADDR : wm_flash_map.h
  • CONFIG_ONESHOT_MAC_FILTER : wm_wifi_oneshot.h
  • CRYPTION_IRQn : wm_regs.h
  • CRYPTO_CRC_TYPE : wm_crypto_hard.h
  • CRYPTO_CRC_TYPE_16_CCITT : wm_crypto_hard.h
  • CRYPTO_CRC_TYPE_16_MODBUS : wm_crypto_hard.h
  • CRYPTO_CRC_TYPE_32 : wm_crypto_hard.h
  • CRYPTO_CRC_TYPE_8 : wm_crypto_hard.h
  • CRYPTO_METHOD_CRC : wm_crypto_hard.h
  • CRYPTO_METHOD_MD5 : wm_crypto_hard.h
  • CRYPTO_MODE : wm_crypto_hard.h
  • CRYPTO_MODE_CBC : wm_crypto_hard.h
  • CRYPTO_MODE_CMAC : wm_crypto_hard.h
  • CRYPTO_MODE_CTR : wm_crypto_hard.h
  • CRYPTO_MODE_ECB : wm_crypto_hard.h
  • CRYPTO_WAY : wm_crypto_hard.h
  • CRYPTO_WAY_DECRYPT : wm_crypto_hard.h
  • CRYPTO_WAY_ENCRYPT : wm_crypto_hard.h
  • csi_kernel_intrpt_enter() : wm_irq.h
  • csi_kernel_intrpt_exit() : wm_irq.h


W800 SDK APIs: Globals

Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- d -

  • DMA_BRUST_IRQn : wm_regs.h
  • DMA_Channel0_IRQn : wm_regs.h
  • DMA_Channel1_IRQn : wm_regs.h
  • DMA_Channel2_IRQn : wm_regs.h
  • DMA_Channel3_IRQn : wm_regs.h
  • DMA_Channel4_7_IRQn : wm_regs.h
  • DUTY_ONEEIGHTH : wm_lcd.h
  • DUTY_ONEFIFTH : wm_lcd.h
  • DUTY_ONEFOURTH : wm_lcd.h
  • DUTY_ONEHALF : wm_lcd.h
  • DUTY_ONESEVENTH : wm_lcd.h
  • DUTY_ONESIXTH : wm_lcd.h
  • DUTY_ONETHIRD : wm_lcd.h
  • DUTY_STATIC : wm_lcd.h


W800 SDK APIs: Globals

Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- e -

  • enable_bt_test_mode() : wm_bt.h
  • ERR_CRY_OK : wm_crypto_hard.h
  • ETH_ALEN : wm_wifi.h
  • exit_bt_test_mode() : wm_bt.h
  • EXSPIFLASH_WRITE_ENABLE : wm_fls_gd25qxx.h


W800 SDK APIs: Globals

Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- f -

  • FLASH_BASE_ADDR : wm_flash_map.h
  • FLASH_BSY : wm_internal_flash.h
  • FLASH_IRQn : wm_regs.h
  • FLASH_PG : wm_internal_flash.h


W800 SDK APIs: Globals

Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- g -

  • GPIOA_IRQn : wm_regs.h
  • GPIOB_IRQn : wm_regs.h


W800 SDK APIs: Globals

Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- h -

  • hmac_md5() : wm_crypto.h
  • HR_CLK_I2S_GATE_Pos : wm_regs.h
  • HR_CLK_LCD_GATE_Pos : wm_regs.h
  • HR_CRYPTO_BASE_ADDR : wm_crypto_hard.h
  • HR_CRYPTO_CRC_KEY : wm_crypto_hard.h
  • HR_CRYPTO_CRC_RESULT : wm_crypto_hard.h
  • HR_CRYPTO_DEST_ADDR : wm_crypto_hard.h
  • HR_CRYPTO_IV0 : wm_crypto_hard.h
  • HR_CRYPTO_IV1 : wm_crypto_hard.h
  • HR_CRYPTO_KEY0 : wm_crypto_hard.h
  • HR_CRYPTO_KEY1 : wm_crypto_hard.h
  • HR_CRYPTO_KEY2 : wm_crypto_hard.h
  • HR_CRYPTO_KEY3 : wm_crypto_hard.h
  • HR_CRYPTO_KEY4 : wm_crypto_hard.h
  • HR_CRYPTO_KEY5 : wm_crypto_hard.h
  • HR_CRYPTO_KEY6 : wm_crypto_hard.h
  • HR_CRYPTO_KEY7 : wm_crypto_hard.h
  • HR_CRYPTO_RNG_RESULT : wm_crypto_hard.h
  • HR_CRYPTO_SEC_CFG : wm_crypto_hard.h
  • HR_CRYPTO_SEC_CTRL : wm_crypto_hard.h
  • HR_CRYPTO_SEC_STS : wm_crypto_hard.h
  • HR_CRYPTO_SHA1_DIGEST0 : wm_crypto_hard.h
  • HR_CRYPTO_SHA1_DIGEST1 : wm_crypto_hard.h
  • HR_CRYPTO_SHA1_DIGEST2 : wm_crypto_hard.h
  • HR_CRYPTO_SHA1_DIGEST3 : wm_crypto_hard.h
  • HR_CRYPTO_SHA1_DIGEST4 : wm_crypto_hard.h
  • HR_CRYPTO_SRC_ADDR : wm_crypto_hard.h
  • HR_CRYPTO_TRNG_CR : wm_crypto_hard.h
  • HR_LCD_REG_BASE : wm_regs.h
  • HSPI_RX_CMD_MSG : wm_hspi.h
  • HSPI_RX_DESC_BASE_ADDR : wm_hspi.h
  • HSPI_RXBUF_BASE_ADDR : wm_hspi.h
  • HSPI_TX_DESC_BASE_ADDR : wm_hspi.h
  • HSPI_TXBUF_NUM : wm_hspi.h
  • HTTP_AUTH_SCHEMA : wm_http_client.h
  • HTTP_CLIENT : wm_http_client.h
  • HTTP_CLIENT_EOS : wm_http_client.h
  • HTTP_CLIENT_ERROR_AUTH_HOST : wm_http_client.h
  • HTTP_CLIENT_ERROR_AUTH_MISMATCH : wm_http_client.h
  • HTTP_CLIENT_ERROR_AUTH_PROXY : wm_http_client.h
  • HTTP_CLIENT_ERROR_BAD_AUTH : wm_http_client.h
  • HTTP_CLIENT_ERROR_BAD_HEADER : wm_http_client.h
  • HTTP_CLIENT_ERROR_BAD_STATE : wm_http_client.h
  • HTTP_CLIENT_ERROR_BAD_URL : wm_http_client.h
  • HTTP_CLIENT_ERROR_BAD_VERB : wm_http_client.h
  • HTTP_CLIENT_ERROR_BUFFER_RSIZE : wm_http_client.h
  • HTTP_CLIENT_ERROR_CHUNK : wm_http_client.h
  • HTTP_CLIENT_ERROR_CHUNK_TOO_BIG : wm_http_client.h
  • HTTP_CLIENT_ERROR_CONNECTION_CLOSE : wm_http_client.h
  • HTTP_CLIENT_ERROR_HEADER_BIG_CLUE : wm_http_client.h
  • HTTP_CLIENT_ERROR_HEADER_NO_LENGTH : wm_http_client.h
  • HTTP_CLIENT_ERROR_HEADER_NOT_FOUND : wm_http_client.h
  • HTTP_CLIENT_ERROR_HEADER_RECV : wm_http_client.h
  • HTTP_CLIENT_ERROR_INVALID_HANDLE : wm_http_client.h
  • HTTP_CLIENT_ERROR_LONG_INPUT : wm_http_client.h
  • HTTP_CLIENT_ERROR_NO_DIGEST_ALG : wm_http_client.h
  • HTTP_CLIENT_ERROR_NO_DIGEST_TOKEN : wm_http_client.h
  • HTTP_CLIENT_ERROR_NO_MEMORY : wm_http_client.h
  • HTTP_CLIENT_ERROR_NOT_IMPLEMENTED : wm_http_client.h
  • HTTP_CLIENT_ERROR_SOCKET_BIND : wm_http_client.h
  • HTTP_CLIENT_ERROR_SOCKET_CANT_SET : wm_http_client.h
  • HTTP_CLIENT_ERROR_SOCKET_CONNECT : wm_http_client.h
  • HTTP_CLIENT_ERROR_SOCKET_INVALID : wm_http_client.h
  • HTTP_CLIENT_ERROR_SOCKET_RECV : wm_http_client.h
  • HTTP_CLIENT_ERROR_SOCKET_RESOLVE : wm_http_client.h
  • HTTP_CLIENT_ERROR_SOCKET_SEND : wm_http_client.h
  • HTTP_CLIENT_ERROR_SOCKET_TIME_OUT : wm_http_client.h
  • HTTP_CLIENT_ERROR_TLS_NEGO : wm_http_client.h
  • HTTP_CLIENT_SUCCESS : wm_http_client.h
  • HTTP_CLIENT_UNKNOWN_ERROR : wm_http_client.h
  • HTTP_VERB : wm_http_client.h
  • HTTPClientAddRequestHeaders() : wm_http_client.h
  • HTTPClientCloseRequest() : wm_http_client.h
  • HTTPClientFindCloseHeader() : wm_http_client.h
  • HTTPClientFindFirstHeader() : wm_http_client.h
  • HTTPClientGetInfo() : wm_http_client.h
  • HTTPClientGetNextHeader() : wm_http_client.h
  • HTTPClientOpenRequest() : wm_http_client.h
  • HTTPClientReadData() : wm_http_client.h
  • HTTPClientRecvResponse() : wm_http_client.h
  • HTTPClientSendRequest() : wm_http_client.h
  • HTTPClientSetAuth() : wm_http_client.h
  • HTTPClientSetCredentials() : wm_http_client.h
  • HTTPClientSetProxy() : wm_http_client.h
  • HTTPClientSetVerb() : wm_http_client.h
  • HTTPClientWriteData() : wm_http_client.h
  • HTTPParameters : wm_http_client.h
  • HZ : wm_osal.h


W800 SDK APIs: Globals

Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- i -

  • I2C_IRQn : wm_regs.h
  • I2S_IRQn : wm_regs.h
  • ieee80211_check_tim() : wm_ieee80211.h
  • ieee80211_dsss_chan_to_freq() : wm_ieee80211.h
  • IEEE80211_ENCRYT_AUTO_WPA : wm_wifi.h
  • IEEE80211_ENCRYT_AUTO_WPA2 : wm_wifi.h
  • IEEE80211_ENCRYT_CCMP_WPA : wm_wifi.h
  • IEEE80211_ENCRYT_CCMP_WPA2 : wm_wifi.h
  • IEEE80211_ENCRYT_NONE : wm_wifi.h
  • IEEE80211_ENCRYT_TKIP_WPA : wm_wifi.h
  • IEEE80211_ENCRYT_TKIP_WPA2 : wm_wifi.h
  • IEEE80211_ENCRYT_WEP104 : wm_wifi.h
  • IEEE80211_ENCRYT_WEP40 : wm_wifi.h
  • ieee80211_erp_chan_to_freq : wm_ieee80211.h
  • ieee80211_fhss_chan_to_freq() : wm_ieee80211.h
  • ieee80211_freq_to_dsss_chan() : wm_ieee80211.h
  • ieee80211_freq_to_erp_chan : wm_ieee80211.h
  • ieee80211_freq_to_fhss_chan() : wm_ieee80211.h
  • ieee80211_freq_to_hr_chan : wm_ieee80211.h
  • ieee80211_freq_to_ofdm_chan() : wm_ieee80211.h
  • ieee80211_get_DA() : wm_ieee80211.h
  • ieee80211_get_qos_ctl() : wm_ieee80211.h
  • ieee80211_get_SA() : wm_ieee80211.h
  • ieee80211_has_a4() : wm_ieee80211.h
  • ieee80211_has_fromds() : wm_ieee80211.h
  • ieee80211_has_moredata() : wm_ieee80211.h
  • ieee80211_has_morefrags() : wm_ieee80211.h
  • ieee80211_has_order() : wm_ieee80211.h
  • ieee80211_has_pm() : wm_ieee80211.h
  • ieee80211_has_protected() : wm_ieee80211.h
  • ieee80211_has_retry() : wm_ieee80211.h
  • ieee80211_has_tods() : wm_ieee80211.h
  • ieee80211_hr_chan_to_freq : wm_ieee80211.h
  • ieee80211_is_ack() : wm_ieee80211.h
  • ieee80211_is_action() : wm_ieee80211.h
  • ieee80211_is_assoc_req() : wm_ieee80211.h
  • ieee80211_is_assoc_resp() : wm_ieee80211.h
  • ieee80211_is_atim() : wm_ieee80211.h
  • ieee80211_is_auth() : wm_ieee80211.h
  • ieee80211_is_back() : wm_ieee80211.h
  • ieee80211_is_back_req() : wm_ieee80211.h
  • ieee80211_is_beacon() : wm_ieee80211.h
  • ieee80211_is_cfend() : wm_ieee80211.h
  • ieee80211_is_cfendack() : wm_ieee80211.h
  • ieee80211_is_ctl() : wm_ieee80211.h
  • ieee80211_is_cts() : wm_ieee80211.h
  • ieee80211_is_data() : wm_ieee80211.h
  • ieee80211_is_data_present() : wm_ieee80211.h
  • ieee80211_is_data_qos() : wm_ieee80211.h
  • ieee80211_is_deauth() : wm_ieee80211.h
  • ieee80211_is_disassoc() : wm_ieee80211.h
  • ieee80211_is_mgmt() : wm_ieee80211.h
  • ieee80211_is_nullfunc() : wm_ieee80211.h
  • ieee80211_is_probe_req() : wm_ieee80211.h
  • ieee80211_is_probe_resp() : wm_ieee80211.h
  • ieee80211_is_pspoll() : wm_ieee80211.h
  • ieee80211_is_qos_nullfunc() : wm_ieee80211.h
  • ieee80211_is_reassoc_req() : wm_ieee80211.h
  • ieee80211_is_reassoc_resp() : wm_ieee80211.h
  • ieee80211_is_robust_mgmt_frame() : wm_ieee80211.h
  • ieee80211_is_rts() : wm_ieee80211.h
  • IEEE80211_MODE_AP : wm_wifi.h
  • IEEE80211_MODE_IBSS : wm_wifi.h
  • IEEE80211_MODE_INFRA : wm_wifi.h
  • ieee80211_ofdm_chan_to_freq() : wm_ieee80211.h
  • ieee80211_tu_to_usec() : wm_ieee80211.h
  • IPADDR_TYPE_V4 : wm_netif2.1.3.h
  • IRQn : wm_regs.h


W800 SDK APIs: Globals

Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- l -

  • LCD : wm_lcd.h
  • LCD_BiasDef : wm_lcd.h
  • LCD_DutyDef : wm_lcd.h
  • LCD_VlcdDef : wm_lcd.h


W800 SDK APIs: Globals

Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- m -

  • MAC_IRQn : wm_regs.h
  • md5() : wm_crypto.h


W800 SDK APIs: Globals

Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- n -

  • net_rx_data_cb : wm_wifi.h
  • NETIF_IP_NET2_UP : wm_netif2.1.3.h
  • NETIF_IP_NET_UP : wm_netif2.1.3.h
  • NETIF_WIFI_DISCONNECTED : wm_netif2.1.3.h
  • NETIF_WIFI_JOIN_FAILED : wm_netif2.1.3.h
  • NETIF_WIFI_JOIN_SUCCESS : wm_netif2.1.3.h
  • NETIF_WIFI_SOFTAP_CLOSED : wm_netif2.1.3.h
  • NETIF_WIFI_SOFTAP_FAILED : wm_netif2.1.3.h
  • NETIF_WIFI_SOFTAP_SUCCESS : wm_netif2.1.3.h


W800 SDK APIs: Globals

Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- o -

  • oneshot_airkiss_send_reply() : wm_wifi_oneshot.h
  • OS_CPU_SR : wm_osal.h
  • OS_STK : wm_osal.h
  • os_time_t : wm_osal.h


W800 SDK APIs: Globals

Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- p -

  • PMU_IRQn : wm_regs.h
  • PWM_CHANNEL_MAX_NUM : wm_pwm.h
  • pwm_init_param : wm_pwm.h
  • PWM_IRQn : wm_regs.h


W800 SDK APIs: Globals

Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- r -

  • rc4() : wm_crypto.h
  • RDPRT_KEY : wm_internal_flash.h
  • RF_CFG_IRQn : wm_regs.h
  • RSA_IRQn : wm_regs.h


W800 SDK APIs: Globals

Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- s -

  • SDIO_IRQn : wm_regs.h
  • SDIO_WP_INT_SRC_CMD_DOWN : wm_hspi.h
  • SEC_IRQn : wm_regs.h
  • sha1() : wm_crypto.h
  • SIDO_HOST_IRQn : wm_regs.h
  • socket_accept_fn : wm_socket2.1.3.h
  • socket_connected_fn : wm_socket2.1.3.h
  • socket_err_fn : wm_socket2.1.3.h
  • socket_poll_fn : wm_socket2.1.3.h
  • socket_recv_fn : wm_socket2.1.3.h
  • socket_recv_ip_rpt_fn : wm_socket2.1.3.h
  • socket_state_changed_fn : wm_socket2.1.3.h
  • SPI_BYTE_TRANSFER : wm_hostspi.h
  • SPI_CPHA : wm_hostspi.h
  • SPI_DEFAULT_SPEED : wm_hostspi.h
  • SPI_HS_IRQn : wm_regs.h
  • SPI_LS_IRQn : wm_regs.h
  • SPI_MESSAGE_STATUS_IDLE : wm_hostspi.h
  • SPI_SLAVE_FLASH : wm_hostspi.h
  • ST_Wm_User_Param : wm_params.h
  • start_routine : wm_wl_task.h
  • SYS_ARCH_TIMEOUT : wm_wl_mbox.h
  • SYS_TICK_IRQn : wm_regs.h


W800 SDK APIs: Globals

Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- t -

  • task_msg_type : wm_wl_task.h
  • TIMER_IRQn : wm_regs.h
  • tls_airkiss_recv() : wm_wifi_oneshot.h
  • tls_airkiss_start() : wm_wifi_oneshot.h
  • tls_airkiss_stop() : wm_wifi_oneshot.h
  • tls_arch_mbox_fetch() : wm_wl_mbox.h
  • tls_bitband_read() : wm_regs.h
  • tls_bitband_write() : wm_regs.h
  • tls_ble_adv() : wm_ble.h
  • tls_ble_callback_t : wm_bt_def.h
  • tls_ble_client_app_deinit() : wm_ble_gatt.h
  • tls_ble_client_app_init() : wm_ble_gatt.h
  • tls_ble_client_app_register() : wm_ble_gatt.h
  • tls_ble_client_app_unregister() : wm_ble_gatt.h
  • tls_ble_client_configure_mtu() : wm_ble_gatt.h
  • tls_ble_client_connect() : wm_ble_gatt.h
  • tls_ble_client_deregister_for_notification() : wm_ble_gatt.h
  • tls_ble_client_disconnect() : wm_ble_gatt.h
  • tls_ble_client_execute_write() : wm_ble_gatt.h
  • tls_ble_client_get_gatt_db() : wm_ble_gatt.h
  • tls_ble_client_listen() : wm_ble_gatt.h
  • tls_ble_client_read_characteristic() : wm_ble_gatt.h
  • tls_ble_client_read_descriptor() : wm_ble_gatt.h
  • tls_ble_client_refresh() : wm_ble_gatt.h
  • tls_ble_client_register_for_notification() : wm_ble_gatt.h
  • tls_ble_client_search_service() : wm_ble_gatt.h
  • tls_ble_client_write_characteristic() : wm_ble_gatt.h
  • tls_ble_client_write_descriptor() : wm_ble_gatt.h
  • tls_ble_conn_parameter_update() : wm_ble.h
  • tls_ble_dm_callback_t : wm_bt_def.h
  • tls_ble_dm_evt_t : wm_bt_def.h
  • tls_ble_dm_init() : wm_ble.h
  • tls_ble_dm_timer_callback_t : wm_bt_def.h
  • tls_ble_dm_triger_callback_t : wm_bt_def.h
  • tls_ble_evt_t : wm_bt_def.h
  • tls_ble_gap_adv() : wm_ble.h
  • tls_ble_get_tx_power() : wm_bt.h
  • tls_ble_scan() : wm_ble.h
  • tls_ble_server_add_characteristic() : wm_ble_gatt.h
  • tls_ble_server_add_descriptor() : wm_ble_gatt.h
  • tls_ble_server_add_service() : wm_ble_gatt.h
  • tls_ble_server_app_init() : wm_ble_gatt.h
  • tls_ble_server_app_register() : wm_ble_gatt.h
  • tls_ble_server_app_unregister() : wm_ble_gatt.h
  • tls_ble_server_connect() : wm_ble_gatt.h
  • tls_ble_server_delete_service() : wm_ble_gatt.h
  • tls_ble_server_disconnect() : wm_ble_gatt.h
  • tls_ble_server_send_indication() : wm_ble_gatt.h
  • tls_ble_server_send_response() : wm_ble_gatt.h
  • tls_ble_server_start_service() : wm_ble_gatt.h
  • tls_ble_server_stop_service() : wm_ble_gatt.h
  • tls_ble_set_adv_data() : wm_ble.h
  • tls_ble_set_adv_ext_param() : wm_ble.h
  • tls_ble_set_adv_param() : wm_ble.h
  • tls_ble_set_scan_param() : wm_ble.h
  • tls_ble_set_sec() : wm_ble.h
  • tls_ble_set_sec_auth_req() : wm_ble.h
  • tls_ble_set_sec_io_cap() : wm_ble.h
  • tls_ble_set_tx_power() : wm_bt.h
  • tls_ble_uart_output_ptr : wm_bt_def.h
  • tls_ble_uart_sent_ptr : wm_bt_def.h
  • tls_bredr_get_tx_power() : wm_bt.h
  • tls_bredr_sco_datapath_set() : wm_bt.h
  • tls_bredr_set_tx_power() : wm_bt.h
  • tls_bt_a2dp_sink_callback_t : wm_bt_def.h
  • tls_bt_a2dp_src_callback_t : wm_bt_def.h
  • tls_bt_acl_state_t : wm_bt_def.h
  • tls_bt_av_evt_t : wm_bt_def.h
  • tls_bt_av_sink_connect_src() : wm_bt_av.h
  • tls_bt_av_sink_deinit() : wm_bt_av.h
  • tls_bt_av_sink_disconnect() : wm_bt_av.h
  • tls_bt_av_sink_init() : wm_bt_av.h
  • tls_bt_av_src_connect_sink() : wm_bt_av.h
  • tls_bt_av_src_deinit() : wm_bt_av.h
  • tls_bt_av_src_disconnect() : wm_bt_av.h
  • tls_bt_av_src_init() : wm_bt_av.h
  • tls_bt_bond_state_t : wm_bt_def.h
  • tls_bt_cancel_bond() : wm_bt.h
  • tls_bt_cancel_discovery() : wm_bt.h
  • tls_bt_controller_get_status() : wm_bt.h
  • tls_bt_create_bond() : wm_bt.h
  • tls_bt_ctrl_disable() : wm_bt.h
  • tls_bt_ctrl_enable() : wm_bt.h
  • tls_bt_ctrl_if_register() : wm_bt.h
  • tls_bt_ctrl_if_unregister() : wm_bt.h
  • tls_bt_ctrl_is_sleep() : wm_bt.h
  • tls_bt_ctrl_sleep() : wm_bt.h
  • tls_bt_ctrl_wakeup() : wm_bt.h
  • tls_bt_disable() : wm_bt.h
  • tls_bt_discovery_state_t : wm_bt_def.h
  • tls_bt_enable() : wm_bt.h
  • tls_bt_get_adapter_property() : wm_bt.h
  • tls_bt_hf_client_connect() : wm_bt_hf_client.h
  • tls_bt_hf_client_connect_audio() : wm_bt_hf_client.h
  • tls_bt_hf_client_deinit() : wm_bt_hf_client.h
  • tls_bt_hf_client_dial() : wm_bt_hf_client.h
  • tls_bt_hf_client_dial_memory() : wm_bt_hf_client.h
  • tls_bt_hf_client_disconnect() : wm_bt_hf_client.h
  • tls_bt_hf_client_disconnect_audio() : wm_bt_hf_client.h
  • tls_bt_hf_client_handle_call_action() : wm_bt_hf_client.h
  • tls_bt_hf_client_init() : wm_bt_hf_client.h
  • tls_bt_hf_client_query_current_calls() : wm_bt_hf_client.h
  • tls_bt_hf_client_query_current_operator_name() : wm_bt_hf_client.h
  • tls_bt_hf_client_request_last_voice_tag_number() : wm_bt_hf_client.h
  • tls_bt_hf_client_retrieve_subscriber_info() : wm_bt_hf_client.h
  • tls_bt_hf_client_send_at_cmd() : wm_bt_hf_client.h
  • tls_bt_hf_client_send_audio() : wm_bt_hf_client.h
  • tls_bt_hf_client_send_dtmf() : wm_bt_hf_client.h
  • tls_bt_hf_client_start_voice_recognition() : wm_bt_hf_client.h
  • tls_bt_hf_client_stop_voice_recognition() : wm_bt_hf_client.h
  • tls_bt_hf_client_volume_control() : wm_bt_hf_client.h
  • tls_bt_host_callback_t : wm_bt_def.h
  • tls_bt_host_cleanup() : wm_bt.h
  • tls_bt_host_evt_t : wm_bt_def.h
  • tls_bt_mesh_role_t : wm_bt_def.h
  • tls_bt_pin_reply() : wm_bt.h
  • tls_bt_property_type_t : wm_bt_def.h
  • tls_bt_register_pending_process_callback() : wm_bt.h
  • tls_bt_register_sleep_callback() : wm_bt.h
  • tls_bt_remove_bond() : wm_bt.h
  • tls_bt_set_adapter_property() : wm_bt.h
  • tls_bt_set_mesh_mode() : wm_bt.h
  • tls_bt_spp_callback_t : wm_bt_def.h
  • tls_bt_spp_connect() : wm_bt_spp.h
  • tls_bt_spp_deinit() : wm_bt_spp.h
  • tls_bt_spp_disable() : wm_bt_spp.h
  • tls_bt_spp_disconnect() : wm_bt_spp.h
  • tls_bt_spp_enable() : wm_bt_spp.h
  • tls_bt_spp_init() : wm_bt_spp.h
  • tls_bt_spp_start_discovery() : wm_bt_spp.h
  • tls_bt_spp_start_server() : wm_bt_spp.h
  • tls_bt_spp_write() : wm_bt_spp.h
  • tls_bt_ssp_reply() : wm_bt.h
  • tls_bt_ssp_variant_t : wm_bt_def.h
  • tls_bt_start_discovery() : wm_bt.h
  • tls_bt_state_t : wm_bt_def.h
  • TLS_BT_STATUS_DONE : wm_bt_def.h
  • TLS_BT_STATUS_INTERNAL_ERROR : wm_bt_def.h
  • TLS_BT_STATUS_NOMEM : wm_bt_def.h
  • TLS_BT_STATUS_SUCCESS : wm_bt_def.h
  • tls_bt_status_t : wm_bt_def.h
  • TLS_BT_STATUS_THREAD_FAILED : wm_bt_def.h
  • tls_bt_vuart_host_check_send_available() : wm_bt.h
  • tls_bt_vuart_host_send_packet() : wm_bt.h
  • tls_bthf_client_callback_t : wm_bt_def.h
  • tls_btrc_callback_t : wm_bt_def.h
  • tls_btrc_ctrl_callback_t : wm_bt_def.h
  • tls_btrc_ctrl_change_player_app_setting() : wm_bt_av.h
  • tls_btrc_ctrl_deinit() : wm_bt_av.h
  • tls_btrc_ctrl_init() : wm_bt_av.h
  • tls_btrc_ctrl_send_groupnavigation_cmd() : wm_bt_av.h
  • tls_btrc_ctrl_send_passthrough_cmd() : wm_bt_av.h
  • tls_btrc_ctrl_set_volume_rsp() : wm_bt_av.h
  • tls_btrc_ctrl_volume_change_notification_rsp() : wm_bt_av.h
  • tls_btrc_deinit() : wm_bt_av.h
  • tls_btrc_get_element_attr_rsp() : wm_bt_av.h
  • tls_btrc_get_play_status_rsp() : wm_bt_av.h
  • tls_btrc_init() : wm_bt_av.h
  • tls_btrc_register_notification_rsp() : wm_bt_av.h
  • tls_btrc_set_volume() : wm_bt_av.h
  • tls_close_peripheral_clock() : wm_pmu.h
  • tls_clr_gpio_irq_status() : wm_gpio.h
  • TLS_CONFIG_AIRKISS_MODE_ONESHOT : wm_wifi_oneshot.h
  • TLS_CONFIG_AP_MODE_ONESHOT : wm_wifi_oneshot.h
  • TLS_CONFIG_BLE_WIFI_ONESHOT : wm_wifi_oneshot.h
  • TLS_CONFIG_HOSTIF : wm_config.h
  • TLS_CONFIG_HS_SPI : wm_config.h
  • TLS_CONFIG_HTTP_CLIENT : wm_config.h
  • TLS_CONFIG_IGMP : wm_config.h
  • TLS_CONFIG_ONESHOT_DELAY_SPECIAL : wm_wifi_oneshot.h
  • TLS_CONFIG_ONLY_FACTORY_ATCMD : wm_config.h
  • TLS_CONFIG_SOCKET_STD : wm_config.h
  • TLS_CONFIG_UDP_LSD_SPECIAL : wm_wifi_oneshot.h
  • TLS_CONFIG_UDP_ONE_SHOT : wm_wifi_oneshot.h
  • tls_crypto_3des_encrypt_decrypt() : wm_crypto_hard.h
  • tls_crypto_3des_init() : wm_crypto_hard.h
  • tls_crypto_aes_encrypt_decrypt() : wm_crypto_hard.h
  • tls_crypto_aes_init() : wm_crypto_hard.h
  • tls_crypto_crc_final() : wm_crypto_hard.h
  • tls_crypto_crc_init() : wm_crypto_hard.h
  • tls_crypto_crc_update() : wm_crypto_hard.h
  • tls_crypto_des_encrypt_decrypt() : wm_crypto_hard.h
  • tls_crypto_des_init() : wm_crypto_hard.h
  • tls_crypto_exptmod() : wm_crypto_hard.h
  • tls_crypto_init() : wm_crypto_hard.h
  • tls_crypto_md5_final() : wm_crypto_hard.h
  • tls_crypto_md5_init() : wm_crypto_hard.h
  • tls_crypto_md5_update() : wm_crypto_hard.h
  • tls_crypto_random_bytes() : wm_crypto_hard.h
  • tls_crypto_random_init() : wm_crypto_hard.h
  • tls_crypto_random_stop() : wm_crypto_hard.h
  • tls_crypto_rc4() : wm_crypto_hard.h
  • tls_crypto_rc4_init() : wm_crypto_hard.h
  • tls_crypto_sha1_final() : wm_crypto_hard.h
  • tls_crypto_sha1_init() : wm_crypto_hard.h
  • tls_crypto_sha1_update() : wm_crypto_hard.h
  • tls_crypto_trng() : wm_crypto_hard.h
  • TLS_DBG_LEVEL_DUMP : wm_debug.h
  • TLS_DBG_LEVEL_ERR : wm_debug.h
  • TLS_DBG_LEVEL_INFO : wm_debug.h
  • TLS_DBG_LEVEL_WARNING : wm_debug.h
  • TLS_DBG_OFF : wm_debug.h
  • TLS_DBG_ON : wm_debug.h
  • TLS_DBGPRT_DUMP : wm_debug.h
  • TLS_DBGPRT_ERR : wm_debug.h
  • TLS_DBGPRT_INFO : wm_debug.h
  • TLS_DBGPRT_WARNING : wm_debug.h
  • tls_dhcp_start() : wm_netif2.1.3.h
  • tls_dhcp_stop() : wm_netif2.1.3.h
  • tls_dhcps_getip() : wm_dhcp_server.h
  • tls_dhcps_setdns() : wm_dhcp_server.h
  • tls_dhcps_start() : wm_dhcp_server.h
  • tls_dhcps_stop() : wm_dhcp_server.h
  • tls_dm_evt_triger() : wm_ble.h
  • tls_dm_read_remote_rssi() : wm_ble.h
  • tls_dm_set_data_length() : wm_ble.h
  • tls_dm_set_privacy() : wm_ble.h
  • tls_dma_free() : wm_dma.h
  • tls_dma_init() : wm_dma.h
  • tls_dma_irq_clr() : wm_dma.h
  • tls_dma_irq_register() : wm_dma.h
  • tls_dma_request() : wm_dma.h
  • tls_dma_start() : wm_dma.h
  • tls_dma_start_by_wrap() : wm_dma.h
  • tls_dma_stop() : wm_dma.h
  • tls_dma_wait_complt() : wm_dma.h
  • tls_dnss_start() : wm_dns_server.h
  • tls_dnss_stop() : wm_dns_server.h
  • tls_ethernet_data_rx_callback() : wm_wifi.h
  • tls_ethernet_init() : wm_netif2.1.3.h
  • tls_filter_mcast_mac() : wm_wifi.h
  • tls_flash_lock() : wm_internal_flash.h
  • TLS_FLASH_MESH_PARAM_ADDR : wm_flash_map.h
  • tls_flash_unlock() : wm_internal_flash.h
  • tls_fls_erase() : wm_internal_flash.h
  • tls_fls_init() : wm_internal_flash.h
  • tls_fls_otp_lock() : wm_internal_flash.h
  • tls_fls_otp_read() : wm_internal_flash.h
  • tls_fls_otp_write() : wm_internal_flash.h
  • tls_fls_read() : wm_internal_flash.h
  • tls_fls_read_unique_id() : wm_internal_flash.h
  • tls_fls_sem_lock() : wm_internal_flash.h
  • tls_fls_sem_unlock() : wm_internal_flash.h
  • tls_fls_sys_param_postion_init() : wm_internal_flash.h
  • tls_fls_write() : wm_internal_flash.h
  • tls_fls_write_without_erase() : wm_internal_flash.h
  • tls_freq_err_op() : wm_efuse.h
  • tls_ft_param_get() : wm_efuse.h
  • tls_ft_param_init() : wm_efuse.h
  • tls_ft_param_set() : wm_efuse.h
  • TLS_FWUP_BLK_SIZE : wm_fwup.h
  • tls_fwup_clear_error() : wm_fwup.h
  • tls_fwup_current_state() : wm_fwup.h
  • TLS_FWUP_DEST_SPECIFIC_FIRMWARE : wm_fwup.h
  • tls_fwup_enter() : wm_fwup.h
  • tls_fwup_exit() : wm_fwup.h
  • tls_fwup_get_current_session_id() : wm_fwup.h
  • tls_fwup_get_current_update_numer() : wm_fwup.h
  • tls_fwup_get_status() : wm_fwup.h
  • tls_fwup_image_src : wm_fwup.h
  • TLS_FWUP_IMAGE_SRC_HSPI : wm_fwup.h
  • TLS_FWUP_IMAGE_SRC_HUART : wm_fwup.h
  • TLS_FWUP_IMAGE_SRC_LUART : wm_fwup.h
  • TLS_FWUP_IMAGE_SRC_WEB : wm_fwup.h
  • tls_fwup_img_header_check() : wm_fwup.h
  • tls_fwup_init() : wm_fwup.h
  • TLS_FWUP_REQ_STATUS_IDLE : wm_fwup.h
  • tls_fwup_request_sync() : wm_fwup.h
  • tls_fwup_reset() : wm_fwup.h
  • tls_fwup_set_crc_error() : wm_fwup.h
  • tls_fwup_set_update_numer() : wm_fwup.h
  • TLS_FWUP_STATE_UNDEF : wm_fwup.h
  • TLS_FWUP_STATUS_OK : wm_fwup.h
  • TLS_GENERAL_DBG : wm_debug.h
  • tls_get_adc_cal_param() : wm_efuse.h
  • tls_get_bt_mac_addr() : wm_efuse.h
  • tls_get_gpio_irq_status() : wm_gpio.h
  • tls_get_isr_count() : wm_irq.h
  • tls_get_mac_addr() : wm_efuse.h
  • tls_get_netif() : wm_netif2.1.3.h
  • tls_get_rtc() : wm_rtc.h
  • tls_get_rx_iq_gain() : wm_efuse.h
  • tls_get_rx_iq_phase() : wm_efuse.h
  • tls_get_tx_gain() : wm_efuse.h
  • tls_get_tx_iq_gain() : wm_efuse.h
  • tls_get_tx_iq_phase() : wm_efuse.h
  • tls_get_tx_lo() : wm_efuse.h
  • tls_gpio_attr : wm_gpio.h
  • tls_gpio_cfg() : wm_gpio.h
  • tls_gpio_dir : wm_gpio.h
  • tls_gpio_irq_callback : wm_gpio.h
  • tls_gpio_irq_disable() : wm_gpio.h
  • tls_gpio_irq_enable() : wm_gpio.h
  • tls_gpio_irq_trig : wm_gpio.h
  • tls_gpio_isr_register() : wm_gpio.h
  • tls_gpio_read() : wm_gpio.h
  • tls_gpio_write() : wm_gpio.h
  • tls_hostif_init() : wm_at_ri_init.h
  • tls_hspi_init() : wm_at_ri_init.h
  • tls_hspi_rx_cmd_callback_register() : wm_hspi.h
  • tls_hspi_rx_data_callback_register() : wm_hspi.h
  • tls_hspi_tx_data() : wm_hspi.h
  • tls_hspi_tx_data_callback_register() : wm_hspi.h
  • tls_http_session_flags_t : wm_http_client.h
  • tls_http_session_handle_t : wm_http_client.h
  • tls_i2c_init() : wm_i2c.h
  • tls_i2c_read_byte() : wm_i2c.h
  • tls_i2c_stop() : wm_i2c.h
  • tls_i2c_wait_ack() : wm_i2c.h
  • tls_i2c_write_byte() : wm_i2c.h
  • tls_io_cfg_get() : wm_io.h
  • tls_io_cfg_set() : wm_io.h
  • tls_io_name : wm_io.h
  • tls_irq_disable() : wm_irq.h
  • tls_irq_enable() : wm_irq.h
  • tls_irq_init() : wm_irq.h
  • tls_irq_register_handler() : wm_irq.h
  • tls_lcd_bias_set() : wm_lcd.h
  • TLS_LCD_CLK_ENABLE : wm_lcd.h
  • tls_lcd_duty_set() : wm_lcd.h
  • TLS_LCD_ENABLE : wm_lcd.h
  • tls_lcd_fresh_rate() : wm_lcd.h
  • tls_lcd_fresh_ratio() : wm_lcd.h
  • tls_lcd_init() : wm_lcd.h
  • TLS_LCD_POWERDOWM : wm_lcd.h
  • tls_lcd_seg_set() : wm_lcd.h
  • tls_lcd_vlcd_sel() : wm_lcd.h
  • tls_mbox_new() : wm_wl_mbox.h
  • tls_mbox_post() : wm_wl_mbox.h
  • tls_mbox_t : wm_wl_mbox.h
  • tls_mbox_trypost() : wm_wl_mbox.h
  • tls_mbox_valid() : wm_wl_mbox.h
  • tls_netif_add_status_event() : wm_netif2.1.3.h
  • tls_netif_dns_setserver() : wm_netif2.1.3.h
  • tls_netif_get_ethif() : wm_netif2.1.3.h
  • tls_netif_remove_status_event() : wm_netif2.1.3.h
  • tls_netif_set_addr() : wm_netif2.1.3.h
  • tls_netif_set_down() : wm_netif2.1.3.h
  • tls_netif_set_status() : wm_netif2.1.3.h
  • tls_netif_set_up() : wm_netif2.1.3.h
  • tls_ntp_client() : wm_ntp.h
  • tls_ntp_query_sntpcfg() : wm_ntp.h
  • tls_ntp_set_server() : wm_ntp.h
  • tls_oneshot_airkiss_change_channel() : wm_wifi_oneshot.h
  • tls_oneshot_find_chlist() : wm_wifi_oneshot.h
  • tls_oneshot_if_use_bssid() : wm_wifi_oneshot.h
  • tls_oneshot_switch_channel_tim_stop() : wm_wifi_oneshot.h
  • tls_oneshot_switch_channel_tim_temp_stop() : wm_wifi_oneshot.h
  • tls_open_peripheral_clock() : wm_pmu.h
  • tls_os_disp_task_stat_info() : wm_osal.h
  • tls_os_get_time() : wm_osal.h
  • tls_os_get_type() : wm_osal.h
  • tls_os_init() : wm_osal.h
  • tls_os_mailbox_create() : wm_osal.h
  • tls_os_mailbox_delete() : wm_osal.h
  • tls_os_mailbox_receive() : wm_osal.h
  • tls_os_mailbox_send() : wm_osal.h
  • tls_os_mailbox_t : wm_osal.h
  • tls_os_mutex_acquire() : wm_osal.h
  • tls_os_mutex_create() : wm_osal.h
  • tls_os_mutex_delete() : wm_osal.h
  • tls_os_mutex_release() : wm_osal.h
  • tls_os_mutex_t : wm_osal.h
  • tls_os_queue_create() : wm_osal.h
  • tls_os_queue_delete() : wm_osal.h
  • tls_os_queue_flush() : wm_osal.h
  • tls_os_queue_receive() : wm_osal.h
  • tls_os_queue_send() : wm_osal.h
  • tls_os_queue_send_to_back() : wm_osal.h
  • tls_os_queue_send_to_front() : wm_osal.h
  • tls_os_queue_space_available() : wm_osal.h
  • tls_os_queue_t : wm_osal.h
  • tls_os_release_critical() : wm_osal.h
  • tls_os_sem_acquire() : wm_osal.h
  • tls_os_sem_create() : wm_osal.h
  • tls_os_sem_delete() : wm_osal.h
  • tls_os_sem_release() : wm_osal.h
  • tls_os_sem_set() : wm_osal.h
  • tls_os_sem_t : wm_osal.h
  • tls_os_set_critical() : wm_osal.h
  • tls_os_start_scheduler() : wm_osal.h
  • tls_os_status : wm_osal.h
  • tls_os_status_t : wm_osal.h
  • tls_os_task_create() : wm_osal.h
  • tls_os_task_del() : wm_osal.h
  • tls_os_task_del_by_task_handle() : wm_osal.h
  • tls_os_task_t : wm_osal.h
  • tls_os_time_delay() : wm_osal.h
  • tls_os_time_tick() : wm_osal.h
  • TLS_OS_TIMER_CALLBACK : wm_osal.h
  • tls_os_timer_create() : wm_osal.h
  • tls_os_timer_delete() : wm_osal.h
  • tls_os_timer_init() : wm_osal.h
  • TLS_OS_TIMER_OPT_ONE_SHORT : wm_osal.h
  • TLS_OS_TIMER_OPT_PERIOD : wm_osal.h
  • tls_os_timer_start() : wm_osal.h
  • tls_os_timer_stop() : wm_osal.h
  • tls_os_timer_t : wm_osal.h
  • TLS_OS_TYPE : wm_osal.h
  • TLS_PARAM_DHCP_ENABLE : wm_params.h
  • TLS_PARAM_ENCRY_OPEN : wm_params.h
  • tls_param_get() : wm_params.h
  • tls_param_get_bt_param_address() : wm_params.h
  • tls_param_get_program_param() : wm_params.h
  • tls_param_get_updp_mode() : wm_params.h
  • TLS_PARAM_ID_ALL : wm_params.h
  • TLS_PARAM_ID_BT_ADAPTER : wm_params.h
  • TLS_PARAM_IEEE80211_INFRA : wm_params.h
  • tls_param_init() : wm_params.h
  • TLS_PARAM_INIT_MAGIC : wm_params.h
  • tls_param_load_factory_default() : wm_params.h
  • TLS_PARAM_MAGIC : wm_params.h
  • TLS_PARAM_MANUAL_MODE : wm_params.h
  • TLS_PARAM_PARTITION_NUM : wm_params.h
  • TLS_PARAM_PHY_11BG_MIXED : wm_params.h
  • TLS_PARAM_PSM_DISABLE : wm_params.h
  • TLS_PARAM_REGION_0_BG_BAND : wm_params.h
  • tls_param_save_user() : wm_params.h
  • tls_param_save_user_default() : wm_params.h
  • tls_param_set() : wm_params.h
  • tls_param_set_program_param() : wm_params.h
  • tls_param_set_updp_mode() : wm_params.h
  • TLS_PARAM_SOCKET_TCP : wm_params.h
  • TLS_PARAM_SSIDBRD_DISABLE : wm_params.h
  • tls_param_to_default() : wm_params.h
  • tls_param_to_flash() : wm_params.h
  • TLS_PARAM_TX_RATEIDX_1M : wm_params.h
  • TLS_PARAM_UART_BAUDRATE_B600 : wm_params.h
  • TLS_PARAM_UART_FLOW_DISABLE : wm_params.h
  • TLS_PARAM_UART_PARITY_NONE : wm_params.h
  • TLS_PARAM_UART_STOPBITS_1BITS : wm_params.h
  • TLS_PARAM_USR_INTF_LUART : wm_params.h
  • TLS_PERIPHERAL_TYPE_BT : wm_pmu.h
  • TLS_PERIPHERAL_TYPE_DMA : wm_pmu.h
  • TLS_PERIPHERAL_TYPE_GPIO : wm_pmu.h
  • TLS_PERIPHERAL_TYPE_GPSEC : wm_pmu.h
  • TLS_PERIPHERAL_TYPE_I2C : wm_pmu.h
  • TLS_PERIPHERAL_TYPE_I2S : wm_pmu.h
  • TLS_PERIPHERAL_TYPE_LCD : wm_pmu.h
  • TLS_PERIPHERAL_TYPE_LSPI : wm_pmu.h
  • TLS_PERIPHERAL_TYPE_PSRAM : wm_pmu.h
  • TLS_PERIPHERAL_TYPE_PWM : wm_pmu.h
  • TLS_PERIPHERAL_TYPE_RSA : wm_pmu.h
  • tls_peripheral_type_s : wm_pmu.h
  • TLS_PERIPHERAL_TYPE_SDADC : wm_pmu.h
  • TLS_PERIPHERAL_TYPE_SDIO_MASTER : wm_pmu.h
  • TLS_PERIPHERAL_TYPE_TIMER : wm_pmu.h
  • TLS_PERIPHERAL_TYPE_TOUCH_SENSOR : wm_pmu.h
  • TLS_PERIPHERAL_TYPE_UART0 : wm_pmu.h
  • TLS_PERIPHERAL_TYPE_UART1 : wm_pmu.h
  • TLS_PERIPHERAL_TYPE_UART2 : wm_pmu.h
  • TLS_PERIPHERAL_TYPE_UART3 : wm_pmu.h
  • TLS_PERIPHERAL_TYPE_UART4 : wm_pmu.h
  • TLS_PERIPHERAL_TYPE_UART5 : wm_pmu.h
  • tls_pmu_clk_select() : wm_pmu.h
  • tls_pmu_gpio_isr_register() : wm_pmu.h
  • tls_pmu_irq_callback : wm_pmu.h
  • tls_pmu_sdio_isr_register() : wm_pmu.h
  • tls_pmu_sleep_start() : wm_pmu.h
  • tls_pmu_standby_start() : wm_pmu.h
  • tls_pmu_timer0_isr_register() : wm_pmu.h
  • tls_pmu_timer0_start() : wm_pmu.h
  • tls_pmu_timer0_stop() : wm_pmu.h
  • tls_pmu_timer1_isr_register() : wm_pmu.h
  • tls_pmu_timer1_start() : wm_pmu.h
  • tls_pmu_timer1_stop() : wm_pmu.h
  • tls_pwm_brake_mode_config() : wm_pwm.h
  • tls_pwm_brake_out_level : wm_pwm.h
  • tls_pwm_cap_init() : wm_pwm.h
  • tls_pwm_cap_int_type : wm_pwm.h
  • tls_pwm_capture_inverse_cmd() : wm_pwm.h
  • tls_pwm_capture_irq_type_config() : wm_pwm.h
  • tls_pwm_capture_mode_config() : wm_pwm.h
  • tls_pwm_cnt_type : wm_pwm.h
  • tls_pwm_cnt_type_config() : wm_pwm.h
  • tls_pwm_deadzone_config() : wm_pwm.h
  • tls_pwm_duty_config() : wm_pwm.h
  • tls_pwm_duty_set() : wm_pwm.h
  • tls_pwm_freq_config() : wm_pwm.h
  • tls_pwm_freq_set() : wm_pwm.h
  • tls_pwm_init() : wm_pwm.h
  • tls_pwm_isr_register() : wm_pwm.h
  • tls_pwm_loop_mode_config() : wm_pwm.h
  • tls_pwm_loop_type : wm_pwm.h
  • tls_pwm_out_en_state : wm_pwm.h
  • tls_pwm_out_init() : wm_pwm.h
  • tls_pwm_out_inverse_cmd() : wm_pwm.h
  • tls_pwm_out_mode : wm_pwm.h
  • tls_pwm_out_mode_config() : wm_pwm.h
  • tls_pwm_output_en_cmd() : wm_pwm.h
  • tls_pwm_start() : wm_pwm.h
  • tls_pwm_stop() : wm_pwm.h
  • tls_pwm_stoptime_by_period_config() : wm_pwm.h
  • tls_pwm_stoptime_irq_cmd() : wm_pwm.h
  • tls_pwm_waveform_inversion : wm_pwm.h
  • tls_reg_read32() : wm_regs.h
  • tls_reg_write32() : wm_regs.h
  • tls_restore_param_from_backup() : wm_params.h
  • tls_rf_bt_mode() : wm_bt.h
  • tls_rf_cal_finish_op() : wm_efuse.h
  • tls_rtc_irq_callback : wm_rtc.h
  • tls_rtc_isr_register() : wm_rtc.h
  • tls_rtc_timer_start() : wm_rtc.h
  • tls_rtc_timer_stop() : wm_rtc.h
  • tls_sem_t : wm_wl_task.h
  • tls_set_adc_cal_param() : wm_efuse.h
  • tls_set_bt_mac_addr() : wm_efuse.h
  • tls_set_high_speed_interface_type() : wm_hspi.h
  • tls_set_hspi_user_mode() : wm_hspi.h
  • tls_set_mac_addr() : wm_efuse.h
  • tls_set_rtc() : wm_rtc.h
  • tls_set_rx_iq_gain() : wm_efuse.h
  • tls_set_rx_iq_phase() : wm_efuse.h
  • tls_set_tx_gain() : wm_efuse.h
  • tls_set_tx_iq_gain() : wm_efuse.h
  • tls_set_tx_iq_phase() : wm_efuse.h
  • tls_set_tx_lo() : wm_efuse.h
  • tls_slave_spi_init() : wm_hspi.h
  • tls_socket_close() : wm_socket2.1.3.h
  • tls_socket_create() : wm_socket2.1.3.h
  • tls_socket_get_status() : wm_socket2.1.3.h
  • tls_socket_send() : wm_socket2.1.3.h
  • tls_socket_udp_sendto() : wm_socket2.1.3.h
  • tls_spi_init() : wm_hostspi.h
  • tls_spi_read() : wm_hostspi.h
  • tls_spi_read_with_cmd() : wm_hostspi.h
  • tls_spi_setup() : wm_hostspi.h
  • TLS_SPI_STATUS_OK : wm_hostspi.h
  • tls_spi_trans_type() : wm_hostspi.h
  • tls_spi_write() : wm_hostspi.h
  • tls_spi_write_with_cmd() : wm_hostspi.h
  • tls_spifls_drv_install() : wm_fls_gd25qxx.h
  • tls_spifls_init() : wm_flash.h
  • tls_spifls_read() : wm_flash.h
  • tls_spifls_write() : wm_flash.h
  • tls_sys_clk_get() : wm_cpu.h
  • tls_sys_clk_set() : wm_cpu.h
  • tls_sys_get_reboot_reason() : wm_watchdog.h
  • tls_sys_reset() : wm_watchdog.h
  • tls_sys_set_reboot_reason() : wm_watchdog.h
  • tls_timeout_handler : wm_wl_timers.h
  • tls_timeout_p() : wm_wl_timers.h
  • tls_timeouts_mbox_fetch_p() : wm_wl_timers.h
  • tls_timer_change() : wm_timer.h
  • tls_timer_create() : wm_timer.h
  • tls_timer_destroy() : wm_timer.h
  • tls_timer_irq_callback : wm_timer.h
  • tls_timer_read() : wm_timer.h
  • tls_timer_start() : wm_timer.h
  • tls_timer_stop() : wm_timer.h
  • tls_timer_unit : wm_timer.h
  • TLS_TIMER_UNIT_MS : wm_timer.h
  • TLS_TIMER_UNIT_US : wm_timer.h
  • tls_touchsensor_chan_config() : wm_touchsensor.h
  • tls_touchsensor_countnum_get() : wm_touchsensor.h
  • tls_touchsensor_deinit() : wm_touchsensor.h
  • tls_touchsensor_init_config() : wm_touchsensor.h
  • tls_touchsensor_irq_disable() : wm_touchsensor.h
  • tls_touchsensor_irq_enable() : wm_touchsensor.h
  • tls_touchsensor_irq_register() : wm_touchsensor.h
  • tls_touchsensor_irq_status_get() : wm_touchsensor.h
  • tls_touchsensor_scan_config() : wm_touchsensor.h
  • tls_touchsensor_scan_start() : wm_touchsensor.h
  • tls_touchsensor_scan_stop() : wm_touchsensor.h
  • tls_touchsensor_threshold_config() : wm_touchsensor.h
  • TLS_UART_CHSIZE : wm_uart.h
  • TLS_UART_CHSIZE_5BIT : wm_uart.h
  • TLS_UART_CHSIZE_6BIT : wm_uart.h
  • TLS_UART_CHSIZE_7BIT : wm_uart.h
  • TLS_UART_CHSIZE_8BIT : wm_uart.h
  • tls_uart_dma_write() : wm_uart.h
  • tls_uart_init() : wm_at_ri_init.h
  • TLS_UART_MODE : wm_uart.h
  • TLS_UART_MODE_INT : wm_uart.h
  • TLS_UART_MODE_POLL : wm_uart.h
  • TLS_UART_PMODE : wm_uart.h
  • TLS_UART_PMODE_DISABLED : wm_uart.h
  • TLS_UART_PMODE_EVEN : wm_uart.h
  • TLS_UART_PMODE_MARK : wm_uart.h
  • TLS_UART_PMODE_ODD : wm_uart.h
  • TLS_UART_PMODE_SPACE : wm_uart.h
  • tls_uart_port_init() : wm_uart.h
  • tls_uart_read() : wm_uart.h
  • tls_uart_rx_callback_register() : wm_uart.h
  • tls_uart_set_baud_rate() : wm_uart.h
  • tls_uart_set_parity() : wm_uart.h
  • tls_uart_set_stop_bits() : wm_uart.h
  • tls_uart_try_read() : wm_uart.h
  • tls_uart_tx_callback_register() : wm_uart.h
  • tls_uart_tx_sent_callback_register() : wm_uart.h
  • tls_uart_write() : wm_uart.h
  • tls_uart_write_async() : wm_uart.h
  • tls_untimeout_p() : wm_wl_timers.h
  • tls_watchdog_clr() : wm_watchdog.h
  • tls_watchdog_deinit() : wm_watchdog.h
  • tls_watchdog_init() : wm_watchdog.h
  • tls_webserver_deinit() : wm_webserver.h
  • tls_webserver_init() : wm_webserver.h
  • tls_wifi_auth_mode : wm_wifi.h
  • tls_wifi_auto_connect_flag() : wm_wifi.h
  • tls_wifi_cfg_connect_pci() : wm_wifi.h
  • tls_wifi_cfg_connect_scan_mode() : wm_wifi.h
  • tls_wifi_cfg_connect_timeout() : wm_wifi.h
  • tls_wifi_cfg_listen_interval() : wm_wifi.h
  • tls_wifi_change_chanel() : wm_wifi.h
  • tls_wifi_cipher_mode : wm_wifi.h
  • tls_wifi_client_event_callback : wm_wifi.h
  • tls_wifi_connect() : wm_wifi.h
  • tls_wifi_connect_by_bssid() : wm_wifi.h
  • tls_wifi_connect_by_ssid_bssid() : wm_wifi.h
  • tls_wifi_data_ext_recv_callback : wm_wifi.h
  • tls_wifi_data_ext_recv_cb_register() : wm_wifi.h
  • tls_wifi_data_recv_callback : wm_wifi.h
  • tls_wifi_data_recv_cb_register() : wm_wifi.h
  • tls_wifi_dataframe_recv() : wm_wifi_oneshot.h
  • tls_wifi_disconnect() : wm_wifi.h
  • tls_wifi_enable_log() : wm_wifi.h
  • tls_wifi_encrypt_mode : wm_wifi.h
  • tls_wifi_get_11b_digital_gain() : wm_wifi.h
  • tls_wifi_get_11n_digital_gain() : wm_wifi.h
  • tls_wifi_get_authed_sta_info() : wm_wifi.h
  • tls_wifi_get_current_bss() : wm_wifi.h
  • tls_wifi_get_errinfo() : wm_wifi.h
  • tls_wifi_get_errno() : wm_wifi.h
  • tls_wifi_get_listen_mode() : wm_wifi.h
  • tls_wifi_get_oneshot_customdata() : wm_wifi.h
  • tls_wifi_get_oneshot_flag() : wm_wifi.h , wm_wifi_oneshot.h
  • tls_wifi_get_oneshot_ssidpwd() : wm_wifi.h
  • tls_wifi_get_psflag() : wm_wifi.h
  • tls_wifi_get_psm_chipsleep_flag() : wm_wifi.h
  • tls_wifi_get_scan_rslt() : wm_wifi.h
  • tls_wifi_get_state() : wm_wifi.h
  • tls_wifi_get_tempcomp_flag() : wm_wifi.h
  • tls_wifi_get_tx_gain_max() : wm_wifi.h
  • tls_wifi_ibss_create() : wm_wifi.h
  • tls_wifi_mem_cfg() : wm_wifi.h
  • tls_wifi_mgmt_ext_recv_cb_register() : wm_wifi.h
  • tls_wifi_mgmt_type : wm_wifi.h
  • tls_wifi_oneshot_result_callback : wm_wifi.h
  • tls_wifi_oneshot_result_cb_register() : wm_wifi.h
  • tls_wifi_passive_scan() : wm_wifi.h
  • tls_wifi_perror() : wm_wifi.h
  • tls_wifi_psm_chipsleep_callback : wm_wifi.h
  • tls_wifi_psm_chipsleep_cb_register() : wm_wifi.h
  • tls_wifi_psm_postchipsleep_callback : wm_wifi.h
  • tls_wifi_psm_prechipsleep_callback : wm_wifi.h
  • tls_wifi_restore_bcast_mac_filter() : wm_wifi.h
  • tls_wifi_scan() : wm_wifi.h
  • tls_wifi_scan_by_param() : wm_wifi.h
  • tls_wifi_scan_result_cb_register() : wm_wifi.h
  • tls_wifi_send_data() : wm_wifi.h
  • tls_wifi_send_mgmt() : wm_wifi.h
  • tls_wifi_send_oneshotdata() : wm_wifi.h
  • tls_wifi_set_11b_digital_gain() : wm_wifi.h
  • tls_wifi_set_11n_digital_gain() : wm_wifi.h
  • tls_wifi_set_bcast_mac_filter() : wm_wifi.h
  • tls_wifi_set_fixed_rate() : wm_wifi.h
  • tls_wifi_set_listen_mode() : wm_wifi.h
  • tls_wifi_set_oneshot_flag() : wm_wifi_oneshot.h , wm_wifi.h
  • tls_wifi_set_psflag() : wm_wifi.h
  • tls_wifi_set_psm_chipsleep_flag() : wm_wifi.h
  • tls_wifi_set_tempcomp_flag() : wm_wifi.h
  • tls_wifi_softap_add_blacksta() : wm_wifi.h
  • tls_wifi_softap_client_event_register() : wm_wifi.h
  • tls_wifi_softap_create() : wm_wifi.h
  • tls_wifi_softap_del_blacksta() : wm_wifi.h
  • tls_wifi_softap_del_station() : wm_wifi.h
  • tls_wifi_softap_destroy() : wm_wifi.h
  • tls_wifi_softap_get_blackinfo() : wm_wifi.h
  • tls_wifi_softap_get_state() : wm_wifi.h
  • tls_wifi_softap_set_sta_num() : wm_wifi.h
  • tls_wifi_states : wm_wifi.h
  • tls_wifi_status_change_cb_register() : wm_wifi.h
  • tls_wifi_tx_rate : wm_wifi.h
  • tls_wl_task_add_timeout() : wm_wl_task.h
  • tls_wl_task_callback() : wm_wl_task.h
  • tls_wl_task_callback_static() : wm_wl_task.h
  • tls_wl_task_init() : wm_wl_task.h
  • tls_wl_task_run() : wm_wl_task.h
  • tls_wl_task_untimeout() : wm_wl_task.h
  • tls_wl_timer_init() : wm_wl_timers.h
  • TOUCH_IRQn : wm_regs.h


W800 SDK APIs: Globals

Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- u -

  • UART0_IRQn : wm_regs.h
  • UART1_IRQn : wm_regs.h
  • UART24_IRQn : wm_regs.h
  • UART_BAUDRATE_B600 : wm_uart.h
  • USER_ADDR_START : wm_flash_map.h


W800 SDK APIs: Globals

Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- v -

  • VLCD27 : wm_lcd.h
  • VLCD29 : wm_lcd.h
  • VLCD31 : wm_lcd.h
  • VLCD33 : wm_lcd.h


W800 SDK APIs: Globals

Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- w -

  • W800_PLL_CLK_MHZ : wm_cpu.h
  • WDG_IRQn : wm_regs.h
  • WIFI_AUTO_CNT_FLAG_GET : wm_wifi.h
  • WIFI_AUTO_CNT_FLAG_SET : wm_wifi.h
  • WIFI_AUTO_CNT_OFF : wm_wifi.h
  • WIFI_AUTO_CNT_ON : wm_wifi.h
  • WIFI_AUTO_CNT_TMP_OFF : wm_wifi.h
  • WIFI_DISCONNECTED : wm_wifi.h
  • WIFI_JOIN_FAILED : wm_wifi.h
  • WIFI_JOIN_SUCCESS : wm_wifi.h
  • WIFI_SOFTAP_CLOSED : wm_wifi.h
  • WIFI_SOFTAP_FAILED : wm_wifi.h
  • WIFI_SOFTAP_SUCCESS : wm_wifi.h
  • wm_adc_config() : wm_gpio_afsel.h
  • WM_BLE_CL_CFG_MTU_EVT : wm_bt_def.h
  • WM_BLE_CL_CLOSE_EVT : wm_bt_def.h
  • WM_BLE_CL_CONGEST_EVT : wm_bt_def.h
  • WM_BLE_CL_DEREGISTER_EVT : wm_bt_def.h
  • WM_BLE_CL_EXEC_CMPL_EVT : wm_bt_def.h
  • WM_BLE_CL_NOTIF_EVT : wm_bt_def.h
  • WM_BLE_CL_OPEN_EVT : wm_bt_def.h
  • WM_BLE_CL_REGISTER_EVT : wm_bt_def.h
  • WM_BLE_CL_SEARCH_CMPL_EVT : wm_bt_def.h
  • WM_BLE_CL_SEARCH_RES_EVT : wm_bt_def.h
  • WM_BLE_CLIENT_MAX : wm_bt_def.h
  • WM_BLE_DM_SCAN_RES_EVT : wm_bt_def.h
  • WM_BLE_DM_SET_ADV_DATA_CMPL_EVT : wm_bt_def.h
  • WM_BLE_DM_TIMER_EXPIRED_EVT : wm_bt_def.h
  • WM_BLE_DM_TRIGER_EVT : wm_bt_def.h
  • WM_BLE_SE_ADD_CHAR_EVT : wm_bt_def.h
  • WM_BLE_SE_CONFIRM_EVT : wm_bt_def.h
  • WM_BLE_SE_CONGEST_EVT : wm_bt_def.h
  • WM_BLE_SE_CREATE_EVT : wm_bt_def.h
  • WM_BLE_SE_DEREGISTER_EVT : wm_bt_def.h
  • WM_BLE_SE_EXEC_WRITE_EVT : wm_bt_def.h
  • WM_BLE_SE_READ_EVT : wm_bt_def.h
  • WM_BLE_SE_REGISTER_EVT : wm_bt_def.h
  • WM_BLE_SE_START_EVT : wm_bt_def.h
  • WM_BLE_SE_STOP_EVT : wm_bt_def.h
  • WM_BLE_SE_WRITE_EVT : wm_bt_def.h
  • WM_BLE_SERVER_MAX : wm_bt_def.h
  • WM_BT_PROPERTY_ADAPTER_BONDED_DEVICES : wm_bt_def.h
  • WM_BT_PROPERTY_ADAPTER_DISCOVERY_TIMEOUT : wm_bt_def.h
  • WM_BT_PROPERTY_ADAPTER_SCAN_MODE : wm_bt_def.h
  • WM_BT_PROPERTY_BDADDR : wm_bt_def.h
  • WM_BT_PROPERTY_BDNAME : wm_bt_def.h
  • WM_BT_PROPERTY_CLASS_OF_DEVICE : wm_bt_def.h
  • WM_BT_PROPERTY_LOCAL_LE_FEATURES : wm_bt_def.h
  • WM_BT_PROPERTY_REMOTE_FRIENDLY_NAME : wm_bt_def.h
  • WM_BT_PROPERTY_REMOTE_RSSI : wm_bt_def.h
  • WM_BT_PROPERTY_REMOTE_VERSION_INFO : wm_bt_def.h
  • WM_BT_PROPERTY_SERVICE_RECORD : wm_bt_def.h
  • WM_BT_PROPERTY_TYPE_OF_DEVICE : wm_bt_def.h
  • WM_BT_PROPERTY_UUIDS : wm_bt_def.h
  • WM_BTRC_MAX_ATTR_STR_LEN : wm_bt_def.h
  • WM_GATT_CHAR_PROP_BIT_AUTH : wm_bt_def.h
  • WM_GATT_CHAR_PROP_BIT_BROADCAST : wm_bt_def.h
  • WM_GATT_CHAR_PROP_BIT_EXT_PROP : wm_bt_def.h
  • WM_GATT_CHAR_PROP_BIT_INDICATE : wm_bt_def.h
  • WM_GATT_CHAR_PROP_BIT_NOTIFY : wm_bt_def.h
  • WM_GATT_CHAR_PROP_BIT_READ : wm_bt_def.h
  • WM_GATT_CHAR_PROP_BIT_WRITE : wm_bt_def.h
  • WM_GATT_CHAR_PROP_BIT_WRITE_NR : wm_bt_def.h
  • WM_GATT_PERM_READ : wm_bt_def.h
  • WM_GATT_PERM_READ_ENC_MITM : wm_bt_def.h
  • WM_GATT_PERM_READ_ENCRYPTED : wm_bt_def.h
  • WM_GATT_PERM_WRITE : wm_bt_def.h
  • WM_GATT_PERM_WRITE_ENC_MITM : wm_bt_def.h
  • WM_GATT_PERM_WRITE_ENCRYPTED : wm_bt_def.h
  • WM_GATT_PERM_WRITE_SIGNED : wm_bt_def.h
  • WM_GATT_PERM_WRITE_SIGNED_MITM : wm_bt_def.h
  • wm_gpio_af_disable() : wm_gpio_afsel.h
  • WM_GPIO_ATTR_FLOATING : wm_gpio.h
  • WM_GPIO_ATTR_PULLHIGH : wm_gpio.h
  • WM_GPIO_ATTR_PULLLOW : wm_gpio.h
  • WM_GPIO_DIR_INPUT : wm_gpio.h
  • WM_GPIO_DIR_OUTPUT : wm_gpio.h
  • WM_GPIO_IRQ_TRIG_DOUBLE_EDGE : wm_gpio.h
  • WM_GPIO_IRQ_TRIG_FALLING_EDGE : wm_gpio.h
  • WM_GPIO_IRQ_TRIG_HIGH_LEVEL : wm_gpio.h
  • WM_GPIO_IRQ_TRIG_LOW_LEVEL : wm_gpio.h
  • WM_GPIO_IRQ_TRIG_RISING_EDGE : wm_gpio.h
  • wm_hspi_gpio_config() : wm_gpio_afsel.h
  • wm_i2c_int_mask : wm_i2c.h
  • wm_i2c_scl_config() : wm_gpio_afsel.h
  • wm_i2c_sda_config() : wm_gpio_afsel.h
  • wm_i2c_start_read_it() : wm_i2c.h
  • wm_i2c_start_write_it() : wm_i2c.h
  • wm_i2c_transfer_done_register() : wm_i2c.h
  • wm_i2s_ck_config() : wm_gpio_afsel.h
  • wm_i2s_di_config() : wm_gpio_afsel.h
  • wm_i2s_do_config() : wm_gpio_afsel.h
  • wm_i2s_extclk_config() : wm_gpio_afsel.h
  • wm_i2s_mclk_config() : wm_gpio_afsel.h
  • wm_i2s_ws_config() : wm_gpio_afsel.h
  • WM_IO_OPTION1 : wm_io.h
  • WM_IO_OPTION2 : wm_io.h
  • WM_IO_OPTION3 : wm_io.h
  • WM_IO_OPTION4 : wm_io.h
  • WM_IO_OPTION5 : wm_io.h
  • WM_IO_OPTION6 : wm_io.h
  • WM_IO_OPTION7 : wm_io.h
  • WM_IO_PA_00 : wm_io.h
  • WM_IO_PA_01 : wm_io.h
  • WM_IO_PA_02 : wm_io.h
  • WM_IO_PA_03 : wm_io.h
  • WM_IO_PA_04 : wm_io.h
  • WM_IO_PA_05 : wm_io.h
  • WM_IO_PA_06 : wm_io.h
  • WM_IO_PA_07 : wm_io.h
  • WM_IO_PA_08 : wm_io.h
  • WM_IO_PA_09 : wm_io.h
  • WM_IO_PA_10 : wm_io.h
  • WM_IO_PA_11 : wm_io.h
  • WM_IO_PA_12 : wm_io.h
  • WM_IO_PA_13 : wm_io.h
  • WM_IO_PA_14 : wm_io.h
  • WM_IO_PA_15 : wm_io.h
  • WM_IO_PB_00 : wm_io.h
  • WM_IO_PB_01 : wm_io.h
  • WM_IO_PB_02 : wm_io.h
  • WM_IO_PB_03 : wm_io.h
  • WM_IO_PB_04 : wm_io.h
  • WM_IO_PB_05 : wm_io.h
  • WM_IO_PB_06 : wm_io.h
  • WM_IO_PB_07 : wm_io.h
  • WM_IO_PB_08 : wm_io.h
  • WM_IO_PB_09 : wm_io.h
  • WM_IO_PB_10 : wm_io.h
  • WM_IO_PB_11 : wm_io.h
  • WM_IO_PB_12 : wm_io.h
  • WM_IO_PB_13 : wm_io.h
  • WM_IO_PB_14 : wm_io.h
  • WM_IO_PB_15 : wm_io.h
  • WM_IO_PB_16 : wm_io.h
  • WM_IO_PB_17 : wm_io.h
  • WM_IO_PB_18 : wm_io.h
  • WM_IO_PB_19 : wm_io.h
  • WM_IO_PB_20 : wm_io.h
  • WM_IO_PB_21 : wm_io.h
  • WM_IO_PB_22 : wm_io.h
  • WM_IO_PB_23 : wm_io.h
  • WM_IO_PB_24 : wm_io.h
  • WM_IO_PB_25 : wm_io.h
  • WM_IO_PB_26 : wm_io.h
  • WM_IO_PB_27 : wm_io.h
  • WM_IO_PB_28 : wm_io.h
  • WM_IO_PB_29 : wm_io.h
  • WM_IO_PB_30 : wm_io.h
  • WM_IO_PB_31 : wm_io.h
  • wm_oneshot_netif_status_event() : wm_wifi_oneshot.h
  • wm_oneshot_task_init() : wm_wifi_oneshot.h
  • wm_psram_config() : wm_gpio_afsel.h
  • wm_pwm0_config() : wm_gpio_afsel.h
  • wm_pwm1_config() : wm_gpio_afsel.h
  • wm_pwm2_config() : wm_gpio_afsel.h
  • wm_pwm3_config() : wm_gpio_afsel.h
  • wm_pwm4_config() : wm_gpio_afsel.h
  • WM_PWM_BRAKE_OUT_HIGH : wm_pwm.h
  • WM_PWM_BRAKE_OUT_LOW : wm_pwm.h
  • WM_PWM_CAP_DMA_INT : wm_pwm.h
  • WM_PWM_CAP_FALLING_EDGE_INT : wm_pwm.h
  • WM_PWM_CAP_RISING_EDGE_INT : wm_pwm.h
  • WM_PWM_CAP_RISING_FALLING_EDGE_INT : wm_pwm.h
  • WM_PWM_CNT_TYPE_CENTER_ALIGN : wm_pwm.h
  • WM_PWM_CNT_TYPE_EDGE_ALIGN_OUT : wm_pwm.h
  • WM_PWM_CNT_TYPE_EDGE_ALLGN_CAP : wm_pwm.h
  • WM_PWM_LOOP_TYPE_LOOP : wm_pwm.h
  • WM_PWM_LOOP_TYPE_SINGLE : wm_pwm.h
  • WM_PWM_OUT_EN_STATE_OUT : wm_pwm.h
  • WM_PWM_OUT_EN_STATE_TRI : wm_pwm.h
  • WM_PWM_OUT_MODE_2SYC : wm_pwm.h
  • WM_PWM_OUT_MODE_ALLSYC : wm_pwm.h
  • WM_PWM_OUT_MODE_BRAKE : wm_pwm.h
  • WM_PWM_OUT_MODE_INDPT : wm_pwm.h
  • WM_PWM_OUT_MODE_MC : wm_pwm.h
  • WM_PWM_WAVEFORM_INVERSION : wm_pwm.h
  • WM_PWM_WAVEFORM_NOINVERSION : wm_pwm.h
  • wm_pwmbrk_config() : wm_gpio_afsel.h
  • wm_sc_7816_mode() : wm_7816.h
  • wm_sc_clk_enable() : wm_7816.h
  • wm_sc_colreset() : wm_7816.h
  • wm_sc_deactive() : wm_7816.h
  • wm_sc_get_protocol() : wm_7816.h
  • wm_sc_hotreset() : wm_7816.h
  • wm_sc_io_clk_config() : wm_7816.h
  • wm_sc_parity_recv() : wm_7816.h
  • wm_sc_powerInit() : wm_7816.h
  • wm_sc_poweroff() : wm_7816.h
  • wm_sc_poweron() : wm_7816.h
  • wm_sc_rst_high() : wm_7816.h
  • wm_sc_rst_low() : wm_7816.h
  • wm_sc_rx_retry_times() : wm_7816.h
  • wm_sc_set_bcwt() : wm_7816.h
  • wm_sc_set_bgt() : wm_7816.h
  • wm_sc_set_etu() : wm_7816.h
  • wm_sc_set_frequency() : wm_7816.h
  • wm_sc_set_guardtime() : wm_7816.h
  • wm_sc_set_protocol() : wm_7816.h
  • wm_sc_tx_errsignal_mask() : wm_7816.h
  • wm_sc_tx_retry_times() : wm_7816.h
  • wm_sdio_host_config() : wm_gpio_afsel.h
  • wm_sdio_slave_config() : wm_gpio_afsel.h
  • wm_spi_ck_config() : wm_gpio_afsel.h
  • wm_spi_cs_config() : wm_gpio_afsel.h
  • wm_spi_di_config() : wm_gpio_afsel.h
  • wm_spi_do_config() : wm_gpio_afsel.h
  • wm_swd_config() : wm_gpio_afsel.h
  • WM_TIMER_ID_INVALID : wm_timer.h
  • wm_touch_sensor_config() : wm_gpio_afsel.h
  • wm_uart0_rx_config() : wm_gpio_afsel.h
  • wm_uart0_tx_config() : wm_gpio_afsel.h
  • wm_uart1_cts_config() : wm_gpio_afsel.h
  • wm_uart1_rts_config() : wm_gpio_afsel.h
  • wm_uart1_rx_config() : wm_gpio_afsel.h
  • wm_uart1_tx_config() : wm_gpio_afsel.h
  • wm_uart2_cts_config() : wm_gpio_afsel.h
  • wm_uart2_rts_scclk_config() : wm_gpio_afsel.h
  • wm_uart2_rx_config() : wm_gpio_afsel.h
  • wm_uart2_tx_scio_config() : wm_gpio_afsel.h
  • wm_uart3_cts_config() : wm_gpio_afsel.h
  • wm_uart3_rts_config() : wm_gpio_afsel.h
  • wm_uart3_rx_config() : wm_gpio_afsel.h
  • wm_uart3_tx_config() : wm_gpio_afsel.h
  • wm_uart4_cts_config() : wm_gpio_afsel.h
  • wm_uart4_rts_config() : wm_gpio_afsel.h
  • wm_uart4_rx_config() : wm_gpio_afsel.h
  • wm_uart4_tx_config() : wm_gpio_afsel.h
  • wm_uart5_cts_config() : wm_gpio_afsel.h
  • wm_uart5_rts_config() : wm_gpio_afsel.h
  • wm_uart5_rx_config() : wm_gpio_afsel.h
  • wm_uart5_tx_config() : wm_gpio_afsel.h
  • WM_WIFI_AUTH_MODE_OPEN : wm_wifi.h
  • WM_WIFI_AUTH_MODE_WEP_AUTO : wm_wifi.h
  • WM_WIFI_AUTH_MODE_WPA2_PSK_AUTO : wm_wifi.h
  • WM_WIFI_AUTH_MODE_WPA2_PSK_CCMP : wm_wifi.h
  • WM_WIFI_AUTH_MODE_WPA2_PSK_TKIP : wm_wifi.h
  • WM_WIFI_AUTH_MODE_WPA_PSK_AUTO : wm_wifi.h
  • WM_WIFI_AUTH_MODE_WPA_PSK_CCMP : wm_wifi.h
  • WM_WIFI_AUTH_MODE_WPA_PSK_TKIP : wm_wifi.h
  • WM_WIFI_AUTH_MODE_WPA_WPA2_PSK_AUTO : wm_wifi.h
  • WM_WIFI_DISCONNECTED : wm_wifi.h
  • WM_WIFI_ECN_MODE_OPEN : wm_wifi.h
  • WM_WIFI_ECN_MODE_UNKNOWN : wm_wifi.h
  • WM_WIFI_ECN_MODE_WEP : wm_wifi.h
  • WM_WIFI_ECN_MODE_WPA2_PSK : wm_wifi.h
  • WM_WIFI_ECN_MODE_WPA_PSK : wm_wifi.h
  • WM_WIFI_ECN_MODE_WPA_WPA2_PSK : wm_wifi.h
  • WM_WIFI_EKEY : wm_wifi.h
  • WM_WIFI_ELSI : wm_wifi.h
  • WM_WIFI_ENOAP : wm_wifi.h
  • WM_WIFI_ENOERR : wm_wifi.h
  • WM_WIFI_ERR_KEY : wm_wifi.h
  • WM_WIFI_ERR_SSID : wm_wifi.h
  • WM_WIFI_JOINED : wm_wifi.h
  • WM_WIFI_JOINING : wm_wifi.h
  • WM_WIFI_MGMT_TYPE_ACTION : wm_wifi.h
  • WM_WIFI_MGMT_TYPE_ASSOC_REQ : wm_wifi.h
  • WM_WIFI_MGMT_TYPE_ASSOC_RESP : wm_wifi.h
  • WM_WIFI_MGMT_TYPE_ATIM : wm_wifi.h
  • WM_WIFI_MGMT_TYPE_AUTH : wm_wifi.h
  • WM_WIFI_MGMT_TYPE_BEACON : wm_wifi.h
  • WM_WIFI_MGMT_TYPE_DEAUTH : wm_wifi.h
  • WM_WIFI_MGMT_TYPE_DISASSOC : wm_wifi.h
  • WM_WIFI_MGMT_TYPE_PROBE_REQ : wm_wifi.h
  • WM_WIFI_MGMT_TYPE_PROBE_RESP : wm_wifi.h
  • WM_WIFI_MGMT_TYPE_REASSOC_REQ : wm_wifi.h
  • WM_WIFI_MGMT_TYPE_REASSOC_RESP : wm_wifi.h
  • WM_WIFI_SCANNING : wm_wifi.h
  • WM_WIFI_SCANNING_BUSY : wm_wifi.h
  • WM_WIFI_STA_BUSY : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_11M : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_12M : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_18M : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_1M : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_24M : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_2M : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_36M : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_48M : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_54M : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_5_5M : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_6M : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_9M : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_MCS0 : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_MCS1 : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_MCS10 : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_MCS11 : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_MCS12 : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_MCS13 : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_MCS14 : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_MCS15 : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_MCS2 : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_MCS3 : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_MCS32 : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_MCS4 : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_MCS5 : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_MCS6 : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_MCS7 : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_MCS8 : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_MCS9 : wm_wifi.h
  • WM_WIFI_WPS_BUSY : wm_wifi.h


W800 SDK APIs: Globals

- a -

  • aes_128_cbc_decrypt() : wm_crypto.h
  • aes_128_cbc_encrypt() : wm_crypto.h


W800 SDK APIs: Globals

- c -

  • csi_kernel_intrpt_enter() : wm_irq.h
  • csi_kernel_intrpt_exit() : wm_irq.h


W800 SDK APIs: Globals

- e -

  • enable_bt_test_mode() : wm_bt.h
  • exit_bt_test_mode() : wm_bt.h


W800 SDK APIs: Globals

- h -

  • hmac_md5() : wm_crypto.h
  • HTTPClientAddRequestHeaders() : wm_http_client.h
  • HTTPClientCloseRequest() : wm_http_client.h
  • HTTPClientFindCloseHeader() : wm_http_client.h
  • HTTPClientFindFirstHeader() : wm_http_client.h
  • HTTPClientGetInfo() : wm_http_client.h
  • HTTPClientGetNextHeader() : wm_http_client.h
  • HTTPClientOpenRequest() : wm_http_client.h
  • HTTPClientReadData() : wm_http_client.h
  • HTTPClientRecvResponse() : wm_http_client.h
  • HTTPClientSendRequest() : wm_http_client.h
  • HTTPClientSetAuth() : wm_http_client.h
  • HTTPClientSetCredentials() : wm_http_client.h
  • HTTPClientSetProxy() : wm_http_client.h
  • HTTPClientSetVerb() : wm_http_client.h
  • HTTPClientWriteData() : wm_http_client.h


W800 SDK APIs: Globals

- i -

  • ieee80211_check_tim() : wm_ieee80211.h
  • ieee80211_dsss_chan_to_freq() : wm_ieee80211.h
  • ieee80211_fhss_chan_to_freq() : wm_ieee80211.h
  • ieee80211_freq_to_dsss_chan() : wm_ieee80211.h
  • ieee80211_freq_to_fhss_chan() : wm_ieee80211.h
  • ieee80211_freq_to_ofdm_chan() : wm_ieee80211.h
  • ieee80211_get_DA() : wm_ieee80211.h
  • ieee80211_get_qos_ctl() : wm_ieee80211.h
  • ieee80211_get_SA() : wm_ieee80211.h
  • ieee80211_has_a4() : wm_ieee80211.h
  • ieee80211_has_fromds() : wm_ieee80211.h
  • ieee80211_has_moredata() : wm_ieee80211.h
  • ieee80211_has_morefrags() : wm_ieee80211.h
  • ieee80211_has_order() : wm_ieee80211.h
  • ieee80211_has_pm() : wm_ieee80211.h
  • ieee80211_has_protected() : wm_ieee80211.h
  • ieee80211_has_retry() : wm_ieee80211.h
  • ieee80211_has_tods() : wm_ieee80211.h
  • ieee80211_is_ack() : wm_ieee80211.h
  • ieee80211_is_action() : wm_ieee80211.h
  • ieee80211_is_assoc_req() : wm_ieee80211.h
  • ieee80211_is_assoc_resp() : wm_ieee80211.h
  • ieee80211_is_atim() : wm_ieee80211.h
  • ieee80211_is_auth() : wm_ieee80211.h
  • ieee80211_is_back() : wm_ieee80211.h
  • ieee80211_is_back_req() : wm_ieee80211.h
  • ieee80211_is_beacon() : wm_ieee80211.h
  • ieee80211_is_cfend() : wm_ieee80211.h
  • ieee80211_is_cfendack() : wm_ieee80211.h
  • ieee80211_is_ctl() : wm_ieee80211.h
  • ieee80211_is_cts() : wm_ieee80211.h
  • ieee80211_is_data() : wm_ieee80211.h
  • ieee80211_is_data_present() : wm_ieee80211.h
  • ieee80211_is_data_qos() : wm_ieee80211.h
  • ieee80211_is_deauth() : wm_ieee80211.h
  • ieee80211_is_disassoc() : wm_ieee80211.h
  • ieee80211_is_mgmt() : wm_ieee80211.h
  • ieee80211_is_nullfunc() : wm_ieee80211.h
  • ieee80211_is_probe_req() : wm_ieee80211.h
  • ieee80211_is_probe_resp() : wm_ieee80211.h
  • ieee80211_is_pspoll() : wm_ieee80211.h
  • ieee80211_is_qos_nullfunc() : wm_ieee80211.h
  • ieee80211_is_reassoc_req() : wm_ieee80211.h
  • ieee80211_is_reassoc_resp() : wm_ieee80211.h
  • ieee80211_is_robust_mgmt_frame() : wm_ieee80211.h
  • ieee80211_is_rts() : wm_ieee80211.h
  • ieee80211_ofdm_chan_to_freq() : wm_ieee80211.h
  • ieee80211_tu_to_usec() : wm_ieee80211.h


W800 SDK APIs: Globals

- m -

  • md5() : wm_crypto.h


W800 SDK APIs: Globals

- o -

  • oneshot_airkiss_send_reply() : wm_wifi_oneshot.h


W800 SDK APIs: Globals

- r -

  • rc4() : wm_crypto.h


W800 SDK APIs: Globals

- s -

  • sha1() : wm_crypto.h


W800 SDK APIs: Globals

- t -

  • tls_airkiss_recv() : wm_wifi_oneshot.h
  • tls_airkiss_start() : wm_wifi_oneshot.h
  • tls_airkiss_stop() : wm_wifi_oneshot.h
  • tls_arch_mbox_fetch() : wm_wl_mbox.h
  • tls_bitband_read() : wm_regs.h
  • tls_bitband_write() : wm_regs.h
  • tls_ble_adv() : wm_ble.h
  • tls_ble_client_app_deinit() : wm_ble_gatt.h
  • tls_ble_client_app_init() : wm_ble_gatt.h
  • tls_ble_client_app_register() : wm_ble_gatt.h
  • tls_ble_client_app_unregister() : wm_ble_gatt.h
  • tls_ble_client_configure_mtu() : wm_ble_gatt.h
  • tls_ble_client_connect() : wm_ble_gatt.h
  • tls_ble_client_deregister_for_notification() : wm_ble_gatt.h
  • tls_ble_client_disconnect() : wm_ble_gatt.h
  • tls_ble_client_execute_write() : wm_ble_gatt.h
  • tls_ble_client_get_gatt_db() : wm_ble_gatt.h
  • tls_ble_client_listen() : wm_ble_gatt.h
  • tls_ble_client_read_characteristic() : wm_ble_gatt.h
  • tls_ble_client_read_descriptor() : wm_ble_gatt.h
  • tls_ble_client_refresh() : wm_ble_gatt.h
  • tls_ble_client_register_for_notification() : wm_ble_gatt.h
  • tls_ble_client_search_service() : wm_ble_gatt.h
  • tls_ble_client_write_characteristic() : wm_ble_gatt.h
  • tls_ble_client_write_descriptor() : wm_ble_gatt.h
  • tls_ble_conn_parameter_update() : wm_ble.h
  • tls_ble_dm_init() : wm_ble.h
  • tls_ble_gap_adv() : wm_ble.h
  • tls_ble_get_tx_power() : wm_bt.h
  • tls_ble_scan() : wm_ble.h
  • tls_ble_server_add_characteristic() : wm_ble_gatt.h
  • tls_ble_server_add_descriptor() : wm_ble_gatt.h
  • tls_ble_server_add_service() : wm_ble_gatt.h
  • tls_ble_server_app_init() : wm_ble_gatt.h
  • tls_ble_server_app_register() : wm_ble_gatt.h
  • tls_ble_server_app_unregister() : wm_ble_gatt.h
  • tls_ble_server_connect() : wm_ble_gatt.h
  • tls_ble_server_delete_service() : wm_ble_gatt.h
  • tls_ble_server_disconnect() : wm_ble_gatt.h
  • tls_ble_server_send_indication() : wm_ble_gatt.h
  • tls_ble_server_send_response() : wm_ble_gatt.h
  • tls_ble_server_start_service() : wm_ble_gatt.h
  • tls_ble_server_stop_service() : wm_ble_gatt.h
  • tls_ble_set_adv_data() : wm_ble.h
  • tls_ble_set_adv_ext_param() : wm_ble.h
  • tls_ble_set_adv_param() : wm_ble.h
  • tls_ble_set_scan_param() : wm_ble.h
  • tls_ble_set_sec() : wm_ble.h
  • tls_ble_set_sec_auth_req() : wm_ble.h
  • tls_ble_set_sec_io_cap() : wm_ble.h
  • tls_ble_set_tx_power() : wm_bt.h
  • tls_bredr_get_tx_power() : wm_bt.h
  • tls_bredr_sco_datapath_set() : wm_bt.h
  • tls_bredr_set_tx_power() : wm_bt.h
  • tls_bt_av_sink_connect_src() : wm_bt_av.h
  • tls_bt_av_sink_deinit() : wm_bt_av.h
  • tls_bt_av_sink_disconnect() : wm_bt_av.h
  • tls_bt_av_sink_init() : wm_bt_av.h
  • tls_bt_av_src_connect_sink() : wm_bt_av.h
  • tls_bt_av_src_deinit() : wm_bt_av.h
  • tls_bt_av_src_disconnect() : wm_bt_av.h
  • tls_bt_av_src_init() : wm_bt_av.h
  • tls_bt_cancel_bond() : wm_bt.h
  • tls_bt_cancel_discovery() : wm_bt.h
  • tls_bt_controller_get_status() : wm_bt.h
  • tls_bt_create_bond() : wm_bt.h
  • tls_bt_ctrl_disable() : wm_bt.h
  • tls_bt_ctrl_enable() : wm_bt.h
  • tls_bt_ctrl_if_register() : wm_bt.h
  • tls_bt_ctrl_if_unregister() : wm_bt.h
  • tls_bt_ctrl_is_sleep() : wm_bt.h
  • tls_bt_ctrl_sleep() : wm_bt.h
  • tls_bt_ctrl_wakeup() : wm_bt.h
  • tls_bt_disable() : wm_bt.h
  • tls_bt_enable() : wm_bt.h
  • tls_bt_get_adapter_property() : wm_bt.h
  • tls_bt_hf_client_connect() : wm_bt_hf_client.h
  • tls_bt_hf_client_connect_audio() : wm_bt_hf_client.h
  • tls_bt_hf_client_deinit() : wm_bt_hf_client.h
  • tls_bt_hf_client_dial() : wm_bt_hf_client.h
  • tls_bt_hf_client_dial_memory() : wm_bt_hf_client.h
  • tls_bt_hf_client_disconnect() : wm_bt_hf_client.h
  • tls_bt_hf_client_disconnect_audio() : wm_bt_hf_client.h
  • tls_bt_hf_client_handle_call_action() : wm_bt_hf_client.h
  • tls_bt_hf_client_init() : wm_bt_hf_client.h
  • tls_bt_hf_client_query_current_calls() : wm_bt_hf_client.h
  • tls_bt_hf_client_query_current_operator_name() : wm_bt_hf_client.h
  • tls_bt_hf_client_request_last_voice_tag_number() : wm_bt_hf_client.h
  • tls_bt_hf_client_retrieve_subscriber_info() : wm_bt_hf_client.h
  • tls_bt_hf_client_send_at_cmd() : wm_bt_hf_client.h
  • tls_bt_hf_client_send_audio() : wm_bt_hf_client.h
  • tls_bt_hf_client_send_dtmf() : wm_bt_hf_client.h
  • tls_bt_hf_client_start_voice_recognition() : wm_bt_hf_client.h
  • tls_bt_hf_client_stop_voice_recognition() : wm_bt_hf_client.h
  • tls_bt_hf_client_volume_control() : wm_bt_hf_client.h
  • tls_bt_host_cleanup() : wm_bt.h
  • tls_bt_pin_reply() : wm_bt.h
  • tls_bt_register_pending_process_callback() : wm_bt.h
  • tls_bt_register_sleep_callback() : wm_bt.h
  • tls_bt_remove_bond() : wm_bt.h
  • tls_bt_set_adapter_property() : wm_bt.h
  • tls_bt_set_mesh_mode() : wm_bt.h
  • tls_bt_spp_connect() : wm_bt_spp.h
  • tls_bt_spp_deinit() : wm_bt_spp.h
  • tls_bt_spp_disable() : wm_bt_spp.h
  • tls_bt_spp_disconnect() : wm_bt_spp.h
  • tls_bt_spp_enable() : wm_bt_spp.h
  • tls_bt_spp_init() : wm_bt_spp.h
  • tls_bt_spp_start_discovery() : wm_bt_spp.h
  • tls_bt_spp_start_server() : wm_bt_spp.h
  • tls_bt_spp_write() : wm_bt_spp.h
  • tls_bt_ssp_reply() : wm_bt.h
  • tls_bt_start_discovery() : wm_bt.h
  • tls_bt_vuart_host_check_send_available() : wm_bt.h
  • tls_bt_vuart_host_send_packet() : wm_bt.h
  • tls_btrc_ctrl_change_player_app_setting() : wm_bt_av.h
  • tls_btrc_ctrl_deinit() : wm_bt_av.h
  • tls_btrc_ctrl_init() : wm_bt_av.h
  • tls_btrc_ctrl_send_groupnavigation_cmd() : wm_bt_av.h
  • tls_btrc_ctrl_send_passthrough_cmd() : wm_bt_av.h
  • tls_btrc_ctrl_set_volume_rsp() : wm_bt_av.h
  • tls_btrc_ctrl_volume_change_notification_rsp() : wm_bt_av.h
  • tls_btrc_deinit() : wm_bt_av.h
  • tls_btrc_get_element_attr_rsp() : wm_bt_av.h
  • tls_btrc_get_play_status_rsp() : wm_bt_av.h
  • tls_btrc_init() : wm_bt_av.h
  • tls_btrc_register_notification_rsp() : wm_bt_av.h
  • tls_btrc_set_volume() : wm_bt_av.h
  • tls_close_peripheral_clock() : wm_pmu.h
  • tls_clr_gpio_irq_status() : wm_gpio.h
  • tls_crypto_3des_encrypt_decrypt() : wm_crypto_hard.h
  • tls_crypto_3des_init() : wm_crypto_hard.h
  • tls_crypto_aes_encrypt_decrypt() : wm_crypto_hard.h
  • tls_crypto_aes_init() : wm_crypto_hard.h
  • tls_crypto_crc_final() : wm_crypto_hard.h
  • tls_crypto_crc_init() : wm_crypto_hard.h
  • tls_crypto_crc_update() : wm_crypto_hard.h
  • tls_crypto_des_encrypt_decrypt() : wm_crypto_hard.h
  • tls_crypto_des_init() : wm_crypto_hard.h
  • tls_crypto_exptmod() : wm_crypto_hard.h
  • tls_crypto_init() : wm_crypto_hard.h
  • tls_crypto_md5_final() : wm_crypto_hard.h
  • tls_crypto_md5_init() : wm_crypto_hard.h
  • tls_crypto_md5_update() : wm_crypto_hard.h
  • tls_crypto_random_bytes() : wm_crypto_hard.h
  • tls_crypto_random_init() : wm_crypto_hard.h
  • tls_crypto_random_stop() : wm_crypto_hard.h
  • tls_crypto_rc4() : wm_crypto_hard.h
  • tls_crypto_rc4_init() : wm_crypto_hard.h
  • tls_crypto_sha1_final() : wm_crypto_hard.h
  • tls_crypto_sha1_init() : wm_crypto_hard.h
  • tls_crypto_sha1_update() : wm_crypto_hard.h
  • tls_crypto_trng() : wm_crypto_hard.h
  • tls_dhcp_start() : wm_netif2.1.3.h
  • tls_dhcp_stop() : wm_netif2.1.3.h
  • tls_dhcps_getip() : wm_dhcp_server.h
  • tls_dhcps_setdns() : wm_dhcp_server.h
  • tls_dhcps_start() : wm_dhcp_server.h
  • tls_dhcps_stop() : wm_dhcp_server.h
  • tls_dm_evt_triger() : wm_ble.h
  • tls_dm_read_remote_rssi() : wm_ble.h
  • tls_dm_set_data_length() : wm_ble.h
  • tls_dm_set_privacy() : wm_ble.h
  • tls_dma_free() : wm_dma.h
  • tls_dma_init() : wm_dma.h
  • tls_dma_irq_clr() : wm_dma.h
  • tls_dma_irq_register() : wm_dma.h
  • tls_dma_request() : wm_dma.h
  • tls_dma_start() : wm_dma.h
  • tls_dma_start_by_wrap() : wm_dma.h
  • tls_dma_stop() : wm_dma.h
  • tls_dma_wait_complt() : wm_dma.h
  • tls_dnss_start() : wm_dns_server.h
  • tls_dnss_stop() : wm_dns_server.h
  • tls_ethernet_data_rx_callback() : wm_wifi.h
  • tls_ethernet_init() : wm_netif2.1.3.h
  • tls_filter_mcast_mac() : wm_wifi.h
  • tls_flash_lock() : wm_internal_flash.h
  • tls_flash_unlock() : wm_internal_flash.h
  • tls_fls_erase() : wm_internal_flash.h
  • tls_fls_init() : wm_internal_flash.h
  • tls_fls_otp_lock() : wm_internal_flash.h
  • tls_fls_otp_read() : wm_internal_flash.h
  • tls_fls_otp_write() : wm_internal_flash.h
  • tls_fls_read() : wm_internal_flash.h
  • tls_fls_read_unique_id() : wm_internal_flash.h
  • tls_fls_sem_lock() : wm_internal_flash.h
  • tls_fls_sem_unlock() : wm_internal_flash.h
  • tls_fls_sys_param_postion_init() : wm_internal_flash.h
  • tls_fls_write() : wm_internal_flash.h
  • tls_fls_write_without_erase() : wm_internal_flash.h
  • tls_freq_err_op() : wm_efuse.h
  • tls_ft_param_get() : wm_efuse.h
  • tls_ft_param_init() : wm_efuse.h
  • tls_ft_param_set() : wm_efuse.h
  • tls_fwup_clear_error() : wm_fwup.h
  • tls_fwup_current_state() : wm_fwup.h
  • tls_fwup_enter() : wm_fwup.h
  • tls_fwup_exit() : wm_fwup.h
  • tls_fwup_get_current_session_id() : wm_fwup.h
  • tls_fwup_get_current_update_numer() : wm_fwup.h
  • tls_fwup_get_status() : wm_fwup.h
  • tls_fwup_img_header_check() : wm_fwup.h
  • tls_fwup_init() : wm_fwup.h
  • tls_fwup_request_sync() : wm_fwup.h
  • tls_fwup_reset() : wm_fwup.h
  • tls_fwup_set_crc_error() : wm_fwup.h
  • tls_fwup_set_update_numer() : wm_fwup.h
  • tls_get_adc_cal_param() : wm_efuse.h
  • tls_get_bt_mac_addr() : wm_efuse.h
  • tls_get_gpio_irq_status() : wm_gpio.h
  • tls_get_isr_count() : wm_irq.h
  • tls_get_mac_addr() : wm_efuse.h
  • tls_get_netif() : wm_netif2.1.3.h
  • tls_get_rtc() : wm_rtc.h
  • tls_get_rx_iq_gain() : wm_efuse.h
  • tls_get_rx_iq_phase() : wm_efuse.h
  • tls_get_tx_gain() : wm_efuse.h
  • tls_get_tx_iq_gain() : wm_efuse.h
  • tls_get_tx_iq_phase() : wm_efuse.h
  • tls_get_tx_lo() : wm_efuse.h
  • tls_gpio_cfg() : wm_gpio.h
  • tls_gpio_irq_disable() : wm_gpio.h
  • tls_gpio_irq_enable() : wm_gpio.h
  • tls_gpio_isr_register() : wm_gpio.h
  • tls_gpio_read() : wm_gpio.h
  • tls_gpio_write() : wm_gpio.h
  • tls_hostif_init() : wm_at_ri_init.h
  • tls_hspi_init() : wm_at_ri_init.h
  • tls_hspi_rx_cmd_callback_register() : wm_hspi.h
  • tls_hspi_rx_data_callback_register() : wm_hspi.h
  • tls_hspi_tx_data() : wm_hspi.h
  • tls_hspi_tx_data_callback_register() : wm_hspi.h
  • tls_i2c_init() : wm_i2c.h
  • tls_i2c_read_byte() : wm_i2c.h
  • tls_i2c_stop() : wm_i2c.h
  • tls_i2c_wait_ack() : wm_i2c.h
  • tls_i2c_write_byte() : wm_i2c.h
  • tls_io_cfg_get() : wm_io.h
  • tls_io_cfg_set() : wm_io.h
  • tls_irq_disable() : wm_irq.h
  • tls_irq_enable() : wm_irq.h
  • tls_irq_init() : wm_irq.h
  • tls_irq_register_handler() : wm_irq.h
  • tls_lcd_bias_set() : wm_lcd.h
  • tls_lcd_duty_set() : wm_lcd.h
  • tls_lcd_fresh_rate() : wm_lcd.h
  • tls_lcd_fresh_ratio() : wm_lcd.h
  • tls_lcd_init() : wm_lcd.h
  • tls_lcd_seg_set() : wm_lcd.h
  • tls_lcd_vlcd_sel() : wm_lcd.h
  • tls_mbox_new() : wm_wl_mbox.h
  • tls_mbox_post() : wm_wl_mbox.h
  • tls_mbox_trypost() : wm_wl_mbox.h
  • tls_mbox_valid() : wm_wl_mbox.h
  • tls_netif_add_status_event() : wm_netif2.1.3.h
  • tls_netif_dns_setserver() : wm_netif2.1.3.h
  • tls_netif_get_ethif() : wm_netif2.1.3.h
  • tls_netif_remove_status_event() : wm_netif2.1.3.h
  • tls_netif_set_addr() : wm_netif2.1.3.h
  • tls_netif_set_down() : wm_netif2.1.3.h
  • tls_netif_set_status() : wm_netif2.1.3.h
  • tls_netif_set_up() : wm_netif2.1.3.h
  • tls_ntp_client() : wm_ntp.h
  • tls_ntp_query_sntpcfg() : wm_ntp.h
  • tls_ntp_set_server() : wm_ntp.h
  • tls_oneshot_airkiss_change_channel() : wm_wifi_oneshot.h
  • tls_oneshot_find_chlist() : wm_wifi_oneshot.h
  • tls_oneshot_if_use_bssid() : wm_wifi_oneshot.h
  • tls_oneshot_switch_channel_tim_stop() : wm_wifi_oneshot.h
  • tls_oneshot_switch_channel_tim_temp_stop() : wm_wifi_oneshot.h
  • tls_open_peripheral_clock() : wm_pmu.h
  • tls_os_disp_task_stat_info() : wm_osal.h
  • tls_os_get_time() : wm_osal.h
  • tls_os_get_type() : wm_osal.h
  • tls_os_init() : wm_osal.h
  • tls_os_mailbox_create() : wm_osal.h
  • tls_os_mailbox_delete() : wm_osal.h
  • tls_os_mailbox_receive() : wm_osal.h
  • tls_os_mailbox_send() : wm_osal.h
  • tls_os_mutex_acquire() : wm_osal.h
  • tls_os_mutex_create() : wm_osal.h
  • tls_os_mutex_delete() : wm_osal.h
  • tls_os_mutex_release() : wm_osal.h
  • tls_os_queue_create() : wm_osal.h
  • tls_os_queue_delete() : wm_osal.h
  • tls_os_queue_flush() : wm_osal.h
  • tls_os_queue_receive() : wm_osal.h
  • tls_os_queue_send() : wm_osal.h
  • tls_os_queue_send_to_back() : wm_osal.h
  • tls_os_queue_send_to_front() : wm_osal.h
  • tls_os_queue_space_available() : wm_osal.h
  • tls_os_release_critical() : wm_osal.h
  • tls_os_sem_acquire() : wm_osal.h
  • tls_os_sem_create() : wm_osal.h
  • tls_os_sem_delete() : wm_osal.h
  • tls_os_sem_release() : wm_osal.h
  • tls_os_sem_set() : wm_osal.h
  • tls_os_set_critical() : wm_osal.h
  • tls_os_start_scheduler() : wm_osal.h
  • tls_os_task_create() : wm_osal.h
  • tls_os_task_del() : wm_osal.h
  • tls_os_task_del_by_task_handle() : wm_osal.h
  • tls_os_time_delay() : wm_osal.h
  • tls_os_time_tick() : wm_osal.h
  • tls_os_timer_create() : wm_osal.h
  • tls_os_timer_delete() : wm_osal.h
  • tls_os_timer_init() : wm_osal.h
  • tls_os_timer_start() : wm_osal.h
  • tls_os_timer_stop() : wm_osal.h
  • tls_param_get() : wm_params.h
  • tls_param_get_bt_param_address() : wm_params.h
  • tls_param_get_program_param() : wm_params.h
  • tls_param_get_updp_mode() : wm_params.h
  • tls_param_init() : wm_params.h
  • tls_param_load_factory_default() : wm_params.h
  • tls_param_save_user() : wm_params.h
  • tls_param_save_user_default() : wm_params.h
  • tls_param_set() : wm_params.h
  • tls_param_set_program_param() : wm_params.h
  • tls_param_set_updp_mode() : wm_params.h
  • tls_param_to_default() : wm_params.h
  • tls_param_to_flash() : wm_params.h
  • tls_pmu_clk_select() : wm_pmu.h
  • tls_pmu_gpio_isr_register() : wm_pmu.h
  • tls_pmu_sdio_isr_register() : wm_pmu.h
  • tls_pmu_sleep_start() : wm_pmu.h
  • tls_pmu_standby_start() : wm_pmu.h
  • tls_pmu_timer0_isr_register() : wm_pmu.h
  • tls_pmu_timer0_start() : wm_pmu.h
  • tls_pmu_timer0_stop() : wm_pmu.h
  • tls_pmu_timer1_isr_register() : wm_pmu.h
  • tls_pmu_timer1_start() : wm_pmu.h
  • tls_pmu_timer1_stop() : wm_pmu.h
  • tls_pwm_brake_mode_config() : wm_pwm.h
  • tls_pwm_cap_init() : wm_pwm.h
  • tls_pwm_capture_inverse_cmd() : wm_pwm.h
  • tls_pwm_capture_irq_type_config() : wm_pwm.h
  • tls_pwm_capture_mode_config() : wm_pwm.h
  • tls_pwm_cnt_type_config() : wm_pwm.h
  • tls_pwm_deadzone_config() : wm_pwm.h
  • tls_pwm_duty_config() : wm_pwm.h
  • tls_pwm_duty_set() : wm_pwm.h
  • tls_pwm_freq_config() : wm_pwm.h
  • tls_pwm_freq_set() : wm_pwm.h
  • tls_pwm_init() : wm_pwm.h
  • tls_pwm_isr_register() : wm_pwm.h
  • tls_pwm_loop_mode_config() : wm_pwm.h
  • tls_pwm_out_init() : wm_pwm.h
  • tls_pwm_out_inverse_cmd() : wm_pwm.h
  • tls_pwm_out_mode_config() : wm_pwm.h
  • tls_pwm_output_en_cmd() : wm_pwm.h
  • tls_pwm_start() : wm_pwm.h
  • tls_pwm_stop() : wm_pwm.h
  • tls_pwm_stoptime_by_period_config() : wm_pwm.h
  • tls_pwm_stoptime_irq_cmd() : wm_pwm.h
  • tls_reg_read32() : wm_regs.h
  • tls_reg_write32() : wm_regs.h
  • tls_restore_param_from_backup() : wm_params.h
  • tls_rf_bt_mode() : wm_bt.h
  • tls_rf_cal_finish_op() : wm_efuse.h
  • tls_rtc_isr_register() : wm_rtc.h
  • tls_rtc_timer_start() : wm_rtc.h
  • tls_rtc_timer_stop() : wm_rtc.h
  • tls_set_adc_cal_param() : wm_efuse.h
  • tls_set_bt_mac_addr() : wm_efuse.h
  • tls_set_high_speed_interface_type() : wm_hspi.h
  • tls_set_hspi_user_mode() : wm_hspi.h
  • tls_set_mac_addr() : wm_efuse.h
  • tls_set_rtc() : wm_rtc.h
  • tls_set_rx_iq_gain() : wm_efuse.h
  • tls_set_rx_iq_phase() : wm_efuse.h
  • tls_set_tx_gain() : wm_efuse.h
  • tls_set_tx_iq_gain() : wm_efuse.h
  • tls_set_tx_iq_phase() : wm_efuse.h
  • tls_set_tx_lo() : wm_efuse.h
  • tls_slave_spi_init() : wm_hspi.h
  • tls_socket_close() : wm_socket2.1.3.h
  • tls_socket_create() : wm_socket2.1.3.h
  • tls_socket_get_status() : wm_socket2.1.3.h
  • tls_socket_send() : wm_socket2.1.3.h
  • tls_socket_udp_sendto() : wm_socket2.1.3.h
  • tls_spi_init() : wm_hostspi.h
  • tls_spi_read() : wm_hostspi.h
  • tls_spi_read_with_cmd() : wm_hostspi.h
  • tls_spi_setup() : wm_hostspi.h
  • tls_spi_trans_type() : wm_hostspi.h
  • tls_spi_write() : wm_hostspi.h
  • tls_spi_write_with_cmd() : wm_hostspi.h
  • tls_spifls_drv_install() : wm_fls_gd25qxx.h
  • tls_spifls_init() : wm_flash.h
  • tls_spifls_read() : wm_flash.h
  • tls_spifls_write() : wm_flash.h
  • tls_sys_clk_get() : wm_cpu.h
  • tls_sys_clk_set() : wm_cpu.h
  • tls_sys_get_reboot_reason() : wm_watchdog.h
  • tls_sys_reset() : wm_watchdog.h
  • tls_sys_set_reboot_reason() : wm_watchdog.h
  • tls_timeout_p() : wm_wl_timers.h
  • tls_timeouts_mbox_fetch_p() : wm_wl_timers.h
  • tls_timer_change() : wm_timer.h
  • tls_timer_create() : wm_timer.h
  • tls_timer_destroy() : wm_timer.h
  • tls_timer_read() : wm_timer.h
  • tls_timer_start() : wm_timer.h
  • tls_timer_stop() : wm_timer.h
  • tls_touchsensor_chan_config() : wm_touchsensor.h
  • tls_touchsensor_countnum_get() : wm_touchsensor.h
  • tls_touchsensor_deinit() : wm_touchsensor.h
  • tls_touchsensor_init_config() : wm_touchsensor.h
  • tls_touchsensor_irq_disable() : wm_touchsensor.h
  • tls_touchsensor_irq_enable() : wm_touchsensor.h
  • tls_touchsensor_irq_register() : wm_touchsensor.h
  • tls_touchsensor_irq_status_get() : wm_touchsensor.h
  • tls_touchsensor_scan_config() : wm_touchsensor.h
  • tls_touchsensor_scan_start() : wm_touchsensor.h
  • tls_touchsensor_scan_stop() : wm_touchsensor.h
  • tls_touchsensor_threshold_config() : wm_touchsensor.h
  • tls_uart_dma_write() : wm_uart.h
  • tls_uart_init() : wm_at_ri_init.h
  • tls_uart_port_init() : wm_uart.h
  • tls_uart_read() : wm_uart.h
  • tls_uart_rx_callback_register() : wm_uart.h
  • tls_uart_set_baud_rate() : wm_uart.h
  • tls_uart_set_parity() : wm_uart.h
  • tls_uart_set_stop_bits() : wm_uart.h
  • tls_uart_try_read() : wm_uart.h
  • tls_uart_tx_callback_register() : wm_uart.h
  • tls_uart_tx_sent_callback_register() : wm_uart.h
  • tls_uart_write() : wm_uart.h
  • tls_uart_write_async() : wm_uart.h
  • tls_untimeout_p() : wm_wl_timers.h
  • tls_watchdog_clr() : wm_watchdog.h
  • tls_watchdog_deinit() : wm_watchdog.h
  • tls_watchdog_init() : wm_watchdog.h
  • tls_webserver_deinit() : wm_webserver.h
  • tls_webserver_init() : wm_webserver.h
  • tls_wifi_auto_connect_flag() : wm_wifi.h
  • tls_wifi_cfg_connect_pci() : wm_wifi.h
  • tls_wifi_cfg_connect_scan_mode() : wm_wifi.h
  • tls_wifi_cfg_connect_timeout() : wm_wifi.h
  • tls_wifi_cfg_listen_interval() : wm_wifi.h
  • tls_wifi_change_chanel() : wm_wifi.h
  • tls_wifi_connect() : wm_wifi.h
  • tls_wifi_connect_by_bssid() : wm_wifi.h
  • tls_wifi_connect_by_ssid_bssid() : wm_wifi.h
  • tls_wifi_data_ext_recv_cb_register() : wm_wifi.h
  • tls_wifi_data_recv_cb_register() : wm_wifi.h
  • tls_wifi_dataframe_recv() : wm_wifi_oneshot.h
  • tls_wifi_disconnect() : wm_wifi.h
  • tls_wifi_enable_log() : wm_wifi.h
  • tls_wifi_get_11b_digital_gain() : wm_wifi.h
  • tls_wifi_get_11n_digital_gain() : wm_wifi.h
  • tls_wifi_get_authed_sta_info() : wm_wifi.h
  • tls_wifi_get_current_bss() : wm_wifi.h
  • tls_wifi_get_errinfo() : wm_wifi.h
  • tls_wifi_get_errno() : wm_wifi.h
  • tls_wifi_get_listen_mode() : wm_wifi.h
  • tls_wifi_get_oneshot_customdata() : wm_wifi.h
  • tls_wifi_get_oneshot_flag() : wm_wifi.h , wm_wifi_oneshot.h
  • tls_wifi_get_oneshot_ssidpwd() : wm_wifi.h
  • tls_wifi_get_psflag() : wm_wifi.h
  • tls_wifi_get_psm_chipsleep_flag() : wm_wifi.h
  • tls_wifi_get_scan_rslt() : wm_wifi.h
  • tls_wifi_get_state() : wm_wifi.h
  • tls_wifi_get_tempcomp_flag() : wm_wifi.h
  • tls_wifi_get_tx_gain_max() : wm_wifi.h
  • tls_wifi_ibss_create() : wm_wifi.h
  • tls_wifi_mem_cfg() : wm_wifi.h
  • tls_wifi_mgmt_ext_recv_cb_register() : wm_wifi.h
  • tls_wifi_oneshot_result_cb_register() : wm_wifi.h
  • tls_wifi_passive_scan() : wm_wifi.h
  • tls_wifi_perror() : wm_wifi.h
  • tls_wifi_psm_chipsleep_cb_register() : wm_wifi.h
  • tls_wifi_restore_bcast_mac_filter() : wm_wifi.h
  • tls_wifi_scan() : wm_wifi.h
  • tls_wifi_scan_by_param() : wm_wifi.h
  • tls_wifi_scan_result_cb_register() : wm_wifi.h
  • tls_wifi_send_data() : wm_wifi.h
  • tls_wifi_send_mgmt() : wm_wifi.h
  • tls_wifi_send_oneshotdata() : wm_wifi.h
  • tls_wifi_set_11b_digital_gain() : wm_wifi.h
  • tls_wifi_set_11n_digital_gain() : wm_wifi.h
  • tls_wifi_set_bcast_mac_filter() : wm_wifi.h
  • tls_wifi_set_fixed_rate() : wm_wifi.h
  • tls_wifi_set_listen_mode() : wm_wifi.h
  • tls_wifi_set_oneshot_flag() : wm_wifi_oneshot.h , wm_wifi.h
  • tls_wifi_set_psflag() : wm_wifi.h
  • tls_wifi_set_psm_chipsleep_flag() : wm_wifi.h
  • tls_wifi_set_tempcomp_flag() : wm_wifi.h
  • tls_wifi_softap_add_blacksta() : wm_wifi.h
  • tls_wifi_softap_client_event_register() : wm_wifi.h
  • tls_wifi_softap_create() : wm_wifi.h
  • tls_wifi_softap_del_blacksta() : wm_wifi.h
  • tls_wifi_softap_del_station() : wm_wifi.h
  • tls_wifi_softap_destroy() : wm_wifi.h
  • tls_wifi_softap_get_blackinfo() : wm_wifi.h
  • tls_wifi_softap_get_state() : wm_wifi.h
  • tls_wifi_softap_set_sta_num() : wm_wifi.h
  • tls_wifi_status_change_cb_register() : wm_wifi.h
  • tls_wl_task_add_timeout() : wm_wl_task.h
  • tls_wl_task_callback() : wm_wl_task.h
  • tls_wl_task_callback_static() : wm_wl_task.h
  • tls_wl_task_init() : wm_wl_task.h
  • tls_wl_task_run() : wm_wl_task.h
  • tls_wl_task_untimeout() : wm_wl_task.h
  • tls_wl_timer_init() : wm_wl_timers.h


W800 SDK APIs: Globals

- w -

  • wm_adc_config() : wm_gpio_afsel.h
  • wm_gpio_af_disable() : wm_gpio_afsel.h
  • wm_hspi_gpio_config() : wm_gpio_afsel.h
  • wm_i2c_scl_config() : wm_gpio_afsel.h
  • wm_i2c_sda_config() : wm_gpio_afsel.h
  • wm_i2c_start_read_it() : wm_i2c.h
  • wm_i2c_start_write_it() : wm_i2c.h
  • wm_i2c_transfer_done_register() : wm_i2c.h
  • wm_i2s_ck_config() : wm_gpio_afsel.h
  • wm_i2s_di_config() : wm_gpio_afsel.h
  • wm_i2s_do_config() : wm_gpio_afsel.h
  • wm_i2s_extclk_config() : wm_gpio_afsel.h
  • wm_i2s_mclk_config() : wm_gpio_afsel.h
  • wm_i2s_ws_config() : wm_gpio_afsel.h
  • wm_oneshot_netif_status_event() : wm_wifi_oneshot.h
  • wm_oneshot_task_init() : wm_wifi_oneshot.h
  • wm_psram_config() : wm_gpio_afsel.h
  • wm_pwm0_config() : wm_gpio_afsel.h
  • wm_pwm1_config() : wm_gpio_afsel.h
  • wm_pwm2_config() : wm_gpio_afsel.h
  • wm_pwm3_config() : wm_gpio_afsel.h
  • wm_pwm4_config() : wm_gpio_afsel.h
  • wm_pwmbrk_config() : wm_gpio_afsel.h
  • wm_sc_7816_mode() : wm_7816.h
  • wm_sc_clk_enable() : wm_7816.h
  • wm_sc_colreset() : wm_7816.h
  • wm_sc_deactive() : wm_7816.h
  • wm_sc_get_protocol() : wm_7816.h
  • wm_sc_hotreset() : wm_7816.h
  • wm_sc_io_clk_config() : wm_7816.h
  • wm_sc_parity_recv() : wm_7816.h
  • wm_sc_powerInit() : wm_7816.h
  • wm_sc_poweroff() : wm_7816.h
  • wm_sc_poweron() : wm_7816.h
  • wm_sc_rst_high() : wm_7816.h
  • wm_sc_rst_low() : wm_7816.h
  • wm_sc_rx_retry_times() : wm_7816.h
  • wm_sc_set_bcwt() : wm_7816.h
  • wm_sc_set_bgt() : wm_7816.h
  • wm_sc_set_etu() : wm_7816.h
  • wm_sc_set_frequency() : wm_7816.h
  • wm_sc_set_guardtime() : wm_7816.h
  • wm_sc_set_protocol() : wm_7816.h
  • wm_sc_tx_errsignal_mask() : wm_7816.h
  • wm_sc_tx_retry_times() : wm_7816.h
  • wm_sdio_host_config() : wm_gpio_afsel.h
  • wm_sdio_slave_config() : wm_gpio_afsel.h
  • wm_spi_ck_config() : wm_gpio_afsel.h
  • wm_spi_cs_config() : wm_gpio_afsel.h
  • wm_spi_di_config() : wm_gpio_afsel.h
  • wm_spi_do_config() : wm_gpio_afsel.h
  • wm_swd_config() : wm_gpio_afsel.h
  • wm_touch_sensor_config() : wm_gpio_afsel.h
  • wm_uart0_rx_config() : wm_gpio_afsel.h
  • wm_uart0_tx_config() : wm_gpio_afsel.h
  • wm_uart1_cts_config() : wm_gpio_afsel.h
  • wm_uart1_rts_config() : wm_gpio_afsel.h
  • wm_uart1_rx_config() : wm_gpio_afsel.h
  • wm_uart1_tx_config() : wm_gpio_afsel.h
  • wm_uart2_cts_config() : wm_gpio_afsel.h
  • wm_uart2_rts_scclk_config() : wm_gpio_afsel.h
  • wm_uart2_rx_config() : wm_gpio_afsel.h
  • wm_uart2_tx_scio_config() : wm_gpio_afsel.h
  • wm_uart3_cts_config() : wm_gpio_afsel.h
  • wm_uart3_rts_config() : wm_gpio_afsel.h
  • wm_uart3_rx_config() : wm_gpio_afsel.h
  • wm_uart3_tx_config() : wm_gpio_afsel.h
  • wm_uart4_cts_config() : wm_gpio_afsel.h
  • wm_uart4_rts_config() : wm_gpio_afsel.h
  • wm_uart4_rx_config() : wm_gpio_afsel.h
  • wm_uart4_tx_config() : wm_gpio_afsel.h
  • wm_uart5_cts_config() : wm_gpio_afsel.h
  • wm_uart5_rts_config() : wm_gpio_afsel.h
  • wm_uart5_rx_config() : wm_gpio_afsel.h
  • wm_uart5_tx_config() : wm_gpio_afsel.h


W800 SDK APIs: Globals

  • HZ : wm_osal.h
  • TLS_FLASH_MESH_PARAM_ADDR : wm_flash_map.h


W800 SDK APIs: Globals

- c -

  • CRYPTO_CRC_TYPE : wm_crypto_hard.h
  • CRYPTO_MODE : wm_crypto_hard.h
  • CRYPTO_WAY : wm_crypto_hard.h

- h -

  • HTTP_AUTH_SCHEMA : wm_http_client.h
  • HTTP_CLIENT : wm_http_client.h
  • HTTP_VERB : wm_http_client.h
  • HTTPParameters : wm_http_client.h

- n -

  • net_rx_data_cb : wm_wifi.h

- o -

  • OS_CPU_SR : wm_osal.h
  • OS_STK : wm_osal.h
  • os_time_t : wm_osal.h

- p -

  • pwm_init_param : wm_pwm.h

- s -

  • socket_accept_fn : wm_socket2.1.3.h
  • socket_connected_fn : wm_socket2.1.3.h
  • socket_err_fn : wm_socket2.1.3.h
  • socket_poll_fn : wm_socket2.1.3.h
  • socket_recv_fn : wm_socket2.1.3.h
  • socket_recv_ip_rpt_fn : wm_socket2.1.3.h
  • socket_state_changed_fn : wm_socket2.1.3.h
  • ST_Wm_User_Param : wm_params.h
  • start_routine : wm_wl_task.h

- t -

  • tls_ble_callback_t : wm_bt_def.h
  • tls_ble_dm_callback_t : wm_bt_def.h
  • tls_ble_dm_timer_callback_t : wm_bt_def.h
  • tls_ble_dm_triger_callback_t : wm_bt_def.h
  • tls_ble_uart_output_ptr : wm_bt_def.h
  • tls_ble_uart_sent_ptr : wm_bt_def.h
  • tls_bt_a2dp_sink_callback_t : wm_bt_def.h
  • tls_bt_a2dp_src_callback_t : wm_bt_def.h
  • tls_bt_host_callback_t : wm_bt_def.h
  • tls_bt_spp_callback_t : wm_bt_def.h
  • tls_bthf_client_callback_t : wm_bt_def.h
  • tls_btrc_callback_t : wm_bt_def.h
  • tls_btrc_ctrl_callback_t : wm_bt_def.h
  • tls_gpio_irq_callback : wm_gpio.h
  • tls_http_session_flags_t : wm_http_client.h
  • tls_http_session_handle_t : wm_http_client.h
  • tls_mbox_t : wm_wl_mbox.h
  • tls_os_mailbox_t : wm_osal.h
  • tls_os_mutex_t : wm_osal.h
  • tls_os_queue_t : wm_osal.h
  • tls_os_sem_t : wm_osal.h
  • tls_os_status_t : wm_osal.h
  • tls_os_task_t : wm_osal.h
  • TLS_OS_TIMER_CALLBACK : wm_osal.h
  • tls_os_timer_t : wm_osal.h
  • tls_pmu_irq_callback : wm_pmu.h
  • tls_rtc_irq_callback : wm_rtc.h
  • tls_sem_t : wm_wl_task.h
  • tls_timeout_handler : wm_wl_timers.h
  • tls_timer_irq_callback : wm_timer.h
  • tls_wifi_client_event_callback : wm_wifi.h
  • tls_wifi_data_ext_recv_callback : wm_wifi.h
  • tls_wifi_data_recv_callback : wm_wifi.h
  • tls_wifi_oneshot_result_callback : wm_wifi.h
  • tls_wifi_psm_chipsleep_callback : wm_wifi.h
  • tls_wifi_psm_postchipsleep_callback : wm_wifi.h
  • tls_wifi_psm_prechipsleep_callback : wm_wifi.h


W800 SDK APIs: Globals

- _ -

  • __CRYPTO_CRC_TYPE : wm_crypto_hard.h
  • __CRYPTO_METHOD : wm_crypto_hard.h
  • __CRYPTO_MODE : wm_crypto_hard.h
  • __CRYPTO_WAY : wm_crypto_hard.h
  • _HTTP_AUTH_SCHEMA : wm_http_client.h
  • _HTTP_VERB : wm_http_client.h

- i -

  • IRQn : wm_regs.h

- l -

  • LCD_BiasDef : wm_lcd.h
  • LCD_DutyDef : wm_lcd.h
  • LCD_VlcdDef : wm_lcd.h

- t -

  • task_msg_type : wm_wl_task.h
  • tls_ble_dm_evt_t : wm_bt_def.h
  • tls_ble_evt_t : wm_bt_def.h
  • tls_bt_acl_state_t : wm_bt_def.h
  • tls_bt_av_evt_t : wm_bt_def.h
  • tls_bt_bond_state_t : wm_bt_def.h
  • tls_bt_discovery_state_t : wm_bt_def.h
  • tls_bt_host_evt_t : wm_bt_def.h
  • tls_bt_mesh_role_t : wm_bt_def.h
  • tls_bt_property_type_t : wm_bt_def.h
  • tls_bt_ssp_variant_t : wm_bt_def.h
  • tls_bt_state_t : wm_bt_def.h
  • tls_bt_status_t : wm_bt_def.h
  • tls_fwup_image_src : wm_fwup.h
  • tls_gpio_attr : wm_gpio.h
  • tls_gpio_dir : wm_gpio.h
  • tls_gpio_irq_trig : wm_gpio.h
  • tls_io_name : wm_io.h
  • tls_os_status : wm_osal.h
  • TLS_OS_TYPE : wm_osal.h
  • tls_peripheral_type_s : wm_pmu.h
  • tls_pwm_brake_out_level : wm_pwm.h
  • tls_pwm_cap_int_type : wm_pwm.h
  • tls_pwm_cnt_type : wm_pwm.h
  • tls_pwm_loop_type : wm_pwm.h
  • tls_pwm_out_en_state : wm_pwm.h
  • tls_pwm_out_mode : wm_pwm.h
  • tls_pwm_waveform_inversion : wm_pwm.h
  • tls_timer_unit : wm_timer.h
  • TLS_UART_CHSIZE : wm_uart.h
  • TLS_UART_MODE : wm_uart.h
  • TLS_UART_PMODE : wm_uart.h
  • tls_wifi_auth_mode : wm_wifi.h
  • tls_wifi_cipher_mode : wm_wifi.h
  • tls_wifi_encrypt_mode : wm_wifi.h
  • tls_wifi_mgmt_type : wm_wifi.h
  • tls_wifi_states : wm_wifi.h
  • tls_wifi_tx_rate : wm_wifi.h


W800 SDK APIs: Globals

- a -

  • ADC_IRQn : wm_regs.h


W800 SDK APIs: Globals

- b -

  • BIAS_ONEFOURTH : wm_lcd.h
  • BIAS_ONEHALF : wm_lcd.h
  • BIAS_ONETHIRD : wm_lcd.h
  • BIAS_STATIC : wm_lcd.h
  • BLE_IRQn : wm_regs.h
  • BT_IRQn : wm_regs.h


W800 SDK APIs: Globals

- c -

  • CRYPTION_IRQn : wm_regs.h
  • CRYPTO_CRC_TYPE_16_CCITT : wm_crypto_hard.h
  • CRYPTO_CRC_TYPE_16_MODBUS : wm_crypto_hard.h
  • CRYPTO_CRC_TYPE_32 : wm_crypto_hard.h
  • CRYPTO_CRC_TYPE_8 : wm_crypto_hard.h
  • CRYPTO_METHOD_CRC : wm_crypto_hard.h
  • CRYPTO_METHOD_MD5 : wm_crypto_hard.h
  • CRYPTO_MODE_CBC : wm_crypto_hard.h
  • CRYPTO_MODE_CMAC : wm_crypto_hard.h
  • CRYPTO_MODE_CTR : wm_crypto_hard.h
  • CRYPTO_MODE_ECB : wm_crypto_hard.h
  • CRYPTO_WAY_DECRYPT : wm_crypto_hard.h
  • CRYPTO_WAY_ENCRYPT : wm_crypto_hard.h


W800 SDK APIs: Globals

- d -

  • DMA_BRUST_IRQn : wm_regs.h
  • DMA_Channel0_IRQn : wm_regs.h
  • DMA_Channel1_IRQn : wm_regs.h
  • DMA_Channel2_IRQn : wm_regs.h
  • DMA_Channel3_IRQn : wm_regs.h
  • DMA_Channel4_7_IRQn : wm_regs.h
  • DUTY_ONEEIGHTH : wm_lcd.h
  • DUTY_ONEFIFTH : wm_lcd.h
  • DUTY_ONEFOURTH : wm_lcd.h
  • DUTY_ONEHALF : wm_lcd.h
  • DUTY_ONESEVENTH : wm_lcd.h
  • DUTY_ONESIXTH : wm_lcd.h
  • DUTY_ONETHIRD : wm_lcd.h
  • DUTY_STATIC : wm_lcd.h


W800 SDK APIs: Globals

- f -

  • FLASH_IRQn : wm_regs.h


W800 SDK APIs: Globals

- g -

  • GPIOA_IRQn : wm_regs.h
  • GPIOB_IRQn : wm_regs.h


W800 SDK APIs: Globals

- i -

  • I2C_IRQn : wm_regs.h
  • I2S_IRQn : wm_regs.h


W800 SDK APIs: Globals

- m -

  • MAC_IRQn : wm_regs.h


W800 SDK APIs: Globals

- p -

  • PMU_IRQn : wm_regs.h
  • PWM_IRQn : wm_regs.h


W800 SDK APIs: Globals

- r -

  • RF_CFG_IRQn : wm_regs.h
  • RSA_IRQn : wm_regs.h


W800 SDK APIs: Globals

- s -

  • SDIO_IRQn : wm_regs.h
  • SEC_IRQn : wm_regs.h
  • SIDO_HOST_IRQn : wm_regs.h
  • SPI_HS_IRQn : wm_regs.h
  • SPI_LS_IRQn : wm_regs.h
  • SYS_TICK_IRQn : wm_regs.h


W800 SDK APIs: Globals

- t -

  • TIMER_IRQn : wm_regs.h
  • TLS_BT_STATUS_DONE : wm_bt_def.h
  • TLS_BT_STATUS_INTERNAL_ERROR : wm_bt_def.h
  • TLS_BT_STATUS_NOMEM : wm_bt_def.h
  • TLS_BT_STATUS_SUCCESS : wm_bt_def.h
  • TLS_BT_STATUS_THREAD_FAILED : wm_bt_def.h
  • TLS_FWUP_IMAGE_SRC_HSPI : wm_fwup.h
  • TLS_FWUP_IMAGE_SRC_HUART : wm_fwup.h
  • TLS_FWUP_IMAGE_SRC_LUART : wm_fwup.h
  • TLS_FWUP_IMAGE_SRC_WEB : wm_fwup.h
  • TLS_PERIPHERAL_TYPE_BT : wm_pmu.h
  • TLS_PERIPHERAL_TYPE_DMA : wm_pmu.h
  • TLS_PERIPHERAL_TYPE_GPIO : wm_pmu.h
  • TLS_PERIPHERAL_TYPE_GPSEC : wm_pmu.h
  • TLS_PERIPHERAL_TYPE_I2C : wm_pmu.h
  • TLS_PERIPHERAL_TYPE_I2S : wm_pmu.h
  • TLS_PERIPHERAL_TYPE_LCD : wm_pmu.h
  • TLS_PERIPHERAL_TYPE_LSPI : wm_pmu.h
  • TLS_PERIPHERAL_TYPE_PSRAM : wm_pmu.h
  • TLS_PERIPHERAL_TYPE_PWM : wm_pmu.h
  • TLS_PERIPHERAL_TYPE_RSA : wm_pmu.h
  • TLS_PERIPHERAL_TYPE_SDADC : wm_pmu.h
  • TLS_PERIPHERAL_TYPE_SDIO_MASTER : wm_pmu.h
  • TLS_PERIPHERAL_TYPE_TIMER : wm_pmu.h
  • TLS_PERIPHERAL_TYPE_TOUCH_SENSOR : wm_pmu.h
  • TLS_PERIPHERAL_TYPE_UART0 : wm_pmu.h
  • TLS_PERIPHERAL_TYPE_UART1 : wm_pmu.h
  • TLS_PERIPHERAL_TYPE_UART2 : wm_pmu.h
  • TLS_PERIPHERAL_TYPE_UART3 : wm_pmu.h
  • TLS_PERIPHERAL_TYPE_UART4 : wm_pmu.h
  • TLS_PERIPHERAL_TYPE_UART5 : wm_pmu.h
  • TLS_TIMER_UNIT_MS : wm_timer.h
  • TLS_TIMER_UNIT_US : wm_timer.h
  • TLS_UART_CHSIZE_5BIT : wm_uart.h
  • TLS_UART_CHSIZE_6BIT : wm_uart.h
  • TLS_UART_CHSIZE_7BIT : wm_uart.h
  • TLS_UART_CHSIZE_8BIT : wm_uart.h
  • TLS_UART_MODE_INT : wm_uart.h
  • TLS_UART_MODE_POLL : wm_uart.h
  • TLS_UART_PMODE_DISABLED : wm_uart.h
  • TLS_UART_PMODE_EVEN : wm_uart.h
  • TLS_UART_PMODE_MARK : wm_uart.h
  • TLS_UART_PMODE_ODD : wm_uart.h
  • TLS_UART_PMODE_SPACE : wm_uart.h
  • TOUCH_IRQn : wm_regs.h


W800 SDK APIs: Globals

- u -

  • UART0_IRQn : wm_regs.h
  • UART1_IRQn : wm_regs.h
  • UART24_IRQn : wm_regs.h


W800 SDK APIs: Globals

- v -

  • VLCD27 : wm_lcd.h
  • VLCD29 : wm_lcd.h
  • VLCD31 : wm_lcd.h
  • VLCD33 : wm_lcd.h


W800 SDK APIs: Globals

- w -

  • WDG_IRQn : wm_regs.h
  • WM_BLE_CL_CFG_MTU_EVT : wm_bt_def.h
  • WM_BLE_CL_CLOSE_EVT : wm_bt_def.h
  • WM_BLE_CL_CONGEST_EVT : wm_bt_def.h
  • WM_BLE_CL_DEREGISTER_EVT : wm_bt_def.h
  • WM_BLE_CL_EXEC_CMPL_EVT : wm_bt_def.h
  • WM_BLE_CL_NOTIF_EVT : wm_bt_def.h
  • WM_BLE_CL_OPEN_EVT : wm_bt_def.h
  • WM_BLE_CL_REGISTER_EVT : wm_bt_def.h
  • WM_BLE_CL_SEARCH_CMPL_EVT : wm_bt_def.h
  • WM_BLE_CL_SEARCH_RES_EVT : wm_bt_def.h
  • WM_BLE_DM_SCAN_RES_EVT : wm_bt_def.h
  • WM_BLE_DM_SET_ADV_DATA_CMPL_EVT : wm_bt_def.h
  • WM_BLE_DM_TIMER_EXPIRED_EVT : wm_bt_def.h
  • WM_BLE_DM_TRIGER_EVT : wm_bt_def.h
  • WM_BLE_SE_ADD_CHAR_EVT : wm_bt_def.h
  • WM_BLE_SE_CONFIRM_EVT : wm_bt_def.h
  • WM_BLE_SE_CONGEST_EVT : wm_bt_def.h
  • WM_BLE_SE_CREATE_EVT : wm_bt_def.h
  • WM_BLE_SE_DEREGISTER_EVT : wm_bt_def.h
  • WM_BLE_SE_EXEC_WRITE_EVT : wm_bt_def.h
  • WM_BLE_SE_READ_EVT : wm_bt_def.h
  • WM_BLE_SE_REGISTER_EVT : wm_bt_def.h
  • WM_BLE_SE_START_EVT : wm_bt_def.h
  • WM_BLE_SE_STOP_EVT : wm_bt_def.h
  • WM_BLE_SE_WRITE_EVT : wm_bt_def.h
  • WM_BT_PROPERTY_ADAPTER_BONDED_DEVICES : wm_bt_def.h
  • WM_BT_PROPERTY_ADAPTER_DISCOVERY_TIMEOUT : wm_bt_def.h
  • WM_BT_PROPERTY_ADAPTER_SCAN_MODE : wm_bt_def.h
  • WM_BT_PROPERTY_BDADDR : wm_bt_def.h
  • WM_BT_PROPERTY_BDNAME : wm_bt_def.h
  • WM_BT_PROPERTY_CLASS_OF_DEVICE : wm_bt_def.h
  • WM_BT_PROPERTY_LOCAL_LE_FEATURES : wm_bt_def.h
  • WM_BT_PROPERTY_REMOTE_FRIENDLY_NAME : wm_bt_def.h
  • WM_BT_PROPERTY_REMOTE_RSSI : wm_bt_def.h
  • WM_BT_PROPERTY_REMOTE_VERSION_INFO : wm_bt_def.h
  • WM_BT_PROPERTY_SERVICE_RECORD : wm_bt_def.h
  • WM_BT_PROPERTY_TYPE_OF_DEVICE : wm_bt_def.h
  • WM_BT_PROPERTY_UUIDS : wm_bt_def.h
  • WM_GPIO_ATTR_FLOATING : wm_gpio.h
  • WM_GPIO_ATTR_PULLHIGH : wm_gpio.h
  • WM_GPIO_ATTR_PULLLOW : wm_gpio.h
  • WM_GPIO_DIR_INPUT : wm_gpio.h
  • WM_GPIO_DIR_OUTPUT : wm_gpio.h
  • WM_GPIO_IRQ_TRIG_DOUBLE_EDGE : wm_gpio.h
  • WM_GPIO_IRQ_TRIG_FALLING_EDGE : wm_gpio.h
  • WM_GPIO_IRQ_TRIG_HIGH_LEVEL : wm_gpio.h
  • WM_GPIO_IRQ_TRIG_LOW_LEVEL : wm_gpio.h
  • WM_GPIO_IRQ_TRIG_RISING_EDGE : wm_gpio.h
  • WM_IO_PA_00 : wm_io.h
  • WM_IO_PA_01 : wm_io.h
  • WM_IO_PA_02 : wm_io.h
  • WM_IO_PA_03 : wm_io.h
  • WM_IO_PA_04 : wm_io.h
  • WM_IO_PA_05 : wm_io.h
  • WM_IO_PA_06 : wm_io.h
  • WM_IO_PA_07 : wm_io.h
  • WM_IO_PA_08 : wm_io.h
  • WM_IO_PA_09 : wm_io.h
  • WM_IO_PA_10 : wm_io.h
  • WM_IO_PA_11 : wm_io.h
  • WM_IO_PA_12 : wm_io.h
  • WM_IO_PA_13 : wm_io.h
  • WM_IO_PA_14 : wm_io.h
  • WM_IO_PA_15 : wm_io.h
  • WM_IO_PB_00 : wm_io.h
  • WM_IO_PB_01 : wm_io.h
  • WM_IO_PB_02 : wm_io.h
  • WM_IO_PB_03 : wm_io.h
  • WM_IO_PB_04 : wm_io.h
  • WM_IO_PB_05 : wm_io.h
  • WM_IO_PB_06 : wm_io.h
  • WM_IO_PB_07 : wm_io.h
  • WM_IO_PB_08 : wm_io.h
  • WM_IO_PB_09 : wm_io.h
  • WM_IO_PB_10 : wm_io.h
  • WM_IO_PB_11 : wm_io.h
  • WM_IO_PB_12 : wm_io.h
  • WM_IO_PB_13 : wm_io.h
  • WM_IO_PB_14 : wm_io.h
  • WM_IO_PB_15 : wm_io.h
  • WM_IO_PB_16 : wm_io.h
  • WM_IO_PB_17 : wm_io.h
  • WM_IO_PB_18 : wm_io.h
  • WM_IO_PB_19 : wm_io.h
  • WM_IO_PB_20 : wm_io.h
  • WM_IO_PB_21 : wm_io.h
  • WM_IO_PB_22 : wm_io.h
  • WM_IO_PB_23 : wm_io.h
  • WM_IO_PB_24 : wm_io.h
  • WM_IO_PB_25 : wm_io.h
  • WM_IO_PB_26 : wm_io.h
  • WM_IO_PB_27 : wm_io.h
  • WM_IO_PB_28 : wm_io.h
  • WM_IO_PB_29 : wm_io.h
  • WM_IO_PB_30 : wm_io.h
  • WM_IO_PB_31 : wm_io.h
  • WM_PWM_BRAKE_OUT_HIGH : wm_pwm.h
  • WM_PWM_BRAKE_OUT_LOW : wm_pwm.h
  • WM_PWM_CAP_DMA_INT : wm_pwm.h
  • WM_PWM_CAP_FALLING_EDGE_INT : wm_pwm.h
  • WM_PWM_CAP_RISING_EDGE_INT : wm_pwm.h
  • WM_PWM_CAP_RISING_FALLING_EDGE_INT : wm_pwm.h
  • WM_PWM_CNT_TYPE_CENTER_ALIGN : wm_pwm.h
  • WM_PWM_CNT_TYPE_EDGE_ALIGN_OUT : wm_pwm.h
  • WM_PWM_CNT_TYPE_EDGE_ALLGN_CAP : wm_pwm.h
  • WM_PWM_LOOP_TYPE_LOOP : wm_pwm.h
  • WM_PWM_LOOP_TYPE_SINGLE : wm_pwm.h
  • WM_PWM_OUT_EN_STATE_OUT : wm_pwm.h
  • WM_PWM_OUT_EN_STATE_TRI : wm_pwm.h
  • WM_PWM_OUT_MODE_2SYC : wm_pwm.h
  • WM_PWM_OUT_MODE_ALLSYC : wm_pwm.h
  • WM_PWM_OUT_MODE_BRAKE : wm_pwm.h
  • WM_PWM_OUT_MODE_INDPT : wm_pwm.h
  • WM_PWM_OUT_MODE_MC : wm_pwm.h
  • WM_PWM_WAVEFORM_INVERSION : wm_pwm.h
  • WM_PWM_WAVEFORM_NOINVERSION : wm_pwm.h
  • WM_WIFI_AUTH_MODE_OPEN : wm_wifi.h
  • WM_WIFI_AUTH_MODE_WEP_AUTO : wm_wifi.h
  • WM_WIFI_AUTH_MODE_WPA2_PSK_AUTO : wm_wifi.h
  • WM_WIFI_AUTH_MODE_WPA2_PSK_CCMP : wm_wifi.h
  • WM_WIFI_AUTH_MODE_WPA2_PSK_TKIP : wm_wifi.h
  • WM_WIFI_AUTH_MODE_WPA_PSK_AUTO : wm_wifi.h
  • WM_WIFI_AUTH_MODE_WPA_PSK_CCMP : wm_wifi.h
  • WM_WIFI_AUTH_MODE_WPA_PSK_TKIP : wm_wifi.h
  • WM_WIFI_AUTH_MODE_WPA_WPA2_PSK_AUTO : wm_wifi.h
  • WM_WIFI_DISCONNECTED : wm_wifi.h
  • WM_WIFI_ECN_MODE_OPEN : wm_wifi.h
  • WM_WIFI_ECN_MODE_UNKNOWN : wm_wifi.h
  • WM_WIFI_ECN_MODE_WEP : wm_wifi.h
  • WM_WIFI_ECN_MODE_WPA2_PSK : wm_wifi.h
  • WM_WIFI_ECN_MODE_WPA_PSK : wm_wifi.h
  • WM_WIFI_ECN_MODE_WPA_WPA2_PSK : wm_wifi.h
  • WM_WIFI_JOINED : wm_wifi.h
  • WM_WIFI_JOINING : wm_wifi.h
  • WM_WIFI_MGMT_TYPE_ACTION : wm_wifi.h
  • WM_WIFI_MGMT_TYPE_ASSOC_REQ : wm_wifi.h
  • WM_WIFI_MGMT_TYPE_ASSOC_RESP : wm_wifi.h
  • WM_WIFI_MGMT_TYPE_ATIM : wm_wifi.h
  • WM_WIFI_MGMT_TYPE_AUTH : wm_wifi.h
  • WM_WIFI_MGMT_TYPE_BEACON : wm_wifi.h
  • WM_WIFI_MGMT_TYPE_DEAUTH : wm_wifi.h
  • WM_WIFI_MGMT_TYPE_DISASSOC : wm_wifi.h
  • WM_WIFI_MGMT_TYPE_PROBE_REQ : wm_wifi.h
  • WM_WIFI_MGMT_TYPE_PROBE_RESP : wm_wifi.h
  • WM_WIFI_MGMT_TYPE_REASSOC_REQ : wm_wifi.h
  • WM_WIFI_MGMT_TYPE_REASSOC_RESP : wm_wifi.h
  • WM_WIFI_SCANNING : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_11M : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_12M : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_18M : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_1M : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_24M : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_2M : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_36M : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_48M : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_54M : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_5_5M : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_6M : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_9M : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_MCS0 : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_MCS1 : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_MCS10 : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_MCS11 : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_MCS12 : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_MCS13 : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_MCS14 : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_MCS15 : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_MCS2 : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_MCS3 : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_MCS32 : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_MCS4 : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_MCS5 : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_MCS6 : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_MCS7 : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_MCS8 : wm_wifi.h
  • WM_WIFI_TX_RATEIDX_MCS9 : wm_wifi.h


W800 SDK APIs: Globals

- _ -

  • __I : wm_regs.h
  • __IO : wm_regs.h
  • __O : wm_regs.h


W800 SDK APIs: Globals

- c -

  • CIRC_CNT : wm_uart.h
  • CIRC_CNT_TO_END : wm_uart.h
  • CIRC_SPACE : wm_uart.h
  • CIRC_SPACE_TO_END : wm_uart.h
  • CMD_START_Msk : wm_internal_flash.h
  • CMD_START_Pos : wm_internal_flash.h
  • CODE_RUN_START_ADDR : wm_flash_map.h
  • CODE_UPD_START_ADDR : wm_flash_map.h
  • CONFIG_ONESHOT_MAC_FILTER : wm_wifi_oneshot.h


W800 SDK APIs: Globals

- e -

  • ERR_CRY_OK : wm_crypto_hard.h
  • ETH_ALEN : wm_wifi.h
  • EXSPIFLASH_WRITE_ENABLE : wm_fls_gd25qxx.h


W800 SDK APIs: Globals

- f -

  • FLASH_BASE_ADDR : wm_flash_map.h
  • FLASH_BSY : wm_internal_flash.h
  • FLASH_PG : wm_internal_flash.h


W800 SDK APIs: Globals

- h -

  • HR_CLK_I2S_GATE_Pos : wm_regs.h
  • HR_CLK_LCD_GATE_Pos : wm_regs.h
  • HR_CRYPTO_BASE_ADDR : wm_crypto_hard.h
  • HR_CRYPTO_CRC_KEY : wm_crypto_hard.h
  • HR_CRYPTO_CRC_RESULT : wm_crypto_hard.h
  • HR_CRYPTO_DEST_ADDR : wm_crypto_hard.h
  • HR_CRYPTO_IV0 : wm_crypto_hard.h
  • HR_CRYPTO_IV1 : wm_crypto_hard.h
  • HR_CRYPTO_KEY0 : wm_crypto_hard.h
  • HR_CRYPTO_KEY1 : wm_crypto_hard.h
  • HR_CRYPTO_KEY2 : wm_crypto_hard.h
  • HR_CRYPTO_KEY3 : wm_crypto_hard.h
  • HR_CRYPTO_KEY4 : wm_crypto_hard.h
  • HR_CRYPTO_KEY5 : wm_crypto_hard.h
  • HR_CRYPTO_KEY6 : wm_crypto_hard.h
  • HR_CRYPTO_KEY7 : wm_crypto_hard.h
  • HR_CRYPTO_RNG_RESULT : wm_crypto_hard.h
  • HR_CRYPTO_SEC_CFG : wm_crypto_hard.h
  • HR_CRYPTO_SEC_CTRL : wm_crypto_hard.h
  • HR_CRYPTO_SEC_STS : wm_crypto_hard.h
  • HR_CRYPTO_SHA1_DIGEST0 : wm_crypto_hard.h
  • HR_CRYPTO_SHA1_DIGEST1 : wm_crypto_hard.h
  • HR_CRYPTO_SHA1_DIGEST2 : wm_crypto_hard.h
  • HR_CRYPTO_SHA1_DIGEST3 : wm_crypto_hard.h
  • HR_CRYPTO_SHA1_DIGEST4 : wm_crypto_hard.h
  • HR_CRYPTO_SRC_ADDR : wm_crypto_hard.h
  • HR_CRYPTO_TRNG_CR : wm_crypto_hard.h
  • HR_LCD_REG_BASE : wm_regs.h
  • HSPI_RX_CMD_MSG : wm_hspi.h
  • HSPI_RX_DESC_BASE_ADDR : wm_hspi.h
  • HSPI_RXBUF_BASE_ADDR : wm_hspi.h
  • HSPI_TX_DESC_BASE_ADDR : wm_hspi.h
  • HSPI_TXBUF_NUM : wm_hspi.h
  • HTTP_CLIENT_EOS : wm_http_client.h
  • HTTP_CLIENT_ERROR_AUTH_HOST : wm_http_client.h
  • HTTP_CLIENT_ERROR_AUTH_MISMATCH : wm_http_client.h
  • HTTP_CLIENT_ERROR_AUTH_PROXY : wm_http_client.h
  • HTTP_CLIENT_ERROR_BAD_AUTH : wm_http_client.h
  • HTTP_CLIENT_ERROR_BAD_HEADER : wm_http_client.h
  • HTTP_CLIENT_ERROR_BAD_STATE : wm_http_client.h
  • HTTP_CLIENT_ERROR_BAD_URL : wm_http_client.h
  • HTTP_CLIENT_ERROR_BAD_VERB : wm_http_client.h
  • HTTP_CLIENT_ERROR_BUFFER_RSIZE : wm_http_client.h
  • HTTP_CLIENT_ERROR_CHUNK : wm_http_client.h
  • HTTP_CLIENT_ERROR_CHUNK_TOO_BIG : wm_http_client.h
  • HTTP_CLIENT_ERROR_CONNECTION_CLOSE : wm_http_client.h
  • HTTP_CLIENT_ERROR_HEADER_BIG_CLUE : wm_http_client.h
  • HTTP_CLIENT_ERROR_HEADER_NO_LENGTH : wm_http_client.h
  • HTTP_CLIENT_ERROR_HEADER_NOT_FOUND : wm_http_client.h
  • HTTP_CLIENT_ERROR_HEADER_RECV : wm_http_client.h
  • HTTP_CLIENT_ERROR_INVALID_HANDLE : wm_http_client.h
  • HTTP_CLIENT_ERROR_LONG_INPUT : wm_http_client.h
  • HTTP_CLIENT_ERROR_NO_DIGEST_ALG : wm_http_client.h
  • HTTP_CLIENT_ERROR_NO_DIGEST_TOKEN : wm_http_client.h
  • HTTP_CLIENT_ERROR_NO_MEMORY : wm_http_client.h
  • HTTP_CLIENT_ERROR_NOT_IMPLEMENTED : wm_http_client.h
  • HTTP_CLIENT_ERROR_SOCKET_BIND : wm_http_client.h
  • HTTP_CLIENT_ERROR_SOCKET_CANT_SET : wm_http_client.h
  • HTTP_CLIENT_ERROR_SOCKET_CONNECT : wm_http_client.h
  • HTTP_CLIENT_ERROR_SOCKET_INVALID : wm_http_client.h
  • HTTP_CLIENT_ERROR_SOCKET_RECV : wm_http_client.h
  • HTTP_CLIENT_ERROR_SOCKET_RESOLVE : wm_http_client.h
  • HTTP_CLIENT_ERROR_SOCKET_SEND : wm_http_client.h
  • HTTP_CLIENT_ERROR_SOCKET_TIME_OUT : wm_http_client.h
  • HTTP_CLIENT_ERROR_TLS_NEGO : wm_http_client.h
  • HTTP_CLIENT_SUCCESS : wm_http_client.h
  • HTTP_CLIENT_UNKNOWN_ERROR : wm_http_client.h


W800 SDK APIs: Globals

- i -

  • IEEE80211_ENCRYT_AUTO_WPA : wm_wifi.h
  • IEEE80211_ENCRYT_AUTO_WPA2 : wm_wifi.h
  • IEEE80211_ENCRYT_CCMP_WPA : wm_wifi.h
  • IEEE80211_ENCRYT_CCMP_WPA2 : wm_wifi.h
  • IEEE80211_ENCRYT_NONE : wm_wifi.h
  • IEEE80211_ENCRYT_TKIP_WPA : wm_wifi.h
  • IEEE80211_ENCRYT_TKIP_WPA2 : wm_wifi.h
  • IEEE80211_ENCRYT_WEP104 : wm_wifi.h
  • IEEE80211_ENCRYT_WEP40 : wm_wifi.h
  • ieee80211_erp_chan_to_freq : wm_ieee80211.h
  • ieee80211_freq_to_erp_chan : wm_ieee80211.h
  • ieee80211_freq_to_hr_chan : wm_ieee80211.h
  • ieee80211_hr_chan_to_freq : wm_ieee80211.h
  • IEEE80211_MODE_AP : wm_wifi.h
  • IEEE80211_MODE_IBSS : wm_wifi.h
  • IEEE80211_MODE_INFRA : wm_wifi.h
  • IPADDR_TYPE_V4 : wm_netif2.1.3.h


W800 SDK APIs: Globals

- l -

  • LCD : wm_lcd.h


W800 SDK APIs: Globals

- n -

  • NETIF_IP_NET2_UP : wm_netif2.1.3.h
  • NETIF_IP_NET_UP : wm_netif2.1.3.h
  • NETIF_WIFI_DISCONNECTED : wm_netif2.1.3.h
  • NETIF_WIFI_JOIN_FAILED : wm_netif2.1.3.h
  • NETIF_WIFI_JOIN_SUCCESS : wm_netif2.1.3.h
  • NETIF_WIFI_SOFTAP_CLOSED : wm_netif2.1.3.h
  • NETIF_WIFI_SOFTAP_FAILED : wm_netif2.1.3.h
  • NETIF_WIFI_SOFTAP_SUCCESS : wm_netif2.1.3.h


W800 SDK APIs: Globals

- p -

  • PWM_CHANNEL_MAX_NUM : wm_pwm.h


W800 SDK APIs: Globals

- r -

  • RDPRT_KEY : wm_internal_flash.h


W800 SDK APIs: Globals

- s -

  • SDIO_WP_INT_SRC_CMD_DOWN : wm_hspi.h
  • SPI_BYTE_TRANSFER : wm_hostspi.h
  • SPI_CPHA : wm_hostspi.h
  • SPI_DEFAULT_SPEED : wm_hostspi.h
  • SPI_MESSAGE_STATUS_IDLE : wm_hostspi.h
  • SPI_SLAVE_FLASH : wm_hostspi.h
  • SYS_ARCH_TIMEOUT : wm_wl_mbox.h


W800 SDK APIs: Globals

- t -

  • TLS_CONFIG_AIRKISS_MODE_ONESHOT : wm_wifi_oneshot.h
  • TLS_CONFIG_AP_MODE_ONESHOT : wm_wifi_oneshot.h
  • TLS_CONFIG_BLE_WIFI_ONESHOT : wm_wifi_oneshot.h
  • TLS_CONFIG_HOSTIF : wm_config.h
  • TLS_CONFIG_HS_SPI : wm_config.h
  • TLS_CONFIG_HTTP_CLIENT : wm_config.h
  • TLS_CONFIG_IGMP : wm_config.h
  • TLS_CONFIG_ONESHOT_DELAY_SPECIAL : wm_wifi_oneshot.h
  • TLS_CONFIG_ONLY_FACTORY_ATCMD : wm_config.h
  • TLS_CONFIG_SOCKET_STD : wm_config.h
  • TLS_CONFIG_UDP_LSD_SPECIAL : wm_wifi_oneshot.h
  • TLS_CONFIG_UDP_ONE_SHOT : wm_wifi_oneshot.h
  • TLS_DBG_LEVEL_DUMP : wm_debug.h
  • TLS_DBG_LEVEL_ERR : wm_debug.h
  • TLS_DBG_LEVEL_INFO : wm_debug.h
  • TLS_DBG_LEVEL_WARNING : wm_debug.h
  • TLS_DBG_OFF : wm_debug.h
  • TLS_DBG_ON : wm_debug.h
  • TLS_DBGPRT_DUMP : wm_debug.h
  • TLS_DBGPRT_ERR : wm_debug.h
  • TLS_DBGPRT_INFO : wm_debug.h
  • TLS_DBGPRT_WARNING : wm_debug.h
  • TLS_FWUP_BLK_SIZE : wm_fwup.h
  • TLS_FWUP_DEST_SPECIFIC_FIRMWARE : wm_fwup.h
  • TLS_FWUP_REQ_STATUS_IDLE : wm_fwup.h
  • TLS_FWUP_STATE_UNDEF : wm_fwup.h
  • TLS_FWUP_STATUS_OK : wm_fwup.h
  • TLS_GENERAL_DBG : wm_debug.h
  • TLS_LCD_CLK_ENABLE : wm_lcd.h
  • TLS_LCD_ENABLE : wm_lcd.h
  • TLS_LCD_POWERDOWM : wm_lcd.h
  • TLS_OS_TIMER_OPT_ONE_SHORT : wm_osal.h
  • TLS_OS_TIMER_OPT_PERIOD : wm_osal.h
  • TLS_PARAM_DHCP_ENABLE : wm_params.h
  • TLS_PARAM_ENCRY_OPEN : wm_params.h
  • TLS_PARAM_ID_ALL : wm_params.h
  • TLS_PARAM_ID_BT_ADAPTER : wm_params.h
  • TLS_PARAM_IEEE80211_INFRA : wm_params.h
  • TLS_PARAM_INIT_MAGIC : wm_params.h
  • TLS_PARAM_MAGIC : wm_params.h
  • TLS_PARAM_MANUAL_MODE : wm_params.h
  • TLS_PARAM_PARTITION_NUM : wm_params.h
  • TLS_PARAM_PHY_11BG_MIXED : wm_params.h
  • TLS_PARAM_PSM_DISABLE : wm_params.h
  • TLS_PARAM_REGION_0_BG_BAND : wm_params.h
  • TLS_PARAM_SOCKET_TCP : wm_params.h
  • TLS_PARAM_SSIDBRD_DISABLE : wm_params.h
  • TLS_PARAM_TX_RATEIDX_1M : wm_params.h
  • TLS_PARAM_UART_BAUDRATE_B600 : wm_params.h
  • TLS_PARAM_UART_FLOW_DISABLE : wm_params.h
  • TLS_PARAM_UART_PARITY_NONE : wm_params.h
  • TLS_PARAM_UART_STOPBITS_1BITS : wm_params.h
  • TLS_PARAM_USR_INTF_LUART : wm_params.h
  • TLS_SPI_STATUS_OK : wm_hostspi.h


W800 SDK APIs: Globals

- u -

  • UART_BAUDRATE_B600 : wm_uart.h
  • USER_ADDR_START : wm_flash_map.h


W800 SDK APIs: Globals

- w -

  • W800_PLL_CLK_MHZ : wm_cpu.h
  • WIFI_AUTO_CNT_FLAG_GET : wm_wifi.h
  • WIFI_AUTO_CNT_FLAG_SET : wm_wifi.h
  • WIFI_AUTO_CNT_OFF : wm_wifi.h
  • WIFI_AUTO_CNT_ON : wm_wifi.h
  • WIFI_AUTO_CNT_TMP_OFF : wm_wifi.h
  • WIFI_DISCONNECTED : wm_wifi.h
  • WIFI_JOIN_FAILED : wm_wifi.h
  • WIFI_JOIN_SUCCESS : wm_wifi.h
  • WIFI_SOFTAP_CLOSED : wm_wifi.h
  • WIFI_SOFTAP_FAILED : wm_wifi.h
  • WIFI_SOFTAP_SUCCESS : wm_wifi.h
  • WM_BLE_CLIENT_MAX : wm_bt_def.h
  • WM_BLE_SERVER_MAX : wm_bt_def.h
  • WM_BTRC_MAX_ATTR_STR_LEN : wm_bt_def.h
  • WM_GATT_CHAR_PROP_BIT_AUTH : wm_bt_def.h
  • WM_GATT_CHAR_PROP_BIT_BROADCAST : wm_bt_def.h
  • WM_GATT_CHAR_PROP_BIT_EXT_PROP : wm_bt_def.h
  • WM_GATT_CHAR_PROP_BIT_INDICATE : wm_bt_def.h
  • WM_GATT_CHAR_PROP_BIT_NOTIFY : wm_bt_def.h
  • WM_GATT_CHAR_PROP_BIT_READ : wm_bt_def.h
  • WM_GATT_CHAR_PROP_BIT_WRITE : wm_bt_def.h
  • WM_GATT_CHAR_PROP_BIT_WRITE_NR : wm_bt_def.h
  • WM_GATT_PERM_READ : wm_bt_def.h
  • WM_GATT_PERM_READ_ENC_MITM : wm_bt_def.h
  • WM_GATT_PERM_READ_ENCRYPTED : wm_bt_def.h
  • WM_GATT_PERM_WRITE : wm_bt_def.h
  • WM_GATT_PERM_WRITE_ENC_MITM : wm_bt_def.h
  • WM_GATT_PERM_WRITE_ENCRYPTED : wm_bt_def.h
  • WM_GATT_PERM_WRITE_SIGNED : wm_bt_def.h
  • WM_GATT_PERM_WRITE_SIGNED_MITM : wm_bt_def.h
  • wm_i2c_int_mask : wm_i2c.h
  • WM_IO_OPTION1 : wm_io.h
  • WM_IO_OPTION2 : wm_io.h
  • WM_IO_OPTION3 : wm_io.h
  • WM_IO_OPTION4 : wm_io.h
  • WM_IO_OPTION5 : wm_io.h
  • WM_IO_OPTION6 : wm_io.h
  • WM_IO_OPTION7 : wm_io.h
  • WM_TIMER_ID_INVALID : wm_timer.h
  • WM_WIFI_EKEY : wm_wifi.h
  • WM_WIFI_ELSI : wm_wifi.h
  • WM_WIFI_ENOAP : wm_wifi.h
  • WM_WIFI_ENOERR : wm_wifi.h
  • WM_WIFI_ERR_KEY : wm_wifi.h
  • WM_WIFI_ERR_SSID : wm_wifi.h
  • WM_WIFI_SCANNING_BUSY : wm_wifi.h
  • WM_WIFI_STA_BUSY : wm_wifi.h
  • WM_WIFI_WPS_BUSY : wm_wifi.h


W800 SDK APIs: doxy_out/include/platform/aes.h Source File

  • doxy_out
  • include
  • platform
aes.h
Go to the documentation of this file.
1
16 #ifndef AES_H
17 #define AES_H
18
19 #include <stddef.h>
20 #include "wm_type_def.h"
21
22
23 int aes_128_cbc_encrypt(const u8 *key, const u8 *iv, u8 *data,
24 size_t data_len);
25 int aes_128_cbc_decrypt(const u8 *key, const u8 *iv, u8 *data,
26 size_t data_len);
27
28 #endif /* AES_H */
29
aes_128_cbc_decrypt
int aes_128_cbc_decrypt(const u8 *key, const u8 *iv, u8 *data, size_t data_len)
Decrypt data by 128 AES crypto.
wm_type_def.h
WM type redefine.
aes_128_cbc_encrypt
int aes_128_cbc_encrypt(const u8 *key, const u8 *iv, u8 *data, size_t data_len)
Encrypt plain data by 128 AES crypto.


W800 SDK APIs: doxy_out/include/driver/wm_7816.h Source File

  • doxy_out
  • include
  • driver
wm_7816.h
Go to the documentation of this file.
1 /**************************************************************************/
9 #ifndef WM_7816_H_
10 #define WM_7816_H_
11
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15
16 #include <string.h>
17 #include <stdbool.h>
18 #include "wm_regs.h"
19 #include "wm_type_def.h"
20 #include "wm_io.h"
21
22 #define WM_SC_RST_PIN WM_IO_PB_23 //(23)
23 #define WM_SC_PWR_PIN WM_IO_PB_24 //(29)
24
25 #define WM_SC_DEFAULT_FD (372)
26
27 typedef struct sc_io_map_ {
28 enum tls_io_name clk_pin_num;
29 uint32_t clk_opt;
30 enum tls_io_name io_pin_num;
31 uint32_t io_opt;
32 uint8_t initialed;
33 } sc_io_map;
34
35 extern sc_io_map sc_io;
36
65 void wm_sc_io_clk_config(uint8_t mode);
66
72 void wm_sc_powerInit(void);
73
79 void wm_sc_poweron(void);
80
86 void wm_sc_poweroff(void);
87
93 void wm_sc_rst_low(void);
94
100 void wm_sc_rst_high(void);
101
107 void wm_sc_hotreset(void);
108
114 void wm_sc_colreset(void);
115
121 void wm_sc_deactive(void);
122
129 void wm_sc_set_bgt(uint8_t bgt);
130
137 void wm_sc_tx_retry_times(uint8_t count);
138
145 void wm_sc_rx_retry_times(uint8_t count);
146
153 void wm_sc_set_etu(uint16_t etu);
154
161 void wm_sc_set_frequency(uint32_t freq);
162
170 static inline void wm_sc_parity_recv(bool bl)
171 {
172 tls_bitband_write(HR_UART2_LINE_CTRL, 9, bl);
173 }
174
182 static inline void wm_sc_7816_mode(bool bl)
183 {
184 tls_bitband_write(HR_UART2_LINE_CTRL, 24, bl);
185 }
186
193 static inline void wm_sc_set_guardtime(uint8_t gt)
194 {
195 tls_reg_write32(HR_UART2_GUARD_TIME, gt);
196 }
197
204 static inline void wm_sc_set_bcwt(uint32_t bwt)
205 {
206 bwt = (bwt > 0xFFFFFF) ? 0xFFFFFF : bwt;
207 tls_reg_write32(HR_UART2_WAIT_TIME, bwt);
208 }
209
217 static inline void wm_sc_tx_errsignal_mask(bool bl)
218 {
219 tls_bitband_write(HR_UART2_INT_MASK, 9, bl);
220 }
221
229 static inline void wm_sc_set_protocol(bool bl)
230 {
231 tls_bitband_write(HR_UART2_LINE_CTRL, 8, bl);
232 }
233
241 static inline uint8_t wm_sc_get_protocol()
242 {
243 return tls_bitband_read(HR_UART2_LINE_CTRL, 8);
244 }
245
253 static inline void wm_sc_clk_enable(bool bl)
254 {
255 tls_bitband_write(HR_UART2_LINE_CTRL, 10, bl);
256 }
257
266 #ifdef __cplusplus
267 }
268 #endif
269
270 #endif
wm_sc_rx_retry_times
void wm_sc_rx_retry_times(uint8_t count)
This function is used to config the rx retry count when detect parity error.
wm_sc_hotreset
void wm_sc_hotreset(void)
hotrest the 7816 device obey the 7816-3 timing
wm_sc_get_protocol
static uint8_t wm_sc_get_protocol()
get the module protol
Definition: wm_7816.h:241
tls_io_name
tls_io_name
Definition: wm_io.h:17
wm_sc_rst_high
void wm_sc_rst_high(void)
driver the reset gpio in high level
wm_sc_tx_retry_times
void wm_sc_tx_retry_times(uint8_t count)
This function is used to config the tx retry count when detect err signal.
wm_sc_7816_mode
static void wm_sc_7816_mode(bool bl)
select the model in 7816 or uart function
Definition: wm_7816.h:182
wm_sc_set_protocol
static void wm_sc_set_protocol(bool bl)
config the module protol
Definition: wm_7816.h:229
wm_sc_colreset
void wm_sc_colreset(void)
colreset the 7816 device obey the 7816-3 timing
wm_sc_parity_recv
static void wm_sc_parity_recv(bool bl)
config recv or not when parity error
Definition: wm_7816.h:170
wm_regs.h
register & operation file
wm_io.h
IO Driver Module.
tls_reg_write32
static __inline void tls_reg_write32(unsigned int reg, unsigned int val)
This function is used to write value to register or memory.
Definition: wm_regs.h:900
wm_sc_deactive
void wm_sc_deactive(void)
deactive the 7816 device obey the 7816-3 timing
wm_sc_set_frequency
void wm_sc_set_frequency(uint32_t freq)
This function config the module clock freq.
wm_sc_powerInit
void wm_sc_powerInit(void)
close af to use as gpio
wm_sc_poweron
void wm_sc_poweron(void)
power on the 7816 device if power is controled by GPIO
wm_type_def.h
WM type redefine.
wm_sc_clk_enable
static void wm_sc_clk_enable(bool bl)
smart card clock output enable or disable
Definition: wm_7816.h:253
wm_sc_set_bcwt
static void wm_sc_set_bcwt(uint32_t bwt)
This function is used to config the CWT or BWT param.
Definition: wm_7816.h:204
wm_sc_set_bgt
void wm_sc_set_bgt(uint8_t bgt)
This function is used to config the block guard time param in 7816 mode.
wm_sc_io_clk_config
void wm_sc_io_clk_config(uint8_t mode)
This function is used to config the pin in gpio or 7816 mode for the 7816 power on timing...
tls_bitband_write
static __inline void tls_bitband_write(volatile unsigned int addr, unsigned int bit, unsigned int val)
This function is used to write specified bit through bit-band alias region.
Definition: wm_regs.h:934
sc_io_map_
Definition: wm_7816.h:27
wm_sc_rst_low
void wm_sc_rst_low(void)
driver the reset gpio in low level
wm_sc_poweroff
void wm_sc_poweroff(void)
power off the 7816 device if power is controled by GPIO
wm_sc_tx_errsignal_mask
static void wm_sc_tx_errsignal_mask(bool bl)
module errsignal int enable or disable
Definition: wm_7816.h:217
wm_sc_set_guardtime
static void wm_sc_set_guardtime(uint8_t gt)
This function is used to config the guard time param.
Definition: wm_7816.h:193
wm_sc_set_etu
void wm_sc_set_etu(uint16_t etu)
This function is used to config the etu param.
tls_bitband_read
static __inline unsigned int tls_bitband_read(volatile unsigned int addr, unsigned int bit)
This function is used to read a single bit from address by bit-band alias region. ...
Definition: wm_regs.h:954


W800 SDK APIs: doxy_out/include/app/wm_at_ri_init.h Source File

  • doxy_out
  • include
  • app
wm_at_ri_init.h
Go to the documentation of this file.
1
11 #ifndef WM_AT_RI_H
12 #define WM_AT_RI_H
13
45 int tls_hostif_init(void);
46
65 int tls_hspi_init(void);
66
76 void tls_uart_init(void);
77
78 #endif /* WM_AT_RI_H */
79
tls_hspi_init
int tls_hspi_init(void)
This function is used to initialize high speed SPI.
tls_uart_init
void tls_uart_init(void)
This function is used to initialize UART.
tls_hostif_init
int tls_hostif_init(void)
This function is used to initialize hostif task used by AT&RI Command.


W800 SDK APIs: doxy_out/include/bt/wm_ble.h Source File

  • doxy_out
  • include
  • bt
wm_ble.h
Go to the documentation of this file.
1
10 #ifndef WM_BLE_H
11 #define WM_BLE_H
12
13 #include "wm_bt_def.h"
14
44 tls_bt_status_t tls_ble_dm_init(tls_ble_dm_callback_t callback);
45
55 tls_bt_status_t tls_ble_adv(uint8_t adv_state);
56
68 tls_bt_status_t tls_ble_set_adv_data(tls_ble_dm_adv_data_t *data);
69
79 tls_bt_status_t tls_ble_set_adv_param(tls_ble_dm_adv_param_t *param);
80
90 tls_bt_status_t tls_ble_set_adv_ext_param(tls_ble_dm_adv_ext_param_t *param);
91
92
102 tls_bt_status_t tls_ble_scan(bool start);
103
116 tls_bt_status_t tls_ble_set_scan_param(int window, int interval, uint8_t scan_mode);
117
128 tls_bt_status_t tls_dm_evt_triger(int id, tls_ble_dm_triger_callback_t callback);
129
140 tls_bt_status_t tls_dm_set_data_length(tls_bt_addr_t *bd_addr, uint16_t length);
141
152 tls_bt_status_t tls_dm_set_privacy(uint8_t enable);
153
167 tls_bt_status_t tls_ble_conn_parameter_update(const tls_bt_addr_t *bd_addr,
168 int min_interval,
169 int max_interval,
170 int latency,
171 int timeout);
172
182 tls_bt_status_t tls_dm_read_remote_rssi(const tls_bt_addr_t *bd_addr);
183
184
195 tls_bt_status_t tls_ble_set_sec_io_cap(uint8_t io_cap);
196
207 tls_bt_status_t tls_ble_set_sec_auth_req(uint8_t auth_req);
208
224 tls_bt_status_t tls_ble_set_sec(const tls_bt_addr_t *bd_addr, uint8_t sec_act);
225
237 tls_bt_status_t tls_ble_gap_adv(uint8_t start, int duration);
238
247 #endif /* WM_BLE_H */
248
tls_ble_set_adv_data
tls_bt_status_t tls_ble_set_adv_data(tls_ble_dm_adv_data_t *data)
configure the advertisment content
tls_bt_status_t
tls_bt_status_t
Definition: wm_bt_def.h:14
tls_ble_set_scan_param
tls_bt_status_t tls_ble_set_scan_param(int window, int interval, uint8_t scan_mode)
configure the scan parameters
wm_bt_def.h
Bluetooth Define.
tls_dm_read_remote_rssi
tls_bt_status_t tls_dm_read_remote_rssi(const tls_bt_addr_t *bd_addr)
read the remote device signal strength connected
tls_dm_evt_triger
tls_bt_status_t tls_dm_evt_triger(int id, tls_ble_dm_triger_callback_t callback)
enable a async process evt
tls_dm_set_data_length
tls_bt_status_t tls_dm_set_data_length(tls_bt_addr_t *bd_addr, uint16_t length)
configure the max transmit unit
tls_ble_set_adv_param
tls_bt_status_t tls_ble_set_adv_param(tls_ble_dm_adv_param_t *param)
configure the advertisment parameters
tls_ble_dm_init
tls_bt_status_t tls_ble_dm_init(tls_ble_dm_callback_t callback)
initialize the application callback function
tls_ble_set_sec
tls_bt_status_t tls_ble_set_sec(const tls_bt_addr_t *bd_addr, uint8_t sec_act)
This function is called to ensure that connection is encrypted. Should be called only on an open conn...
tls_ble_set_sec_io_cap
tls_bt_status_t tls_ble_set_sec_io_cap(uint8_t io_cap)
config the io capabilities of local device
tls_ble_dm_callback_t
void(* tls_ble_dm_callback_t)(tls_ble_dm_evt_t event, tls_ble_dm_msg_t *p_data)
Definition: wm_bt_def.h:979
tls_ble_adv
tls_bt_status_t tls_ble_adv(uint8_t adv_state)
start/stop ble advertisement
tls_ble_scan
tls_bt_status_t tls_ble_scan(bool start)
start/stop ble scan
tls_ble_dm_triger_callback_t
void(* tls_ble_dm_triger_callback_t)(uint32_t evt_id)
Definition: wm_bt_def.h:985
tls_ble_conn_parameter_update
tls_bt_status_t tls_ble_conn_parameter_update(const tls_bt_addr_t *bd_addr, int min_interval, int max_interval, int latency, int timeout)
update the connection parameters
tls_ble_set_sec_auth_req
tls_bt_status_t tls_ble_set_sec_auth_req(uint8_t auth_req)
config the auth requirement of local device
tls_ble_set_adv_ext_param
tls_bt_status_t tls_ble_set_adv_ext_param(tls_ble_dm_adv_ext_param_t *param)
configure the advertisment extented parameters
tls_dm_set_privacy
tls_bt_status_t tls_dm_set_privacy(uint8_t enable)
configure the ble privacy
tls_ble_gap_adv
tls_bt_status_t tls_ble_gap_adv(uint8_t start, int duration)
only used to start/stop ble advertisement


W800 SDK APIs: doxy_out/include/bt/wm_ble_gatt.h Source File

  • doxy_out
  • include
  • bt
wm_ble_gatt.h
Go to the documentation of this file.
1
10 #ifndef WM_BLE_GATT_H
11 #define WM_BLE_GATT_H
12
13 #include "wm_bt_def.h"
14
44 tls_bt_status_t tls_ble_client_app_init(tls_ble_callback_t callback);
45
55 tls_bt_status_t tls_ble_client_app_deinit(void);
56
66 tls_bt_status_t tls_ble_client_app_register(tls_bt_uuid_t *uuid);
67
77 tls_bt_status_t tls_ble_client_app_unregister(uint8_t client_if);
78
92 tls_bt_status_t tls_ble_client_connect(uint8_t client_if, const tls_bt_addr_t *bd_addr, uint8_t is_direct, int transport);
93
105 tls_bt_status_t tls_ble_client_disconnect(uint8_t client_if, const tls_bt_addr_t *bd_addr, int conn_id);
106
117 tls_bt_status_t tls_ble_client_listen(uint8_t client_if, uint8_t start);
118
129 tls_bt_status_t tls_ble_client_refresh(uint8_t client_if, const tls_bt_addr_t *bd_addr);
130
141 tls_bt_status_t tls_ble_client_search_service(uint16_t conn_id, tls_bt_uuid_t *filter_uuid);
142
157 tls_bt_status_t tls_ble_client_write_characteristic(uint16_t conn_id, uint16_t handle, int write_type, int len, int auth_req, char *p_value);
158
170 tls_bt_status_t tls_ble_client_read_characteristic(uint16_t conn_id, uint16_t handle, int auth_req);
171
183 tls_bt_status_t tls_ble_client_read_descriptor(uint16_t conn_id, uint16_t handle, int auth_req);
184
199 tls_bt_status_t tls_ble_client_write_descriptor(uint16_t conn_id, uint16_t handle, int write_type, int len, int auth_req, char *p_value);
200
211 tls_bt_status_t tls_ble_client_execute_write(uint16_t conn_id, int execute);
212
226 tls_bt_status_t tls_ble_client_register_for_notification(int client_if, const tls_bt_addr_t *bd_addr, uint16_t handle, uint16_t conn_id);
227
239 tls_bt_status_t tls_ble_client_deregister_for_notification(int client_if, const tls_bt_addr_t *bd_addr, uint16_t handle,uint16_t conn_id);
240
251 tls_bt_status_t tls_ble_client_configure_mtu(uint16_t conn_id, uint16_t mtu);
252
262 tls_bt_status_t tls_ble_client_get_gatt_db(uint16_t conn_id);
263
289 tls_bt_status_t tls_ble_server_app_init(tls_ble_callback_t callback);
290
291 /*******************************************************************************
292 **
293 ** Function tls_ble_server_app_deinit
294 **
295 ** Description free the tls_ble_callback_t pointer
296 **
297 ** Parameters None
298 **
299 ** Returns TLS_BT_STATUS_SUCCESS
300 ** TLS_BT_STATUS_DONE
301 **
302 *******************************************************************************/
303 tls_bt_status_t tls_ble_server_app_deinit();
304
314 tls_bt_status_t tls_ble_server_app_register(tls_bt_uuid_t *uuid);
315
325 tls_bt_status_t tls_ble_server_app_unregister(uint8_t server_if);
326
340 tls_bt_status_t tls_ble_server_add_service(uint8_t server_if, int inst_id, int primay, tls_bt_uuid_t *uuid, int num_handles);
341
355 tls_bt_status_t tls_ble_server_add_characteristic(uint8_t server_if, uint16_t service_handle, tls_bt_uuid_t *uuid, int properties, int permission);
356
369 tls_bt_status_t tls_ble_server_add_descriptor(uint8_t server_if, uint16_t service_handle, tls_bt_uuid_t *uuid, int permissions);
370
382 tls_bt_status_t tls_ble_server_start_service(uint8_t server_if, uint16_t service_handle, int transport);
383
394 tls_bt_status_t tls_ble_server_stop_service(uint8_t server_if, uint16_t service_handle);
395
406 tls_bt_status_t tls_ble_server_delete_service(uint8_t server_if, uint16_t service_handle);
407
420 tls_bt_status_t tls_ble_server_connect(uint8_t server_if, const tls_bt_addr_t *bd_addr, uint8_t is_direct, int transport);
421
433 tls_bt_status_t tls_ble_server_disconnect(uint8_t server_if, const tls_bt_addr_t *bd_addr, uint16_t conn_id);
434
451 tls_bt_status_t tls_ble_server_send_indication(uint8_t server_if, uint16_t attribute_handle, uint16_t conn_id, int len, int confirm, char *p_value);
452
469 tls_bt_status_t tls_ble_server_send_response(uint16_t conn_id, uint32_t trans_id, uint8_t status, int offset, uint16_t attr_handle, int auth_req, uint8_t *p_value, int len);
470
479 #endif /* WM_BLE_GATT_H */
480
tls_ble_client_search_service
tls_bt_status_t tls_ble_client_search_service(uint16_t conn_id, tls_bt_uuid_t *filter_uuid)
enumerate all GATT services on a connected device
tls_ble_client_app_deinit
tls_bt_status_t tls_ble_client_app_deinit(void)
free the tls_ble_callback_t pointer
tls_ble_server_delete_service
tls_bt_status_t tls_ble_server_delete_service(uint8_t server_if, uint16_t service_handle)
delete a local service
tls_bt_status_t
tls_bt_status_t
Definition: wm_bt_def.h:14
tls_ble_server_app_register
tls_bt_status_t tls_ble_server_app_register(tls_bt_uuid_t *uuid)
this function is called to register server application
tls_ble_server_connect
tls_bt_status_t tls_ble_server_connect(uint8_t server_if, const tls_bt_addr_t *bd_addr, uint8_t is_direct, int transport)
create a connection to a remote peripheral
tls_bt_uuid_t
Definition: wm_bt_def.h:534
tls_ble_client_disconnect
tls_bt_status_t tls_ble_client_disconnect(uint8_t client_if, const tls_bt_addr_t *bd_addr, int conn_id)
this function is called to disconnect with gatt server connection
tls_ble_client_write_characteristic
tls_bt_status_t tls_ble_client_write_characteristic(uint16_t conn_id, uint16_t handle, int write_type, int len, int auth_req, char *p_value)
write a remote characteristic
wm_bt_def.h
Bluetooth Define.
tls_ble_client_app_register
tls_bt_status_t tls_ble_client_app_register(tls_bt_uuid_t *uuid)
this function is called to register client application
tls_ble_server_app_init
tls_bt_status_t tls_ble_server_app_init(tls_ble_callback_t callback)
initialize the btif_gatt_server callback function
tls_ble_client_read_descriptor
tls_bt_status_t tls_ble_client_read_descriptor(uint16_t conn_id, uint16_t handle, int auth_req)
read the descriptor for a given characteristic
tls_ble_client_deregister_for_notification
tls_bt_status_t tls_ble_client_deregister_for_notification(int client_if, const tls_bt_addr_t *bd_addr, uint16_t handle, uint16_t conn_id)
deregister a previous request for notifications/indications
tls_ble_server_app_unregister
tls_bt_status_t tls_ble_server_app_unregister(uint8_t server_if)
this function is called to unregister server application
tls_ble_client_read_characteristic
tls_bt_status_t tls_ble_client_read_characteristic(uint16_t conn_id, uint16_t handle, int auth_req)
read a characteristic on a remote device
tls_ble_callback_t
void(* tls_ble_callback_t)(tls_ble_evt_t event, tls_ble_msg_t *p_data)
Definition: wm_bt_def.h:858
tls_ble_server_send_response
tls_bt_status_t tls_ble_server_send_response(uint16_t conn_id, uint32_t trans_id, uint8_t status, int offset, uint16_t attr_handle, int auth_req, uint8_t *p_value, int len)
send a response to a read/write operation
tls_ble_server_add_descriptor
tls_bt_status_t tls_ble_server_add_descriptor(uint8_t server_if, uint16_t service_handle, tls_bt_uuid_t *uuid, int permissions)
add a descriptor to a given service
tls_ble_client_app_init
tls_bt_status_t tls_ble_client_app_init(tls_ble_callback_t callback)
initialize the btif_gatt_client callback function
tls_ble_client_listen
tls_bt_status_t tls_ble_client_listen(uint8_t client_if, uint8_t start)
start or stop advertisements to listen for incoming connections
tls_ble_server_start_service
tls_bt_status_t tls_ble_server_start_service(uint8_t server_if, uint16_t service_handle, int transport)
starts a local service
tls_ble_server_send_indication
tls_bt_status_t tls_ble_server_send_indication(uint8_t server_if, uint16_t attribute_handle, uint16_t conn_id, int len, int confirm, char *p_value)
send value indication to a remote device
tls_ble_client_execute_write
tls_bt_status_t tls_ble_client_execute_write(uint16_t conn_id, int execute)
execute a prepared write operation
tls_ble_client_register_for_notification
tls_bt_status_t tls_ble_client_register_for_notification(int client_if, const tls_bt_addr_t *bd_addr, uint16_t handle, uint16_t conn_id)
Register to receive notifications or indications for a given characteristic.
tls_ble_client_configure_mtu
tls_bt_status_t tls_ble_client_configure_mtu(uint16_t conn_id, uint16_t mtu)
configure the MTU for a given connection
tls_ble_client_app_unregister
tls_bt_status_t tls_ble_client_app_unregister(uint8_t client_if)
this function is called to unregister client application
tls_ble_client_write_descriptor
tls_bt_status_t tls_ble_client_write_descriptor(uint16_t conn_id, uint16_t handle, int write_type, int len, int auth_req, char *p_value)
write a remote descriptor for a given characteristic
tls_ble_client_get_gatt_db
tls_bt_status_t tls_ble_client_get_gatt_db(uint16_t conn_id)
get gatt db content
tls_ble_server_add_service
tls_bt_status_t tls_ble_server_add_service(uint8_t server_if, int inst_id, int primay, tls_bt_uuid_t *uuid, int num_handles)
create a new service
tls_ble_client_connect
tls_bt_status_t tls_ble_client_connect(uint8_t client_if, const tls_bt_addr_t *bd_addr, uint8_t is_direct, int transport)
this function is called to open an BLE connection to a remote device or add a background auto connect...
tls_ble_server_disconnect
tls_bt_status_t tls_ble_server_disconnect(uint8_t server_if, const tls_bt_addr_t *bd_addr, uint16_t conn_id)
disconnect an established connection or cancel a pending one
tls_ble_server_add_characteristic
tls_bt_status_t tls_ble_server_add_characteristic(uint8_t server_if, uint16_t service_handle, tls_bt_uuid_t *uuid, int properties, int permission)
add a characteristic to a service
tls_ble_client_refresh
tls_bt_status_t tls_ble_client_refresh(uint8_t client_if, const tls_bt_addr_t *bd_addr)
clear the attribute cache for a given device
tls_ble_server_stop_service
tls_bt_status_t tls_ble_server_stop_service(uint8_t server_if, uint16_t service_handle)
stop a local service


W800 SDK APIs: doxy_out/include/bt/wm_bt.h Source File

  • doxy_out
  • include
  • bt
wm_bt.h
Go to the documentation of this file.
1
10 #ifndef WM_BT_H
11 #define WM_BT_H
12
13 #include "wm_bt_def.h"
14
50 tls_bt_status_t tls_bt_pin_reply(const tls_bt_addr_t *bd_addr, uint8_t accept,
51 uint8_t pin_len, tls_bt_pin_code_t *pin_code);
52
66 tls_bt_status_t tls_bt_ssp_reply(const tls_bt_addr_t *bd_addr, tls_bt_ssp_variant_t variant,
67 uint8_t accept, uint32_t passkey);
68
79 tls_bt_status_t tls_bt_set_adapter_property(const tls_bt_property_t *property, uint8_t update_to_flash);
80
90 tls_bt_status_t tls_bt_get_adapter_property(tls_bt_property_type_t type);
91
101 tls_bt_status_t tls_bt_start_discovery(void);
102
112 tls_bt_status_t tls_bt_cancel_discovery(void);
113
124 tls_bt_status_t tls_bt_create_bond(const tls_bt_addr_t *bd_addr, int transport);
125
135 tls_bt_status_t tls_bt_cancel_bond(const tls_bt_addr_t *bd_addr);
136
146 tls_bt_status_t tls_bt_remove_bond(const tls_bt_addr_t *bd_addr);
147
157 tls_bt_status_t tls_bt_host_cleanup(void);
158
170 tls_bt_status_t tls_bt_enable(tls_bt_host_callback_t callback, tls_bt_hci_if_t *p_hci_if, tls_bt_log_level_t log_level);
171
181 tls_bt_status_t tls_bt_disable();
182
183
210 tls_bt_status_t tls_bt_ctrl_enable(tls_bt_hci_if_t *p_hci_if, tls_bt_log_level_t log_level);
211
212
222 tls_bt_status_t tls_bt_ctrl_disable(void);
223
234 tls_bt_status_t tls_ble_set_tx_power(tls_ble_power_type_t power_type, int8_t power_level_index);
235
245 int8_t tls_ble_get_tx_power(tls_ble_power_type_t power_type);
246
257 tls_bt_status_t tls_bredr_set_tx_power(int8_t min_power_level,int8_t max_power_level);
258
269 tls_bt_status_t tls_bredr_get_tx_power(int8_t* min_power_level, int8_t* max_power_level);
270
280 tls_bt_status_t tls_bredr_sco_datapath_set(tls_sco_data_path_t data_path);
281
291 tls_bt_ctrl_status_t tls_bt_controller_get_status(void);
292
303 tls_bt_status_t tls_bt_vuart_host_send_packet( uint8_t *data, uint16_t len);
304
315 tls_bt_status_t tls_bt_ctrl_if_register(const tls_bt_host_if_t *p_host_if);
316
327 tls_bt_status_t tls_bt_ctrl_if_unregister();
328
329
341 tls_bt_status_t tls_bt_ctrl_sleep(bool enable);
342
353 bool tls_bt_ctrl_is_sleep(void);
354
364 tls_bt_status_t tls_bt_ctrl_wakeup(void);
365
376 bool tls_bt_vuart_host_check_send_available();
377
387 tls_bt_status_t exit_bt_test_mode();
388
399 tls_bt_status_t enable_bt_test_mode(tls_bt_hci_if_t *p_hci_if);
400
411 void tls_rf_bt_mode(uint8_t enable);
412
423 tls_bt_status_t tls_bt_set_mesh_mode(uint8_t enable);
424
435 tls_bt_status_t tls_bt_register_sleep_callback(tls_bt_controller_sleep_enter_func_ptr sleep_enter, tls_bt_controller_sleep_exit_func_ptr sleep_exit);
436
447 tls_bt_status_t tls_bt_register_pending_process_callback(tls_bt_app_pending_process_func_ptr process_ptr);
448
457 #endif /* WM_BT_H */
458
tls_bt_status_t
tls_bt_status_t
Definition: wm_bt_def.h:14
tls_bt_ctrl_is_sleep
bool tls_bt_ctrl_is_sleep(void)
this function look up the controller is in sleep mode or not
tls_bt_host_callback_t
void(* tls_bt_host_callback_t)(tls_bt_host_evt_t event, tls_bt_host_msg_t *p_data)
Definition: wm_bt_def.h:378
tls_bt_vuart_host_check_send_available
bool tls_bt_vuart_host_check_send_available()
this function check controller can handle hci commands yes or no
tls_bt_remove_bond
tls_bt_status_t tls_bt_remove_bond(const tls_bt_addr_t *bd_addr)
tls_bt_controller_get_status
tls_bt_ctrl_status_t tls_bt_controller_get_status(void)
get controller stack status
tls_bt_register_sleep_callback
tls_bt_status_t tls_bt_register_sleep_callback(tls_bt_controller_sleep_enter_func_ptr sleep_enter, tls_bt_controller_sleep_exit_func_ptr sleep_exit)
this function register callback function when controller entering or exiting sleep mode ...
enable_bt_test_mode
tls_bt_status_t enable_bt_test_mode(tls_bt_hci_if_t *p_hci_if)
this function enable bluetooth test mode
tls_bt_ssp_reply
tls_bt_status_t tls_bt_ssp_reply(const tls_bt_addr_t *bd_addr, tls_bt_ssp_variant_t variant, uint8_t accept, uint32_t passkey)
reply the ssp request
tls_bt_ctrl_if_register
tls_bt_status_t tls_bt_ctrl_if_register(const tls_bt_host_if_t *p_host_if)
this function register the host stack receive message function and indication the controller receive ...
wm_bt_def.h
Bluetooth Define.
tls_bt_disable
tls_bt_status_t tls_bt_disable()
tls_bt_host_cleanup
tls_bt_status_t tls_bt_host_cleanup(void)
tls_bt_set_mesh_mode
tls_bt_status_t tls_bt_set_mesh_mode(uint8_t enable)
this function enable controller to running in mesh mode or not
tls_bt_start_discovery
tls_bt_status_t tls_bt_start_discovery(void)
tls_bt_ssp_variant_t
tls_bt_ssp_variant_t
Definition: wm_bt_def.h:288
tls_bt_ctrl_wakeup
tls_bt_status_t tls_bt_ctrl_wakeup(void)
this function wake up the controller, in other words exit sleep mode
tls_bt_ctrl_if_unregister
tls_bt_status_t tls_bt_ctrl_if_unregister()
this function unregister the host stack receive message function and indication the controller receiv...
tls_ble_set_tx_power
tls_bt_status_t tls_ble_set_tx_power(tls_ble_power_type_t power_type, int8_t power_level_index)
configure the ble emit power of different ble handle type
tls_bredr_sco_datapath_set
tls_bt_status_t tls_bredr_sco_datapath_set(tls_sco_data_path_t data_path)
configure the voice output path
tls_bt_create_bond
tls_bt_status_t tls_bt_create_bond(const tls_bt_addr_t *bd_addr, int transport)
tls_bredr_set_tx_power
tls_bt_status_t tls_bredr_set_tx_power(int8_t min_power_level, int8_t max_power_level)
configure the classic/enhanced bluetooth transmit power
tls_bt_property_type_t
tls_bt_property_type_t
Definition: wm_bt_def.h:83
tls_bt_enable
tls_bt_status_t tls_bt_enable(tls_bt_host_callback_t callback, tls_bt_hci_if_t *p_hci_if, tls_bt_log_level_t log_level)
tls_bt_property_t
Definition: wm_bt_def.h:176
tls_bt_set_adapter_property
tls_bt_status_t tls_bt_set_adapter_property(const tls_bt_property_t *property, uint8_t update_to_flash)
set the adapter property
exit_bt_test_mode
tls_bt_status_t exit_bt_test_mode()
this function exit bluetooth test mode
tls_bt_ctrl_enable
tls_bt_status_t tls_bt_ctrl_enable(tls_bt_hci_if_t *p_hci_if, tls_bt_log_level_t log_level)
enable the bluetooth controller stack
tls_bt_register_pending_process_callback
tls_bt_status_t tls_bt_register_pending_process_callback(tls_bt_app_pending_process_func_ptr process_ptr)
this function register blocking operation function(eg. flash read/write).
tls_bt_hci_if_t
Definition: wm_bt_def.h:392
tls_bt_host_if_t
Definition: wm_bt_def.h:424
tls_rf_bt_mode
void tls_rf_bt_mode(uint8_t enable)
this function enable rf to bluetooth mode
tls_bt_ctrl_disable
tls_bt_status_t tls_bt_ctrl_disable(void)
disable the bluetooth controller stack
tls_bt_cancel_discovery
tls_bt_status_t tls_bt_cancel_discovery(void)
tls_bt_cancel_bond
tls_bt_status_t tls_bt_cancel_bond(const tls_bt_addr_t *bd_addr)
tls_bt_vuart_host_send_packet
tls_bt_status_t tls_bt_vuart_host_send_packet(uint8_t *data, uint16_t len)
this function receive the hci message from host hci_h4 inteface
tls_bt_pin_reply
tls_bt_status_t tls_bt_pin_reply(const tls_bt_addr_t *bd_addr, uint8_t accept, uint8_t pin_len, tls_bt_pin_code_t *pin_code)
reply the pin request
tls_bt_get_adapter_property
tls_bt_status_t tls_bt_get_adapter_property(tls_bt_property_type_t type)
get the adapter property
tls_ble_get_tx_power
int8_t tls_ble_get_tx_power(tls_ble_power_type_t power_type)
get the ble emit power of different ble handle type
tls_bredr_get_tx_power
tls_bt_status_t tls_bredr_get_tx_power(int8_t *min_power_level, int8_t *max_power_level)
get the classic/enhanced bluetooth transmit power level
tls_bt_ctrl_sleep
tls_bt_status_t tls_bt_ctrl_sleep(bool enable)
this function configure the controller enter into sleep mode when controller is in idle mode ...


W800 SDK APIs: doxy_out/include/bt/wm_bt_av.h Source File

  • doxy_out
  • include
  • bt
wm_bt_av.h
Go to the documentation of this file.
1
11 #ifndef __WM_BT_A2DP_H__
12 #define __WM_BT_A2DP_H__
13
14 #include "wm_bt.h"
15
46 tls_bt_status_t tls_bt_av_sink_init(tls_bt_a2dp_sink_callback_t callback);
47
57 tls_bt_status_t tls_bt_av_sink_deinit(void);
58
68 tls_bt_status_t tls_bt_av_sink_connect_src(tls_bt_addr_t *bd_addr);
69
70
80 tls_bt_status_t tls_bt_av_sink_disconnect(tls_bt_addr_t *bd_addr);
81
93 tls_bt_status_t tls_bt_av_src_init(tls_bt_a2dp_src_callback_t callback);
94
104 tls_bt_status_t tls_bt_av_src_deinit(void);
105
115 tls_bt_status_t tls_bt_av_src_connect_sink(tls_bt_addr_t *bd_addr);
116
126 tls_bt_status_t tls_bt_av_src_disconnect(tls_bt_addr_t *bd_addr);
127
139 tls_bt_status_t tls_btrc_init(tls_btrc_callback_t callback);
140
150 tls_bt_status_t tls_btrc_deinit(void);
151
163 tls_bt_status_t tls_btrc_get_play_status_rsp(tls_btrc_play_status_t play_status, uint32_t song_len,
164 uint32_t song_pos);
165
176 tls_bt_status_t tls_btrc_get_element_attr_rsp(uint8_t num_attr, tls_btrc_element_attr_val_t *p_attrs);
177
189 tls_bt_status_t tls_btrc_register_notification_rsp(tls_btrc_event_id_t event_id,
190 tls_btrc_notification_type_t type, tls_btrc_register_notification_t *p_param);
191
192
205 tls_bt_status_t tls_btrc_set_volume(uint8_t volume);
206
218 tls_bt_status_t tls_btrc_ctrl_init(tls_btrc_ctrl_callback_t callback);
219
229 tls_bt_status_t tls_btrc_ctrl_deinit(void);
230
242 tls_bt_status_t tls_btrc_ctrl_send_passthrough_cmd(tls_bt_addr_t *bd_addr, uint8_t key_code, uint8_t key_state);
243
255 tls_bt_status_t tls_btrc_ctrl_send_groupnavigation_cmd(tls_bt_addr_t *bd_addr, uint8_t key_code, uint8_t key_state);
256
269 tls_bt_status_t tls_btrc_ctrl_change_player_app_setting(tls_bt_addr_t *bd_addr, uint8_t num_attrib, uint8_t *attrib_ids, uint8_t *attrib_vals);
270
271
283 tls_bt_status_t tls_btrc_ctrl_set_volume_rsp(tls_bt_addr_t *bd_addr, uint8_t abs_vol, uint8_t label);
284
285
298 tls_bt_status_t tls_btrc_ctrl_volume_change_notification_rsp(tls_bt_addr_t *bd_addr, tls_btrc_notification_type_t rsp_type,uint8_t abs_vol, uint8_t label);
299
300 #endif
tls_btrc_get_play_status_rsp
tls_bt_status_t tls_btrc_get_play_status_rsp(tls_btrc_play_status_t play_status, uint32_t song_len, uint32_t song_pos)
Returns the current play status.
tls_bt_av_sink_init
tls_bt_status_t tls_bt_av_sink_init(tls_bt_a2dp_sink_callback_t callback)
Initializes the AV interface for sink mode.
tls_btrc_get_element_attr_rsp
tls_bt_status_t tls_btrc_get_element_attr_rsp(uint8_t num_attr, tls_btrc_element_attr_val_t *p_attrs)
Returns the current songs&#39; element attributes in text.
tls_bt_status_t
tls_bt_status_t
Definition: wm_bt_def.h:14
tls_bt_av_src_disconnect
tls_bt_status_t tls_bt_av_src_disconnect(tls_bt_addr_t *bd_addr)
Tears down the AV signalling channel with the sink side.
tls_btrc_register_notification_t
Definition: wm_bt_def.h:1167
tls_btrc_ctrl_send_passthrough_cmd
tls_bt_status_t tls_btrc_ctrl_send_passthrough_cmd(tls_bt_addr_t *bd_addr, uint8_t key_code, uint8_t key_state)
Send Pass-Through command.
tls_btrc_ctrl_deinit
tls_bt_status_t tls_btrc_ctrl_deinit(void)
Closes the AVRC ctrl interface.
tls_btrc_register_notification_rsp
tls_bt_status_t tls_btrc_register_notification_rsp(tls_btrc_event_id_t event_id, tls_btrc_notification_type_t type, tls_btrc_register_notification_t *p_param)
Response to the register notification request in text.
tls_btrc_ctrl_callback_t
void(* tls_btrc_ctrl_callback_t)(tls_btrc_ctrl_evt_t event, tls_btrc_ctrl_msg_t *p_data)
Definition: wm_bt_def.h:1289
tls_btrc_ctrl_set_volume_rsp
tls_bt_status_t tls_btrc_ctrl_set_volume_rsp(tls_bt_addr_t *bd_addr, uint8_t abs_vol, uint8_t label)
Rsp for SetAbsoluteVolume Command.
tls_btrc_element_attr_val_t
Definition: wm_bt_def.h:1137
tls_btrc_set_volume
tls_bt_status_t tls_btrc_set_volume(uint8_t volume)
Send current volume setting to remote side.
tls_btrc_deinit
tls_bt_status_t tls_btrc_deinit(void)
Closes the AVRC interface.
tls_bt_av_src_init
tls_bt_status_t tls_bt_av_src_init(tls_bt_a2dp_src_callback_t callback)
Initializes the AV interface for source mode.
tls_bt_av_src_deinit
tls_bt_status_t tls_bt_av_src_deinit(void)
Shuts down the AV source interface and does the cleanup.
tls_btrc_ctrl_init
tls_bt_status_t tls_btrc_ctrl_init(tls_btrc_ctrl_callback_t callback)
Initializes the AVRC ctrl interface.
tls_bt_av_sink_disconnect
tls_bt_status_t tls_bt_av_sink_disconnect(tls_bt_addr_t *bd_addr)
Tears down the AV signalling channel with the source side.
tls_bt_a2dp_sink_callback_t
void(* tls_bt_a2dp_sink_callback_t)(tls_bt_av_evt_t event, tls_bt_av_msg_t *p_data)
Definition: wm_bt_def.h:1053
tls_btrc_callback_t
void(* tls_btrc_callback_t)(tls_btrc_evt_t event, tls_btrc_msg_t *p_data)
Definition: wm_bt_def.h:1401
tls_bt_av_sink_deinit
tls_bt_status_t tls_bt_av_sink_deinit(void)
Shuts down the AV sink interface and does the cleanup.
wm_bt.h
Bluetooth API.
tls_btrc_ctrl_change_player_app_setting
tls_bt_status_t tls_btrc_ctrl_change_player_app_setting(tls_bt_addr_t *bd_addr, uint8_t num_attrib, uint8_t *attrib_ids, uint8_t *attrib_vals)
Set current values of Player Attributes.
tls_bt_a2dp_src_callback_t
void(* tls_bt_a2dp_src_callback_t)(tls_bt_av_evt_t event, tls_bt_av_msg_t *p_data)
Definition: wm_bt_def.h:1057
tls_bt_av_src_connect_sink
tls_bt_status_t tls_bt_av_src_connect_sink(tls_bt_addr_t *bd_addr)
Establishes the AV signalling channel with the sink.
tls_btrc_init
tls_bt_status_t tls_btrc_init(tls_btrc_callback_t callback)
Initializes the AVRC interface.
tls_btrc_ctrl_send_groupnavigation_cmd
tls_bt_status_t tls_btrc_ctrl_send_groupnavigation_cmd(tls_bt_addr_t *bd_addr, uint8_t key_code, uint8_t key_state)
Send group navigation command.
tls_btrc_ctrl_volume_change_notification_rsp
tls_bt_status_t tls_btrc_ctrl_volume_change_notification_rsp(tls_bt_addr_t *bd_addr, tls_btrc_notification_type_t rsp_type, uint8_t abs_vol, uint8_t label)
Rsp for Notification of Absolute Volume.
tls_bt_av_sink_connect_src
tls_bt_status_t tls_bt_av_sink_connect_src(tls_bt_addr_t *bd_addr)
Establishes the AV signalling channel with the source.


W800 SDK APIs: doxy_out/include/wm_bt_config.h Source File

  • doxy_out
  • include
wm_bt_config.h
Go to the documentation of this file.
1
10 #ifndef __WM_BLUETOOTH_CONFIG_H__
11 #define __WM_BLUETOOTH_CONFIG_H__
12
13 #include "wm_config.h"
14
15
16 #if (TLS_CONFIG_BR_EDR == CFG_ON)
17 #define WM_BTA_AV_SINK_INCLUDED CFG_ON
18 #define WM_BTA_HFP_HSP_INCLUDED CFG_ON
19 #define WM_BTA_SPPS_INCLUDED CFG_ON
20 #define WM_BTA_SPPC_INCLUDED CFG_OFF
21 #define WM_AUDIO_BOARD_INCLUDED CFG_OFF
22 #else
23 #define WM_BTA_AV_SINK_INCLUDED CFG_OFF
24 #define WM_BTA_HFP_HSP_INCLUDED CFG_OFF
25 #define WM_BTA_SPPS_INCLUDED CFG_OFF
26 #define WM_BTA_SPPC_INCLUDED CFG_OFF
27 #endif
28
29
30 #if (TLS_CONFIG_BLE == CFG_ON)
31 #define WM_BLE_PERIPHERAL_INCLUDED CFG_ON
32 #define WM_BLE_CENTRAL_INCLUDED CFG_ON
33 #define WM_MESH_INCLUDED CFG_OFF
34 #else
35 #define WM_BLE_PERIPHERAL_INCLUDED CFG_OFF
36 #define WM_BLE_CENTRAL_INCLUDED CFG_OFF
37 #define WM_MESH_INCLUDED CFG_OFF
38 #endif
39
40 #if (WM_BTA_AV_SINK_INCLUDED == CFG_ON) || (WM_BTA_HFP_HSP_INCLUDED == CFG_ON) || (WM_BTA_SPPS_INCLUDED == CFG_ON) || (WM_BTA_SPPC_INCLUDED == CFG_ON)
41 #define WM_BT_INCLUDED CFG_ON
42 #else
43 #define WM_BT_INCLUDED CFG_OFF
44 #endif
45
46
47 #if (WM_BLE_PERIPHERAL_INCLUDED == CFG_ON) || (WM_BLE_CENTRAL_INCLUDED == CFG_ON)
48 #if NIMBLE_FTR
49 #define WM_BLE_INCLUDED CFG_OFF
50 #define WM_NIMBLE_INCLUDED CFG_ON
51 #else
52 #define WM_BLE_INCLUDED CFG_ON
53 #define WM_NIMBLE_INCLUDED CFG_OFF
54 #endif
55 #else
56 #define WM_BLE_INCLUDED CFG_OFF
57 #define WM_NIMBLE_INCLUDE CFG_OFF
58 #endif
59
60 #if (WM_BLE_CENTRAL_INCLUDED == CFG_ON)
61 #if (WM_BT_INCLUDED == CFG_ON || WM_MESH_INCLUDED == CFG_ON)
62 #define WM_BLE_MAX_CONNECTION 1
63 #else
64 #define WM_BLE_MAX_CONNECTION 7
65 #endif
66 #else
67 #define WM_BLE_MAX_CONNECTION 1
68 #endif
69
70
71
72 #endif /*__WM_WIFI_CONFIG_H__*/
73
wm_config.h
w800 chip inferface configure


W800 SDK APIs: doxy_out/include/bt/wm_bt_def.h Source File

  • doxy_out
  • include
  • bt
wm_bt_def.h
Go to the documentation of this file.
1
10 #ifndef WM_BT_DEF_H
11 #define WM_BT_DEF_H
12
14 typedef enum
15 {
16 TLS_BT_STATUS_SUCCESS,
17 TLS_BT_STATUS_FAIL,
18 TLS_BT_STATUS_NOT_READY,
19 TLS_BT_STATUS_NOMEM,
20 TLS_BT_STATUS_BUSY,
21 TLS_BT_STATUS_DONE,
22 TLS_BT_STATUS_UNSUPPORTED,
23 TLS_BT_STATUS_PARM_INVALID,
24 TLS_BT_STATUS_UNHANDLED,
25 TLS_BT_STATUS_AUTH_FAILURE,
26 TLS_BT_STATUS_RMT_DEV_DOWN,
27 TLS_BT_STATUS_AUTH_REJECTED,
28 TLS_BT_STATUS_THREAD_FAILED,
29 TLS_BT_STATUS_INTERNAL_ERROR,
30 TLS_BT_STATUS_CTRL_ENABLE_FAILED,
31 TLS_BT_STATUS_HOST_ENABLE_FAILED,
32 TLS_BT_STATUS_CTRL_DISABLE_FAILED,
33 TLS_BT_STATUS_HOST_DISABLE_FAILED,
34
35 } tls_bt_status_t;
36
37 typedef enum
38 {
39 TLS_BT_CTRL_IDLE = (1<<0),
40 TLS_BT_CTRL_ENABLED = (1<<1),
41 TLS_BT_CTRL_SLEEPING = (1<<2),
42 TLS_BT_CTRL_BLE_ROLE_MASTER = (1<<3),
43 TLS_BT_CTRL_BLE_ROLE_SLAVE = (1<<4),
44 TLS_BT_CTRL_BLE_ROLE_END = (1<<5),
45 TLS_BT_CTRL_BLE_STATE_IDLE = (1<<6),
46 TLS_BT_CTRL_BLE_STATE_ADVERTISING = (1<<7),
47 TLS_BT_CTRL_BLE_STATE_SCANNING = (1<<8),
48 TLS_BT_CTRL_BLE_STATE_INITIATING = (1<<9),
49 TLS_BT_CTRL_BLE_STATE_STOPPING = (1<<10),
50 TLS_BT_CTRL_BLE_STATE_TESTING = (1<<11),
51 } tls_bt_ctrl_status_t;
52
54 typedef enum
55 {
56 WM_BT_STATE_OFF,
57 WM_BT_STATE_ON
58 } tls_bt_state_t;
59
61 typedef enum
62 {
63 WM_BT_ADAPTER_STATE_CHG_EVT = (0x01<<0),
64 WM_BT_ADAPTER_PROP_CHG_EVT = (0x01<<1),
65 WM_BT_RMT_DEVICE_PROP_EVT = (0x01<<2),
66 WM_BT_DEVICE_FOUND_EVT = (0x01<<3),
67 WM_BT_DISCOVERY_STATE_CHG_EVT=(0x01<<4),
68 WM_BT_REQUEST_EVT = (0x01<<5),
69 WM_BT_SSP_REQUEST_EVT = (0x01<<6),
70 WM_BT_PIN_REQUEST_EVT = (0x01<<7),
71 WM_BT_BOND_STATE_CHG_EVT = (0x01<<8),
72 WM_BT_ACL_STATE_CHG_EVT = (0x01<<9),
73 WM_BT_ENERGY_INFO_EVT = (0x01<<10),
74 WM_BT_LE_TEST_EVT = (0x01<<11),
75 } tls_bt_host_evt_t;
76
77 typedef struct
78 {
79 tls_bt_state_t status;
80 } tls_bt_adapter_state_change_msg_t;
81
83 typedef enum
84 {
85 /* Properties common to both adapter and remote device */
91 WM_BT_PROPERTY_BDNAME = 0x1,
97 WM_BT_PROPERTY_BDADDR,
103 WM_BT_PROPERTY_UUIDS,
109 WM_BT_PROPERTY_CLASS_OF_DEVICE,
115 WM_BT_PROPERTY_TYPE_OF_DEVICE,
121 WM_BT_PROPERTY_SERVICE_RECORD,
122
123 /* Properties unique to adapter */
129 WM_BT_PROPERTY_ADAPTER_SCAN_MODE,
136 WM_BT_PROPERTY_ADAPTER_BONDED_DEVICES,
142 WM_BT_PROPERTY_ADAPTER_DISCOVERY_TIMEOUT,
143
144 /* Properties unique to remote device */
150 WM_BT_PROPERTY_REMOTE_FRIENDLY_NAME,
156 WM_BT_PROPERTY_REMOTE_RSSI,
163 WM_BT_PROPERTY_REMOTE_VERSION_INFO,
164
170 WM_BT_PROPERTY_LOCAL_LE_FEATURES,
171
172 WM_BT_PROPERTY_REMOTE_DEVICE_TIMESTAMP = 0xFF,
173 } tls_bt_property_type_t;
174
176 typedef struct
177 {
178 tls_bt_property_type_t type;
179 int len;
180 void *val;
181 } tls_bt_property_t;
182
183 typedef struct
184 {
185 tls_bt_status_t status;
186 int num_properties;
187 tls_bt_property_t *properties;
188 } tls_bt_adapter_prop_msg_t;
189
190 typedef enum
191 {
192 WM_BLE_SCAN_STOP = 0,
193 WM_BLE_SCAN_PASSIVE = 1,
194 WM_BLE_SCAN_ACTIVE = 2,
195
196 } wm_ble_scan_type_t;
197
198 typedef enum
199 {
200 WM_BLE_ADV_DATA = 0,
201 WM_BLE_ADV_RSP_DATA,
202 } wm_ble_gap_data_t;
203
204 typedef enum{
205 WM_BLE_ADV_STOP = 0,
206 WM_BLE_ADV_IND,
207 WM_BLE_ADV_DIRECT_IND_HDC, /*<high duty cycle, directed advertising>*/
208 WM_BLE_ADV_SCAN_IND,
209 WM_BLE_ADV_NONCONN_IND,
210 WM_BLE_ADV_DIRECT_IND_LDC, /*<low duty cycle, directed advertising>*/
211 } wm_ble_adv_type_t;
212
213 #define WM_BLE_GAP_EVENT_CONNECT (0x01<<0)
214 #define WM_BLE_GAP_EVENT_DISCONNECT (0x01<<1)
215 /* Reserved 2 */
216 #define WM_BLE_GAP_EVENT_CONN_UPDATE (0x01<<3)
217 #define WM_BLE_GAP_EVENT_CONN_UPDATE_REQ (0x01<<4)
218 #define WM_BLE_GAP_EVENT_L2CAP_UPDATE_REQ (0x01<<5)
219 #define WM_BLE_GAP_EVENT_TERM_FAILURE (0x01<<6)
220 #define WM_BLE_GAP_EVENT_DISC (0x01<<7)
221 #define WM_BLE_GAP_EVENT_DISC_COMPLETE (0x01<<8)
222 #define WM_BLE_GAP_EVENT_ADV_COMPLETE (0x01<<9)
223 #define WM_BLE_GAP_EVENT_ENC_CHANGE (0x01<<10)
224 #define WM_BLE_GAP_EVENT_PASSKEY_ACTION (0x01<<11)
225 #define WM_BLE_GAP_EVENT_NOTIFY_RX (0x01<<12)
226 #define WM_BLE_GAP_EVENT_NOTIFY_TX (0x01<<13)
227 #define WM_BLE_GAP_EVENT_SUBSCRIBE (0x01<<14)
228 #define WM_BLE_GAP_EVENT_MTU (0x01<<15)
229 #define WM_BLE_GAP_EVENT_IDENTITY_RESOLVED (0x01<<16)
230 #define WM_BLE_GAP_EVENT_REPEAT_PAIRING (0x01<<17)
231 #define WM_BLE_GAP_EVENT_PHY_UPDATE_COMPLETE (0x01<<18)
232 #define WM_BLE_GAP_EVENT_EXT_DISC (0x01<<19)
233 #define WM_BLE_GAP_EVENT_PERIODIC_SYNC (0x01<<20)
234 #define WM_BLE_GAP_EVENT_PERIODIC_REPORT (0x01<<21)
235 #define WM_BLE_GAP_EVENT_PERIODIC_SYNC_LOST (0x01<<22)
236 #define WM_BLE_GAP_EVENT_SCAN_REQ_RCVD (0x01<<23)
237 #define WM_BLE_GAP_EVENT_PERIODIC_TRANSFER (0x01<<24)
238 #define WM_BLE_GAP_EVENT_HOST_SHUTDOWN (0x01<<31)
239
240
242 typedef struct
243 {
244 uint8_t address[6];
245 } __attribute__((packed))tls_bt_addr_t;
246
247 typedef struct
248 {
249 tls_bt_status_t status;
250 tls_bt_addr_t *address;
251 int num_properties;
252 tls_bt_property_t *properties;
253 } tls_bt_remote_dev_prop_msg_t;
254
255 typedef struct
256 {
257 int num_properties;
258 tls_bt_property_t *properties;
259 } tls_bt_device_found_msg_t;
260
262 typedef enum
263 {
264 WM_BT_DISCOVERY_STOPPED,
265 WM_BT_DISCOVERY_STARTED
266 } tls_bt_discovery_state_t;
267
268 typedef struct
269 {
270 tls_bt_discovery_state_t state;
271 } tls_bt_discovery_state_chg_msg_t;
272
274 typedef struct
275 {
276 uint8_t name[249];
277 } __attribute__((packed))tls_bt_bdname_t;
278
279 typedef struct
280 {
281 tls_bt_addr_t *remote_bd_addr;
282 tls_bt_bdname_t *bd_name;
283 uint32_t cod;
284 uint8_t min_16_digit;
285 } tls_bt_pin_request_msg_t;
286
288 typedef enum
289 {
290 WM_BT_SSP_VARIANT_PASSKEY_CONFIRMATION,
291 WM_BT_SSP_VARIANT_PASSKEY_ENTRY,
292 WM_BT_SSP_VARIANT_CONSENT,
293 WM_BT_SSP_VARIANT_PASSKEY_NOTIFICATION
294 } tls_bt_ssp_variant_t;
295
297 typedef struct
298 {
299 uint8_t pin[16];
300 } __attribute__((packed))tls_bt_pin_code_t;
301
302 typedef struct
303 {
304 tls_bt_addr_t *remote_bd_addr;
305 tls_bt_bdname_t *bd_name;
306 uint32_t cod;
307 tls_bt_ssp_variant_t pairing_variant;
308 uint32_t pass_key;
309 } tls_bt_ssp_request_msg_t;
310
312 typedef enum
313 {
314 WM_BT_BOND_STATE_NONE,
315 WM_BT_BOND_STATE_BONDING,
316 WM_BT_BOND_STATE_BONDED
317 } tls_bt_bond_state_t;
318
319 typedef struct
320 {
321 tls_bt_status_t status;
322 tls_bt_addr_t *remote_bd_addr;
323 tls_bt_bond_state_t state;
324 } tls_bt_bond_state_chg_msg_t;
325
327 typedef enum
328 {
329 WM_BT_ACL_STATE_CONNECTED,
330 WM_BT_ACL_STATE_DISCONNECTED
331 } tls_bt_acl_state_t;
332
333 typedef struct
334 {
335 tls_bt_status_t status;
336 tls_bt_addr_t *remote_address;
337 uint8_t link_type;
338 tls_bt_acl_state_t state;
339 } tls_bt_acl_state_chg_msg_t;
340
341 typedef struct
342 {
343 uint8_t status;
344 uint8_t ctrl_state; /* stack reported state */
345 uint64_t tx_time; /* in ms */
346 uint64_t rx_time; /* in ms */
347 uint64_t idle_time; /* in ms */
348 uint64_t energy_used; /* a product of mA, V and ms */
349 } __attribute__((packed))tls_bt_activity_energy_info;
350
351 typedef struct
352 {
353 tls_bt_activity_energy_info *energy_info;
354 } tls_bt_energy_info_msg_t;
355
356 typedef struct
357 {
358 uint8_t status;
359 uint32_t count;
360 } tls_bt_ble_test_msg_t;
361
362 typedef union
363 {
364 tls_bt_adapter_state_change_msg_t adapter_state_change;
365 tls_bt_adapter_prop_msg_t adapter_prop;
366 tls_bt_remote_dev_prop_msg_t remote_device_prop;
367 tls_bt_device_found_msg_t device_found;
368 tls_bt_discovery_state_chg_msg_t discovery_state;
369 tls_bt_pin_request_msg_t pin_request;
370 tls_bt_ssp_request_msg_t ssp_request;
371 tls_bt_bond_state_chg_msg_t bond_state;
372 tls_bt_acl_state_chg_msg_t acl_state;
373 tls_bt_energy_info_msg_t energy_info;
374 tls_bt_ble_test_msg_t ble_test;
375 } tls_bt_host_msg_t;
376
378 typedef void (*tls_bt_host_callback_t)(tls_bt_host_evt_t event, tls_bt_host_msg_t *p_data);
379
380
381 typedef enum
382 {
383 TLS_BT_LOG_NONE = 0,
384 TLS_BT_LOG_ERROR = 1,
385 TLS_BT_LOG_WARNING = 2,
386 TLS_BT_LOG_API = 3,
387 TLS_BT_LOG_EVENT = 4,
388 TLS_BT_LOG_DEBUG = 5,
389 TLS_BT_LOG_VERBOSE = 6,
390 } tls_bt_log_level_t;
391
392 typedef struct
393 {
394 uint8_t uart_index;
395 uint32_t band_rate;
396 uint8_t data_bit;
397 uint8_t verify_bit;
398 uint8_t stop_bit;
399 } tls_bt_hci_if_t;
400
401 typedef enum
402 {
403 TLS_BLE_PWR_TYPE_CONN_HDL0,
404 TLS_BLE_PWR_TYPE_CONN_HDL1,
405 TLS_BLE_PWR_TYPE_CONN_HDL2,
406 TLS_BLE_PWR_TYPE_CONN_HDL3,
407 TLS_BLE_PWR_TYPE_CONN_HDL4,
408 TLS_BLE_PWR_TYPE_CONN_HDL5,
409 TLS_BLE_PWR_TYPE_CONN_HDL6,
410 TLS_BLE_PWR_TYPE_CONN_HDL7,
411 TLS_BLE_PWR_TYPE_CONN_HDL8,
412 TLS_BLE_PWR_TYPE_ADV,
413 TLS_BLE_PWR_TYPE_SCAN,
414 TLS_BLE_PWR_TYPE_DEFAULT,
415 } tls_ble_power_type_t;
416
417 typedef enum
418 {
419 WM_AUDIO_OVER_HCI = 0,
420 WM_AUDIO_INTERNAL_MODE,
421 } tls_sco_data_path_t;
422
423
424 typedef struct
425 {
426 void (*notify_controller_avaiable_hci_buffer)(int cnt);
427 void (*notify_host_recv_h4)(uint8_t *ptr, uint16_t length);
428 } tls_bt_host_if_t;
429
430
431 /*****************************************************************************
432 ** Constants and Type Definitions
433 *****************************************************************************/
434
435
437 #define WM_GATT_PERM_READ (1 << 0)
438 #define WM_GATT_PERM_READ_ENCRYPTED (1 << 1)
439 #define WM_GATT_PERM_READ_ENC_MITM (1 << 2)
440 #define WM_GATT_PERM_WRITE (1 << 4)
441 #define WM_GATT_PERM_WRITE_ENCRYPTED (1 << 5)
442 #define WM_GATT_PERM_WRITE_ENC_MITM (1 << 6)
443 #define WM_GATT_PERM_WRITE_SIGNED (1 << 7)
444 #define WM_GATT_PERM_WRITE_SIGNED_MITM (1 << 8)
447 #define WM_GATT_CHAR_PROP_BIT_BROADCAST (1 << 0)
448 #define WM_GATT_CHAR_PROP_BIT_READ (1 << 1)
449 #define WM_GATT_CHAR_PROP_BIT_WRITE_NR (1 << 2)
450 #define WM_GATT_CHAR_PROP_BIT_WRITE (1 << 3)
451 #define WM_GATT_CHAR_PROP_BIT_NOTIFY (1 << 4)
452 #define WM_GATT_CHAR_PROP_BIT_INDICATE (1 << 5)
453 #define WM_GATT_CHAR_PROP_BIT_AUTH (1 << 6)
454 #define WM_GATT_CHAR_PROP_BIT_EXT_PROP (1 << 7)
456 #define WM_BLE_MAX_ATTR_LEN 600
457
458
459
461 #ifndef WM_BLE_CLIENT_MAX
462 #define WM_BLE_CLIENT_MAX 3
463 #endif
464
466 #define WM_BLE_SERVER_MAX 4
467 #define WM_BLE_ATTRIBUTE_MAX 50
468
469 #ifndef WM_BLE_SERVER_SECURITY
470 #define WM_BLE_SERVER_SECURITY BTA_DM_BLE_SEC_NONE
471 #endif
472
473 #define WM_BLE_INVALID_IF 0xFF
474 #define WM_BLE_INVALID_CONN 0xFFFF
475
476 #define WM_BLE_GATT_TRANSPORT_LE 0x02
477 #define WM_BLE_GATT_TRANSPORT_BR_EDR 0x01
478 #define WM_BLE_GATT_TRANSPORT_LE_BR_EDR 0x03
479
480 #define WM_BLE_MAX_PDU_LENGTH 251
481
482
484 typedef enum
485 {
487 WM_BLE_CL_REGISTER_EVT,
488 WM_BLE_CL_DEREGISTER_EVT,
489 WM_BLE_CL_READ_CHAR_EVT,
490 WM_BLE_CL_WRITE_CHAR_EVT,
491 WM_BLE_CL_PREP_WRITE_EVT,
492 WM_BLE_CL_EXEC_CMPL_EVT,
493 WM_BLE_CL_SEARCH_CMPL_EVT,
494 WM_BLE_CL_SEARCH_RES_EVT,
495 WM_BLE_CL_READ_DESCR_EVT,
496 WM_BLE_CL_WRITE_DESCR_EVT,
497 WM_BLE_CL_NOTIF_EVT,
498 WM_BLE_CL_OPEN_EVT,
499 WM_BLE_CL_CLOSE_EVT,
500 WM_BLE_CL_LISTEN_EVT,
501 WM_BLE_CL_CFG_MTU_EVT,
502 WM_BLE_CL_CONGEST_EVT,
503 WM_BLE_CL_REPORT_DB_EVT,
504 WM_BLE_CL_REG_NOTIFY_EVT,
505 WM_BLE_CL_DEREG_NOTIFY_EVT,
506
507
509 WM_BLE_SE_REGISTER_EVT,
510 WM_BLE_SE_DEREGISTER_EVT,
511 WM_BLE_SE_CONNECT_EVT,
512 WM_BLE_SE_DISCONNECT_EVT,
513 WM_BLE_SE_CREATE_EVT,
514 WM_BLE_SE_ADD_INCL_SRVC_EVT,
515 WM_BLE_SE_ADD_CHAR_EVT,
516 WM_BLE_SE_ADD_CHAR_DESCR_EVT,
517 WM_BLE_SE_START_EVT,
518 WM_BLE_SE_STOP_EVT,
519 WM_BLE_SE_DELETE_EVT,
520 WM_BLE_SE_READ_EVT,
521 WM_BLE_SE_WRITE_EVT,
522 WM_BLE_SE_EXEC_WRITE_EVT,
523 WM_BLE_SE_CONFIRM_EVT,
524 WM_BLE_SE_RESP_EVT,
525 WM_BLE_SE_CONGEST_EVT,
526 WM_BLE_SE_MTU_EVT,
527
528 } tls_ble_evt_t;
529
530 /* WM BLE Client Host callback events */
531 /* Client callback function events */
532
534 typedef struct
535 {
536 uint8_t uu[16];
537 } tls_bt_uuid_t;
538
539 /* callback event data for WM_BLE_CL_REGISTER_EVT/ event */
540 typedef struct
541 {
542 uint8_t status;
543 uint8_t client_if;
544 tls_bt_uuid_t app_uuid;
546 } tls_ble_cl_register_msg_t;
547
549 typedef struct
550 {
551 uint16_t conn_id;
552 uint8_t status;
553 uint16_t handle;
554 uint16_t len;
555 uint8_t *value;
556 uint16_t value_type;
557 } tls_ble_cl_read_msg_t;
558
560 typedef struct
561 {
562 uint16_t conn_id;
563 uint8_t status;
564 uint16_t handle;
565 } tls_ble_cl_write_msg_t;
566
568 typedef struct
569 {
570 uint16_t conn_id;
571 uint8_t status;
572 } tls_ble_cl_exec_cmpl_msg_t;
573
575 typedef struct
576 {
577 uint16_t conn_id;
578 uint8_t status;
579 } tls_ble_cl_search_cmpl_msg_t;
580
582 typedef struct
583 {
584 uint16_t conn_id;
585 tls_bt_uuid_t uuid;
586 uint8_t inst_id;
587 } tls_ble_cl_search_res_msg_t;
588
590 typedef struct
591 {
592 uint16_t conn_id;
593 uint8_t *value;
594 uint8_t bda[6];
595 uint16_t handle;
596 uint16_t len;
597 bool is_notify;
598 } tls_ble_cl_notify_msg_t;
599
601 typedef struct
602 {
603 uint16_t conn_id;
604 uint8_t status;
605 uint8_t client_if;
606 uint8_t bd_addr[6];
607 } tls_ble_cl_open_msg_t;
608
610 typedef struct
611 {
612 uint16_t conn_id;
613 uint8_t status;
614 uint8_t client_if;
615 uint8_t remote_bda[6];
616 uint16_t reason;
617 } tls_ble_cl_close_msg_t;
618
620 typedef struct
621 {
622 uint8_t status;
623 uint8_t client_if;
624 } tls_ble_cl_listen_msg_t;
625
627 typedef struct
628 {
629 uint16_t conn_id;
630 uint8_t status;
631 uint16_t mtu;
632 } tls_ble_cl_cfg_mtu_msg_t;
633
634 typedef struct
635 {
636 uint16_t conn_id;
637 bool congested;
638 } tls_ble_cl_congest_msg_t;
639
640 typedef enum
641 {
642 WM_BTGATT_DB_PRIMARY_SERVICE,
643 WM_BTGATT_DB_SECONDARY_SERVICE,
644 WM_BTGATT_DB_INCLUDED_SERVICE,
645 WM_BTGATT_DB_CHARACTERISTIC,
646 WM_BTGATT_DB_DESCRIPTOR,
647 } tls_bt_gatt_db_attribute_type_t;
648
649 typedef struct
650 {
651 uint16_t id;
652 tls_bt_uuid_t uuid;
653 tls_bt_gatt_db_attribute_type_t type;
654 uint16_t attribute_handle;
655
656 /*
657 * If |type| is |BTGATT_DB_PRIMARY_SERVICE|, or
658 * |BTGATT_DB_SECONDARY_SERVICE|, this contains the start and end attribute
659 * handles.
660 */
661 uint16_t start_handle;
662 uint16_t end_handle;
663
664 /*
665 * If |type| is |BTGATT_DB_CHARACTERISTIC|, this contains the properties of
666 * the characteristic.
667 */
668 uint8_t properties;
669 } tls_btgatt_db_element_t;
670
671 typedef struct
672 {
673 uint16_t conn_id;
674 tls_btgatt_db_element_t *db;
675 int count;
676 uint8_t status;
677 } tls_ble_cl_gatt_db_msg_t;
678
679 typedef struct
680 {
681 uint16_t conn_id;
682 uint8_t status;
683 bool reg;
684 uint16_t handle;
685
686 } tls_ble_cl_reg_notify_msg_t;
687
688
689 /* WM BLE Server Host callback events */
690 /* Server callback function events */
691
693 typedef struct
694 {
695 uint8_t status; /* operation status */
696 uint8_t server_if; /* Server interface ID */
697 tls_bt_uuid_t app_uuid;
698 } tls_ble_se_register_msg_t;
699
701 typedef struct
702 {
703 uint16_t conn_id;
704 uint8_t server_if;
705 bool connected;
706 uint16_t reason;
707 uint8_t addr[6];
708 } tls_ble_se_connect_msg_t;
709
710 typedef tls_ble_se_connect_msg_t tls_ble_se_disconnect_msg_t;
711
713 typedef struct
714 {
715 uint8_t status;
716 uint8_t server_if;
717 bool is_primary;
718 uint8_t inst_id;
719 tls_bt_uuid_t uuid;
720 uint16_t service_id;
721 } tls_ble_se_create_msg_t;
722
724 typedef struct
725 {
726 uint8_t status;
727 uint8_t server_if;
728 uint16_t service_id;
729 uint16_t attr_id;
730 } tls_ble_se_add_incl_srvc_msg_t;
731
733 typedef struct
734 {
735 uint8_t status;
736 uint8_t server_if;
737 tls_bt_uuid_t uuid;
738 uint16_t service_id;
739 uint16_t attr_id;
740 } tls_ble_se_add_char_msg_t;
741
742 typedef tls_ble_se_add_char_msg_t tls_ble_se_add_char_descr_msg_t;
743
744
745
747 typedef struct
748 {
749 uint8_t status;
750 uint8_t server_if;
751 uint16_t service_id;
752 } tls_ble_se_start_msg_t;
753
754 typedef tls_ble_se_start_msg_t tls_ble_se_stop_msg_t;
755
756 typedef tls_ble_se_start_msg_t tls_ble_se_delete_msg_t;
757
758 typedef struct
759 {
760 uint16_t conn_id;
761 uint32_t trans_id;
762 uint8_t remote_bda[6];
763 uint16_t handle;
764 uint16_t offset;
765 bool is_long;
766 } tls_ble_se_read_msg_t;
767
768 typedef struct
769 {
770 uint16_t conn_id;
771 uint32_t trans_id;
772 uint8_t remote_bda[6];
773 uint16_t handle;
774 uint16_t offset;
775 uint16_t len;
776 bool need_rsp;
777 bool is_prep;
778 uint8_t *value;
779 } tls_ble_se_write_msg_t;
780
781 typedef struct
782 {
783 uint16_t conn_id;
784 uint32_t trans_id;
785 uint8_t remote_bda[6];
786 uint8_t exec_write;
787 } tls_ble_se_exec_write_msg_t;
788
789 typedef struct
790 {
791 uint16_t conn_id;
792 uint8_t status;
794 } tls_ble_se_confirm_msg_t;
795
796 typedef struct
797 {
798
799 uint8_t status; /* operation status */
800 uint16_t conn_id;
801 uint16_t trans_id;
802
803 } tls_ble_se_response_msg_t;
804
805 typedef struct
806 {
807 uint16_t conn_id;
808 bool congested;
809 } tls_ble_se_congest_msg_t;
810
811 typedef struct
812 {
813 uint16_t conn_id;
814 uint16_t mtu;
815 } tls_ble_se_mtu_msg_t;
816
817
819 typedef union
820 {
821 tls_ble_cl_register_msg_t cli_register;
822 tls_ble_cl_read_msg_t cli_read;
823 tls_ble_cl_write_msg_t cli_write;
824 tls_ble_cl_exec_cmpl_msg_t cli_exec_cmpl;
825 tls_ble_cl_search_cmpl_msg_t cli_search_cmpl;
826 tls_ble_cl_search_res_msg_t cli_search_res;
827 tls_ble_cl_notify_msg_t cli_notif;
828 tls_ble_cl_open_msg_t cli_open;
829 tls_ble_cl_close_msg_t cli_close;
830 tls_ble_cl_listen_msg_t cli_listen;
831 tls_ble_cl_cfg_mtu_msg_t cli_cfg_mtu;
832 tls_ble_cl_congest_msg_t cli_congest;
833 tls_ble_cl_gatt_db_msg_t cli_db; /* WM_BLE_CL_REPORT_DB_EVT*/
834 tls_ble_cl_reg_notify_msg_t cli_reg_notify;
835
836
837 tls_ble_se_register_msg_t ser_register;
838 tls_ble_se_connect_msg_t ser_connect;
839 tls_ble_se_disconnect_msg_t ser_disconnect;
840 tls_ble_se_create_msg_t ser_create;
841 tls_ble_se_add_incl_srvc_msg_t ser_add_incl_srvc;
842 tls_ble_se_add_char_msg_t ser_add_char;
843 tls_ble_se_add_char_descr_msg_t ser_add_char_descr;
844 tls_ble_se_start_msg_t ser_start_srvc;
845 tls_ble_se_stop_msg_t ser_stop_srvc;
846 tls_ble_se_delete_msg_t ser_delete_srvc;
847 tls_ble_se_read_msg_t ser_read;
848 tls_ble_se_write_msg_t ser_write;
849 tls_ble_se_exec_write_msg_t ser_exec_write;
850 tls_ble_se_confirm_msg_t ser_confirm;
851 tls_ble_se_congest_msg_t ser_congest;
852 tls_ble_se_mtu_msg_t ser_mtu;
853 tls_ble_se_response_msg_t ser_resp;
854
855 } tls_ble_msg_t;
856
858 typedef void (*tls_ble_callback_t)(tls_ble_evt_t event, tls_ble_msg_t *p_data);
859
860 typedef void (*tls_ble_output_func_ptr)(uint8_t *p_data, uint32_t length);
861
862
864 typedef enum
865 {
866 WM_BLE_DM_SET_ADV_DATA_CMPL_EVT = (0x01<<0),
867 WM_BLE_DM_TIMER_EXPIRED_EVT = (0x01<<1),
868 WM_BLE_DM_TRIGER_EVT = (0x01<<2),
869 WM_BLE_DM_SCAN_RES_EVT = (0x01<<3),
870 WM_BLE_DM_SET_SCAN_PARAM_CMPL_EVT=(0x01<<4),
871 WM_BLE_DM_REPORT_RSSI_EVT = (0x01<<5),
872 WM_BLE_DM_SCAN_RES_CMPL_EVT = (0x01<<6),
873 WM_BLE_DM_SEC_EVT = (0x01<<7),
874 WM_BLE_DM_ADV_STARTED_EVT = (0x01<<8),
875 WM_BLE_DM_ADV_STOPPED_EVT = (0x01<<9),
876 WM_BLE_DM_HOST_SHUTDOWN_EVT = (0x01<<31),
877
878 } tls_ble_dm_evt_t;
879
880
882 typedef struct
883 {
884 uint8_t status;
885 } tls_ble_dm_set_adv_data_cmpl_msg_t;
886
887 typedef struct
888 {
889 uint8_t status;
890 uint8_t dm_id; //dummy value; who care this value;
891 } tls_ble_dm_set_scan_param_cmpl_msg_t;
892
893 typedef struct
894 {
895 uint32_t id;
896 int32_t func_ptr;
897 } tls_ble_dm_timer_expired_msg_t;
898
899 typedef tls_ble_dm_timer_expired_msg_t tls_ble_dm_evt_triger_msg_t;
900
901 typedef struct
902 {
903 uint8_t address[6];
904 int8_t rssi;
905 uint8_t *value;
906 } tls_ble_dm_scan_res_msg_t;
907
908 typedef struct
909 {
910 uint8_t address[6];
911 int8_t rssi;
912 uint8_t status;
913 } tls_ble_report_rssi_msg_t;
914 typedef struct
915 {
916 uint8_t address[6];
917 int8_t transport;
918 uint8_t status;
919 } tls_ble_sec_msg_t;
920
921 typedef struct
922 {
923 uint16_t num_responses;
924 } tls_ble_dm_scan_res_cmpl_msg_t;
925
926 typedef tls_ble_dm_set_adv_data_cmpl_msg_t tls_ble_dm_adv_cmpl_msg_t;
927 typedef union
928 {
929 tls_ble_dm_set_adv_data_cmpl_msg_t dm_set_adv_data_cmpl;
930 tls_ble_dm_timer_expired_msg_t dm_timer_expired;
931 tls_ble_dm_evt_triger_msg_t dm_evt_trigered;
932 tls_ble_dm_scan_res_msg_t dm_scan_result;
933 tls_ble_dm_set_scan_param_cmpl_msg_t dm_set_scan_param_cmpl;
934 tls_ble_dm_scan_res_cmpl_msg_t dm_scan_result_cmpl;
935 tls_ble_report_rssi_msg_t dm_report_rssi;
936 tls_ble_sec_msg_t dm_sec_result;
937 tls_ble_dm_adv_cmpl_msg_t dm_adv_cmpl;
938
939 } tls_ble_dm_msg_t;
940
941 typedef struct
942 {
943 bool set_scan_rsp;
944 bool include_name;
945 bool include_txpower;
946 bool pure_data;
947 int min_interval;
948 int max_interval;
949 int appearance;
950 uint16_t manufacturer_len;
951 uint8_t manufacturer_data[31];
952 uint16_t service_data_len;
953 uint8_t service_data[31];
954 uint16_t service_uuid_len;
955 uint8_t service_uuid[31];
956 } __attribute__((packed)) tls_ble_dm_adv_data_t;
957
958 typedef struct
959 {
960 uint16_t adv_int_min; /* minimum adv interval */
961 uint16_t adv_int_max; /* maximum adv interval */
962 tls_bt_addr_t *dir_addr;
963 } __attribute__((packed)) tls_ble_dm_adv_param_t;
964
965 typedef struct
966 {
967 uint16_t adv_int_min; /* minimum adv interval */
968 uint16_t adv_int_max; /* maximum adv interval */
969 uint8_t adv_type;
970 uint8_t own_addr_type;
971 uint8_t chnl_map;
972 uint8_t afp;
973 uint8_t peer_addr_type;
974 tls_bt_addr_t *dir_addr;
975 } __attribute__((packed)) tls_ble_dm_adv_ext_param_t;
976
977
979 typedef void (*tls_ble_dm_callback_t)(tls_ble_dm_evt_t event, tls_ble_dm_msg_t *p_data);
980
982 typedef void (*tls_ble_dm_timer_callback_t)(uint8_t timer_id);
983
985 typedef void (*tls_ble_dm_triger_callback_t)(uint32_t evt_id);
986
987 typedef void (*tls_ble_scan_res_notify_t)(tls_ble_dm_scan_res_msg_t *msg);
988
989 /*********************************************************************************************************/
990 /* Bluetooth AV connection states */
991 typedef enum
992 {
993 WM_BTAV_CONNECTION_STATE_DISCONNECTED = 0,
994 WM_BTAV_CONNECTION_STATE_CONNECTING,
995 WM_BTAV_CONNECTION_STATE_CONNECTED,
996 WM_BTAV_CONNECTION_STATE_DISCONNECTING
997 } tls_btav_connection_state_t;
998
999 /* Bluetooth AV datapath states */
1000 typedef enum
1001 {
1002 WM_BTAV_AUDIO_STATE_REMOTE_SUSPEND = 0,
1003 WM_BTAV_AUDIO_STATE_STOPPED,
1004 WM_BTAV_AUDIO_STATE_STARTED,
1005 } tls_btav_audio_state_t;
1006
1008 typedef enum
1009 {
1010 WMBT_A2DP_CONNECTION_STATE_EVT,
1011 WMBT_A2DP_AUDIO_STATE_EVT,
1012 WMBT_A2DP_AUDIO_CONFIG_EVT,
1013 WMBT_A2DP_AUDIO_PAYLOAD_EVT,
1014 } tls_bt_av_evt_t;
1015
1016 typedef struct
1017 {
1018 tls_btav_connection_state_t stat;
1019 tls_bt_addr_t *bd_addr;
1020 } tls_bt_av_connection_state_t;
1021
1022 typedef struct
1023 {
1024 tls_btav_audio_state_t stat;
1025 tls_bt_addr_t *bd_addr;
1026 } tls_bt_av_audio_state_t;
1027
1028 typedef struct
1029 {
1030 tls_bt_addr_t *bd_addr;
1031 uint32_t sample_rate;
1032 uint8_t channel_count;
1033 } tls_bt_av_audio_config_t;
1034
1035 typedef struct
1036 {
1037 tls_bt_addr_t *bd_addr;
1038 uint8_t audio_format;
1039 uint8_t *payload;
1040 uint16_t payload_length;
1041 } tls_bt_av_audio_payload_t;
1042
1043 typedef union
1044 {
1045 tls_bt_av_connection_state_t av_connection_state;
1046 tls_bt_av_audio_state_t av_audio_state;
1047 tls_bt_av_audio_config_t av_audio_config;
1048 tls_bt_av_audio_payload_t av_audio_payload;
1049
1050 } tls_bt_av_msg_t;
1051
1053 typedef void (*tls_bt_a2dp_sink_callback_t)(tls_bt_av_evt_t event, tls_bt_av_msg_t *p_data);
1054
1056 typedef void (*tls_bt_a2dp_src_callback_t)(tls_bt_av_evt_t event, tls_bt_av_msg_t *p_data);
1058
1059
1062 #define WM_BTRC_MAX_ATTR_STR_LEN 255
1063 #define WM_BTRC_UID_SIZE 8
1064 #define WM_BTRC_MAX_APP_SETTINGS 8
1065 #define WM_BTRC_MAX_FOLDER_DEPTH 4
1066 #define WM_BTRC_MAX_APP_ATTR_SIZE 16
1067 #define WM_BTRC_MAX_ELEM_ATTR_SIZE 7
1068
1069 typedef uint8_t tls_btrc_uid_t[WM_BTRC_UID_SIZE];
1070 typedef enum
1071 {
1072 WM_BTRC_PLAYSTATE_STOPPED = 0x00, /* Stopped */
1073 WM_BTRC_PLAYSTATE_PLAYING = 0x01, /* Playing */
1074 WM_BTRC_PLAYSTATE_PAUSED = 0x02, /* Paused */
1075 WM_BTRC_PLAYSTATE_FWD_SEEK = 0x03, /* Fwd Seek*/
1076 WM_BTRC_PLAYSTATE_REV_SEEK = 0x04, /* Rev Seek*/
1077 WM_BTRC_PLAYSTATE_ERROR = 0xFF, /* Error */
1078 } tls_btrc_play_status_t;
1079
1080 typedef enum
1081 {
1082 WM_BTRC_FEAT_NONE = 0x00, /* AVRCP 1.0 */
1083 WM_BTRC_FEAT_METADATA = 0x01, /* AVRCP 1.3 */
1084 WM_BTRC_FEAT_ABSOLUTE_VOLUME = 0x02, /* Supports TG role and volume sync */
1085 WM_BTRC_FEAT_BROWSE = 0x04, /* AVRCP 1.4 and up, with Browsing support */
1086 } tls_btrc_remote_features_t;
1087 typedef enum
1088 {
1089 WM_BTRC_NOTIFICATION_TYPE_INTERIM = 0,
1090 WM_BTRC_NOTIFICATION_TYPE_CHANGED = 1,
1091 } tls_btrc_notification_type_t;
1092
1093 typedef enum
1094 {
1095 WM_BTRC_PLAYER_ATTR_EQUALIZER = 0x01,
1096 WM_BTRC_PLAYER_ATTR_REPEAT = 0x02,
1097 WM_BTRC_PLAYER_ATTR_SHUFFLE = 0x03,
1098 WM_BTRC_PLAYER_ATTR_SCAN = 0x04,
1099 } tls_btrc_player_attr_t;
1100
1101 typedef enum
1102 {
1103 WM_BTRC_MEDIA_ATTR_TITLE = 0x01,
1104 WM_BTRC_MEDIA_ATTR_ARTIST = 0x02,
1105 WM_BTRC_MEDIA_ATTR_ALBUM = 0x03,
1106 WM_BTRC_MEDIA_ATTR_TRACK_NUM = 0x04,
1107 WM_BTRC_MEDIA_ATTR_NUM_TRACKS = 0x05,
1108 WM_BTRC_MEDIA_ATTR_GENRE = 0x06,
1109 WM_BTRC_MEDIA_ATTR_PLAYING_TIME = 0x07,
1110 } tls_btrc_media_attr_t;
1111
1112 typedef enum
1113 {
1114 WM_BTRC_PLAYER_VAL_OFF_REPEAT = 0x01,
1115 WM_BTRC_PLAYER_VAL_SINGLE_REPEAT = 0x02,
1116 WM_BTRC_PLAYER_VAL_ALL_REPEAT = 0x03,
1117 WM_BTRC_PLAYER_VAL_GROUP_REPEAT = 0x04
1118 } tls_btrc_player_repeat_val_t;
1119
1120 typedef enum
1121 {
1122 WM_BTRC_EVT_PLAY_STATUS_CHANGED = 0x01,
1123 WM_BTRC_EVT_TRACK_CHANGE = 0x02,
1124 WM_BTRC_EVT_TRACK_REACHED_END = 0x03,
1125 WM_BTRC_EVT_TRACK_REACHED_START = 0x04,
1126 WM_BTRC_EVT_PLAY_POS_CHANGED = 0x05,
1127 WM_BTRC_EVT_APP_SETTINGS_CHANGED = 0x08,
1128 } tls_btrc_event_id_t;
1129
1130 typedef struct
1131 {
1132 uint8_t num_attr;
1133 uint8_t attr_ids[WM_BTRC_MAX_APP_SETTINGS];
1134 uint8_t attr_values[WM_BTRC_MAX_APP_SETTINGS];
1135 } tls_btrc_player_settings_t;
1136
1137 typedef struct
1138 {
1139 uint32_t attr_id;
1140 uint8_t text[WM_BTRC_MAX_ATTR_STR_LEN];
1141 } tls_btrc_element_attr_val_t;
1142
1143 typedef struct
1144 {
1145 uint8_t attr_id;
1146 uint8_t num_val;
1147 uint8_t attr_val[WM_BTRC_MAX_APP_ATTR_SIZE];
1148 } tls_btrc_player_app_attr_t;
1149 typedef struct
1150 {
1151 uint8_t val;
1152 uint16_t charset_id;
1153 uint16_t str_len;
1154 uint8_t *p_str;
1155 } tls_btrc_player_app_ext_attr_val_t;
1156
1157 typedef struct
1158 {
1159 uint8_t attr_id;
1160 uint16_t charset_id;
1161 uint16_t str_len;
1162 uint8_t *p_str;
1163 uint8_t num_val;
1164 tls_btrc_player_app_ext_attr_val_t ext_attr_val[WM_BTRC_MAX_APP_ATTR_SIZE];
1165 } tls_btrc_player_app_ext_attr_t;
1166
1167 typedef union
1168 {
1169 tls_btrc_play_status_t play_status;
1170 tls_btrc_uid_t track; /* queue position in NowPlaying */
1171 uint32_t song_pos;
1172 tls_btrc_player_settings_t player_setting;
1173 } tls_btrc_register_notification_t;
1174
1175
1176 typedef enum
1177 {
1178 WM_BTRC_PASSTHROUGH_RSP_EVT,
1179 WM_BTRC_GROUPNAVIGATION_RSP_EVT,
1180 WM_BTRC_CONNECTION_STATE_EVT,
1181 WM_BTRC_CTRL_GETRCFEATURES_EVT,
1182 WM_BTRC_CTRL_SETPLAYERAPPLICATIONSETTING_RSP_EVT,
1183 WM_BTRC_CTRL_PLAYERAPPLICATIONSETTING_EVT,
1184 WM_BTRC_CTRL_PLAYERAPPLICATIONSETTING_CHANGED_EVT,
1185 WM_BTRC_CTRL_SETABSVOL_CMD_EVT,
1186 WM_BTRC_CTRL_REGISTERNOTIFICATION_ABS_VOL_EVT,
1187 WM_BTRC_CTRL_TRACK_CHANGED_EVT,
1188 WM_BTRC_CTRL_PLAY_POSITION_CHANGED_EVT,
1189 WM_BTRC_CTRL_PLAY_STATUS_CHANGED_EVT,
1190 } tls_btrc_ctrl_evt_t;
1191
1192 typedef struct
1193 {
1194 int id;
1195 int key_state;
1196 } tls_btrc_passthrough_rsp_msg_t;
1197
1198 typedef struct
1199 {
1200 int id;
1201 int key_state;
1202 } tls_btrc_groupnavigation_rsp_msg_t;
1203
1204 typedef struct
1205 {
1206 uint8_t state;
1207 tls_bt_addr_t *bd_addr;
1208 } tls_btrc_connection_state_msg_t;
1209
1210 typedef struct
1211 {
1212 tls_bt_addr_t *bd_addr;
1213 int features;
1214 } tls_btrc_ctrl_getrcfeatures_msg_t;
1215
1216 typedef struct
1217 {
1218 tls_bt_addr_t *bd_addr;
1219 uint8_t abs_vol;
1220 uint8_t label;
1221 } tls_btrc_ctrl_setabsvol_msg_t;
1222
1223 typedef struct
1224 {
1225 tls_bt_addr_t *bd_addr;
1226 uint8_t label;
1227 } tls_btrc_ctrl_registernotification_abs_vol_msg_t;
1228
1229 typedef struct
1230 {
1231 tls_bt_addr_t *bd_addr;
1232 uint8_t accepted;
1233 } tls_btrc_ctrl_setplayerapplicationsetting_rsp_msg_t;
1234
1235 typedef struct
1236 {
1237 tls_bt_addr_t *bd_addr;
1238 uint8_t num_attr;
1239 tls_btrc_player_app_attr_t *app_attrs;
1240 uint8_t num_ext_attr;
1241 tls_btrc_player_app_ext_attr_t *ext_attrs;
1242 } tls_btrc_ctrl_playerapplicationsetting_msg_t;
1243
1244 typedef struct
1245 {
1246 tls_bt_addr_t *bd_addr;
1247 tls_btrc_player_settings_t *p_vals;
1248 } tls_btrc_ctrl_playerapplicationsetting_changed_msg_t;
1249
1250 typedef struct
1251 {
1252 tls_bt_addr_t *bd_addr;
1253 uint8_t num_attr;
1254 tls_btrc_element_attr_val_t *p_attrs;
1255
1256 } tls_btrc_ctrl_track_changed_msg_t;
1257
1258 typedef struct
1259 {
1260 tls_bt_addr_t *bd_addr;
1261 uint32_t song_len;
1262 uint32_t song_pos;
1263 } tls_btrc_ctrl_play_position_changed_msg_t;
1264
1265 typedef struct
1266 {
1267 tls_bt_addr_t *bd_addr;
1268 tls_btrc_play_status_t play_status;
1269 } tls_btrc_ctrl_play_status_changed_msg_t;
1270
1271 typedef union
1272 {
1273 tls_btrc_passthrough_rsp_msg_t passthrough_rsp;
1274 tls_btrc_groupnavigation_rsp_msg_t groupnavigation_rsp;
1275 tls_btrc_connection_state_msg_t connection_state;
1276 tls_btrc_ctrl_getrcfeatures_msg_t getrcfeatures;
1277 tls_btrc_ctrl_setabsvol_msg_t setabsvol;
1278 tls_btrc_ctrl_registernotification_abs_vol_msg_t registernotification_abs_vol;
1279 tls_btrc_ctrl_setplayerapplicationsetting_rsp_msg_t setplayerapplicationsetting_rsp;
1280 tls_btrc_ctrl_playerapplicationsetting_msg_t playerapplicationsetting;
1281 tls_btrc_ctrl_playerapplicationsetting_changed_msg_t playerapplicationsetting_changed;
1282 tls_btrc_ctrl_track_changed_msg_t track_changed;
1283 tls_btrc_ctrl_play_position_changed_msg_t play_position_changed;
1284 tls_btrc_ctrl_play_status_changed_msg_t play_status_changed;
1285
1286 } tls_btrc_ctrl_msg_t;
1287
1289 typedef void (*tls_btrc_ctrl_callback_t)(tls_btrc_ctrl_evt_t event, tls_btrc_ctrl_msg_t *p_data);
1290
1291
1292 typedef enum
1293 {
1294 WM_BTRC_REMOTE_FEATURE_EVT,
1295 WM_BTRC_GET_PLAY_STATUS_EVT,
1296 WM_BTRC_LIST_PLAYER_APP_ATTR_EVT,
1297 WM_BTRC_LIST_PLAYER_APP_VALUES_EVT,
1298 WM_BTRC_GET_PLAYER_APP_VALUE_EVT,
1299 WM_BTRC_GET_PLAYER_APP_ATTRS_TEXT_EVT,
1300 WM_BTRC_GET_PLAYER_APP_VALUES_TEXT_EVT,
1301 WM_BTRC_SET_PLAYER_APP_VALUE_EVT,
1302 WM_BTRC_GET_ELEMENT_ATTR_EVT,
1303 WM_BTRC_REGISTER_NOTIFICATION_EVT,
1304 WM_BTRC_VOLUME_CHANGED_EVT,
1305 WM_BTRC_PASSTHROUGH_CMD_EVT,
1306 } tls_btrc_evt_t;
1307
1308 typedef struct
1309 {
1310 tls_bt_addr_t *bd_addr;
1311 tls_btrc_remote_features_t features;
1312 } tls_btrc_remote_features_msg_t;
1313
1314 typedef struct
1315 {
1316 void *reserved;
1317 } tls_btrc_get_play_status_msg_t;
1318
1319 typedef struct
1320 {
1321 void *reserved;
1322 } tls_btrc_list_player_app_attr_msg_t;
1323
1324 typedef struct
1325 {
1326 tls_btrc_player_attr_t attr_id;
1327 } tls_btrc_list_player_app_values_msg_t;
1328
1329 typedef struct
1330 {
1331 uint8_t num_attr;
1332 tls_btrc_player_attr_t *p_attrs;
1333
1334 } tls_btrc_get_player_app_value_msg_t;
1335
1336 typedef struct
1337 {
1338 uint8_t attr_id;
1339 uint8_t num_val;
1340 uint8_t *p_vals;
1341 } tls_btrc_get_player_app_attrs_text_msg_t;
1342
1343 typedef struct
1344 {
1345 uint8_t num_attr;
1346 tls_btrc_player_attr_t *p_attrs;
1347
1348 } tls_btrc_get_player_app_values_text_msg_t;
1349
1350 typedef struct
1351 {
1352 tls_btrc_player_settings_t *p_vals;
1353
1354 } tls_btrc_set_player_app_value_msg_t;
1355
1356 typedef struct
1357 {
1358 uint8_t num_attr;
1359 tls_btrc_media_attr_t *p_attrs;
1360
1361 } tls_btrc_get_element_attr_msg_t;
1362
1363 typedef struct
1364 {
1365 tls_btrc_event_id_t event_id;
1366 uint32_t param;
1367
1368 } tls_btrc_register_notification_msg_t;
1369
1370 typedef struct
1371 {
1372 uint8_t volume;
1373 uint8_t ctype;
1374 } tls_btrc_volume_change_msg_t;
1375
1376 typedef struct
1377 {
1378 int id;
1379 int key_state;
1380
1381 } tls_btrc_passthrough_cmd_msg_t;
1382
1383 typedef union
1384 {
1385 tls_btrc_remote_features_msg_t remote_features;
1386 tls_btrc_get_play_status_msg_t get_play_status;
1387 tls_btrc_list_player_app_attr_msg_t list_player_app_attr;
1388 tls_btrc_list_player_app_values_msg_t list_player_app_values;
1389 tls_btrc_get_player_app_value_msg_t get_player_app_value;
1390 tls_btrc_get_player_app_attrs_text_msg_t get_player_app_attrs_text;
1391 tls_btrc_get_player_app_values_text_msg_t get_player_app_values_text;
1392 tls_btrc_set_player_app_value_msg_t set_player_app_value;
1393 tls_btrc_get_element_attr_msg_t get_element_attr;
1394 tls_btrc_register_notification_msg_t register_notification;
1395 tls_btrc_volume_change_msg_t volume_change;
1396 tls_btrc_passthrough_cmd_msg_t passthrough_cmd;
1397
1398 } tls_btrc_msg_t;
1399
1401 typedef void (*tls_btrc_callback_t)(tls_btrc_evt_t event, tls_btrc_msg_t *p_data);
1402
1403
1404
1405 /*************************************************************************************************************/
1406
1407 typedef enum
1408 {
1409 WM_BTHF_CLIENT_CONNECTION_STATE_DISCONNECTED = 0,
1410 WM_BTHF_CLIENT_CONNECTION_STATE_CONNECTING,
1411 WM_BTHF_CLIENT_CONNECTION_STATE_CONNECTED,
1412 WM_BTHF_CLIENT_CONNECTION_STATE_SLC_CONNECTED,
1413 WM_BTHF_CLIENT_CONNECTION_STATE_DISCONNECTING
1414 } tls_bthf_client_connection_state_t;
1415
1416 typedef enum
1417 {
1418 WM_BTHF_CLIENT_AUDIO_STATE_DISCONNECTED = 0,
1419 WM_BTHF_CLIENT_AUDIO_STATE_CONNECTING,
1420 WM_BTHF_CLIENT_AUDIO_STATE_CONNECTED,
1421 WM_BTHF_CLIENT_AUDIO_STATE_CONNECTED_MSBC,
1422 } tls_bthf_client_audio_state_t;
1423
1424 typedef enum
1425 {
1426 WM_BTHF_CLIENT_VR_STATE_STOPPED = 0,
1427 WM_BTHF_CLIENT_VR_STATE_STARTED
1428 } tls_bthf_client_vr_state_t;
1429
1430 typedef enum
1431 {
1432 WM_BTHF_CLIENT_VOLUME_TYPE_SPK = 0,
1433 WM_BTHF_CLIENT_VOLUME_TYPE_MIC
1434 } tls_bthf_client_volume_type_t;
1435
1436 typedef enum
1437 {
1438 WM_BTHF_CLIENT_NETWORK_STATE_NOT_AVAILABLE = 0,
1439 WM_BTHF_CLIENT_NETWORK_STATE_AVAILABLE
1440 } tls_bthf_client_network_state_t;
1441
1442 typedef enum
1443 {
1444 WM_BTHF_CLIENT_SERVICE_TYPE_HOME = 0,
1445 WM_BTHF_CLIENT_SERVICE_TYPE_ROAMING
1446 } tls_bthf_client_service_type_t;
1447
1448 typedef enum
1449 {
1450 WM_BTHF_CLIENT_CALL_STATE_ACTIVE = 0,
1451 WM_BTHF_CLIENT_CALL_STATE_HELD,
1452 WM_BTHF_CLIENT_CALL_STATE_DIALING,
1453 WM_BTHF_CLIENT_CALL_STATE_ALERTING,
1454 WM_BTHF_CLIENT_CALL_STATE_INCOMING,
1455 WM_BTHF_CLIENT_CALL_STATE_WAITING,
1456 WM_BTHF_CLIENT_CALL_STATE_HELD_BY_RESP_HOLD,
1457 } tls_bthf_client_call_state_t;
1458
1459 typedef enum
1460 {
1461 WM_BTHF_CLIENT_CALL_NO_CALLS_IN_PROGRESS = 0,
1462 WM_BTHF_CLIENT_CALL_CALLS_IN_PROGRESS
1463 } tls_bthf_client_call_t;
1464
1465 typedef enum
1466 {
1467 WM_BTHF_CLIENT_CALLSETUP_NONE = 0,
1468 WM_BTHF_CLIENT_CALLSETUP_INCOMING,
1469 WM_BTHF_CLIENT_CALLSETUP_OUTGOING,
1470 WM_BTHF_CLIENT_CALLSETUP_ALERTING
1471
1472 } tls_bthf_client_callsetup_t;
1473
1474 typedef enum
1475 {
1476 WM_BTHF_CLIENT_CALLHELD_NONE = 0,
1477 WM_BTHF_CLIENT_CALLHELD_HOLD_AND_ACTIVE,
1478 WM_BTHF_CLIENT_CALLHELD_HOLD,
1479 } tls_bthf_client_callheld_t;
1480
1481 typedef enum
1482 {
1483 WM_BTHF_CLIENT_RESP_AND_HOLD_HELD = 0,
1484 WM_BTRH_CLIENT_RESP_AND_HOLD_ACCEPT,
1485 WM_BTRH_CLIENT_RESP_AND_HOLD_REJECT,
1486 } tls_bthf_client_resp_and_hold_t;
1487
1488 typedef enum
1489 {
1490 WM_BTHF_CLIENT_CALL_DIRECTION_OUTGOING = 0,
1491 WM_BTHF_CLIENT_CALL_DIRECTION_INCOMING
1492 } tls_bthf_client_call_direction_t;
1493
1494 typedef enum
1495 {
1496 WM_BTHF_CLIENT_CALL_MPTY_TYPE_SINGLE = 0,
1497 WM_BTHF_CLIENT_CALL_MPTY_TYPE_MULTI
1498 } tls_bthf_client_call_mpty_type_t;
1499
1500 typedef enum
1501 {
1502 WM_BTHF_CLIENT_CMD_COMPLETE_OK = 0,
1503 WM_BTHF_CLIENT_CMD_COMPLETE_ERROR,
1504 WM_BTHF_CLIENT_CMD_COMPLETE_ERROR_NO_CARRIER,
1505 WM_BTHF_CLIENT_CMD_COMPLETE_ERROR_BUSY,
1506 WM_BTHF_CLIENT_CMD_COMPLETE_ERROR_NO_ANSWER,
1507 WM_BTHF_CLIENT_CMD_COMPLETE_ERROR_DELAYED,
1508 WM_BTHF_CLIENT_CMD_COMPLETE_ERROR_BLACKLISTED,
1509 WM_BTHF_CLIENT_CMD_COMPLETE_ERROR_CME
1510 } tls_bthf_client_cmd_complete_t;
1511
1512 typedef enum
1513 {
1514 WM_BTHF_CLIENT_CALL_ACTION_CHLD_0 = 0,
1515 WM_BTHF_CLIENT_CALL_ACTION_CHLD_1,
1516 WM_BTHF_CLIENT_CALL_ACTION_CHLD_2,
1517 WM_BTHF_CLIENT_CALL_ACTION_CHLD_3,
1518 WM_BTHF_CLIENT_CALL_ACTION_CHLD_4,
1519 WM_BTHF_CLIENT_CALL_ACTION_CHLD_1x,
1520 WM_BTHF_CLIENT_CALL_ACTION_CHLD_2x,
1521 WM_BTHF_CLIENT_CALL_ACTION_ATA,
1522 WM_BTHF_CLIENT_CALL_ACTION_CHUP,
1523 WM_BTHF_CLIENT_CALL_ACTION_BTRH_0,
1524 WM_BTHF_CLIENT_CALL_ACTION_BTRH_1,
1525 WM_BTHF_CLIENT_CALL_ACTION_BTRH_2,
1526 } tls_bthf_client_call_action_t;
1527
1528 typedef enum
1529 {
1530 WM_BTHF_CLIENT_SERVICE_UNKNOWN = 0,
1531 WM_BTHF_CLIENT_SERVICE_VOICE,
1532 WM_BTHF_CLIENT_SERVICE_FAX
1533 } tls_bthf_client_subscriber_service_type_t;
1534
1535 typedef enum
1536 {
1537 WM_BTHF_CLIENT_IN_BAND_RINGTONE_NOT_PROVIDED = 0,
1538 WM_BTHF_CLIENT_IN_BAND_RINGTONE_PROVIDED,
1539 } tls_bthf_client_in_band_ring_state_t;
1540
1541 /* Peer features masks */
1542 #define WM_BTHF_CLIENT_PEER_FEAT_3WAY 0x00000001 /* Three-way calling */
1543 #define WM_BTHF_CLIENT_PEER_FEAT_ECNR 0x00000002 /* Echo cancellation and/or noise reduction */
1544 #define WM_BTHF_CLIENT_PEER_FEAT_VREC 0x00000004 /* Voice recognition */
1545 #define WM_BTHF_CLIENT_PEER_FEAT_INBAND 0x00000008 /* In-band ring tone */
1546 #define WM_BTHF_CLIENT_PEER_FEAT_VTAG 0x00000010 /* Attach a phone number to a voice tag */
1547 #define WM_BTHF_CLIENT_PEER_FEAT_REJECT 0x00000020 /* Ability to reject incoming call */
1548 #define WM_BTHF_CLIENT_PEER_FEAT_ECS 0x00000040 /* Enhanced Call Status */
1549 #define WM_BTHF_CLIENT_PEER_FEAT_ECC 0x00000080 /* Enhanced Call Control */
1550 #define WM_BTHF_CLIENT_PEER_FEAT_EXTERR 0x00000100 /* Extended error codes */
1551 #define WM_BTHF_CLIENT_PEER_FEAT_CODEC 0x00000200 /* Codec Negotiation */
1552
1553 /* Peer call handling features masks */
1554 #define WM_BTHF_CLIENT_CHLD_FEAT_REL 0x00000001 /* 0 Release waiting call or held calls */
1555 #define WM_BTHF_CLIENT_CHLD_FEAT_REL_ACC 0x00000002 /* 1 Release active calls and accept other
1556 (waiting or held) cal */
1557 #define WM_BTHF_CLIENT_CHLD_FEAT_REL_X 0x00000004 /* 1x Release specified active call only */
1558 #define WM_BTHF_CLIENT_CHLD_FEAT_HOLD_ACC 0x00000008 /* 2 Active calls on hold and accept other
1559 (waiting or held) call */
1560 #define WM_BTHF_CLIENT_CHLD_FEAT_PRIV_X 0x00000010 /* 2x Request private mode with specified
1561 call (put the rest on hold) */
1562 #define WM_BTHF_CLIENT_CHLD_FEAT_MERGE 0x00000020 /* 3 Add held call to multiparty */
1563 #define WM_BTHF_CLIENT_CHLD_FEAT_MERGE_DETACH 0x00000040 /* 4 Connect two calls and leave
1564 (disconnect from) multiparty */
1565
1566
1567 typedef enum
1568 {
1569 WM_BTHF_CLIENT_CONNECTION_STATE_EVT,
1570 WM_BTHF_CLIENT_AUDIO_STATE_EVT,
1571 WM_BTHF_CLIENT_VR_CMD_EVT,
1572 WM_BTHF_CLIENT_NETWORK_STATE_EVT,
1573 WM_BTHF_CLIENT_NETWORK_ROAMING_EVT,
1574 WM_BTHF_CLIENT_NETWORK_SIGNAL_EVT,
1575 WM_BTHF_CLIENT_BATTERY_LEVEL_EVT,
1576 WM_BTHF_CLIENT_CURRENT_OPERATOR_EVT,
1577 WM_BTHF_CLIENT_CALL_EVT,
1578 WM_BTHF_CLIENT_CALLSETUP_EVT,
1579 WM_BTHF_CLIENT_CALLHELD_EVT,
1580 WM_BTHF_CLIENT_RESP_AND_HOLD_EVT,
1581 WM_BTHF_CLIENT_CLIP_EVT,
1582 WM_BTHF_CLIENT_CALL_WAITING_EVT,
1583 WM_BTHF_CLIENT_CURRENT_CALLS_EVT,
1584 WM_BTHF_CLIENT_VOLUME_CHANGE_EVT,
1585 WM_BTHF_CLIENT_CMD_COMPLETE_EVT,
1586 WM_BTHF_CLIENT_SUBSCRIBER_INFO_EVT,
1587 WM_BTHF_CLIENT_IN_BAND_RING_TONE_EVT,
1588 WM_BTHF_CLIENT_LAST_VOICE_TAG_NUMBER_EVT,
1589 WM_BTHF_CLIENT_RING_INDICATION_EVT,
1590 WM_BTHF_CLIENT_AUDIO_PAYLOAD_EVT,
1591 } tls_bthf_client_evt_t;
1592
1593 typedef struct
1594 {
1595 tls_bthf_client_connection_state_t state;
1596 unsigned int peer_feat;
1597 unsigned int chld_feat;
1598 tls_bt_addr_t *bd_addr;
1599 } tls_bthf_client_connection_state_msg_t;
1600
1601 typedef struct
1602 {
1603 tls_bthf_client_audio_state_t state;
1604 tls_bt_addr_t *bd_addr;
1605 } tls_bthf_client_audio_state_msg_t;
1606
1607 typedef struct
1608 {
1609 tls_bthf_client_vr_state_t state;
1610
1611 } tls_bthf_client_vr_cmd_msg_t;
1612
1613 typedef struct
1614 {
1615 tls_bthf_client_network_state_t state;
1616
1617 } tls_bthf_client_network_state_msg_t;
1618
1619 typedef struct
1620 {
1621 tls_bthf_client_service_type_t type;
1622
1623 } tls_bthf_client_network_roaming_msg_t;
1624
1625 typedef struct
1626 {
1627 int signal_strength;
1628
1629 } tls_bthf_client_network_signal_msg_t;
1630
1631 typedef struct
1632 {
1633 int battery_level;
1634
1635 } tls_bthf_client_battery_level_msg_t;
1636
1637 typedef struct
1638 {
1639 char* name;
1640
1641 } tls_bthf_client_current_operator_msg_t;
1642
1643 typedef struct
1644 {
1645 tls_bthf_client_call_t call;
1646
1647 } tls_bthf_client_call_msg_t;
1648
1649 typedef struct
1650 {
1651 tls_bthf_client_callsetup_t callsetup;
1652
1653 } tls_bthf_client_callsetup_msg_t;
1654
1655 typedef struct
1656 {
1657 tls_bthf_client_callheld_t callheld;
1658
1659 } tls_bthf_client_callheld_msg_t;
1660
1661 typedef struct
1662 {
1663 tls_bthf_client_resp_and_hold_t resp_and_hold;
1664
1665 } tls_bthf_client_resp_and_hold_msg_t;
1666
1667 typedef struct
1668 {
1669 char *number;
1670
1671 } tls_bthf_client_clip_msg_t;
1672
1673 typedef struct
1674 {
1675 char *number;
1676
1677 } tls_bthf_client_call_waiting_msg_t;
1678
1679 typedef struct
1680 {
1681 int index;
1682 tls_bthf_client_call_direction_t dir;
1683 tls_bthf_client_call_state_t state;
1684 tls_bthf_client_call_mpty_type_t mpty;
1685 char *number;
1686 } tls_bthf_client_current_calls_msg_t;
1687
1688 typedef struct
1689 {
1690 tls_bthf_client_volume_type_t type;
1691 int volume;
1692
1693 } tls_bthf_client_volume_change_msg_t;
1694
1695 typedef struct
1696 {
1697 tls_bthf_client_cmd_complete_t type;
1698 int cme;
1699
1700 } tls_bthf_client_cmd_complete_msg_t;
1701
1702 typedef struct
1703 {
1704 const char *name;
1705 tls_bthf_client_subscriber_service_type_t type;
1706
1707 } tls_bthf_client_subscriber_info_msg_t;
1708
1709 typedef struct
1710 {
1711 tls_bthf_client_in_band_ring_state_t state;
1712
1713 } tls_bthf_client_in_band_ring_tone_msg_t;
1714
1715 typedef struct
1716 {
1717 char *number;
1718
1719 } tls_bthf_client_last_voice_tag_number_msg_t;
1720
1721 typedef struct
1722 {
1723 int ring;
1724
1725 } tls_bthf_client_ring_indication_msg_t;
1726
1727 typedef struct
1728 {
1729 tls_bt_addr_t *bd_addr;
1730 uint8_t audio_format;
1731 uint8_t *payload;
1732 uint16_t payload_length;
1733 } tls_bthf_audio_payload_msg_t;
1734
1735
1736 typedef union
1737 {
1738 tls_bthf_client_connection_state_msg_t connection_state_msg;
1739 tls_bthf_client_audio_state_msg_t audio_state_msg;
1740 tls_bthf_client_vr_cmd_msg_t vr_cmd_msg;
1741 tls_bthf_client_network_state_msg_t network_state_msg;
1742 tls_bthf_client_network_roaming_msg_t network_roaming_msg;
1743 tls_bthf_client_network_signal_msg_t network_signal_msg;
1744 tls_bthf_client_battery_level_msg_t battery_level_msg;
1745 tls_bthf_client_current_operator_msg_t current_operator_msg;
1746 tls_bthf_client_call_msg_t call_msg;
1747 tls_bthf_client_callsetup_msg_t callsetup_msg;
1748 tls_bthf_client_callheld_msg_t callheld_msg;
1749 tls_bthf_client_resp_and_hold_msg_t resp_and_hold_msg;
1750 tls_bthf_client_clip_msg_t clip_msg;
1751 tls_bthf_client_call_waiting_msg_t call_waiting_msg;
1752 tls_bthf_client_current_calls_msg_t current_calls_msg;
1753 tls_bthf_client_volume_change_msg_t volume_change_msg;
1754 tls_bthf_client_cmd_complete_msg_t cmd_complete_msg;
1755 tls_bthf_client_subscriber_info_msg_t subscriber_info_msg;
1756 tls_bthf_client_in_band_ring_tone_msg_t in_band_ring_tone_msg;
1757 tls_bthf_client_last_voice_tag_number_msg_t last_voice_tag_number_msg;
1758 tls_bthf_client_ring_indication_msg_t ring_indication_msg;
1759 tls_bthf_audio_payload_msg_t audio_payload_msg;
1760
1761 } tls_bthf_client_msg_t;
1762
1764 typedef void (*tls_bthf_client_callback_t)(tls_bthf_client_evt_t event, tls_bthf_client_msg_t *p_data);
1765
1766
1767
1768 /******************************************************************************************/
1769 /* Security Setting Mask */
1770 #define WM_SPP_SEC_NONE 0x0000 /* No security*/
1771 #define WM_SPP_SEC_AUTHORIZE 0x0001 /*Authorization required (only needed for out going connection ) */
1772 #define WM_SPP_SEC_AUTHENTICATE 0x0012 /*Authentication required*/
1773 #define WM_SPP_SEC_ENCRYPT 0x0024 /*Encryption required*/
1774 #define WM_SPP_SEC_MODE4_LEVEL4 0x0040 /*Mode 4 level 4 service, i.e. incoming/outgoing MITM and P-256 encryption*/
1775 #define WM_SPP_SEC_MITM 0x3000 /*Man-In-The_Middle protection*/
1776 #define WM_SPP_SEC_IN_16_DIGITS 0x4000 /*Min 16 digit for pin code*/
1777 typedef uint16_t wm_spp_sec_t;
1778
1779 #define WM_SPP_MAX_SCN 31
1780
1781 typedef enum {
1782 WM_SPP_ROLE_CLIENT = 0,
1783 WM_SPP_ROLE_SERVER = 1,
1784 } tls_spp_role_t;
1785
1786 typedef enum {
1787 WM_SPP_INIT_EVT = 0,
1788 WM_SPP_DISCOVERY_COMP_EVT = 8,
1789 WM_SPP_OPEN_EVT = 26,
1790 WM_SPP_CLOSE_EVT = 27,
1791 WM_SPP_START_EVT = 28,
1792 WM_SPP_CL_INIT_EVT = 29,
1793 WM_SPP_DATA_IND_EVT = 30,
1794 WM_SPP_CONG_EVT = 31,
1795 WM_SPP_WRITE_EVT = 33,
1796 WM_SPP_SRV_OPEN_EVT = 34,
1797 } tls_spp_event_t;
1798
1799 typedef struct {
1800 uint8_t status;
1801 } tls_spp_init_msg_t ;
1802
1803 typedef struct {
1804 uint8_t status;
1805 uint8_t scn_num;
1806 uint8_t scn[WM_SPP_MAX_SCN];
1807 } tls_spp_disc_comp_msg_t;
1808
1809 typedef struct {
1810 uint8_t status;
1811 uint32_t handle;
1812 uint8_t addr[6];
1813 } tls_spp_open_msg_t;
1814
1815 typedef struct {
1816 uint8_t status;
1817 uint32_t handle;
1818 uint32_t new_listen_handle;
1819 uint8_t addr[6];
1820 } tls_spp_srv_open_msg_t;
1821
1822 typedef struct {
1823 uint8_t status;
1824 uint32_t port_status;
1825 uint32_t handle;
1826 bool local;
1827 } tls_spp_close_msg_t;
1828
1829 typedef struct {
1830 uint8_t status;
1831 uint32_t handle;
1832 uint8_t sec_id;
1833 bool use_co_rfc;
1834 } tls_spp_start_msg_t;
1835
1836 typedef struct {
1837 uint8_t status;
1838 uint32_t handle;
1839 uint8_t sec_id;
1840 bool use_co_rfc;
1841 } tls_spp_cli_init_msg_t;
1842
1843 typedef struct {
1844 uint8_t status;
1845 uint32_t handle;
1846 int length;
1847 bool congest;
1848 } tls_spp_write_msg_t;
1849
1850 typedef struct {
1851 uint8_t status;
1852 uint32_t handle;
1853 uint16_t length;
1854 uint8_t *data;
1855 } tls_spp_data_ind_msg_t;
1856
1857 typedef struct {
1858 uint8_t status;
1859 uint32_t handle;
1860 bool congest;
1861 } tls_spp_cong_msg_t;
1862
1863 typedef union
1864 {
1865 tls_spp_init_msg_t init_msg;
1866 tls_spp_disc_comp_msg_t disc_comp_msg;
1867 tls_spp_open_msg_t open_msg;
1868 tls_spp_srv_open_msg_t srv_open_msg;
1869 tls_spp_close_msg_t close_msg;
1870 tls_spp_start_msg_t start_msg;
1871 tls_spp_cli_init_msg_t cli_init_msg;
1872 tls_spp_write_msg_t write_msg;
1873 tls_spp_data_ind_msg_t data_ind_msg;
1874 tls_spp_cong_msg_t congest_msg;
1875
1876 } tls_spp_msg_t;
1877
1879 typedef void (*tls_bt_spp_callback_t)(tls_spp_event_t event, tls_spp_msg_t *p_data);
1880
1881 typedef enum
1882 {
1883 BLE_UART_SERVER_MODE,
1884 BLE_UART_CLIENT_MODE,
1885 BLE_UART_UNKNOWN_MODE,
1886 } tls_ble_uart_mode_t;
1887
1888 typedef enum{
1889 UART_OUTPUT_DATA=0,
1890 UART_OUTPUT_CMD_ADVERTISING,
1891 UART_OUTPUT_CMD_CONNECTED,
1892 UART_OUTPUT_CMD_DISCONNECTED,
1893 } tls_uart_msg_out_t;
1894
1896 typedef void (*tls_ble_uart_output_ptr)(tls_uart_msg_out_t type,uint8_t *payload, int length);
1897
1899 typedef void (*tls_ble_uart_sent_ptr)(tls_ble_uart_mode_t mode, int status);
1900
1901
1904 typedef enum{
1905 MESH_ROLE_UNKNOWN = 0x00,
1906 MESH_ROLE_NODE,
1907 MESH_ROLE_PROVISIONER
1908 } tls_bt_mesh_role_t;
1909
1910 #ifndef BIT
1911 #define BIT(n) (1UL << (n))
1912 #endif
1913
1914 #define BIT_MASK(n) (BIT(n) - 1)
1915
1916 #define TLS_BT_MESH_TRANSMIT_INT(transmit) ((((transmit) >> 3) + 1) * 10)
1917
1918 #define TLS_BT_MESH_TRANSMIT_COUNT(transmit) (((transmit) & (uint8_t)BIT_MASK(3)))
1919
1920 #define TLS_BT_MESH_TRANSMIT(count, int_ms) ((count) | (((int_ms / 10) - 1) << 3))
1921
1922 #define TLS_BT_MESH_PUB_TRANSMIT(count, int_ms) TLS_BT_MESH_TRANSMIT(count, \
1923 (int_ms) / 5)
1924
1925 #define TLS_BT_MESH_PUB_TRANSMIT_INT(transmit) ((((transmit) >> 3) + 1) * 50)
1926 #define TLS_BT_MESH_PUB_TRANSMIT_COUNT(transmit) TLS_BT_MESH_TRANSMIT_COUNT(transmit)
1927
1928 typedef struct {
1929 uint8_t net_transmit_count; /* Network Transmit state */
1930 uint8_t net_transmit_intvl; /* Network Transmit state */
1931 uint8_t relay; /* Relay Mode state */
1932 uint8_t relay_retransmit_count; /* Relay Retransmit state */
1933 uint8_t relay_retransmit_intvl; /* Relay Retransmit state */
1934 uint8_t beacon; /* Secure Network Beacon state */
1935 uint8_t gatt_proxy; /* GATT Proxy state */
1936 uint8_t frnd; /* Friend state */
1937 uint8_t default_ttl; /* Default TTL */
1938 } tls_mesh_primary_cfg_t;
1939
1940 typedef struct {
1941 uint16_t addr;
1942 uint16_t app_idx;
1943 uint8_t cred_flag;
1944 uint8_t ttl;
1945 uint8_t period;
1946 uint8_t transmit;
1947 } tls_bt_mesh_cfg_mod_pub ;
1948
1949 typedef struct {
1950 uint16_t dst;
1951 uint8_t count;
1952 uint8_t period;
1953 uint8_t ttl;
1954 uint16_t feat;
1955 uint16_t net_idx;
1956 } tls_bt_mesh_cfg_hb_pub;
1957
1958 typedef struct {
1959 uint16_t src;
1960 uint16_t dst;
1961 uint8_t period;
1962 uint8_t count;
1963 uint8_t min;
1964 uint8_t max;
1965 } tls_bt_mesh_cfg_hb_sub;
1966
1967 typedef struct{
1968 uint8_t addr[6];
1969 uint8_t addr_type;
1970 uint8_t uuid[16];
1971 uint32_t oob_info;
1972 uint32_t uri_hash;
1973
1974 } tls_mesh_unprov_msg_t;
1975
1976 typedef struct{
1977 uint16_t net_idx;
1978 uint16_t addr;
1979 uint8_t num_elem;
1980
1981 } tls_mesh_node_added_msg_t;
1982
1983 typedef struct{
1984 uint16_t net_idx;
1985 uint16_t addr;
1986
1987 } tls_mesh_prov_complete_msg_t;
1988
1989 typedef struct{
1990 char *str;
1991 } tls_mesh_oob_output_str_msg_t;
1992
1993 typedef struct{
1994 uint32_t number;
1995 } tls_mesh_oob_output_number_msg_t;
1996
1997 typedef struct{
1998 uint32_t act;
1999 } tls_mesh_oob_input_msg_t;
2000
2001 typedef struct{
2002 bool success;
2003 uint16_t net_idx;
2004 uint16_t addr;
2005 uint8_t num_elem;
2006
2007 } tls_mesh_prov_end_msg_t;
2008
2009 typedef union
2010 {
2011 tls_mesh_unprov_msg_t unprov_msg;
2012 tls_mesh_node_added_msg_t node_added_msg;
2013 tls_mesh_oob_output_str_msg_t oob_output_string_msg;
2014 tls_mesh_oob_output_number_msg_t oob_output_number_msg;
2015 tls_mesh_prov_complete_msg_t prov_cmplt_msg;
2016 tls_mesh_oob_input_msg_t oob_input_msg;
2017 tls_mesh_prov_end_msg_t prov_end_msg;
2018
2019 } tls_mesh_msg_t;
2020
2021
2022 typedef enum{
2023 WM_MESH_UNPROVISION_BEACON_EVT = (0x01<<1),
2024 WM_MESH_SECURE_BEACON_EVT = (0x01<<2),
2025 WM_MESH_NODE_ADDED_EVT = (0x01<<3),
2026 WM_MESH_OOB_STRING_EVT = (0x01<<4),
2027 WM_MESH_OOB_NUMBER_EVT = (0x01<<5),
2028 WM_MESH_PROV_CMPLT_EVT = (0x01<<6),
2029 WM_MESH_OOB_INPUT_EVT = (0x01<<7),
2030 WM_MESH_PROV_END_EVT = (0x01<<8),
2031
2032 } tls_mesh_event_t;
2033
2034 typedef void (*tls_bt_mesh_at_callback_t)(tls_mesh_event_t event, tls_mesh_msg_t *p_data);
2035
2036 typedef void (*tls_bt_controller_sleep_enter_func_ptr)(uint32_t sleep_duration_ms);
2037
2038 typedef void (*tls_bt_controller_sleep_exit_func_ptr)(void);
2039
2040 typedef void (*tls_bt_app_pending_process_func_ptr)(void);
2041
2042 #define TLS_HAL_AT_NOTIFY(P_CB, PARAM1, PARAM2)\
2043 if (P_CB) { \
2044 P_CB(PARAM1, PARAM2); \
2045 }
2046
2047
2048
2049 #define TLS_HAL_CBACK(P_CB, P_CBACK, ...)\
2050 if (P_CB && P_CB->P_CBACK) { \
2051 P_CB->P_CBACK(__VA_ARGS__); \
2052 } \
2053 else { \
2054 assert(0); \
2055 }
2056
2057 #endif /* WM_BT_DEF_H */
2058
tls_ble_cl_search_cmpl_msg_t::status
uint8_t status
Definition: wm_bt_def.h:578
tls_bt_hci_if_t::band_rate
uint32_t band_rate
Definition: wm_bt_def.h:395
tls_bthf_client_cmd_complete_msg_t
Definition: wm_bt_def.h:1695
WM_BLE_CL_DEREGISTER_EVT
Definition: wm_bt_def.h:488
tls_bt_remote_dev_prop_msg_t
Definition: wm_bt_def.h:247
WM_BT_PROPERTY_LOCAL_LE_FEATURES
Definition: wm_bt_def.h:170
WM_BT_PROPERTY_ADAPTER_DISCOVERY_TIMEOUT
Definition: wm_bt_def.h:142
WM_BLE_DM_TRIGER_EVT
Definition: wm_bt_def.h:868
tls_spp_close_msg_t
Definition: wm_bt_def.h:1822
tls_ble_cl_cfg_mtu_msg_t
Definition: wm_bt_def.h:627
WM_BLE_SE_READ_EVT
Definition: wm_bt_def.h:520
tls_btrc_ctrl_track_changed_msg_t
Definition: wm_bt_def.h:1250
tls_ble_se_write_msg_t::len
uint16_t len
Definition: wm_bt_def.h:775
tls_ble_dm_evt_t
tls_ble_dm_evt_t
Definition: wm_bt_def.h:864
tls_btrc_player_app_attr_t
Definition: wm_bt_def.h:1143
tls_mesh_primary_cfg_t
Definition: wm_bt_def.h:1928
tls_spp_srv_open_msg_t
Definition: wm_bt_def.h:1815
tls_mesh_prov_end_msg_t
Definition: wm_bt_def.h:2001
tls_ble_cl_gatt_db_msg_t
Definition: wm_bt_def.h:671
TLS_BT_STATUS_INTERNAL_ERROR
Definition: wm_bt_def.h:29
tls_ble_dm_set_adv_data_cmpl_msg_t::status
uint8_t status
Definition: wm_bt_def.h:884
tls_mesh_oob_input_msg_t
Definition: wm_bt_def.h:1997
tls_bthf_client_audio_state_msg_t
Definition: wm_bt_def.h:1601
tls_ble_sec_msg_t
Definition: wm_bt_def.h:914
WM_BLE_SE_START_EVT
Definition: wm_bt_def.h:517
tls_btrc_get_player_app_values_text_msg_t
Definition: wm_bt_def.h:1343
tls_bthf_client_callsetup_msg_t
Definition: wm_bt_def.h:1649
tls_bthf_client_resp_and_hold_msg_t
Definition: wm_bt_def.h:1661
tls_btrc_passthrough_rsp_msg_t
Definition: wm_bt_def.h:1192
tls_bt_adapter_state_change_msg_t
Definition: wm_bt_def.h:77
tls_ble_cl_search_cmpl_msg_t
Definition: wm_bt_def.h:575
tls_btrc_remote_features_msg_t
Definition: wm_bt_def.h:1308
tls_ble_cl_congest_msg_t::congested
bool congested
Definition: wm_bt_def.h:637
tls_ble_dm_scan_res_msg_t::value
uint8_t * value
Definition: wm_bt_def.h:905
tls_bt_hci_if_t::stop_bit
uint8_t stop_bit
Definition: wm_bt_def.h:398
tls_bt_ble_test_msg_t
Definition: wm_bt_def.h:356
tls_ble_se_connect_msg_t::server_if
uint8_t server_if
Definition: wm_bt_def.h:704
tls_ble_msg_t::cli_notif
tls_ble_cl_notify_msg_t cli_notif
Definition: wm_bt_def.h:827
tls_bt_status_t
tls_bt_status_t
Definition: wm_bt_def.h:14
tls_spp_write_msg_t
Definition: wm_bt_def.h:1843
tls_ble_msg_t::cli_congest
tls_ble_cl_congest_msg_t cli_congest
Definition: wm_bt_def.h:832
tls_ble_cl_read_msg_t
Definition: wm_bt_def.h:549
tls_bt_host_msg_t
Definition: wm_bt_def.h:362
tls_btrc_get_player_app_attrs_text_msg_t
Definition: wm_bt_def.h:1336
tls_ble_dm_timer_expired_msg_t
Definition: wm_bt_def.h:893
WM_BT_PROPERTY_TYPE_OF_DEVICE
Definition: wm_bt_def.h:115
tls_mesh_msg_t
Definition: wm_bt_def.h:2009
tls_bt_host_callback_t
void(* tls_bt_host_callback_t)(tls_bt_host_evt_t event, tls_bt_host_msg_t *p_data)
Definition: wm_bt_def.h:378
WM_BLE_CL_OPEN_EVT
Definition: wm_bt_def.h:498
WM_BLE_CL_REGISTER_EVT
Definition: wm_bt_def.h:487
tls_ble_msg_t::cli_cfg_mtu
tls_ble_cl_cfg_mtu_msg_t cli_cfg_mtu
Definition: wm_bt_def.h:831
WM_BT_PROPERTY_REMOTE_VERSION_INFO
Definition: wm_bt_def.h:163
tls_bt_mesh_role_t
tls_bt_mesh_role_t
Definition: wm_bt_def.h:1904
tls_ble_cl_open_msg_t
Definition: wm_bt_def.h:601
WM_BLE_CL_CFG_MTU_EVT
Definition: wm_bt_def.h:501
tls_btgatt_db_element_t
Definition: wm_bt_def.h:649
tls_btrc_set_player_app_value_msg_t
Definition: wm_bt_def.h:1350
tls_bt_discovery_state_chg_msg_t
Definition: wm_bt_def.h:268
tls_bt_mesh_cfg_mod_pub
Definition: wm_bt_def.h:1940
tls_bt_hci_if_t::data_bit
uint8_t data_bit
Definition: wm_bt_def.h:396
WM_BTRC_MAX_ATTR_STR_LEN
#define WM_BTRC_MAX_ATTR_STR_LEN
Definition: wm_bt_def.h:1062
tls_ble_se_write_msg_t::handle
uint16_t handle
Definition: wm_bt_def.h:773
tls_mesh_prov_complete_msg_t
Definition: wm_bt_def.h:1983
tls_bt_av_msg_t
Definition: wm_bt_def.h:1043
tls_ble_msg_t::cli_search_cmpl
tls_ble_cl_search_cmpl_msg_t cli_search_cmpl
Definition: wm_bt_def.h:825
WM_BLE_DM_TIMER_EXPIRED_EVT
Definition: wm_bt_def.h:867
tls_ble_cl_write_msg_t
Definition: wm_bt_def.h:560
tls_bthf_client_ring_indication_msg_t
Definition: wm_bt_def.h:1721
tls_ble_cl_open_msg_t::status
uint8_t status
Definition: wm_bt_def.h:604
tls_ble_se_response_msg_t
Definition: wm_bt_def.h:796
WM_BLE_SE_WRITE_EVT
Definition: wm_bt_def.h:521
tls_bt_mesh_cfg_hb_pub
Definition: wm_bt_def.h:1949
tls_ble_msg_t::ser_stop_srvc
tls_ble_se_stop_msg_t ser_stop_srvc
Definition: wm_bt_def.h:845
tls_bthf_client_last_voice_tag_number_msg_t
Definition: wm_bt_def.h:1715
tls_bt_mesh_cfg_hb_sub
Definition: wm_bt_def.h:1958
WM_BT_PROPERTY_CLASS_OF_DEVICE
Definition: wm_bt_def.h:109
tls_mesh_unprov_msg_t
Definition: wm_bt_def.h:1967
tls_bt_av_connection_state_t
Definition: wm_bt_def.h:1016
tls_bt_uuid_t
Definition: wm_bt_def.h:534
tls_btrc_register_notification_t
Definition: wm_bt_def.h:1167
WM_BLE_SE_CREATE_EVT
Definition: wm_bt_def.h:513
tls_btrc_ctrl_msg_t
Definition: wm_bt_def.h:1271
tls_btrc_passthrough_cmd_msg_t
Definition: wm_bt_def.h:1376
WM_BT_PROPERTY_REMOTE_RSSI
Definition: wm_bt_def.h:156
tls_bt_spp_callback_t
void(* tls_bt_spp_callback_t)(tls_spp_event_t event, tls_spp_msg_t *p_data)
Definition: wm_bt_def.h:1879
tls_ble_se_create_msg_t
Definition: wm_bt_def.h:713
WM_BT_PROPERTY_BDADDR
Definition: wm_bt_def.h:97
tls_bthf_client_callheld_msg_t
Definition: wm_bt_def.h:1655
WM_BLE_SE_EXEC_WRITE_EVT
Definition: wm_bt_def.h:522
tls_mesh_oob_output_number_msg_t
Definition: wm_bt_def.h:1993
tls_ble_se_confirm_msg_t
Definition: wm_bt_def.h:789
tls_spp_start_msg_t
Definition: wm_bt_def.h:1829
TLS_BT_STATUS_SUCCESS
Definition: wm_bt_def.h:16
tls_ble_cl_register_msg_t::app_uuid
tls_bt_uuid_t app_uuid
Definition: wm_bt_def.h:544
tls_btrc_ctrl_playerapplicationsetting_changed_msg_t
Definition: wm_bt_def.h:1244
tls_ble_msg_t::ser_write
tls_ble_se_write_msg_t ser_write
Definition: wm_bt_def.h:848
tls_btrc_connection_state_msg_t
Definition: wm_bt_def.h:1204
tls_ble_se_congest_msg_t
Definition: wm_bt_def.h:805
tls_bt_ssp_request_msg_t
Definition: wm_bt_def.h:302
__attribute__
Definition: wm_bt_def.h:242
tls_bt_adapter_prop_msg_t::properties
tls_bt_property_t * properties
Definition: wm_bt_def.h:187
tls_bt_hci_if_t::uart_index
uint8_t uart_index
Definition: wm_bt_def.h:394
tls_bthf_client_connection_state_msg_t
Definition: wm_bt_def.h:1593
tls_ble_cl_close_msg_t::reason
uint16_t reason
Definition: wm_bt_def.h:616
tls_bthf_client_network_state_msg_t
Definition: wm_bt_def.h:1613
tls_ble_se_read_msg_t
Definition: wm_bt_def.h:758
tls_ble_se_connect_msg_t
Definition: wm_bt_def.h:701
tls_ble_se_add_incl_srvc_msg_t::status
uint8_t status
Definition: wm_bt_def.h:726
tls_ble_dm_scan_res_msg_t
Definition: wm_bt_def.h:901
tls_ble_msg_t::cli_open
tls_ble_cl_open_msg_t cli_open
Definition: wm_bt_def.h:828
TLS_BT_STATUS_DONE
Definition: wm_bt_def.h:21
tls_btrc_ctrl_setabsvol_msg_t
Definition: wm_bt_def.h:1216
tls_bthf_client_vr_cmd_msg_t
Definition: wm_bt_def.h:1607
tls_bthf_client_subscriber_info_msg_t
Definition: wm_bt_def.h:1702
tls_mesh_oob_output_str_msg_t
Definition: wm_bt_def.h:1989
tls_bt_ssp_variant_t
tls_bt_ssp_variant_t
Definition: wm_bt_def.h:288
tls_ble_se_write_msg_t::need_rsp
bool need_rsp
Definition: wm_bt_def.h:776
tls_bthf_client_callback_t
void(* tls_bthf_client_callback_t)(tls_bthf_client_evt_t event, tls_bthf_client_msg_t *p_data)
Definition: wm_bt_def.h:1764
tls_ble_se_start_msg_t::status
uint8_t status
Definition: wm_bt_def.h:749
tls_ble_cl_close_msg_t
Definition: wm_bt_def.h:610
WM_BLE_CL_CLOSE_EVT
Definition: wm_bt_def.h:499
tls_btrc_player_settings_t
Definition: wm_bt_def.h:1130
tls_bt_av_evt_t
tls_bt_av_evt_t
Definition: wm_bt_def.h:1008
tls_ble_dm_set_adv_data_cmpl_msg_t
Definition: wm_bt_def.h:882
tls_ble_callback_t
void(* tls_ble_callback_t)(tls_ble_evt_t event, tls_ble_msg_t *p_data)
Definition: wm_bt_def.h:858
tls_ble_msg_t::ser_confirm
tls_ble_se_confirm_msg_t ser_confirm
Definition: wm_bt_def.h:850
tls_ble_se_register_msg_t
Definition: wm_bt_def.h:693
tls_bt_remote_dev_prop_msg_t::properties
tls_bt_property_t * properties
Definition: wm_bt_def.h:252
tls_bt_acl_state_t
tls_bt_acl_state_t
Definition: wm_bt_def.h:327
tls_ble_dm_set_scan_param_cmpl_msg_t
Definition: wm_bt_def.h:887
WM_BT_PROPERTY_ADAPTER_SCAN_MODE
Definition: wm_bt_def.h:129
tls_btrc_ctrl_callback_t
void(* tls_btrc_ctrl_callback_t)(tls_btrc_ctrl_evt_t event, tls_btrc_ctrl_msg_t *p_data)
Definition: wm_bt_def.h:1289
tls_btrc_msg_t
Definition: wm_bt_def.h:1383
tls_ble_dm_msg_t
Definition: wm_bt_def.h:927
tls_bt_device_found_msg_t
Definition: wm_bt_def.h:255
tls_bt_property_type_t
tls_bt_property_type_t
Definition: wm_bt_def.h:83
tls_bt_property_t
Definition: wm_bt_def.h:176
WM_BLE_SE_CONFIRM_EVT
Definition: wm_bt_def.h:523
tls_ble_msg_t::ser_add_char
tls_ble_se_add_char_msg_t ser_add_char
Definition: wm_bt_def.h:842
tls_ble_msg_t::cli_close
tls_ble_cl_close_msg_t cli_close
Definition: wm_bt_def.h:829
tls_ble_se_mtu_msg_t
Definition: wm_bt_def.h:811
tls_ble_cl_register_msg_t::status
uint8_t status
Definition: wm_bt_def.h:542
tls_ble_se_write_msg_t::value
uint8_t * value
Definition: wm_bt_def.h:778
tls_bt_discovery_state_t
tls_bt_discovery_state_t
Definition: wm_bt_def.h:262
tls_ble_cl_exec_cmpl_msg_t
Definition: wm_bt_def.h:568
tls_ble_msg_t::cli_register
tls_ble_cl_register_msg_t cli_register
Definition: wm_bt_def.h:821
tls_bt_state_t
tls_bt_state_t
Definition: wm_bt_def.h:54
tls_ble_se_add_char_msg_t::status
uint8_t status
Definition: wm_bt_def.h:735
tls_btrc_ctrl_getrcfeatures_msg_t
Definition: wm_bt_def.h:1210
tls_btrc_register_notification_msg_t
Definition: wm_bt_def.h:1363
tls_ble_dm_callback_t
void(* tls_ble_dm_callback_t)(tls_ble_dm_evt_t event, tls_ble_dm_msg_t *p_data)
Definition: wm_bt_def.h:979
tls_ble_msg_t::ser_disconnect
tls_ble_se_disconnect_msg_t ser_disconnect
Definition: wm_bt_def.h:839
tls_btrc_ctrl_setplayerapplicationsetting_rsp_msg_t
Definition: wm_bt_def.h:1229
tls_btrc_element_attr_val_t
Definition: wm_bt_def.h:1137
tls_bt_energy_info_msg_t
Definition: wm_bt_def.h:351
tls_ble_se_add_incl_srvc_msg_t
Definition: wm_bt_def.h:724
WM_BT_PROPERTY_BDNAME
Definition: wm_bt_def.h:91
tls_btrc_list_player_app_values_msg_t
Definition: wm_bt_def.h:1324
WM_BLE_CL_SEARCH_CMPL_EVT
Definition: wm_bt_def.h:493
tls_ble_cl_open_msg_t::client_if
uint8_t client_if
Definition: wm_bt_def.h:605
tls_bthf_client_current_calls_msg_t
Definition: wm_bt_def.h:1679
tls_btrc_ctrl_registernotification_abs_vol_msg_t
Definition: wm_bt_def.h:1223
tls_bt_acl_state_chg_msg_t
Definition: wm_bt_def.h:333
tls_bt_av_audio_state_t
Definition: wm_bt_def.h:1022
WM_BLE_CL_SEARCH_RES_EVT
Definition: wm_bt_def.h:494
tls_btrc_groupnavigation_rsp_msg_t
Definition: wm_bt_def.h:1198
tls_ble_se_confirm_msg_t::status
uint8_t status
Definition: wm_bt_def.h:792
tls_ble_se_write_msg_t
Definition: wm_bt_def.h:768
tls_bt_hci_if_t::verify_bit
uint8_t verify_bit
Definition: wm_bt_def.h:397
tls_bthf_client_msg_t
Definition: wm_bt_def.h:1736
WM_BLE_SE_ADD_CHAR_EVT
Definition: wm_bt_def.h:515
tls_ble_se_add_char_msg_t
Definition: wm_bt_def.h:733
tls_bthf_client_battery_level_msg_t
Definition: wm_bt_def.h:1631
WM_BLE_CL_CONGEST_EVT
Definition: wm_bt_def.h:502
tls_ble_report_rssi_msg_t
Definition: wm_bt_def.h:908
WM_BT_PROPERTY_REMOTE_FRIENDLY_NAME
Definition: wm_bt_def.h:150
tls_ble_dm_scan_res_msg_t::rssi
int8_t rssi
Definition: wm_bt_def.h:904
tls_ble_msg_t::cli_listen
tls_ble_cl_listen_msg_t cli_listen
Definition: wm_bt_def.h:830
tls_ble_msg_t::cli_search_res
tls_ble_cl_search_res_msg_t cli_search_res
Definition: wm_bt_def.h:826
tls_bt_hci_if_t
Definition: wm_bt_def.h:392
tls_btrc_list_player_app_attr_msg_t
Definition: wm_bt_def.h:1319
tls_bt_host_if_t
Definition: wm_bt_def.h:424
tls_btrc_volume_change_msg_t
Definition: wm_bt_def.h:1370
tls_ble_msg_t::cli_write
tls_ble_cl_write_msg_t cli_write
Definition: wm_bt_def.h:823
WM_BT_PROPERTY_ADAPTER_BONDED_DEVICES
Definition: wm_bt_def.h:136
tls_bthf_client_call_waiting_msg_t
Definition: wm_bt_def.h:1673
tls_btrc_player_app_ext_attr_t
Definition: wm_bt_def.h:1157
tls_ble_cl_reg_notify_msg_t
Definition: wm_bt_def.h:679
tls_ble_se_create_msg_t::status
uint8_t status
Definition: wm_bt_def.h:715
tls_ble_dm_triger_callback_t
void(* tls_ble_dm_triger_callback_t)(uint32_t evt_id)
Definition: wm_bt_def.h:985
tls_spp_cli_init_msg_t
Definition: wm_bt_def.h:1836
tls_bthf_client_call_msg_t
Definition: wm_bt_def.h:1643
tls_ble_cl_listen_msg_t
Definition: wm_bt_def.h:620
tls_spp_disc_comp_msg_t
Definition: wm_bt_def.h:1803
tls_bthf_client_network_roaming_msg_t
Definition: wm_bt_def.h:1619
tls_ble_msg_t::cli_exec_cmpl
tls_ble_cl_exec_cmpl_msg_t cli_exec_cmpl
Definition: wm_bt_def.h:824
tls_bt_av_audio_config_t
Definition: wm_bt_def.h:1028
WM_BLE_SE_DEREGISTER_EVT
Definition: wm_bt_def.h:510
tls_bthf_client_current_operator_msg_t
Definition: wm_bt_def.h:1637
tls_bt_pin_request_msg_t
Definition: wm_bt_def.h:279
tls_ble_dm_timer_callback_t
void(* tls_ble_dm_timer_callback_t)(uint8_t timer_id)
Definition: wm_bt_def.h:982
tls_spp_open_msg_t
Definition: wm_bt_def.h:1809
tls_ble_msg_t::ser_exec_write
tls_ble_se_exec_write_msg_t ser_exec_write
Definition: wm_bt_def.h:849
WM_BLE_SE_CONGEST_EVT
Definition: wm_bt_def.h:525
WM_BT_PROPERTY_SERVICE_RECORD
Definition: wm_bt_def.h:121
tls_spp_msg_t
Definition: wm_bt_def.h:1863
tls_bt_a2dp_sink_callback_t
void(* tls_bt_a2dp_sink_callback_t)(tls_bt_av_evt_t event, tls_bt_av_msg_t *p_data)
Definition: wm_bt_def.h:1053
tls_btrc_callback_t
void(* tls_btrc_callback_t)(tls_btrc_evt_t event, tls_btrc_msg_t *p_data)
Definition: wm_bt_def.h:1401
WM_BLE_CL_NOTIF_EVT
Definition: wm_bt_def.h:497
WM_BT_PROPERTY_UUIDS
Definition: wm_bt_def.h:103
tls_bthf_client_network_signal_msg_t
Definition: wm_bt_def.h:1625
tls_ble_se_write_msg_t::is_prep
bool is_prep
Definition: wm_bt_def.h:777
tls_btrc_ctrl_playerapplicationsetting_msg_t
Definition: wm_bt_def.h:1235
tls_ble_msg_t::ser_read
tls_ble_se_read_msg_t ser_read
Definition: wm_bt_def.h:847
tls_bthf_client_in_band_ring_tone_msg_t
Definition: wm_bt_def.h:1709
tls_bt_host_evt_t
tls_bt_host_evt_t
Definition: wm_bt_def.h:61
tls_ble_se_exec_write_msg_t
Definition: wm_bt_def.h:781
WM_BLE_SE_REGISTER_EVT
Definition: wm_bt_def.h:509
tls_bt_bond_state_chg_msg_t
Definition: wm_bt_def.h:319
tls_ble_msg_t::ser_register
tls_ble_se_register_msg_t ser_register
Definition: wm_bt_def.h:837
tls_bt_adapter_prop_msg_t
Definition: wm_bt_def.h:183
tls_btrc_ctrl_play_status_changed_msg_t
Definition: wm_bt_def.h:1265
tls_bt_a2dp_src_callback_t
void(* tls_bt_a2dp_src_callback_t)(tls_bt_av_evt_t event, tls_bt_av_msg_t *p_data)
Definition: wm_bt_def.h:1057
tls_ble_cl_congest_msg_t
Definition: wm_bt_def.h:634
tls_ble_msg_t::ser_connect
tls_ble_se_connect_msg_t ser_connect
Definition: wm_bt_def.h:838
tls_ble_dm_scan_res_cmpl_msg_t
Definition: wm_bt_def.h:921
tls_ble_cl_search_res_msg_t
Definition: wm_bt_def.h:582
tls_ble_msg_t
Definition: wm_bt_def.h:819
tls_ble_msg_t::ser_create
tls_ble_se_create_msg_t ser_create
Definition: wm_bt_def.h:840
tls_bt_adapter_state_change_msg_t::status
tls_bt_state_t status
Definition: wm_bt_def.h:79
tls_ble_se_congest_msg_t::congested
bool congested
Definition: wm_bt_def.h:808
tls_btrc_get_player_app_value_msg_t
Definition: wm_bt_def.h:1329
tls_bthf_client_volume_change_msg_t
Definition: wm_bt_def.h:1688
tls_ble_cl_notify_msg_t
Definition: wm_bt_def.h:590
tls_ble_msg_t::ser_start_srvc
tls_ble_se_start_msg_t ser_start_srvc
Definition: wm_bt_def.h:844
tls_ble_se_write_msg_t::offset
uint16_t offset
Definition: wm_bt_def.h:774
tls_bthf_audio_payload_msg_t
Definition: wm_bt_def.h:1727
tls_bt_av_audio_payload_t
Definition: wm_bt_def.h:1035
tls_ble_cl_register_msg_t
Definition: wm_bt_def.h:540
TLS_BT_STATUS_THREAD_FAILED
Definition: wm_bt_def.h:28
tls_bthf_client_clip_msg_t
Definition: wm_bt_def.h:1667
tls_spp_cong_msg_t
Definition: wm_bt_def.h:1857
tls_ble_cl_register_msg_t::client_if
uint8_t client_if
Definition: wm_bt_def.h:543
tls_ble_se_start_msg_t
Definition: wm_bt_def.h:747
WM_BLE_DM_SET_ADV_DATA_CMPL_EVT
Definition: wm_bt_def.h:866
tls_btrc_ctrl_play_position_changed_msg_t
Definition: wm_bt_def.h:1258
TLS_BT_STATUS_NOMEM
Definition: wm_bt_def.h:19
tls_btrc_get_play_status_msg_t
Definition: wm_bt_def.h:1314
tls_btrc_player_app_ext_attr_val_t
Definition: wm_bt_def.h:1149
tls_bt_bond_state_t
tls_bt_bond_state_t
Definition: wm_bt_def.h:312
tls_mesh_node_added_msg_t
Definition: wm_bt_def.h:1976
tls_ble_msg_t::cli_read
tls_ble_cl_read_msg_t cli_read
Definition: wm_bt_def.h:822
WM_BLE_CL_EXEC_CMPL_EVT
Definition: wm_bt_def.h:492
tls_spp_init_msg_t
Definition: wm_bt_def.h:1799
WM_BLE_DM_SCAN_RES_EVT
Definition: wm_bt_def.h:869
tls_ble_uart_output_ptr
void(* tls_ble_uart_output_ptr)(tls_uart_msg_out_t type, uint8_t *payload, int length)
Definition: wm_bt_def.h:1896
tls_ble_msg_t::ser_congest
tls_ble_se_congest_msg_t ser_congest
Definition: wm_bt_def.h:851
tls_btrc_get_element_attr_msg_t
Definition: wm_bt_def.h:1356
tls_ble_evt_t
tls_ble_evt_t
Definition: wm_bt_def.h:484
WM_BLE_SE_STOP_EVT
Definition: wm_bt_def.h:518
tls_bt_device_found_msg_t::properties
tls_bt_property_t * properties
Definition: wm_bt_def.h:258
tls_spp_data_ind_msg_t
Definition: wm_bt_def.h:1850
tls_ble_uart_sent_ptr
void(* tls_ble_uart_sent_ptr)(tls_ble_uart_mode_t mode, int status)
Definition: wm_bt_def.h:1899


W800 SDK APIs: doxy_out/include/bt/wm_bt_hf_client.h Source File

  • doxy_out
  • include
  • bt
wm_bt_hf_client.h
Go to the documentation of this file.
1
12 #ifndef __WM_BT_HF_CLIENT_H__
13 #define __WM_BT_HF_CLIENT_H__
14
15 #include "wm_bt.h"
47 tls_bt_status_t tls_bt_hf_client_init(tls_bthf_client_callback_t callback);
48
58 tls_bt_status_t tls_bt_hf_client_deinit(void);
59
69 tls_bt_status_t tls_bt_hf_client_connect(tls_bt_addr_t *bd_addr);
70
71
82 tls_bt_status_t tls_bt_hf_client_disconnect(tls_bt_addr_t *bd_addr);
83
93 tls_bt_status_t tls_bt_hf_client_connect_audio(tls_bt_addr_t *bd_addr);
94
104 tls_bt_status_t tls_bt_hf_client_disconnect_audio(tls_bt_addr_t *bd_addr);
105
115 tls_bt_status_t tls_bt_hf_client_start_voice_recognition(void);
116
126 tls_bt_status_t tls_bt_hf_client_stop_voice_recognition(void);
127
139 tls_bt_status_t tls_bt_hf_client_volume_control(tls_bthf_client_volume_type_t type, int volume);
140
150 tls_bt_status_t tls_bt_hf_client_dial(const char *number);
151
161 tls_bt_status_t tls_bt_hf_client_dial_memory(int location);
162
173 tls_bt_status_t tls_bt_hf_client_handle_call_action(tls_bthf_client_call_action_t action, int idx);
174
185 tls_bt_status_t tls_bt_hf_client_query_current_calls(void);
186
196 tls_bt_status_t tls_bt_hf_client_query_current_operator_name(void);
197
208 tls_bt_status_t tls_bt_hf_client_retrieve_subscriber_info(void);
209
220 tls_bt_status_t tls_bt_hf_client_send_dtmf(char code);
221
232 tls_bt_status_t tls_bt_hf_client_request_last_voice_tag_number(void);
233
247 tls_bt_status_t tls_bt_hf_client_send_at_cmd(int cmd, int val1, int val2, const char *arg);
248
261 tls_bt_status_t tls_bt_hf_client_send_audio(tls_bt_addr_t *bd_addr, uint8_t *p_data, uint16_t length);
262 #endif
tls_bt_hf_client_request_last_voice_tag_number
tls_bt_status_t tls_bt_hf_client_request_last_voice_tag_number(void)
Request number from AG for VR purposes.
tls_bt_hf_client_send_audio
tls_bt_status_t tls_bt_hf_client_send_audio(tls_bt_addr_t *bd_addr, uint8_t *p_data, uint16_t length)
Send audio to audio gateway.
tls_bt_status_t
tls_bt_status_t
Definition: wm_bt_def.h:14
tls_bt_hf_client_volume_control
tls_bt_status_t tls_bt_hf_client_volume_control(tls_bthf_client_volume_type_t type, int volume)
volume control
tls_bt_hf_client_init
tls_bt_status_t tls_bt_hf_client_init(tls_bthf_client_callback_t callback)
initializes the hf client interface
tls_bt_hf_client_query_current_calls
tls_bt_status_t tls_bt_hf_client_query_current_calls(void)
query list of current calls
tls_bt_hf_client_disconnect_audio
tls_bt_status_t tls_bt_hf_client_disconnect_audio(tls_bt_addr_t *bd_addr)
close the audio connection
tls_bt_hf_client_dial
tls_bt_status_t tls_bt_hf_client_dial(const char *number)
place a call
tls_bt_hf_client_connect_audio
tls_bt_status_t tls_bt_hf_client_connect_audio(tls_bt_addr_t *bd_addr)
create an audio connection
tls_bt_hf_client_connect
tls_bt_status_t tls_bt_hf_client_connect(tls_bt_addr_t *bd_addr)
connect to audio gateway
tls_bthf_client_callback_t
void(* tls_bthf_client_callback_t)(tls_bthf_client_evt_t event, tls_bthf_client_msg_t *p_data)
Definition: wm_bt_def.h:1764
tls_bt_hf_client_query_current_operator_name
tls_bt_status_t tls_bt_hf_client_query_current_operator_name(void)
query current selected operator name
tls_bt_hf_client_start_voice_recognition
tls_bt_status_t tls_bt_hf_client_start_voice_recognition(void)
start voice recognition
tls_bt_hf_client_handle_call_action
tls_bt_status_t tls_bt_hf_client_handle_call_action(tls_bthf_client_call_action_t action, int idx)
handle specified call related action
tls_bt_hf_client_disconnect
tls_bt_status_t tls_bt_hf_client_disconnect(tls_bt_addr_t *bd_addr)
disconnect from audio gateway
tls_bt_hf_client_send_dtmf
tls_bt_status_t tls_bt_hf_client_send_dtmf(char code)
send dtmf
tls_bt_hf_client_stop_voice_recognition
tls_bt_status_t tls_bt_hf_client_stop_voice_recognition(void)
stop voice recognition
tls_bt_hf_client_retrieve_subscriber_info
tls_bt_status_t tls_bt_hf_client_retrieve_subscriber_info(void)
retrieve subscriber number information
wm_bt.h
Bluetooth API.
tls_bt_hf_client_send_at_cmd
tls_bt_status_t tls_bt_hf_client_send_at_cmd(int cmd, int val1, int val2, const char *arg)
Send requested AT command to remote device.
tls_bt_hf_client_dial_memory
tls_bt_status_t tls_bt_hf_client_dial_memory(int location)
place a call with number specified by location (speed dial)
tls_bt_hf_client_deinit
tls_bt_status_t tls_bt_hf_client_deinit(void)
Closes the HF client interface.


W800 SDK APIs: doxy_out/include/bt/wm_bt_spp.h Source File

  • doxy_out
  • include
  • bt
wm_bt_spp.h
Go to the documentation of this file.
1
11 #ifndef __WM_BT_SPP_H__
12 #define __WM_BT_SPP_H__
13
14 #include "wm_bt.h"
15
46 tls_bt_status_t tls_bt_spp_init(tls_bt_spp_callback_t callback);
47
57 tls_bt_status_t tls_bt_spp_deinit(void);
58
68 tls_bt_status_t tls_bt_spp_enable(void);
69
80 tls_bt_status_t tls_bt_spp_disable(void);
81
82
93 tls_bt_status_t tls_bt_spp_start_discovery(tls_bt_addr_t *bd_addr, tls_bt_uuid_t *uuid);
94
107 tls_bt_status_t tls_bt_spp_connect(wm_spp_sec_t sec_mask,
108 tls_spp_role_t role, uint8_t remote_scn, tls_bt_addr_t *bd_addr);
109
119 tls_bt_status_t tls_bt_spp_disconnect(uint32_t handle);
120
134 tls_bt_status_t tls_bt_spp_start_server(wm_spp_sec_t sec_mask,
135 tls_spp_role_t role, uint8_t local_scn, const char *name);
136
147 tls_bt_status_t tls_bt_spp_write(uint32_t handle, uint8_t *p_data, int length);
148
149 #endif
150
151
tls_bt_spp_enable
tls_bt_status_t tls_bt_spp_enable(void)
Enable the bta jv interface.
tls_bt_status_t
tls_bt_status_t
Definition: wm_bt_def.h:14
tls_bt_spp_init
tls_bt_status_t tls_bt_spp_init(tls_bt_spp_callback_t callback)
Initializes the SPP interface.
tls_bt_uuid_t
Definition: wm_bt_def.h:534
tls_bt_spp_callback_t
void(* tls_bt_spp_callback_t)(tls_spp_event_t event, tls_spp_msg_t *p_data)
Definition: wm_bt_def.h:1879
tls_bt_spp_start_discovery
tls_bt_status_t tls_bt_spp_start_discovery(tls_bt_addr_t *bd_addr, tls_bt_uuid_t *uuid)
Discovery the spp service by the given peer device.
tls_bt_spp_disconnect
tls_bt_status_t tls_bt_spp_disconnect(uint32_t handle)
Close a spp connection.
tls_bt_spp_disable
tls_bt_status_t tls_bt_spp_disable(void)
Disable the bta jv interface and cleanup internal resource.
wm_bt.h
Bluetooth API.
tls_bt_spp_start_server
tls_bt_status_t tls_bt_spp_start_server(wm_spp_sec_t sec_mask, tls_spp_role_t role, uint8_t local_scn, const char *name)
This function create a SPP server and starts listening for an SPP connection request from a remote Bl...
tls_bt_spp_deinit
tls_bt_status_t tls_bt_spp_deinit(void)
Shuts down the SPP interface and does the cleanup.
tls_bt_spp_write
tls_bt_status_t tls_bt_spp_write(uint32_t handle, uint8_t *p_data, int length)
This function is used to write data.
tls_bt_spp_connect
tls_bt_status_t tls_bt_spp_connect(wm_spp_sec_t sec_mask, tls_spp_role_t role, uint8_t remote_scn, tls_bt_addr_t *bd_addr)
Create a spp connection to the remote device.


W800 SDK APIs: doxy_out/include/wm_config.h Source File

  • doxy_out
  • include
wm_config.h
Go to the documentation of this file.
1
10 #ifndef __WM_CONFIG_H__
11 #define __WM_CONFIG_H__
12 #include <csi_config.h>
13
14 #define CFG_ON 1
15 #define CFG_OFF 0
16
17 #define WM_CONFIG_DEBUG_UART1 CFG_OFF/*PRINTF PORT USE UART1*/
18
19 #define TLS_CONFIG_HS_SPI CFG_ON /*High Speed SPI*/
20 #define TLS_CONFIG_LS_SPI CFG_ON /*Low Speed SPI*/
21 #define TLS_CONFIG_UART CFG_ON /*UART*/
22
24 #define TLS_CONFIG_ONLY_FACTORY_ATCMD CFG_OFF
25
27 #define TLS_CONFIG_HOSTIF CFG_ON
28 #define TLS_CONFIG_AT_CMD (CFG_ON && TLS_CONFIG_HOSTIF)
29 #define TLS_CONFIG_RI_CMD (CFG_ON && TLS_CONFIG_HOSTIF)
30 #define TLS_CONFIG_RMMS (CFG_ON && TLS_CONFIG_HOSTIF)
31
32 //LWIP CONFIG
33 #define TLS_CONFIG_IPV4 CFG_ON //must ON
34 #define TLS_CONFIG_IPV6 CFG_OFF
35 #define TLS_CONFIG_DHCP_OPTION60 "Winnermicro:W800_01"
36
38 #define TLS_CONFIG_SOCKET_STD CFG_ON
39 #define TLS_CONFIG_SOCKET_RAW CFG_ON
40 #define TLS_CONFIG_CMD_USE_RAW_SOCKET (CFG_ON && TLS_CONFIG_SOCKET_RAW)
41 #define TLS_CONFIG_CMD_NET_USE_LIST_FTR CFG_ON
42
43
44
45 #define TLS_CONFIG_HARD_CRYPTO CFG_ON
46
47 #define TLS_CONFIG_NTO CFG_ON
48 #define TLS_CONFIG_CRYSTAL_24M CFG_OFF
49
51 /*
52 HTTP Lib
53 HTTPS Lib
54 SSL LIB
55 CRYPTO
56 */
57 #define TLS_CONFIG_HTTP_CLIENT (CFG_ON)
58 #define TLS_CONFIG_HTTP_CLIENT_PROXY CFG_OFF
59 #define TLS_CONFIG_HTTP_CLIENT_AUTH_BASIC CFG_OFF
60 #define TLS_CONFIG_HTTP_CLIENT_AUTH_DIGEST CFG_OFF
61 #define TLS_CONFIG_HTTP_CLIENT_AUTH (TLS_CONFIG_HTTP_CLIENT_AUTH_BASIC || TLS_CONFIG_HTTP_CLIENT_AUTH_DIGEST)
62 #define TLS_CONFIG_HTTP_CLIENT_SECURE (CFG_ON && (TLS_CONFIG_USE_POLARSSL || TLS_CONFIG_USE_MBEDTLS))
63 #define TLS_CONFIG_HTTP_CLIENT_TASK (CFG_ON && TLS_CONFIG_HTTP_CLIENT)
64
65 /*MatrixSSL will be used except one of the following two Macros is CFG_ON*/
66 #define TLS_CONFIG_USE_POLARSSL CFG_OFF
67 #define TLS_CONFIG_USE_MBEDTLS CFG_ON
68
69 #define TLS_CONFIG_SERVER_SIDE_SSL (CFG_ON && TLS_CONFIG_HTTP_CLIENT_SECURE && TLS_CONFIG_USE_MBEDTLS) /*MUST configure TLS_CONFIG_HTTP_CLIENT_SECURE CFG_ON */
70
71
73 #define TLS_CONFIG_IGMP CFG_ON
74
75
76 #define TLS_CONFIG_NTP CFG_ON
77
78 #if NIMBLE_FTR
79 #define TLS_CONFIG_BLE CFG_ON
80 #define TLS_CONFIG_BR_EDR CFG_OFF
81 #else
82 #define TLS_CONFIG_BLE CFG_OFF
83 #define TLS_CONFIG_BR_EDR CFG_ON
84 #endif
85
86 #define TLS_CONFIG_BT (TLS_CONFIG_BR_EDR || TLS_CONFIG_BLE)
87
88 #include "wm_os_config.h" //if you want to use source code,please open
89 #include "wm_wifi_config.h"
90
91 #include "wm_ram_config.h"
92 #endif /*__WM_CONFIG_H__*/
93
wm_ram_config.h
WM ram model configure.
wm_os_config.h
WM OS select freertos or ucos.
wm_wifi_config.h
WM wifi model configure.


W800 SDK APIs: doxy_out/include/driver/wm_cpu.h Source File

  • doxy_out
  • include
  • driver
wm_cpu.h
Go to the documentation of this file.
1
10 #ifndef WM_CPU_H
11 #define WM_CPU_H
12
13 #include <stdint.h>
14
16 #define W800_PLL_CLK_MHZ (480)
17
18 enum CPU_CLK{
19 CPU_CLK_240M = 2,
20 CPU_CLK_160M = 3,
21 CPU_CLK_80M = 6,
22 CPU_CLK_40M = 12,
23 CPU_CLK_2M = 240,
24 };
25
26 typedef union {
27 struct {
28 uint32_t CPU: 8;
29 uint32_t WLAN: 8;
30 uint32_t BUS2: 8;
31 uint32_t PD: 4;
32 uint32_t RSV: 3;
33 uint32_t DIV_EN: 1;
34 } b;
35 uint32_t w;
36 } clk_div_reg;
37
38 #define UNIT_MHZ (1000000)
39
40
41 typedef struct{
42 u32 apbclk;
43 u32 cpuclk;
44 u32 wlanclk;
45 }tls_sys_clk;
46
79 void tls_sys_clk_set(u32 clk);
80
81
91 void tls_sys_clk_get(tls_sys_clk *sysclk);
92
101 #endif /* WM_CPU_H */
tls_sys_clk_set
void tls_sys_clk_set(u32 clk)
This function is used to set cpu clock.
clk_div_reg::WLAN
uint32_t WLAN
Definition: wm_cpu.h:29
tls_sys_clk
Definition: wm_cpu.h:41
tls_sys_clk_get
void tls_sys_clk_get(tls_sys_clk *sysclk)
This function is used to get cpu clock.
clk_div_reg::BUS2
uint32_t BUS2
Definition: wm_cpu.h:30
clk_div_reg
Definition: wm_cpu.h:26
clk_div_reg::CPU
uint32_t CPU
Definition: wm_cpu.h:28
clk_div_reg::DIV_EN
uint32_t DIV_EN
Definition: wm_cpu.h:33
clk_div_reg::PD
uint32_t PD
Definition: wm_cpu.h:31
clk_div_reg::RSV
uint32_t RSV
Definition: wm_cpu.h:32


W800 SDK APIs: doxy_out/include/app/wm_crypto.h Source File

  • doxy_out
  • include
  • app
wm_crypto.h
Go to the documentation of this file.
1
10 #ifndef WM_CRYPTO_H
11 #define WM_CRYPTO_H
12
24 int aes_128_cbc_encrypt (const u8 *key, const u8 *iv, u8 *data, size_t data_len) ;
25
37 int aes_128_cbc_decrypt(const u8 *key, const u8 *iv, u8 *data,
38 size_t data_len);
39
51 int rc4(const u8 *key, size_t keylen, u8 *data, size_t data_len);
52
53
63 int md5(const u8 *addr, int len, u8 *mac);
64
76 int hmac_md5(const u8 *key, size_t key_len, const u8 *data, size_t data_len, u8 *mac);
77
88 int sha1(const u8 *addr, int len, u8 *mac);
89
90 #endif
91
aes_128_cbc_decrypt
int aes_128_cbc_decrypt(const u8 *key, const u8 *iv, u8 *data, size_t data_len)
Decrypt data by 128 AES crypto.
rc4
int rc4(const u8 *key, size_t keylen, u8 *data, size_t data_len)
XOR RC4 stream to given data with skip-stream-start.
md5
int md5(const u8 *addr, int len, u8 *mac)
MD5 hash for data vector.
sha1
int sha1(const u8 *addr, int len, u8 *mac)
SHA1 hash for data vector.
aes_128_cbc_encrypt
int aes_128_cbc_encrypt(const u8 *key, const u8 *iv, u8 *data, size_t data_len)
Encrypt plain data by 128 AES crypto.
hmac_md5
int hmac_md5(const u8 *key, size_t key_len, const u8 *data, size_t data_len, u8 *mac)
HMAC-MD5 over data buffer (RFC 2104)


W800 SDK APIs: doxy_out/include/platform/wm_crypto_hard.h Source File

  • doxy_out
  • include
  • platform
wm_crypto_hard.h
Go to the documentation of this file.
1
11 #ifndef WM_CRYPTO_HARD_H
12 #define WM_CRYPTO_HARD_H
13
14 #include "wm_type_def.h"
15 #include "wm_osal.h"
16
17 #ifndef min
18 #define min(a,b) (((a) < (b)) ? (a) : (b))
19 #endif /* min */
20
22 #define HR_CRYPTO_BASE_ADDR 0x40000600
23
24 #define HR_CRYPTO_SRC_ADDR (HR_CRYPTO_BASE_ADDR + 0x00)
25
26 #define HR_CRYPTO_DEST_ADDR (HR_CRYPTO_BASE_ADDR + 0x04)
27
28 #define HR_CRYPTO_SEC_CFG (HR_CRYPTO_BASE_ADDR + 0x08)
29
30 #define HR_CRYPTO_SEC_CTRL (HR_CRYPTO_BASE_ADDR + 0x0C)
31
32 #define HR_CRYPTO_KEY0 (HR_CRYPTO_BASE_ADDR + 0x10)
33
34 #define HR_CRYPTO_KEY1 (HR_CRYPTO_BASE_ADDR + 0x14)
35
36 #define HR_CRYPTO_KEY2 (HR_CRYPTO_BASE_ADDR + 0x18)
37
38 #define HR_CRYPTO_KEY3 (HR_CRYPTO_BASE_ADDR + 0x1C)
39
40 #define HR_CRYPTO_KEY4 (HR_CRYPTO_BASE_ADDR + 0x20)
41
42 #define HR_CRYPTO_KEY5 (HR_CRYPTO_BASE_ADDR + 0x24)
43
44 #define HR_CRYPTO_KEY6 (HR_CRYPTO_BASE_ADDR + 0x4c)
45
46 #define HR_CRYPTO_KEY7 (HR_CRYPTO_BASE_ADDR + 0x50)
47
49 #define HR_CRYPTO_IV0 (HR_CRYPTO_BASE_ADDR + 0x28)
50
51 #define HR_CRYPTO_IV1 (HR_CRYPTO_BASE_ADDR + 0x20)
52
54 #define HR_CRYPTO_SEC_STS (HR_CRYPTO_BASE_ADDR + 0x30)
55
57 #define HR_CRYPTO_SHA1_DIGEST0 (HR_CRYPTO_BASE_ADDR + 0x34)
58
59 #define HR_CRYPTO_SHA1_DIGEST1 (HR_CRYPTO_BASE_ADDR + 0x38)
60
61 #define HR_CRYPTO_SHA1_DIGEST2 (HR_CRYPTO_BASE_ADDR + 0x3C)
62
63 #define HR_CRYPTO_SHA1_DIGEST3 (HR_CRYPTO_BASE_ADDR + 0x40)
64
65 #define HR_CRYPTO_SHA1_DIGEST4 (HR_CRYPTO_BASE_ADDR + 0x44)
66
67 #define HR_CRYPTO_RNG_RESULT (HR_CRYPTO_BASE_ADDR + 0x48)
68
69 #define HR_CRYPTO_TRNG_CR (HR_CRYPTO_BASE_ADDR + 0x54)
70
72 #define HR_CRYPTO_CRC_KEY HR_CRYPTO_SHA1_DIGEST4
73
74 #define HR_CRYPTO_CRC_RESULT HR_CRYPTO_SHA1_DIGEST4
75
76 #define ERR_CRY_OK 0
77 #define ERR_FAILURE -1 /* failure */
78 #define ERR_ARG_FAIL -6 /* Failure due to bad function param */
79
80 # define PS_SUCCESS 0
81 # define PS_FAILURE -1
82 # define PS_FAIL PS_FAILURE/* Just another name */
83
84 /* NOTE: Failure return codes MUST be < 0 */
85 /* NOTE: The range for core error codes should be between -2 and -29 */
86 # define PS_ARG_FAIL -6 /* Failure due to bad function param */
87 # define PS_PLATFORM_FAIL -7 /* Failure as a result of system call error */
88 # define PS_MEM_FAIL -8 /* Failure to allocate requested memory */
89 # define PS_LIMIT_FAIL -9 /* Failure on sanity/limit tests */
90 # define PS_UNSUPPORTED_FAIL -10 /* Unimplemented feature error */
91 # define PS_DISABLED_FEATURE_FAIL -11 /* Incorrect #define toggle for feature */
92 # define PS_PROTOCOL_FAIL -12 /* A protocol error occurred */
93 # define PS_TIMEOUT_FAIL -13 /* A timeout occurred and MAY be an error */
94 # define PS_INTERRUPT_FAIL -14 /* An interrupt occurred and MAY be an error */
95 # define PS_PENDING -15 /* In process. Not necessarily an error */
96 # define PS_EAGAIN -16 /* Try again later. Not necessarily an error */
97 # define PS_OUTPUT_LENGTH -17 /* Output length negotiation:
98 output buffer is too small. */
99 # define PS_HOSTNAME_RESOLUTION -18 /* Cannot resolve host name. */
100 # define PS_CONNECT -19 /* Cannot connect to remote host. */
101 # define PS_INSECURE_PROTOCOL -20 /* The operation needs to use insecure protocol.
102 The caller needs to accept use of insecure
103 protocol. */
104 # define PS_VERIFICATION_FAILED -21 /* Signature verification failed. */
105
106
107 //CRC
108 #define OUTPUT_REFLECT 1
109 #define INPUT_REFLECT 2
110
111 typedef enum __CRYPTO_METHOD
112 {
113 CRYPTO_METHOD_RSV=0,
114 CRYPTO_METHOD_RC4,
115 CRYPTO_METHOD_SHA1,
116 CRYPTO_METHOD_AES,
117 CRYPTO_METHOD_DES,
118 CRYPTO_METHOD_3DES,
119 CRYPTO_METHOD_CRC,
120 CRYPTO_METHOD_MD5
121 }CRYPTO_METHOD;
122
126 typedef enum __CRYPTO_WAY
127 {
128 CRYPTO_WAY_ENCRYPT=0,
129 CRYPTO_WAY_DECRYPT
130 }CRYPTO_WAY;
131
132 typedef enum __CRYPTO_RNG_SWITCH
133 {
134 CRYPTO_RNG_SWITCH_16 = 0,
135 CRYPTO_RNG_SWITCH_32
136 }CRYPTO_RNG_SWITCH;
137
141 typedef enum __CRYPTO_MODE
142 {
143 CRYPTO_MODE_ECB=0,
144 CRYPTO_MODE_CBC,
145 CRYPTO_MODE_CTR,
146 CRYPTO_MODE_CMAC
147 }CRYPTO_MODE;
151 typedef enum __CRYPTO_CRC_TYPE
152 {
153 CRYPTO_CRC_TYPE_8=0,
154 CRYPTO_CRC_TYPE_16_MODBUS,
155 CRYPTO_CRC_TYPE_16_CCITT,
156 CRYPTO_CRC_TYPE_32
157 }CRYPTO_CRC_TYPE;
158
162 typedef struct {
163 u32 state;
164 u8 type;
165 u8 mode;
166 }psCrcContext_t;
167
168 #if 1
169 typedef u32 hstm_digit;
170 typedef struct {
171 int16 used, alloc, sign;
172 hstm_digit *dp;
173 } hstm_int;
174
175 typedef struct
176 {
177 # ifdef HAVE_NATIVE_INT64
178 uint64 length;
179 # else
180 uint32 lengthHi;
181 uint32 lengthLo;
182 # endif /* HAVE_NATIVE_INT64 */
183 uint32 state[5], curlen;
184 unsigned char buf[64];
185 } psSha1_t;
186 typedef struct
187 {
188 # ifdef HAVE_NATIVE_INT64
189 uint64 length;
190 # else
191 uint32 lengthHi;
192 uint32 lengthLo;
193 # endif /* HAVE_NATIVE_INT64 */
194 uint32 state[4], curlen;
195 unsigned char buf[64];
196 } psMd5_t;
197
198 typedef struct
199 {
200 union
201 {
202 psSha1_t sha1;
203 psMd5_t md5;
204 } u;
205 int32_t hashAlgId;
206 } psDigestContext_t;
207
208 # define AES_BLOCKLEN 16
209 # define AES_IVLEN AES_BLOCKLEN
210 # define AES128_KEYLEN 16
211 # define AES192_KEYLEN 24
212 # define AES256_KEYLEN 32
213 # define DES3_BLOCKLEN 8
214 # define DES3_IVLEN DES3_BLOCKLEN
215 # define DES3_KEYLEN 24
216
217 typedef struct
218 {
219 uint32_t skey[64];
220 uint16_t rounds;
221 uint16_t type;
222 } psAesKey_t;
223 typedef struct
224 {
225 psAesKey_t key;
226 unsigned char IV[AES_BLOCKLEN];
227 } psAesCbc_t;
228
229 typedef struct
230 {
231 unsigned char state[256];
232 uint32_t byteCount;
233 unsigned char x;
234 unsigned char y;
235 } psArc4_t;
236
237 typedef struct
238 {
239 uint32_t ek[3][32];
240 uint32_t dk[3][32];
241 } psDes3Key_t;
242
243 typedef struct
244 {
245 psDes3Key_t key;
246 unsigned char IV[DES3_BLOCKLEN];
247 uint32_t blocklen;
248 } psDes3_t;
249
250
251 typedef union
252 {
253 psAesCbc_t aes;
254 psArc4_t arc4;
255 psDes3_t des3;
256 } psCipherContext_t;
257
258 #endif
259
260 struct wm_crypto_ctx
261 {
262 volatile u8 rsa_complete;
263 volatile u8 gpsec_complete;
264 #ifndef CONFIG_KERNEL_NONE
265 tls_os_sem_t *gpsec_lock;
266 #endif
267 };
268
269
300 int tls_crypto_random_stop(void);
301
302
314 int tls_crypto_random_init(u32 seed, CRYPTO_RNG_SWITCH rng_switch);
315
316
328 int tls_crypto_random_bytes(unsigned char *out, u32 len);
329
341 int tls_crypto_trng(unsigned char *out, u32 len);
342
343
359 int tls_crypto_rc4_init(psCipherContext_t * ctx, const unsigned char *key, u32 keylen);
360
376 int tls_crypto_rc4(psCipherContext_t * ctx, unsigned char *in, unsigned char *out, u32 len);
377
392 int tls_crypto_aes_init(psCipherContext_t * ctx, const unsigned char *IV, const unsigned char *key, u32 keylen, CRYPTO_MODE cbc);
393
408 int tls_crypto_aes_encrypt_decrypt(psCipherContext_t * ctx, unsigned char *in, unsigned char *out, u32 len, CRYPTO_WAY dec);
409
424 int tls_crypto_3des_init(psCipherContext_t * ctx, const unsigned char *IV, const unsigned char *key, u32 keylen, CRYPTO_MODE cbc);
425
440 int tls_crypto_3des_encrypt_decrypt(psCipherContext_t * ctx, unsigned char *in, unsigned char *out, u32 len, CRYPTO_WAY dec);
441
456 int tls_crypto_des_init(psCipherContext_t * ctx, const unsigned char *IV, const unsigned char *key, u32 keylen, CRYPTO_MODE cbc);
457
472 int tls_crypto_des_encrypt_decrypt(psCipherContext_t * ctx, unsigned char *in, unsigned char *out, u32 len, CRYPTO_WAY dec);
473
490 int tls_crypto_crc_init(psCrcContext_t * ctx, u32 key, CRYPTO_CRC_TYPE crc_type, u8 mode);
491
505 int tls_crypto_crc_update(psCrcContext_t * ctx, unsigned char *in, u32 len);
506
518 int tls_crypto_crc_final(psCrcContext_t * ctx, u32 *crc_val);
519
530 void tls_crypto_sha1_init(psDigestContext_t * md);
531
546 void tls_crypto_sha1_update(psDigestContext_t * md, const unsigned char *buf, u32 len);
547
562 int tls_crypto_sha1_final(psDigestContext_t * md, unsigned char *hash);
563
577 void tls_crypto_md5_init(psDigestContext_t * md);
578
593 void tls_crypto_md5_update(psDigestContext_t * md, const unsigned char *buf, u32 len);
594
608 int tls_crypto_md5_final(psDigestContext_t * md, unsigned char *hash);
609
624 int tls_crypto_exptmod(hstm_int *a, hstm_int *e, hstm_int *n, hstm_int *res);
625
636 int tls_crypto_init(void);
637
646 #endif
647
648
CRYPTO_MODE_CBC
CBC.
Definition: wm_crypto_hard.h:144
tls_crypto_des_init
int tls_crypto_des_init(psCipherContext_t *ctx, const unsigned char *IV, const unsigned char *key, u32 keylen, CRYPTO_MODE cbc)
This function initializes a DES encryption algorithm, i.e. fills the psCipherContext_t structure poin...
tls_crypto_aes_init
int tls_crypto_aes_init(psCipherContext_t *ctx, const unsigned char *IV, const unsigned char *key, u32 keylen, CRYPTO_MODE cbc)
This function initializes a AES encryption algorithm, i.e. fills the psCipherContext_t structure poin...
CRYPTO_METHOD_CRC
CRC.
Definition: wm_crypto_hard.h:119
psCrcContext_t::mode
u8 mode
The mode of CRC, bit0 means output reflection and bit1 means input reflection.
Definition: wm_crypto_hard.h:165
tls_crypto_rc4_init
int tls_crypto_rc4_init(psCipherContext_t *ctx, const unsigned char *key, u32 keylen)
This function initializes a RC4 encryption algorithm, i.e. fills the psCipherContext_t structure po...
CRYPTO_CRC_TYPE_16_MODBUS
16 bits Modbus CRC
Definition: wm_crypto_hard.h:154
psCrcContext_t::type
u8 type
The type of CRC, refernec the CRYPTO_CRC_TYPE enum.
Definition: wm_crypto_hard.h:164
wm_osal.h
WM OS adapter layer.
psAesKey_t::type
uint16_t type
Definition: wm_crypto_hard.h:221
tls_crypto_crc_init
int tls_crypto_crc_init(psCrcContext_t *ctx, u32 key, CRYPTO_CRC_TYPE crc_type, u8 mode)
This function initializes a CRC algorithm, i.e. fills the psCrcContext_t structure pointed to by ctx ...
tls_crypto_exptmod
int tls_crypto_exptmod(hstm_int *a, hstm_int *e, hstm_int *n, hstm_int *res)
This function implements the large module power multiplication algorithm. res = a**e (mod n) ...
__CRYPTO_WAY
__CRYPTO_WAY
Definition: wm_crypto_hard.h:126
md5
int md5(const u8 *addr, int len, u8 *mac)
MD5 hash for data vector.
CRYPTO_WAY
enum __CRYPTO_WAY CRYPTO_WAY
tls_crypto_crc_final
int tls_crypto_crc_final(psCrcContext_t *ctx, u32 *crc_val)
This function ends a CRC operation and produces a CRC value.
tls_crypto_crc_update
int tls_crypto_crc_update(psCrcContext_t *ctx, unsigned char *in, u32 len)
This function updates the CRC value with a variable length bytes. This function may be called as many...
sha1
int sha1(const u8 *addr, int len, u8 *mac)
SHA1 hash for data vector.
tls_crypto_trng
int tls_crypto_trng(unsigned char *out, u32 len)
This function is used to generate true random number.
psMd5_t
Definition: wm_crypto_hard.h:186
tls_crypto_3des_init
int tls_crypto_3des_init(psCipherContext_t *ctx, const unsigned char *IV, const unsigned char *key, u32 keylen, CRYPTO_MODE cbc)
This function initializes a 3DES encryption algorithm, i.e. fills the psCipherContext_t structure poi...
psDigestContext_t
Definition: wm_crypto_hard.h:198
tls_crypto_sha1_final
int tls_crypto_sha1_final(psDigestContext_t *md, unsigned char *hash)
This function ends a SHA1 operation and produces a Message-Digest. This function finalizes SHA1 algor...
wm_crypto_ctx
Definition: wm_crypto_hard.h:260
CRYPTO_WAY_ENCRYPT
Encryption.
Definition: wm_crypto_hard.h:128
psAesKey_t::rounds
uint16_t rounds
Definition: wm_crypto_hard.h:220
CRYPTO_MODE_CTR
CTR, only for AES.
Definition: wm_crypto_hard.h:145
CRYPTO_CRC_TYPE
enum __CRYPTO_CRC_TYPE CRYPTO_CRC_TYPE
psArc4_t
Definition: wm_crypto_hard.h:229
CRYPTO_MODE
enum __CRYPTO_MODE CRYPTO_MODE
tls_crypto_rc4
int tls_crypto_rc4(psCipherContext_t *ctx, unsigned char *in, unsigned char *out, u32 len)
This function encrypts a variable length data stream according to RC4. The RC4 algorithm it generates...
hstm_int
Definition: wm_crypto_hard.h:170
__CRYPTO_MODE
__CRYPTO_MODE
Definition: wm_crypto_hard.h:141
CRYPTO_CRC_TYPE_8
8 bits CRC
Definition: wm_crypto_hard.h:153
psAesCbc_t
Definition: wm_crypto_hard.h:223
tls_crypto_md5_init
void tls_crypto_md5_init(psDigestContext_t *md)
This function initializes Message-Diggest context for usage in MD5 algorithm, starts a new MD5 operat...
psDes3_t
Definition: wm_crypto_hard.h:243
wm_type_def.h
WM type redefine.
psCrcContext_t
Definition: wm_crypto_hard.h:162
tls_crypto_des_encrypt_decrypt
int tls_crypto_des_encrypt_decrypt(psCipherContext_t *ctx, unsigned char *in, unsigned char *out, u32 len, CRYPTO_WAY dec)
This function encrypts or decrypts a variable length data stream according to DES.
tls_crypto_sha1_init
void tls_crypto_sha1_init(psDigestContext_t *md)
This function initializes Message-Diggest context for usage in SHA1 algorithm, starts a new SHA1 oper...
tls_crypto_3des_encrypt_decrypt
int tls_crypto_3des_encrypt_decrypt(psCipherContext_t *ctx, unsigned char *in, unsigned char *out, u32 len, CRYPTO_WAY dec)
This function encrypts or decrypts a variable length data stream according to 3DES.
tls_crypto_random_bytes
int tls_crypto_random_bytes(unsigned char *out, u32 len)
This function is used to get random digit content.
tls_os_sem_t
void tls_os_sem_t
Definition: wm_osal.h:53
tls_crypto_sha1_update
void tls_crypto_sha1_update(psDigestContext_t *md, const unsigned char *buf, u32 len)
Process a message block using SHA1 algorithm. This function performs a SHA1 block update operation...
__CRYPTO_METHOD
__CRYPTO_METHOD
Definition: wm_crypto_hard.h:111
tls_crypto_aes_encrypt_decrypt
int tls_crypto_aes_encrypt_decrypt(psCipherContext_t *ctx, unsigned char *in, unsigned char *out, u32 len, CRYPTO_WAY dec)
This function encrypts or decrypts a variable length data stream according to AES.
psDes3Key_t
Definition: wm_crypto_hard.h:237
CRYPTO_METHOD_MD5
MD5.
Definition: wm_crypto_hard.h:120
psCrcContext_t::state
u32 state
The initial value input and result value output.
Definition: wm_crypto_hard.h:163
CRYPTO_WAY_DECRYPT
Decryption.
Definition: wm_crypto_hard.h:129
psCipherContext_t
Definition: wm_crypto_hard.h:251
CRYPTO_MODE_ECB
ECB.
Definition: wm_crypto_hard.h:143
CRYPTO_MODE_CMAC
MAC, only for AES.
Definition: wm_crypto_hard.h:146
CRYPTO_CRC_TYPE_16_CCITT
16 bits CCITT CRC
Definition: wm_crypto_hard.h:155
psAesKey_t
Definition: wm_crypto_hard.h:217
tls_crypto_random_stop
int tls_crypto_random_stop(void)
This function is used to stop random produce.
tls_crypto_init
int tls_crypto_init(void)
This function initializes the encryption module.
tls_crypto_random_init
int tls_crypto_random_init(u32 seed, CRYPTO_RNG_SWITCH rng_switch)
This function initializes random digit seed and BIT number.
tls_crypto_md5_final
int tls_crypto_md5_final(psDigestContext_t *md, unsigned char *hash)
This function ends a MD5 operation and produces a Message-Digest. This function finalizes MD5 algorit...
psSha1_t
Definition: wm_crypto_hard.h:175
__CRYPTO_CRC_TYPE
__CRYPTO_CRC_TYPE
Definition: wm_crypto_hard.h:151
CRYPTO_CRC_TYPE_32
32 bits CRC
Definition: wm_crypto_hard.h:156
tls_crypto_md5_update
void tls_crypto_md5_update(psDigestContext_t *md, const unsigned char *buf, u32 len)
Process a message block using MD5 algorithm. This function performs a MD5 block update operation...


W800 SDK APIs: doxy_out/include/wm_debug.h Source File

  • doxy_out
  • include
wm_debug.h
Go to the documentation of this file.
1
10 #ifndef WM_DEBUG_H
11 #define WM_DEBUG_H
12
13 #include <stdio.h>
14 #include <stdlib.h>
15 #include "wm_config.h"
16 #include "wm_osal.h"
17
18 /* 0x00000000 - 0x80000000 */
20 #define TLS_DBG_ON 1
21
22 #define TLS_DBG_OFF 0
23
24 #define TLS_DBG_SIMPLE 1
25
26 /* 0x0000000F - 0x00000001 */
28 #define TLS_DBG_LEVEL_INFO TLS_DBG_OFF
29
30 #define TLS_DBG_LEVEL_WARNING TLS_DBG_OFF
31
32 #define TLS_DBG_LEVEL_ERR TLS_DBG_OFF
33
34 #define TLS_DBG_LEVEL_DUMP TLS_DBG_OFF
35
37 #define TLS_GENERAL_DBG TLS_DBG_OFF
38
39 #if TLS_DBG_SIMPLE
40 #define __TLS_DBGPRT_INFO(fmt, ...) printf(fmt, ##__VA_ARGS__)
41 #define __TLS_DBGPRT_WARNING(fmt, ...) printf(fmt, ##__VA_ARGS__)
42 #define __TLS_DBGPRT_ERR(fmt, ...) printf(fmt, ##__VA_ARGS__)
43 #else
44 #define __TLS_DBGPRT_INFO(fmt, ...) \
45 do { \
46 u32 time = tls_os_get_time(); \
47 printf("[WM_I] <%d.%02d> %s : "fmt, (time/100), (time%100), __func__ , ##__VA_ARGS__); \
48 } while (0)
49
50 #define __TLS_DBGPRT_WARNING(fmt, ...) \
51 do { \
52 u32 time = tls_os_get_time(); \
53 printf("[WM_W] <%d.%02d> %s : "fmt, (time/100), (time%100), __func__ , ##__VA_ARGS__); \
54 } while (0)
55
56 #define __TLS_DBGPRT_ERR(fmt, ...) \
57 do { \
58 u32 time = tls_os_get_time(); \
59 printf("[WM_E] <%d.%02d> %s : "fmt, (time/100), (time%100), __func__ , ##__VA_ARGS__); \
60 } while (0)
61 #endif
62
83 #if (TLS_GENERAL_DBG && TLS_DBG_LEVEL_INFO)
84
85 #define TLS_DBGPRT_INFO(f, a...) __TLS_DBGPRT_INFO(f, ##a)
86 #else
87
88 #define TLS_DBGPRT_INFO(f, a...)
89 #endif
90
91 #if (TLS_GENERAL_DBG && TLS_DBG_LEVEL_WARNING)
92
93 #define TLS_DBGPRT_WARNING(f, a...) __TLS_DBGPRT_WARNING(f, ##a)
94 #else
95
96 #define TLS_DBGPRT_WARNING(f, a...)
97 #endif
98
99 #if (TLS_GENERAL_DBG && TLS_DBG_LEVEL_ERR)
100
101 #define TLS_DBGPRT_ERR(f, a...) __TLS_DBGPRT_ERR(f, ##a)
102 #else
103
104 #define TLS_DBGPRT_ERR(f, a...)
105 #endif
106
107 #if (TLS_GENERAL_DBG && TLS_DBG_LEVEL_DUMP)
108
118 void TLS_DBGPRT_DUMP(char *p, u32 len);
119 #else
120
121 #define TLS_DBGPRT_DUMP(p, len)
122 #endif
123
132 #endif /* end of WM_DEBUG_H */
133
wm_osal.h
WM OS adapter layer.
TLS_DBGPRT_DUMP
#define TLS_DBGPRT_DUMP(p, len)
Definition: wm_debug.h:121
wm_config.h
w800 chip inferface configure


W800 SDK APIs: doxy_out/include/app/wm_dhcp_server.h Source File

  • doxy_out
  • include
  • app
wm_dhcp_server.h
Go to the documentation of this file.
1
11 #ifndef WM_DHCP_SERVER_H
12 #define WM_DHCP_SERVER_H
13
45 s8 tls_dhcps_start(void);
46
56 void tls_dhcps_stop(void);
57
69 ip_addr_t *tls_dhcps_getip(const u8 *mac);
70
80 void tls_dhcps_setdns(u8 numdns);
81
90 #endif /* WM_DHCP_SERVER_H */
91
tls_dhcps_start
s8 tls_dhcps_start(void)
This function is used to start DHCP Server for a network interface.
tls_dhcps_setdns
void tls_dhcps_setdns(u8 numdns)
This function is used to set DHCP server&#39;s DNS address.
tls_dhcps_stop
void tls_dhcps_stop(void)
This function is used to stop DHCP server.
tls_dhcps_getip
ip_addr_t * tls_dhcps_getip(const u8 *mac)
This function is used to get station&#39;s IP address by MAC address.


W800 SDK APIs: doxy_out/include/driver/wm_dma.h Source File

  • doxy_out
  • include
  • driver
wm_dma.h
Go to the documentation of this file.
1
10 #ifndef __WM_DMA_H_
11 #define __WM_DMA_H_
12
13 #define TLS_DMA_SEL_UART_RX 0
14 #define TLS_DMA_SEL_UART_TX 1
15 #define TLS_DMA_SEL_PWM_CAP0 2
16 #define TLS_DMA_SEL_PWM_CAP1 3
17 #define TLS_DMA_SEL_LSSPI_RX 4
18 #define TLS_DMA_SEL_LSSPI_TX 5
19 #define TLS_DMA_SEL_SDADC_CH0 6
20 #define TLS_DMA_SEL_SDADC_CH1 7
21 #define TLS_DMA_SEL_SDADC_CH2 8
22 #define TLS_DMA_SEL_SDADC_CH3 9
23 #define TLS_DMA_SEL_I2S_RX 10
24 #define TLS_DMA_SEL_I2S_TX 11
25 #define TLS_DMA_SEL_SDIO_HOST 12
26
27 #define TLS_DMA_FLAGS_HARD_MODE (1 << 0)
28 #define TLS_DMA_FLAGS_CHAIN_MODE (1 << 1)
29 #define TLS_DMA_FLAGS_CHANNEL_SEL(n) ((n) << 2)
30 #define TLS_DMA_FLAGS_CHAIN_LINK_EN (1 << 6)
31 #define TLS_DMA_FLAGS_CHANNEL_VALID (1 << 7)
32
33
34 #define TLS_DMA_DESC_VALID (1U << 31)
35 #define TLS_DMA_DESC_CTRL_SRC_ADD_INC (1 << 0)
36 #define TLS_DMA_DESC_CTRL_DEST_ADD_INC (1 << 2)
37 #define TLS_DMA_DESC_CTRL_DATA_SIZE_BYTE (0 << 4)
38 #define TLS_DMA_DESC_CTRL_DATA_SIZE_SHORT (1 << 4)
39 #define TLS_DMA_DESC_CTRL_DATA_SIZE_WORD (2 << 4)
40 #define TLS_DMA_DESC_CTRL_BURST_SIZE1 (0 << 6)
41 #define TLS_DMA_DESC_CTRL_BURST_SIZE4 (1 << 6)
42 #define TLS_DMA_DESC_CTRL_TOTAL_BYTES(n) ((n) << 7)
43
44
45 /* dma interrupt flags */
46 #define TLS_DMA_IRQ_BURST_DONE (1 << 0)
47 #define TLS_DMA_IRQ_TRANSFER_DONE (1 << 1)
48 #define TLS_DMA_IRQ_BOTH_DONE (TLS_DMA_IRQ_BURST_DONE | TLS_DMA_IRQ_TRANSFER_DONE)
49
50 struct tls_dma_descriptor {
51 unsigned int valid;
52 unsigned int dma_ctrl;
53 unsigned int src_addr;
54 unsigned int dest_addr;
55 struct tls_dma_descriptor *next;
56 };
57
89 void tls_dma_irq_clr(unsigned char ch, unsigned char flags);
90
91
104 void tls_dma_irq_register(unsigned char ch, void (*callback)(void *p), void *arg, unsigned char flags);
105
106
116 int tls_dma_wait_complt(unsigned char ch);
117
118
142 unsigned char tls_dma_start_by_wrap(unsigned char ch, struct tls_dma_descriptor *dma_desc,
143 unsigned char auto_reload, unsigned short src_zize,
144 unsigned short dest_zize);
145
146
170 unsigned char tls_dma_start(unsigned char ch, struct tls_dma_descriptor *dma_desc,
171 unsigned char auto_reload);
172
182 unsigned char tls_dma_stop(unsigned char ch);
183
184
198 unsigned char tls_dma_request(unsigned char ch, unsigned char flags);
199
200
210 void tls_dma_free(unsigned char ch);
211
212
222 void tls_dma_init(void);
223
232 #endif /* __TLS_DMA_H_151606__ */
233
tls_dma_start_by_wrap
unsigned char tls_dma_start_by_wrap(unsigned char ch, struct tls_dma_descriptor *dma_desc, unsigned char auto_reload, unsigned short src_zize, unsigned short dest_zize)
This function is used to Start the DMA controller by Wrap.
tls_dma_stop
unsigned char tls_dma_stop(unsigned char ch)
This function is used to To stop current DMA channel transfer.
tls_dma_request
unsigned char tls_dma_request(unsigned char ch, unsigned char flags)
This function is used to Request a free dma channel If ch is out of range [0,7] or valid but used...
tls_dma_init
void tls_dma_init(void)
This function is used to Initialize DMA Control.
tls_dma_wait_complt
int tls_dma_wait_complt(unsigned char ch)
This function is used to register dma interrupt.
tls_dma_irq_register
void tls_dma_irq_register(unsigned char ch, void(*callback)(void *p), void *arg, unsigned char flags)
This function is used to register dma interrupt callback function.
tls_dma_irq_clr
void tls_dma_irq_clr(unsigned char ch, unsigned char flags)
This function is used to clear dma interrupt flag.
tls_dma_start
unsigned char tls_dma_start(unsigned char ch, struct tls_dma_descriptor *dma_desc, unsigned char auto_reload)
This function is used to Wait until DMA operation completes.
tls_dma_free
void tls_dma_free(unsigned char ch)
This function is used to Free the DMA channel when not use.
tls_dma_descriptor::next
struct tls_dma_descriptor * next
Definition: wm_dma.h:55
tls_dma_descriptor
Definition: wm_dma.h:50


W800 SDK APIs: doxy_out/include/app/wm_dns_server.h Source File

  • doxy_out
  • include
  • app
wm_dns_server.h
Go to the documentation of this file.
1
11 #ifndef WM_DNS_SERVER_H
12 #define WM_DNS_SERVER_H
13
44 s8 tls_dnss_start(u8 *dnsname);
45
55 void tls_dnss_stop(void);
56
65 #endif /* WM_DNS_SERVER_H */
66
tls_dnss_start
s8 tls_dnss_start(u8 *dnsname)
This function is used to start DNS service.
tls_dnss_stop
void tls_dnss_stop(void)
This function is used to stop DNS service.


W800 SDK APIs: doxy_out/include/driver/wm_efuse.h Source File

  • doxy_out
  • include
  • driver
wm_efuse.h
Go to the documentation of this file.
1
10 #ifndef WM_EFUSE_H
11 #define WM_EFUSE_H
12
13 #define TLS_EFUSE_STATUS_OK (0)
14 #define TLS_EFUSE_STATUS_EINVALID (1)
15 #define TLS_EFUSE_STATUS_EIO (2)
16
17 enum {
18 CMD_WIFI_MAC = 0x01,
19 CMD_BT_MAC,
20 CMD_TX_DC,
21 CMD_RX_DC,
22 CMD_TX_IQ_GAIN,
23 CMD_RX_IQ_GAIN,
24 CMD_TX_IQ_PHASE,
25 CMD_RX_IQ_PHASE,
26 CMD_TX_GAIN,
27 CMD_TX_ADC_CAL,
28 CMD_FREQ_ERR,
29 CMD_RF_CAL_FLAG,
30 CMD_ALL,
31 };
32
33 #define FREQERR_ADDR (FT_MAGICNUM_ADDR + sizeof(FT_PARAM_ST))
34 #define FREQERR_LEN (4)
35 #define CAL_FLAG_ADDR (FT_MAGICNUM_ADDR + sizeof(FT_PARAM_ST)+4)
36 #define CAL_FLAG_LEN (4)
37
38 //#define TX_GAIN_NEW_ADDR (VCG_ADDR+VCG_LEN)
39 #define TX_GAIN_LEN (28*3)
40
41 typedef struct FT_ADC_CAL_UNIT
42 {
43 unsigned short ref_val;
44 unsigned short real_val;
45 }FT_ADC_CAL_UINT_ST;
46
47 typedef struct FT_ADC_CAL
48 {
49 unsigned int valid_cnt;
50 FT_ADC_CAL_UINT_ST units[6];
51 float a;
52 float b;
53 }FT_ADC_CAL_ST;
54
55 typedef struct FT_TEMP_CAL
56 {
57 int ref_val;
58 int real_val;
59 }FT_TEMP_CAL_ST;
60
89 int tls_ft_param_init(void);
90
91
102 int tls_ft_param_set(unsigned int opnum, void *data, unsigned int len);
103
114 int tls_ft_param_get(unsigned int opnum, void *data, unsigned int rdlen);
115
116
125 int tls_get_mac_addr(u8 *mac);
126
135 int tls_set_mac_addr(u8 *mac);
144 int tls_get_bt_mac_addr(u8 *mac);
145
154 int tls_set_bt_mac_addr(u8 *mac);
155
156
165 int tls_get_tx_gain(u8 *txgain);
166
175 int tls_set_tx_gain(u8 *txgain);
176
185 int tls_get_tx_lo(u8 *txlo);
186
196 int tls_set_tx_lo(u8 *txlo);
197
206 int tls_get_tx_iq_gain(u8 *txGain);
207
216 int tls_set_tx_iq_gain(u8 *txGain);
217
226 int tls_get_rx_iq_gain(u8 *rxGain);
227
236 int tls_set_rx_iq_gain(u8 *rxGain);
237
246 int tls_get_tx_iq_phase(u8 *txPhase);
247
256 int tls_set_tx_iq_phase(u8 *txPhase);
257
266 int tls_get_rx_iq_phase(u8 *rxPhase);
267
276 int tls_set_rx_iq_phase(u8 *rxPhase);
277
286 int tls_freq_err_op(u8 *freqerr, u8 flag);
287
297 int tls_rf_cal_finish_op(u8 *calflag, u8 flag);
298
299
308 int tls_get_adc_cal_param(FT_ADC_CAL_ST *adc_cal);
309
310
319 int tls_set_adc_cal_param(FT_ADC_CAL_ST *adc_cal);
320
321
330 #endif /* WM_EFUSE_H */
331
tls_get_rx_iq_phase
int tls_get_rx_iq_phase(u8 *rxPhase)
This function is used to get rx iq phase.
tls_get_tx_gain
int tls_get_tx_gain(u8 *txgain)
This function is used to get tx gain.
FT_ADC_CAL_UNIT
Definition: wm_efuse.h:41
tls_rf_cal_finish_op
int tls_rf_cal_finish_op(u8 *calflag, u8 flag)
This function is used to set/get cal finish flag.
tls_get_tx_iq_gain
int tls_get_tx_iq_gain(u8 *txGain)
This function is used to get tx iq gain.
tls_set_rx_iq_gain
int tls_set_rx_iq_gain(u8 *rxGain)
This function is used to get rx iq gain.
FT_ADC_CAL
Definition: wm_efuse.h:47
tls_set_tx_lo
int tls_set_tx_lo(u8 *txlo)
This function is used to set tx lod.
tls_set_adc_cal_param
int tls_set_adc_cal_param(FT_ADC_CAL_ST *adc_cal)
This function is used to set adc cal param.
tls_set_tx_iq_phase
int tls_set_tx_iq_phase(u8 *txPhase)
This function is used to set tx iq phase.
tls_set_tx_gain
int tls_set_tx_gain(u8 *txgain)
This function is used to set tx gain.
tls_freq_err_op
int tls_freq_err_op(u8 *freqerr, u8 flag)
This function is used to set/get freq err.
FT_TEMP_CAL
Definition: wm_efuse.h:55
tls_get_tx_iq_phase
int tls_get_tx_iq_phase(u8 *txPhase)
This function is used to get tx iq phase.
tls_set_bt_mac_addr
int tls_set_bt_mac_addr(u8 *mac)
This function is used to set bluetooth mac addr.
tls_get_tx_lo
int tls_get_tx_lo(u8 *txlo)
This function is used to get tx lod.
tls_set_rx_iq_phase
int tls_set_rx_iq_phase(u8 *rxPhase)
This function is used to set rx iq phase.
tls_ft_param_get
int tls_ft_param_get(unsigned int opnum, void *data, unsigned int rdlen)
This function is used to read ft_param.
tls_set_mac_addr
int tls_set_mac_addr(u8 *mac)
This function is used to set mac addr.
tls_ft_param_init
int tls_ft_param_init(void)
This function is used to init ft param.
tls_get_bt_mac_addr
int tls_get_bt_mac_addr(u8 *mac)
This function is used to get bluetooth mac addr.
tls_get_adc_cal_param
int tls_get_adc_cal_param(FT_ADC_CAL_ST *adc_cal)
This function is used to get adc cal param.
tls_set_tx_iq_gain
int tls_set_tx_iq_gain(u8 *txGain)
This function is used to set tx iq gain.
tls_ft_param_set
int tls_ft_param_set(unsigned int opnum, void *data, unsigned int len)
This function is used to write ft_param.
tls_get_rx_iq_gain
int tls_get_rx_iq_gain(u8 *rxGain)
This function is used to get rx iq gain.
tls_get_mac_addr
int tls_get_mac_addr(u8 *mac)
This function is used to get mac addr.


W800 SDK APIs: doxy_out/include/driver/wm_flash.h Source File

  • doxy_out
  • include
  • driver
wm_flash.h
Go to the documentation of this file.
1
10 #ifndef WM_FLASH_H
11 #define WM_FLASH_H
12
13 #include "wm_type_def.h"
14 #include "wm_osal.h"
15
16 #define TLS_FLS_STATUS_OK (0)
17 #define TLS_FLS_STATUS_EINVAL (1)
18 #define TLS_FLS_STATUS_EBUSY (2)
19 #define TLS_FLS_STATUS_EPERM (3)
20 #define TLS_FLS_STATUS_ENOSUPPORT (4)
21 #define TLS_FLS_STATUS_EEXIST (5)
22 #define TLS_FLS_STATUS_ENOMEM (6)
23 #define TLS_FLS_STATUS_EOVERFLOW (7)
24 #define TLS_FLS_STATUS_ENODEV (8)
25 #define TLS_FLS_STATUS_EDEV (9)
26 #define TLS_FLS_STATUS_EIO (10)
27 #define TLS_FLS_STATUS_ENODRV (11)
28
29 #define TLS_FLS_PARAM_TYPE_ID (0)
30 #define TLS_FLS_PARAM_TYPE_SIZE (1)
31 #define TLS_FLS_PARAM_TYPE_PAGE_SIZE (2)
32 #define TLS_FLS_PARAM_TYPE_PROG_SIZE (3)
33 #define TLS_FLS_PARAM_TYPE_SECTOR_SIZE (4)
34
35 #define TLS_FLS_FLAG_UNDER_PROTECT (1<<0)
36 #define TLS_FLS_FLAG_FAST_READ (1<<1)
37 #define TLS_FLS_FLAG_AAAI (1<<2)
38
39 #define FLS_CMD_READ_DEV_ID (0x9F) // read device id //(0x9f)
40
44 struct fls_list
45 {
46 struct fls_list *next;
47 struct fls_list *prev;
48 };
49
50
54 struct tls_fls_drv
55 {
56 struct fls_list drv_list;
57 u32 id;
58 u32 total_size;
59 u32 page_size;
60 u32 program_size;
61 u32 sector_size;
62 u32 clock;
63 u8 mode;
64 u8 cs_active;
65 u8 flags;
66 int (*read) (u32, u8 *, u32);
67 int (*fast_read) (u32, u8 *, u32);
68 int (*page_write) (u32, u8 *);
69 int (*erase) (u32);
70 int (*chip_erase) (void);
71 int (*probe)(u32 id);
72 void (*remove) (void);
73 };
74
78 struct tls_fls
79 {
80 struct fls_list fls_drvs;
81 struct tls_fls_drv *current_drv;
82 tls_os_sem_t *fls_lock;
83 };
84
116 int tls_spifls_init(void);
117
118
131 int tls_spifls_read(u32 addr, u8 * buf, u32 len);
132
133
149 int tls_spifls_write(u32 addr, u8 * buf, u32 len);
150
159 #endif /* WM_FLASH_H */
wm_osal.h
WM OS adapter layer.
tls_fls
Definition: wm_flash.h:78
wm_type_def.h
WM type redefine.
tls_os_sem_t
void tls_os_sem_t
Definition: wm_osal.h:53
tls_fls_drv
Definition: wm_flash.h:54
tls_spifls_read
int tls_spifls_read(u32 addr, u8 *buf, u32 len)
This function is used to read data from the flash.
tls_spifls_init
int tls_spifls_init(void)
This function is used to initial flash module structer.
tls_spifls_write
int tls_spifls_write(u32 addr, u8 *buf, u32 len)
This function is used to write data into the flash.
fls_list
Definition: wm_flash.h:44


W800 SDK APIs: doxy_out/include/driver/wm_flash_map.h Source File

  • doxy_out
  • include
  • driver
wm_flash_map.h
Go to the documentation of this file.
1
10 #ifndef __WM_FLASH_MAP_H__
11 #define __WM_FLASH_MAP_H__
12
16 #define FLASH_BASE_ADDR (0x8000000UL)
17
19 #define CODE_UPD_START_ADDR (0x8010000UL)
20
22 #define CODE_RUN_START_ADDR (0x80D0000UL)
23
25 #define USER_ADDR_START (0x81E0000UL)
26
27
29 extern unsigned int TLS_FLASH_MESH_PARAM_ADDR;
30 extern unsigned int TLS_FLASH_PARAM_DEFAULT;
31 extern unsigned int TLS_FLASH_PARAM1_ADDR;
32 extern unsigned int TLS_FLASH_PARAM2_ADDR;
33 extern unsigned int TLS_FLASH_PARAM_RESTORE_ADDR;
34 extern unsigned int TLS_FLASH_OTA_FLAG_ADDR;
35 extern unsigned int TLS_FLASH_END_ADDR;
36
37 #define SIGNATURE_WORD (0xA0FFFF9FUL)
38 #define IMAGE_START_ADDR_MSK (0x400)
39 #endif /*__WM_CONFIG_H__*/
40
TLS_FLASH_MESH_PARAM_ADDR
unsigned int TLS_FLASH_MESH_PARAM_ADDR


W800 SDK APIs: doxy_out/include/driver/wm_fls_gd25qxx.h Source File

  • doxy_out
  • include
  • driver
wm_fls_gd25qxx.h
Go to the documentation of this file.
1
11 #ifndef TLS_EXSPIFLS_H
12 #define TLS_EXSPIFLS_H
13
14 #define SPI_SCLK (10000000)
15 #define FLASH_TOTAL_SIZE (1024*1024)
16 #define PAGE_SIZE 256
17 #define PROGRAM_SIZE 256
18 #define PAGE_ADDR_OFFSET 8
19 #define SECTOR_SIZE 4096
20
21
25 #define EXSPIFLASH_WRITE_ENABLE (0x06)
26 #define EXSPIFLASH_WRITE_DISABLE (0x04)
27 #define EXSPIFLASH_READ_SR1 (0x05)
28 #define EXSPIFLASH_READ_SR2 (0x35)
29 #define EXSPIFLASH_WRITE_SR (0x01)
30 #define EXSPIFLASH_PAGE_PROGRAM (0x02)
31 #define EXSPIFLASH_DATA_READ (0x03)
32 #define EXSPIFLASH_DATA_FAST_READ (0x0b)
33 #define EXSPIFLASH_SECTOR_ERASE (0x20)
34 #define EXSPIFLASH_BLOCK32_ERASE (0x52)
35 #define EXSPIFLASH_BLOCK64_ERASE (0xd8)
36 #define EXSPIFLASH_CHIP_ERASE (0xc7)
37 #define EXSPIFLASH_FLASH_DEVICEID (0x90)
38 #define EXSPIFLASH_FLASH_ID (0x9f)
41 #define FLASH_STATUS_BUSY (1 << 0)
42 #define FLASH_STATUS_WEL (1 << 1)
43
58 int tls_spifls_drv_install(void);
59
60 #endif /* TLS_FLS_GD25QXX_H */
tls_spifls_drv_install
int tls_spifls_drv_install(void)
This function is used to install gd25qxx driver.


W800 SDK APIs: doxy_out/include/platform/wm_fwup.h Source File

  • doxy_out
  • include
  • platform
wm_fwup.h
Go to the documentation of this file.
1
11 #ifndef WM_FWUP_H
12 #define WM_FWUP_H
13 #include "wm_osal.h"
14 #include "list.h"
15
17 #define TLS_FWUP_STATUS_OK (0)
18 #define TLS_FWUP_STATUS_EINVALID (1)
19 #define TLS_FWUP_STATUS_EMEM (2)
20 #define TLS_FWUP_STATUS_EPERM (3)
21 #define TLS_FWUP_STATUS_EBUSY (4)
22 #define TLS_FWUP_STATUS_ESESSIONID (5)
23 #define TLS_FWUP_STATUS_EIO (6)
24 #define TLS_FWUP_STATUS_ESIGNATURE (7)
25 #define TLS_FWUP_STATUS_ECRC (8)
26 #define TLS_FWUP_STATUS_EUNDEF (9)
27
28
30 #define TLS_FWUP_BLK_SIZE 512
31
33 #define TLS_FWUP_REQ_STATUS_IDLE (0)
34 #define TLS_FWUP_REQ_STATUS_BUSY (1)
35 #define TLS_FWUP_REQ_STATUS_SUCCESS (2)
36 #define TLS_FWUP_REQ_STATUS_FIO (3)
37 #define TLS_FWUP_REQ_STATUS_FSIGNATURE (4)
38 #define TLS_FWUP_REQ_STATUS_FMEM (5)
39 #define TLS_FWUP_REQ_STATUS_FCRC (6)
40 #define TLS_FWUP_REQ_STATUS_FCOMPLETE (7)
41
43 #define TLS_FWUP_STATE_UNDEF (0xffff)
44 #define TLS_FWUP_STATE_BUSY (1 << 0)
45 #define TLS_FWUP_STATE_COMPLETE (1 << 1)
46 #define TLS_FWUP_STATE_ERROR_IO (1 << 2)
47 #define TLS_FWUP_STATE_ERROR_SIGNATURE (1 << 3)
48 #define TLS_FWUP_STATE_ERROR_MEM (1 << 4)
49 #define TLS_FWUP_STATE_ERROR_CRC (1 << 5)
50
51 #define TLS_FWUP_STATE_ERROR (TLS_FWUP_STATE_ERROR_IO | TLS_FWUP_STATE_ERROR_SIGNATURE | TLS_FWUP_STATE_ERROR_MEM | TLS_FWUP_STATE_ERROR_CRC)
52
54 #define TLS_FWUP_DEST_SPECIFIC_FIRMWARE (0)
55 #define TLS_FWUP_DEST_SPECIFIC_DATA (1)
56
57 enum IMAGE_TYPE_ENUM{
58 IMG_TYPE_SECBOOT = 0x0,
59 IMG_TYPE_FLASHBIN0 = 0x1,
60 IMG_TYPE_CPFT = 0xE
61 };
62
63 enum
64 {
65 NOT_ZIP_FILE = 0,
66 ZIP_FILE = 1
67 };
68 typedef union {
69 struct {
70 uint32_t img_type: 4;
71 uint32_t code_encrypt:1;
72 uint32_t prikey_sel:3;
73 uint32_t signature:1;
74 uint32_t _reserved1: 7;
75 uint32_t zip_type: 1;
76 uint32_t psram_io: 1;
77 uint32_t erase_block_en: 1;
78 uint32_t erase_always: 1;
79 uint32_t _reserved2: 12;
80 } b;
81 uint32_t w;
82 } Img_Attr_Type;
83
84 typedef struct IMAGE_HEADER_PARAM{
85 unsigned int magic_no;
86 Img_Attr_Type img_attr;
87 unsigned int img_addr;
88 unsigned int img_len;
89 unsigned int img_header_addr;
90 unsigned int upgrade_img_addr;
91 unsigned int org_checksum;
92 unsigned int upd_no;
93 unsigned char ver[16];
94 unsigned int _reserved0;
95 unsigned int _reserved1;
96 struct IMAGE_HEADER_PARAM *next;
97 unsigned int hd_checksum;
98 }IMAGE_HEADER_PARAM_ST;
99
100
102 struct tls_fwup_image_hdr {
103 u32 magic;
104 u8 crc8;
105 u8 dest_specific;
106 u16 dest_offset; // unit: 4KB, valid when dest_specific is TRUE
107 u32 file_len;
108 char time[4];
109 };
110
112 struct tls_fwup_block {
113 u16 number; //0~Sum-1
114 u16 sum;
115 u8 data[TLS_FWUP_BLK_SIZE];
116 u32 crc32;
117 u8 pad[8];
118 };
119
121 enum tls_fwup_image_src {
122 TLS_FWUP_IMAGE_SRC_LUART = 0,
123 TLS_FWUP_IMAGE_SRC_HUART,
124 TLS_FWUP_IMAGE_SRC_HSPI,
125 TLS_FWUP_IMAGE_SRC_WEB
126 };
127
129 struct tls_fwup_request {
130 struct dl_list list;
131 u8 *data;
132 u32 data_len;
133 int status;
134 void (*complete)(struct tls_fwup_request *request, void *arg);
135 void *arg;
136 };
137
139 struct tls_fwup {
140 struct dl_list wait_list;
141 tls_os_sem_t *list_lock;
142
143 bool busy;
144 enum tls_fwup_image_src current_image_src;
145 u16 current_state;
146 u32 current_session_id;
147
148 u32 received_len;
149 u32 total_len;
150 u32 updated_len;
151 u32 program_base;
152 u32 program_offset;
153 s32 received_number;
154 };
155
186 int tls_fwup_init(void);
187
201 u32 tls_fwup_enter(enum tls_fwup_image_src image_src);
202
215 int tls_fwup_exit(u32 session_id);
216
236 int tls_fwup_request_sync(u32 session_id, u8 *data, u32 data_len);
237
247 u16 tls_fwup_current_state(u32 session_id);
248
261 int tls_fwup_reset(u32 session_id);
262
272 int tls_fwup_clear_error(u32 session_id);
273
286 int tls_fwup_set_crc_error(u32 session_id);
287
298 int tls_fwup_get_status(void);
299
310 int tls_fwup_set_update_numer(int number);
311
322 int tls_fwup_get_current_update_numer(void);
323
324
335 int tls_fwup_get_current_session_id(void);
336
347 int tls_fwup_img_header_check(IMAGE_HEADER_PARAM_ST *img_param);
348
357 #endif /* WM_FWUP_H */
358
TLS_FWUP_IMAGE_SRC_HSPI
Definition: wm_fwup.h:124
Img_Attr_Type::erase_block_en
uint32_t erase_block_en
Definition: wm_fwup.h:77
wm_osal.h
WM OS adapter layer.
tls_fwup_request
Definition: wm_fwup.h:129
TLS_FWUP_IMAGE_SRC_LUART
Definition: wm_fwup.h:122
tls_fwup_get_current_session_id
int tls_fwup_get_current_session_id(void)
This function is used to get current session id.
IMAGE_HEADER_PARAM
Definition: wm_fwup.h:84
Img_Attr_Type::_reserved1
uint32_t _reserved1
Definition: wm_fwup.h:74
tls_fwup_block
Definition: wm_fwup.h:112
tls_fwup_image_src
tls_fwup_image_src
Definition: wm_fwup.h:121
tls_fwup_image_hdr
Definition: wm_fwup.h:102
tls_fwup_clear_error
int tls_fwup_clear_error(u32 session_id)
This function is used to clear error update state.
Img_Attr_Type::signature
uint32_t signature
Definition: wm_fwup.h:73
tls_fwup_enter
u32 tls_fwup_enter(enum tls_fwup_image_src image_src)
This function is used to enter firmware update progress.
dl_list
Definition: list.h:22
Img_Attr_Type::psram_io
uint32_t psram_io
Definition: wm_fwup.h:76
Img_Attr_Type::erase_always
uint32_t erase_always
Definition: wm_fwup.h:78
tls_fwup_get_current_update_numer
int tls_fwup_get_current_update_numer(void)
This function is used to get received update packet number.
Img_Attr_Type::code_encrypt
uint32_t code_encrypt
Definition: wm_fwup.h:71
Img_Attr_Type::prikey_sel
uint32_t prikey_sel
Definition: wm_fwup.h:72
tls_fwup_reset
int tls_fwup_reset(u32 session_id)
This function is used to reset the update information.
TLS_FWUP_IMAGE_SRC_HUART
Definition: wm_fwup.h:123
tls_fwup_exit
int tls_fwup_exit(u32 session_id)
This function is used to exit firmware update progress.
tls_fwup_set_update_numer
int tls_fwup_set_update_numer(int number)
This function is used to set update packet number.
tls_os_sem_t
void tls_os_sem_t
Definition: wm_osal.h:53
tls_fwup_img_header_check
int tls_fwup_img_header_check(IMAGE_HEADER_PARAM_ST *img_param)
This function is used to check image header.
tls_fwup_set_crc_error
int tls_fwup_set_crc_error(u32 session_id)
This function is used to set update state to TLS_FWUP_STATE_ERROR_CRC.
tls_fwup
Definition: wm_fwup.h:139
tls_fwup_current_state
u16 tls_fwup_current_state(u32 session_id)
This function is used to get current update status.
Img_Attr_Type::zip_type
uint32_t zip_type
Definition: wm_fwup.h:75
TLS_FWUP_IMAGE_SRC_WEB
Definition: wm_fwup.h:125
Img_Attr_Type::w
uint32_t w
Definition: wm_fwup.h:81
Img_Attr_Type
Definition: wm_fwup.h:68
Img_Attr_Type::img_type
uint32_t img_type
Definition: wm_fwup.h:70
tls_fwup_init
int tls_fwup_init(void)
This function is used to initialize firmware update task.
Img_Attr_Type::_reserved2
uint32_t _reserved2
Definition: wm_fwup.h:79
tls_fwup_request_sync
int tls_fwup_request_sync(u32 session_id, u8 *data, u32 data_len)
This function is used to start update progress.
tls_fwup_get_status
int tls_fwup_get_status(void)
This function is used to get progress&#39;s status.
TLS_FWUP_BLK_SIZE
#define TLS_FWUP_BLK_SIZE
Definition: wm_fwup.h:30


W800 SDK APIs: doxy_out/include/driver/wm_gpio.h Source File

  • doxy_out
  • include
  • driver
wm_gpio.h
Go to the documentation of this file.
1
10 #ifndef WM_GPIO_H
11 #define WM_GPIO_H
12
13 #include "wm_type_def.h"
14 #include "wm_io.h"
15
17 typedef void (*tls_gpio_irq_callback)(void *arg);
18
20 enum tls_gpio_dir {
21 WM_GPIO_DIR_OUTPUT,
22 WM_GPIO_DIR_INPUT
23 };
24
26 enum tls_gpio_attr {
27 WM_GPIO_ATTR_FLOATING,
28 WM_GPIO_ATTR_PULLHIGH,
29 WM_GPIO_ATTR_PULLLOW
30 };
31
33 enum tls_gpio_irq_trig {
34 WM_GPIO_IRQ_TRIG_RISING_EDGE,
35 WM_GPIO_IRQ_TRIG_FALLING_EDGE,
36 WM_GPIO_IRQ_TRIG_DOUBLE_EDGE,
37 WM_GPIO_IRQ_TRIG_HIGH_LEVEL,
38 WM_GPIO_IRQ_TRIG_LOW_LEVEL
39 };
40
73 void tls_gpio_cfg(enum tls_io_name gpio_pin, enum tls_gpio_dir dir, enum tls_gpio_attr attr);
74
75
86 u8 tls_gpio_read(enum tls_io_name gpio_pin);
87
88
101 void tls_gpio_write(enum tls_io_name gpio_pin, u8 value);
102
103
114 void tls_gpio_irq_enable(enum tls_io_name gpio_pin, enum tls_gpio_irq_trig mode);
115
116
126 void tls_gpio_irq_disable(enum tls_io_name gpio_pin);
127
128
139 u8 tls_get_gpio_irq_status(enum tls_io_name gpio_pin);
140
141
151 void tls_clr_gpio_irq_status(enum tls_io_name gpio_pin);
152
153
168 void tls_gpio_isr_register(enum tls_io_name gpio_pin,
169 tls_gpio_irq_callback callback,
170 void *arg);
180 #endif /* end of WM_GPIO_H */
181
tls_gpio_dir
tls_gpio_dir
Definition: wm_gpio.h:20
WM_GPIO_ATTR_PULLLOW
Definition: wm_gpio.h:29
tls_io_name
tls_io_name
Definition: wm_io.h:17
tls_clr_gpio_irq_status
void tls_clr_gpio_irq_status(enum tls_io_name gpio_pin)
This function is used to clear gpio interrupt flag.
WM_GPIO_IRQ_TRIG_FALLING_EDGE
Definition: wm_gpio.h:35
WM_GPIO_DIR_INPUT
Definition: wm_gpio.h:22
tls_gpio_attr
tls_gpio_attr
Definition: wm_gpio.h:26
WM_GPIO_IRQ_TRIG_HIGH_LEVEL
Definition: wm_gpio.h:37
wm_io.h
IO Driver Module.
tls_get_gpio_irq_status
u8 tls_get_gpio_irq_status(enum tls_io_name gpio_pin)
This function is used to get gpio interrupt status.
tls_gpio_isr_register
void tls_gpio_isr_register(enum tls_io_name gpio_pin, tls_gpio_irq_callback callback, void *arg)
This function is used to register gpio interrupt.
tls_gpio_irq_disable
void tls_gpio_irq_disable(enum tls_io_name gpio_pin)
This function is used to disable gpio interrupt.
tls_gpio_cfg
void tls_gpio_cfg(enum tls_io_name gpio_pin, enum tls_gpio_dir dir, enum tls_gpio_attr attr)
This function is used to config gpio function.
tls_gpio_write
void tls_gpio_write(enum tls_io_name gpio_pin, u8 value)
This function is used to modify gpio status.
WM_GPIO_IRQ_TRIG_LOW_LEVEL
Definition: wm_gpio.h:38
wm_type_def.h
WM type redefine.
WM_GPIO_IRQ_TRIG_RISING_EDGE
Definition: wm_gpio.h:34
tls_gpio_read
u8 tls_gpio_read(enum tls_io_name gpio_pin)
This function is used to read gpio status.
WM_GPIO_DIR_OUTPUT
Definition: wm_gpio.h:21
WM_GPIO_IRQ_TRIG_DOUBLE_EDGE
Definition: wm_gpio.h:36
tls_gpio_irq_enable
void tls_gpio_irq_enable(enum tls_io_name gpio_pin, enum tls_gpio_irq_trig mode)
This function is used to config gpio interrupt.
tls_gpio_irq_trig
tls_gpio_irq_trig
Definition: wm_gpio.h:33
tls_gpio_irq_callback
void(* tls_gpio_irq_callback)(void *arg)
Definition: wm_gpio.h:17
WM_GPIO_ATTR_PULLHIGH
Definition: wm_gpio.h:28
WM_GPIO_ATTR_FLOATING
Definition: wm_gpio.h:27


W800 SDK APIs: doxy_out/include/driver/wm_gpio_afsel.h Source File

  • doxy_out
  • include
  • driver
wm_gpio_afsel.h
Go to the documentation of this file.
1
10 #ifndef WM_GPIO_AFSEL_H
11 #define WM_GPIO_AFSEL_H
12
13 #include "wm_gpio.h"
14 #include "wm_regs.h"
15 #include "wm_irq.h"
16 #include "wm_osal.h"
17 #include "tls_common.h"
45 void wm_hspi_gpio_config(uint8_t numsel);
46
57 void wm_spi_ck_config(enum tls_io_name io_name);
58
69 void wm_spi_cs_config(enum tls_io_name io_name);
70
81 void wm_spi_di_config(enum tls_io_name io_name);
82
93 void wm_spi_do_config(enum tls_io_name io_name);
94
108 void wm_sdio_host_config(uint8_t numsel);
109
123 void wm_sdio_slave_config(uint8_t numsel);
124
138 void wm_psram_config(uint8_t numsel);
139
148 void wm_uart0_tx_config(enum tls_io_name io_name);
149
157 void wm_uart0_rx_config(enum tls_io_name io_name);
158
166 void wm_uart1_tx_config(enum tls_io_name io_name);
167
176 void wm_uart1_rx_config(enum tls_io_name io_name);
177
186 void wm_uart1_rts_config(enum tls_io_name io_name);
187
196 void wm_uart1_cts_config(enum tls_io_name io_name);
197
206 void wm_uart2_tx_scio_config(enum tls_io_name io_name);
207
216 void wm_uart2_rx_config(enum tls_io_name io_name);
217
226 void wm_uart2_rts_scclk_config(enum tls_io_name io_name);
227
236 void wm_uart2_cts_config(enum tls_io_name io_name);
237
246 void wm_uart3_tx_config(enum tls_io_name io_name);
247
256 void wm_uart3_rx_config(enum tls_io_name io_name);
257
265 void wm_uart3_rts_config(enum tls_io_name io_name);
266
274 void wm_uart3_cts_config(enum tls_io_name io_name);
275
276
285 void wm_uart4_tx_config(enum tls_io_name io_name);
286
295 void wm_uart4_rx_config(enum tls_io_name io_name);
296
305 void wm_uart4_rts_config(enum tls_io_name io_name);
306
315 void wm_uart4_cts_config(enum tls_io_name io_name);
316
326 void wm_uart5_tx_config(enum tls_io_name io_name);
327
337 void wm_uart5_rx_config(enum tls_io_name io_name);
338
347 void wm_uart5_rts_config(enum tls_io_name io_name);
348
357 void wm_uart5_cts_config(enum tls_io_name io_name);
358
359
360
371 void wm_i2s_ck_config(enum tls_io_name io_name);
372
383 void wm_i2s_ws_config(enum tls_io_name io_name);
384
395 void wm_i2s_do_config(enum tls_io_name io_name);
396
407 void wm_i2s_di_config(enum tls_io_name io_name);
408
416 void wm_i2s_mclk_config(enum tls_io_name io_name);
417
425 void wm_i2s_extclk_config(enum tls_io_name io_name);
426
435 void wm_i2c_scl_config(enum tls_io_name io_name);
436
445 void wm_i2c_sda_config(enum tls_io_name io_name);
446
458 void wm_pwm0_config(enum tls_io_name io_name);
459
471 void wm_pwm1_config(enum tls_io_name io_name);
472
484 void wm_pwm2_config(enum tls_io_name io_name);
485
497 void wm_pwm3_config(enum tls_io_name io_name);
498
510 void wm_pwm4_config(enum tls_io_name io_name);
511
523 void wm_pwmbrk_config(enum tls_io_name io_name);
524
533 void wm_swd_config(bool enable);
534
545 void wm_adc_config(u8 Channel);
546
569 void wm_touch_sensor_config(enum tls_io_name io_name);
570
579 void wm_gpio_af_disable(void);
588 #endif /* end of WM_GPIO_AFSEL_H */
589
wm_swd_config
void wm_swd_config(bool enable)
config the pins used for swd
wm_i2s_mclk_config
void wm_i2s_mclk_config(enum tls_io_name io_name)
config the pins used for i2s mclk
wm_hspi_gpio_config
void wm_hspi_gpio_config(uint8_t numsel)
config the pins used for highspeed spi
wm_sdio_host_config
void wm_sdio_host_config(uint8_t numsel)
config the pins used for sdio host ck dat0 dat1 dat2 dat3
wm_i2c_sda_config
void wm_i2c_sda_config(enum tls_io_name io_name)
config the pins used for i2c sda
wm_pwm1_config
void wm_pwm1_config(enum tls_io_name io_name)
config the pins used for pwm1
wm_uart3_rts_config
void wm_uart3_rts_config(enum tls_io_name io_name)
config the pins used for uart3 rts
wm_spi_do_config
void wm_spi_do_config(enum tls_io_name io_name)
config the pins used for spi do
wm_osal.h
WM OS adapter layer.
tls_io_name
tls_io_name
Definition: wm_io.h:17
wm_uart4_rts_config
void wm_uart4_rts_config(enum tls_io_name io_name)
config the pins used for uart4 rts
wm_spi_cs_config
void wm_spi_cs_config(enum tls_io_name io_name)
config the pins used for spi cs
wm_i2s_do_config
void wm_i2s_do_config(enum tls_io_name io_name)
config the pins used for i2s do
wm_uart3_rx_config
void wm_uart3_rx_config(enum tls_io_name io_name)
config the pins used for uart3 rx
wm_regs.h
register & operation file
wm_i2s_extclk_config
void wm_i2s_extclk_config(enum tls_io_name io_name)
config the pins used for i2s extclk
wm_uart1_tx_config
void wm_uart1_tx_config(enum tls_io_name io_name)
config the pins used for uart1 tx
wm_i2s_di_config
void wm_i2s_di_config(enum tls_io_name io_name)
config the pins used for i2s di
wm_uart2_rts_scclk_config
void wm_uart2_rts_scclk_config(enum tls_io_name io_name)
config the pins used for uart2 rts or 7816-clk
wm_uart0_tx_config
void wm_uart0_tx_config(enum tls_io_name io_name)
config the pins used for uart0 tx
wm_uart4_tx_config
void wm_uart4_tx_config(enum tls_io_name io_name)
config the pins used for uart4 tx
wm_sdio_slave_config
void wm_sdio_slave_config(uint8_t numsel)
config the pins used for sdio slave ck dat0 dat1 dat2 dat3
wm_uart5_tx_config
void wm_uart5_tx_config(enum tls_io_name io_name)
config the pins used for uart4 tx
wm_pwm4_config
void wm_pwm4_config(enum tls_io_name io_name)
config the pins used for pwm4
wm_uart5_rts_config
void wm_uart5_rts_config(enum tls_io_name io_name)
config the pins used for uart4 rts
wm_uart1_rx_config
void wm_uart1_rx_config(enum tls_io_name io_name)
config the pins used for uart1 rx
wm_i2c_scl_config
void wm_i2c_scl_config(enum tls_io_name io_name)
config the pins used for i2c scl
wm_spi_ck_config
void wm_spi_ck_config(enum tls_io_name io_name)
config the pins used for spi ck
wm_touch_sensor_config
void wm_touch_sensor_config(enum tls_io_name io_name)
config the pins used for touch sensor
wm_uart3_tx_config
void wm_uart3_tx_config(enum tls_io_name io_name)
config the pins used for uart3 tx
wm_uart1_rts_config
void wm_uart1_rts_config(enum tls_io_name io_name)
config the pins used for uart1 rts
wm_adc_config
void wm_adc_config(u8 Channel)
config the pins used for adc
wm_uart2_tx_scio_config
void wm_uart2_tx_scio_config(enum tls_io_name io_name)
config the pins used for uart2 tx or 7816-io
wm_uart4_rx_config
void wm_uart4_rx_config(enum tls_io_name io_name)
config the pins used for uart4 rx
wm_uart5_rx_config
void wm_uart5_rx_config(enum tls_io_name io_name)
config the pins used for uart4 rx
wm_irq.h
interupt driver module
wm_pwmbrk_config
void wm_pwmbrk_config(enum tls_io_name io_name)
config the pins used for pwm break
wm_uart0_rx_config
void wm_uart0_rx_config(enum tls_io_name io_name)
config the pins used for uart0 rx
wm_gpio.h
GPIO Driver Module.
wm_spi_di_config
void wm_spi_di_config(enum tls_io_name io_name)
config the pins used for spi di
wm_uart1_cts_config
void wm_uart1_cts_config(enum tls_io_name io_name)
config the pins used for uart1 cts
wm_pwm3_config
void wm_pwm3_config(enum tls_io_name io_name)
config the pins used for pwm3
wm_i2s_ck_config
void wm_i2s_ck_config(enum tls_io_name io_name)
config the pins used for i2s ck
wm_uart2_rx_config
void wm_uart2_rx_config(enum tls_io_name io_name)
config the pins used for uart2 rx
wm_uart3_cts_config
void wm_uart3_cts_config(enum tls_io_name io_name)
config the pins used for uart3 cts
wm_gpio_af_disable
void wm_gpio_af_disable(void)
disable all the gpio af
wm_uart2_cts_config
void wm_uart2_cts_config(enum tls_io_name io_name)
config the pins used for uart2 cts
wm_i2s_ws_config
void wm_i2s_ws_config(enum tls_io_name io_name)
config the pins used for i2s ws
wm_uart5_cts_config
void wm_uart5_cts_config(enum tls_io_name io_name)
config the pins used for uart4 cts
wm_pwm2_config
void wm_pwm2_config(enum tls_io_name io_name)
config the pins used for pwm2
wm_uart4_cts_config
void wm_uart4_cts_config(enum tls_io_name io_name)
config the pins used for uart4 cts
wm_pwm0_config
void wm_pwm0_config(enum tls_io_name io_name)
config the pins used for pwm0
wm_psram_config
void wm_psram_config(uint8_t numsel)
config the pins used for psram ck cs dat0 dat1 dat2 dat3


W800 SDK APIs: doxy_out/include/driver/wm_hostspi.h Source File

  • doxy_out
  • include
  • driver
wm_hostspi.h
Go to the documentation of this file.
1
10 #ifndef WM_HOST_SPI_H
11 #define WM_HOST_SPI_H
12
13 #include "wm_type_def.h"
14 #include "list.h"
15 #include "wm_osal.h"
16 #include "wm_ram_config.h"
17
18
19 #define SPI_USE_DMA
20
21 #define SPI_DMA_CMD_MAX_SIZE (0x20)
22 #define SPI_DMA_BUF_MAX_SIZE (8160)
23 #define SPI_DMA_MAX_TRANS_SIZE (4092)
24
28 #define TLS_SPI_STATUS_OK (0)
29 #define TLS_SPI_STATUS_EINVAL (-1)
30 #define TLS_SPI_STATUS_ENOMEM (-2)
31 #define TLS_SPI_STATUS_EBUSY (-3)
32 #define TLS_SPI_STATUS_ESHUTDOWN (-4)
33 #define TLS_SPI_STATUS_EPERM (-5)
34 #define TLS_SPI_STATUS_ECLKNOSUPPORT (-6)
35 #define TLS_SPI_STATUS_EMODENOSUPPORT (-7)
36
37 #define SPI_MASTER_FIFO_SIZE (32)
38
43 #define SPI_CPHA (0x01)
44 #define SPI_CPOL (0x02)
45 #define TLS_SPI_MODE_0 (0|0)
46 #define TLS_SPI_MODE_1 (0|SPI_CPHA)
47 #define TLS_SPI_MODE_2 (SPI_CPOL|0)
48 #define TLS_SPI_MODE_3 (SPI_CPOL|SPI_CPHA)
49 #define TLS_SPI_CS_LOW 0x00
50 #define TLS_SPI_CS_HIGH 0x01
51 #define TLS_SPI_FCLK_MIN (1000)
52 #define TLS_SPI_FCLK_MAX (APB_CLK/2)
56 #define SPI_DEFAULT_SPEED (2000000)
57 #define SPI_DEFAULT_MODE (TLS_SPI_MODE_0)
58 #define SPI_CS_ACTIVE_MODE (TLS_SPI_CS_LOW)
59 #define SPI_CS_INACTIVE_MODE (TLS_SPI_CS_HIGH)
60
62 #define SPI_MESSAGE_STATUS_IDLE (0)
63 #define SPI_MESSAGE_STATUS_INPROGRESS (1)
64 #define SPI_MESSAGE_STATUS_DONE (2)
65
67 #define SPI_SLAVE_FLASH 0
68 #define SPI_SLAVE_CARD 1
69 #define SPI_SLAVE_CONTROL_PIN 0
70
71 #define SPI_BYTE_TRANSFER 0
72 #define SPI_WORD_TRANSFER 1
73 #define SPI_DMA_TRANSFER 2
83 struct tls_spi_transfer
84 {
85 struct dl_list transfer_list;
88 const void *tx_buf;
89 void *rx_buf;
90 u32 len;
91 u32 delay_usecs;
92 };
93
94
103 struct tls_spi_message
104 {
105 struct dl_list queue;
108 struct dl_list transfers;
109 void (*complete) (void *);
110 void *context;
111 u32 status;
112 };
113
124 struct tls_spi_port
125 {
126 u32 speed_hz;
127 u8 cs_active;
129 u8 mode;
132 u8 reconfig;
133
134 struct dl_list wait_queue;
135 tls_os_queue_t *lock;
136
137 tls_os_queue_t *msg_queue;
139 struct tls_spi_message *current_message;
141 u32 current_remaining_transfer;
144 struct tls_spi_transfer *current_transfer;
146 u32 current_remaining_bytes;
149 u8 transtype;
150 };
151
183 int tls_spi_init(void);
184
185
200 int tls_spi_setup(u8 mode, u8 cs_active, u32 fclk);
201
215 int tls_spi_write(const u8 * buf, u32 len);
216
230 int tls_spi_read(u8 * buf, u32 len);
231
247 int tls_spi_read_with_cmd(const u8 * txbuf, u32 n_tx, u8 * rxbuf, u32 n_rx);
248
264 int tls_spi_write_with_cmd(const u8 * cmd, u32 n_cmd, const u8 * txbuf, u32 n_tx);
265
279 void tls_spi_trans_type(u8 type);
280
289 #endif /* WM_HOST_SPI_H */
tls_spi_port::current_remaining_transfer
u32 current_remaining_transfer
Definition: wm_hostspi.h:141
tls_spi_port::wait_queue
struct dl_list wait_queue
Definition: wm_hostspi.h:134
wm_osal.h
WM OS adapter layer.
tls_spi_port::current_remaining_bytes
u32 current_remaining_bytes
Definition: wm_hostspi.h:146
tls_spi_transfer::delay_usecs
u32 delay_usecs
Definition: wm_hostspi.h:91
tls_spi_read
int tls_spi_read(u8 *buf, u32 len)
This function is used to synchronously read data from SPI.
tls_spi_port::cs_active
u8 cs_active
Definition: wm_hostspi.h:127
tls_spi_port
Definition: wm_hostspi.h:124
tls_spi_trans_type
void tls_spi_trans_type(u8 type)
This function is used to set SPI transfer mode.
tls_spi_port::current_message
struct tls_spi_message * current_message
Definition: wm_hostspi.h:139
tls_spi_message::transfers
struct dl_list transfers
Definition: wm_hostspi.h:108
tls_spi_init
int tls_spi_init(void)
This function is used to initialize the SPI master driver.
tls_spi_write_with_cmd
int tls_spi_write_with_cmd(const u8 *cmd, u32 n_cmd, const u8 *txbuf, u32 n_tx)
This function is used to synchronous write 32bit command then write data from SPI.
dl_list
Definition: list.h:22
tls_spi_port::speed_hz
u32 speed_hz
Definition: wm_hostspi.h:126
tls_spi_write
int tls_spi_write(const u8 *buf, u32 len)
This function is used to synchronous write data by SPI.
wm_type_def.h
WM type redefine.
tls_spi_transfer::rx_buf
void * rx_buf
Definition: wm_hostspi.h:89
wm_ram_config.h
WM ram model configure.
tls_spi_message::complete
void(* complete)(void *)
Definition: wm_hostspi.h:109
tls_spi_transfer
Definition: wm_hostspi.h:83
tls_spi_setup
int tls_spi_setup(u8 mode, u8 cs_active, u32 fclk)
This function is used to setup the spi controller.
tls_spi_port::transtype
u8 transtype
Definition: wm_hostspi.h:149
tls_spi_message::status
u32 status
Definition: wm_hostspi.h:111
tls_spi_port::mode
u8 mode
Definition: wm_hostspi.h:129
tls_spi_transfer::len
u32 len
Definition: wm_hostspi.h:90
tls_spi_message::queue
struct dl_list queue
Definition: wm_hostspi.h:105
tls_spi_port::current_transfer
struct tls_spi_transfer * current_transfer
Definition: wm_hostspi.h:144
tls_os_queue_t
void tls_os_queue_t
Definition: wm_osal.h:55
tls_spi_transfer::tx_buf
const void * tx_buf
Definition: wm_hostspi.h:88
tls_spi_port::msg_queue
tls_os_queue_t * msg_queue
Definition: wm_hostspi.h:137
tls_spi_read_with_cmd
int tls_spi_read_with_cmd(const u8 *txbuf, u32 n_tx, u8 *rxbuf, u32 n_rx)
This function is used to synchronously write command and then read data from SPI. ...
tls_spi_message
Definition: wm_hostspi.h:103
tls_spi_message::context
void * context
Definition: wm_hostspi.h:110


W800 SDK APIs: doxy_out/include/driver/wm_hspi.h Source File

  • doxy_out
  • include
  • driver
wm_hspi.h
Go to the documentation of this file.
1
12 #ifndef WM_HSPI_H
13 #define WM_HSPI_H
14
15 #include "wm_type_def.h"
16 #include "wm_ram_config.h"
17
18 #define HSPI_TX_MEM_MALLOC 0
22 #define HSPI_INTERFACE_SPI 2
23 #define HSPI_INTERFACE_SDIO 3
26 #define HSPI_RX_CMD_MSG 1
27 #define HSPI_RX_DATA_MSG 2
28
30 #define HSPI_TXBUF_NUM 2
31 #define HSPI_TX_DESC_NUM HSPI_TXBUF_NUM
32 #define HSPI_RXBUF_NUM 3
33 #define HSPI_RX_DESC_NUM HSPI_RXBUF_NUM
34 #define HSPI_TXBUF_SIZE 1500
35 #define HSPI_RXBUF_SIZE 1500
36
37 #define HSPI_TX_DESC_SIZE sizeof(struct tls_hspi_tx_desc)
38 #define HSPI_RX_DESC_SIZE sizeof(struct tls_hspi_rx_desc)
39
40 /*****************************************************************************
41 * sdio/hspi sram partition
42 ******************************************************************************/
43 /* HSPI txbuf zone */
44 #define HSPI_TXBUF_BASE_ADDR ((u32)(SLAVE_HSPI_SDIO_ADDR))
45
46 #if HSPI_TX_MEM_MALLOC
47 #define HSPI_TXBUF_TOTAL_SIZE 0
48 #else
49 #define HSPI_TXBUF_TOTAL_SIZE (HSPI_TXBUF_SIZE * HSPI_TXBUF_NUM)
50 #endif
51
52 #define HSPI_TX_DESC_BASE_ADDR ((u32)(HSPI_TXBUF_BASE_ADDR + HSPI_TXBUF_TOTAL_SIZE))
53 #define HSPI_TX_DESC_TOTAL_SIZE (HSPI_TX_DESC_SIZE * HSPI_TX_DESC_NUM) //28*3=84
54
55 #define HSPI_RXBUF_BASE_ADDR ((u32)(HSPI_TX_DESC_BASE_ADDR + HSPI_TX_DESC_TOTAL_SIZE))
56 #define HSPI_RXBUF_TOTAL_SIZE (HSPI_RXBUF_NUM * HSPI_RXBUF_SIZE) //4500
57
58 #define HSPI_RX_DESC_BASE_ADDR ((u32)(HSPI_RXBUF_BASE_ADDR + HSPI_RXBUF_TOTAL_SIZE))
59 #define HSPI_RX_DESC_TOTAL_SIZE (HSPI_RX_DESC_SIZE * HSPI_RX_DESC_NUM) //36
60
61 #define SDIO_CIS_SIZE (0x80)
62 #define SDIO_CMD_RXBUF_SIZE 256
63
64
65 #define SDIO_CIS0_ADDR (HSPI_RX_DESC_BASE_ADDR + HSPI_RX_DESC_TOTAL_SIZE) //128
66 #define SDIO_CIS1_ADDR (SDIO_CIS0_ADDR + SDIO_CIS_SIZE) //128
67 #define SDIO_CMD_RXBUF_ADDR (SDIO_CIS1_ADDR + SDIO_CIS_SIZE)
68
69
70 #define CIS_FUN0_ADDR ((u32)SDIO_CIS0_ADDR)
71 #define CIS_FUN1_ADDR ((u32)SDIO_CIS1_ADDR)
72
73 #define FN0_TPL_FUNCID (CIS_FUN0_ADDR + 0x00)
74 #define FN0_TPL_FUNCE (CIS_FUN0_ADDR + 0x04)
75 #define FN0_TPL_FUNCE_MAXBLK (CIS_FUN0_ADDR + 0x08)
76 #define FN0_TPL_MANFID_MID (CIS_FUN0_ADDR + 0x0C)
77 #define FN0_TPL_END (CIS_FUN0_ADDR + 0x10)
78
79 #define FN1_TPL_FUNCID (CIS_FUN1_ADDR + 0x00)
80 #define FN1_TPL_FUNCE (CIS_FUN1_ADDR + 0x04)
81 #define FN1_TPL_FUNCE_VER (CIS_FUN1_ADDR + 0x08)
82 #define FN1_TPL_FUNCE_NSN (CIS_FUN1_ADDR + 0x0C)
83 #define FN1_TPL_FUNCE_CSASIZE (CIS_FUN1_ADDR + 0x10)
84 #define FN1_TPL_FUNCE_OCR (CIS_FUN1_ADDR + 0x14)
85 #define FN1_TPL_FUNCE_MINPWR (CIS_FUN1_ADDR + 0x18)
86 #define FN1_TPL_FUNCE_STANDBY (CIS_FUN1_ADDR + 0x1C)
87 #define FN1_TPL_FUNCE_OPTBW (CIS_FUN1_ADDR + 0x20)
88 #define FN1_TPL_FUNCE_NTIMEOUT (CIS_FUN1_ADDR + 0x24)
89 #define FN1_TPL_FUNCE_AVGPWR (CIS_FUN1_ADDR + 0x28)
90 #define FN1_TPL_END (CIS_FUN1_ADDR + 0x30)
91
92
93
95 #define SDIO_WP_INT_SRC_CMD_DOWN (1UL<<3)
96 #define SDIO_WP_INT_SRC_CMD_UP (1UL<<2)
97 #define SDIO_WP_INT_SRC_DATA_DOWN (1UL<<1)
98 #define SDIO_WP_INT_SRC_DATA_UP (1UL<<0)
99
100
102 struct tls_hspi_tx_desc {
103 volatile u32 valid_ctrl;
104 u32 buf_info;
105 u32 buf_addr[3];
106 u32 next_desc_addr;
107 #if HSPI_TX_MEM_MALLOC
108 u32 txbuf_addr;
109 #endif
110 };
111
113 struct tls_hspi_rx_desc {
114 u32 valid_ctrl;
115 u32 buf_addr;
116 u32 next_desc_addr;
117 };
118
119
121 struct tls_slave_hspi {
122 u8 ifusermode;
123
124 s16 (*rx_cmd_callback)(char *buf);
125
126 s16 (*rx_data_callback)(char *buf);
127
128 s16 (*tx_data_callback)(char *buf);
129
130 struct tls_hspi_tx_desc *curr_tx_desc;
132 struct tls_hspi_rx_desc *curr_rx_desc;
134 #if HSPI_TX_MEM_MALLOC
135 u8 txdoneflag;
136 #endif
137 };
138
169 int tls_slave_spi_init(void);
170
182 void tls_set_hspi_user_mode(u8 ifenable);
183
184
194 void tls_set_high_speed_interface_type(int type);
195
196
206 void tls_hspi_rx_cmd_callback_register(s16 (*rx_cmd_callback)(char *buf));
207
208
218 void tls_hspi_rx_data_callback_register(s16 (*rx_data_callback)(char *buf));
219
229 void tls_hspi_tx_data_callback_register(s16 (*tx_data_callback)(char *buf));
230
231
243 int tls_hspi_tx_data(char *txbuf, int len);
244
253 #endif /* WM_HSPI_H */
tls_hspi_tx_data_callback_register
void tls_hspi_tx_data_callback_register(s16(*tx_data_callback)(char *buf))
This function is used to register hspi tx data interrupt.
tls_set_hspi_user_mode
void tls_set_hspi_user_mode(u8 ifenable)
This function is used to enable or disable user mode.
tls_set_high_speed_interface_type
void tls_set_high_speed_interface_type(int type)
This function is used to set high speed interface type.
tls_slave_hspi
Definition: wm_hspi.h:121
tls_hspi_rx_data_callback_register
void tls_hspi_rx_data_callback_register(s16(*rx_data_callback)(char *buf))
This function is used to register hspi rx data interrupt.
tls_hspi_tx_desc
Definition: wm_hspi.h:102
wm_type_def.h
WM type redefine.
tls_slave_hspi::curr_tx_desc
struct tls_hspi_tx_desc * curr_tx_desc
Definition: wm_hspi.h:130
wm_ram_config.h
WM ram model configure.
tls_hspi_rx_desc
Definition: wm_hspi.h:113
tls_slave_spi_init
int tls_slave_spi_init(void)
This function is used to initial HSPI register.
tls_hspi_rx_cmd_callback_register
void tls_hspi_rx_cmd_callback_register(s16(*rx_cmd_callback)(char *buf))
This function is used to register hspi rx command interrupt.
tls_slave_hspi::curr_rx_desc
struct tls_hspi_rx_desc * curr_rx_desc
Definition: wm_hspi.h:132
tls_hspi_tx_data
int tls_hspi_tx_data(char *txbuf, int len)
This function is used to transfer data.


W800 SDK APIs: doxy_out/include/app/wm_http_client.h Source File

  • doxy_out
  • include
  • app
wm_http_client.h
Go to the documentation of this file.
1
10 #ifndef WM_HTTP_CLIENT_H
11 #define WM_HTTP_CLIENT_H
12
13 #include "wm_config.h"
14 #include "wm_type_def.h"
15 #ifdef BOOL
16 #undef BOOL
17 #endif
18 #ifdef UCHAR
19 #undef UCHAR
20 #endif
21 #ifdef CHAR
22 #undef CHAR
23 #endif
24 #ifdef UINT16
25 #undef UINT16
26 #endif
27 #ifdef INT16
28 #undef INT16
29 #endif
30 #ifdef UINT32
31 #undef UINT32
32 #endif
33 #ifdef INT32
34 #undef INT32
35 #endif
36 #ifdef UINT64
37 #undef UINT64
38 #endif
39 #ifdef INT64
40 #undef INT64
41 #endif
42 #ifdef ULONG
43 #undef ULONG
44 #endif
45 #ifdef LONG
46 #undef LONG
47 #endif
48 #define VOID void
49 typedef int BOOL;
50 typedef unsigned char UCHAR;
51 //typedef signed char CHAR;
52 typedef char CHAR;
53 typedef unsigned short UINT16;
54 typedef signed short INT16;
55 typedef unsigned int UINT32;
56 typedef signed int INT32;
57 typedef unsigned long long UINT64;
58 typedef long long INT64;
59 typedef unsigned long ULONG;
60 typedef signed long LONG;
61
62
63 /* HTTP Status, API Return codes */
65 #define HTTP_CLIENT_SUCCESS 0
66
67 #define HTTP_CLIENT_UNKNOWN_ERROR 1
68
69 #define HTTP_CLIENT_ERROR_INVALID_HANDLE 2
70
71 #define HTTP_CLIENT_ERROR_NO_MEMORY 3
72
73 #define HTTP_CLIENT_ERROR_SOCKET_INVALID 4
74
75 #define HTTP_CLIENT_ERROR_SOCKET_CANT_SET 5
76
77 #define HTTP_CLIENT_ERROR_SOCKET_RESOLVE 6
78
79 #define HTTP_CLIENT_ERROR_SOCKET_CONNECT 7
80
81 #define HTTP_CLIENT_ERROR_SOCKET_TIME_OUT 8
82
83 #define HTTP_CLIENT_ERROR_SOCKET_RECV 9
84
85 #define HTTP_CLIENT_ERROR_SOCKET_SEND 10
86
87 #define HTTP_CLIENT_ERROR_HEADER_RECV 11
88
89 #define HTTP_CLIENT_ERROR_HEADER_NOT_FOUND 12
90
91 #define HTTP_CLIENT_ERROR_HEADER_BIG_CLUE 13
92
94 #define HTTP_CLIENT_ERROR_HEADER_NO_LENGTH 14
95
96 #define HTTP_CLIENT_ERROR_CHUNK_TOO_BIG 15
97
98 #define HTTP_CLIENT_ERROR_AUTH_HOST 16
99
100 #define HTTP_CLIENT_ERROR_AUTH_PROXY 17
101
102 #define HTTP_CLIENT_ERROR_BAD_VERB 18
103
104 #define HTTP_CLIENT_ERROR_LONG_INPUT 19
105
106 #define HTTP_CLIENT_ERROR_BAD_STATE 20
107
108 #define HTTP_CLIENT_ERROR_CHUNK 21
109
110 #define HTTP_CLIENT_ERROR_BAD_URL 22
111
112 #define HTTP_CLIENT_ERROR_BAD_HEADER 23
113
114 #define HTTP_CLIENT_ERROR_BUFFER_RSIZE 24
115
116 #define HTTP_CLIENT_ERROR_BAD_AUTH 25
117
118 #define HTTP_CLIENT_ERROR_AUTH_MISMATCH 26
119
120 #define HTTP_CLIENT_ERROR_NO_DIGEST_TOKEN 27
121
122 #define HTTP_CLIENT_ERROR_NO_DIGEST_ALG 28
123
124 #define HTTP_CLIENT_ERROR_SOCKET_BIND 29
125
126 #define HTTP_CLIENT_ERROR_TLS_NEGO 30
127
128 #define HTTP_CLIENT_ERROR_NOT_IMPLEMENTED 64
129
130 #define HTTP_CLIENT_ERROR_CONNECTION_CLOSE 500
131
132 #define HTTP_CLIENT_EOS 1000
133
134 // HTTP Session flags (Public flags)
135 #define HTTP_CLIENT_FLAG_KEEP_ALIVE 0x00000001 // Set the keep alive header
136 #define HTTP_CLIENT_FLAG_SEND_CHUNKED 0x00000002 // The outgoing should chunked
137 #define HTTP_CLIENT_FLAG_NO_CACHE 0x00000004 // Set the no cache header
138 #define HTTP_CLIENT_FLAG_ASYNC 0x00000008 // Currently not implemented
139 #define HTTP_CLIENT_FLAG_MULTIPART_FORM 0x00000010 // The outgoing should multipart/form-data
140
141 // HTTP Type Definitions
142 typedef UINT32 HTTP_SESSION_HANDLE;
143 typedef UINT32 HTTP_CLIENT_SESSION_FLAGS;
144 /******************************************************************************
145 *
146 * Section : HTTP API structures
147 *
148 ******************************************************************************/
149
150 /* HTTP Type Definitions */
152 typedef u32 tls_http_session_handle_t;
154 typedef u32 tls_http_session_flags_t;
155
157 typedef enum _HTTP_AUTH_SCHEMA
158 {
159 AuthSchemaNone = 0,
160 AuthSchemaBasic,
161 AuthSchemaDigest,
162 AuthSchemaKerberos,
163 AuthNotSupported
164
165 } HTTP_AUTH_SCHEMA;
167 typedef enum _HTTP_VERB
168 {
169 VerbGet = 0,
170 VerbHead,
171 VerbPost,
172 VerbPut,
173 VerbFwup,
174 VerbNotSupported
175 // Note: others verb such as connect and put are currently not supported
176
177 } HTTP_VERB;
180 typedef struct _HTTP_CLIENT
181 {
182 UINT32 HTTPStatusCode; // HTTP Status code (200 OK)
183 UINT32 RequestBodyLengthSent; // Total bytes sent (body only)
184 UINT32 ResponseBodyLengthReceived; // Total bytes received (body only)
185 UINT32 TotalResponseBodyLength; // as extracted from the 揷ontent-length" header
186 UINT32 HttpState;
187 } HTTP_CLIENT;
188
190 typedef struct _HTTPParameters
191 {
192 CHAR* Uri;
193 CHAR* ProxyHost;
194 UINT32 UseProxy ;
195 UINT32 ProxyPort;
196 UINT32 Verbose;
197 CHAR* UserName;
198 CHAR* Password;
199 HTTP_AUTH_SCHEMA AuthType;
200
201 } HTTPParameters;
202
203 #if TLS_CONFIG_HTTP_CLIENT_TASK
204
205 typedef void (*http_client_recv_callback_fn)(HTTP_SESSION_HANDLE pSession, CHAR * data, UINT32 totallen, UINT32 datalen);
207 typedef void (*http_client_err_callback_fn)(HTTP_SESSION_HANDLE pSession, int err);
208
210 typedef struct _http_client_msg
211 {
212 HTTP_SESSION_HANDLE pSession;
213 HTTPParameters param;
214 HTTP_VERB method;
215 CHAR* sendData;
216 UINT32 dataLen;
217 http_client_recv_callback_fn recv_fn;
218 http_client_err_callback_fn err_fn;
219 } http_client_msg;
220 #endif
221
243 /******************************************************************************
244 *
245 * Section : HTTP API public interface
246 *
247 ******************************************************************************/
248
259 HTTP_SESSION_HANDLE HTTPClientOpenRequest (HTTP_CLIENT_SESSION_FLAGS Flags);
270 UINT32 HTTPClientCloseRequest (HTTP_SESSION_HANDLE *pSession);
283 UINT32 HTTPClientSetAuth (HTTP_SESSION_HANDLE pSession, HTTP_AUTH_SCHEMA AuthSchema, void *pReserved);
296 UINT32 HTTPClientSetCredentials (HTTP_SESSION_HANDLE pSession, CHAR *pUserName, CHAR *pPassword);
311 UINT32 HTTPClientSetProxy (HTTP_SESSION_HANDLE pSession, CHAR *pProxyName, UINT16 nPort, CHAR *pUserName, CHAR *pPassword);
323 UINT32 HTTPClientSetVerb (HTTP_SESSION_HANDLE pSession, HTTP_VERB HttpVerb);
337 UINT32 HTTPClientAddRequestHeaders (HTTP_SESSION_HANDLE pSession, CHAR *pHeaderName, CHAR *pHeaderData, BOOL nInsert);
359 UINT32 HTTPClientSendRequest (HTTP_SESSION_HANDLE pSession, CHAR *pUrl, VOID *pData, UINT32 nDataLength, BOOL TotalLength, UINT32 nTimeout,UINT32 nClientPort);
373 UINT32 HTTPClientWriteData (HTTP_SESSION_HANDLE pSession, VOID *pBuffer, UINT32 nBufferLength, UINT32 nTimeout);
386 UINT32 HTTPClientRecvResponse (HTTP_SESSION_HANDLE pSession, UINT32 nTimeout);
401 UINT32 HTTPClientReadData (HTTP_SESSION_HANDLE pSession, VOID *pBuffer, UINT32 nBytesToRead, UINT32 nTimeout, UINT32 *nBytesRecived);
413 UINT32 HTTPClientGetInfo (HTTP_SESSION_HANDLE pSession, HTTP_CLIENT *HTTPClient);
427 UINT32 HTTPClientFindFirstHeader (HTTP_SESSION_HANDLE pSession, CHAR *pSearchClue,CHAR *pHeaderBuffer, UINT32 *nLength);
440 UINT32 HTTPClientGetNextHeader (HTTP_SESSION_HANDLE pSession, CHAR *pHeaderBuffer, UINT32 *nLength);
451 UINT32 HTTPClientFindCloseHeader (HTTP_SESSION_HANDLE pSession);
452
453 #if TLS_CONFIG_HTTP_CLIENT_TASK
454
464 int http_client_task_init(void);
465
476 int http_client_post(http_client_msg * msg);
477 #endif /* TLS_CONFIG_HTTP_CLIENT_TASK */
478
487 #endif /* WM_HTTP_CLIENT_H */
488
HTTPClientRecvResponse
UINT32 HTTPClientRecvResponse(HTTP_SESSION_HANDLE pSession, UINT32 nTimeout)
Receives the response header on the connection and parses it. Performs any required authentication...
HTTP_CLIENT
struct _HTTP_CLIENT HTTP_CLIENT
HTTPClientOpenRequest
HTTP_SESSION_HANDLE HTTPClientOpenRequest(HTTP_CLIENT_SESSION_FLAGS Flags)
Allocate memory for a new HTTP Session.
HTTPClientSetAuth
UINT32 HTTPClientSetAuth(HTTP_SESSION_HANDLE pSession, HTTP_AUTH_SCHEMA AuthSchema, void *pReserved)
Sets the HTTP authentication schema.
HTTP_AUTH_SCHEMA
enum _HTTP_AUTH_SCHEMA HTTP_AUTH_SCHEMA
HTTPClientSendRequest
UINT32 HTTPClientSendRequest(HTTP_SESSION_HANDLE pSession, CHAR *pUrl, VOID *pData, UINT32 nDataLength, BOOL TotalLength, UINT32 nTimeout, UINT32 nClientPort)
This function builds the request headers, performs a DNS resolution, opens the connection (if it was ...
HTTPClientCloseRequest
UINT32 HTTPClientCloseRequest(HTTP_SESSION_HANDLE *pSession)
Closes the active connection and free the corresponding memory.
tls_http_session_handle_t
u32 tls_http_session_handle_t
Definition: wm_http_client.h:152
_HTTP_CLIENT
Definition: wm_http_client.h:180
HTTPClientAddRequestHeaders
UINT32 HTTPClientAddRequestHeaders(HTTP_SESSION_HANDLE pSession, CHAR *pHeaderName, CHAR *pHeaderData, BOOL nInsert)
Add headers into the outgoing request.
_HTTP_VERB
_HTTP_VERB
Definition: wm_http_client.h:167
_HTTP_AUTH_SCHEMA
_HTTP_AUTH_SCHEMA
Definition: wm_http_client.h:157
HTTPClientFindCloseHeader
UINT32 HTTPClientFindCloseHeader(HTTP_SESSION_HANDLE pSession)
Terminate a headers search session.
HTTPClientSetVerb
UINT32 HTTPClientSetVerb(HTTP_SESSION_HANDLE pSession, HTTP_VERB HttpVerb)
Sets the HTTP verb for the outgoing request.
wm_type_def.h
WM type redefine.
HTTPClientGetInfo
UINT32 HTTPClientGetInfo(HTTP_SESSION_HANDLE pSession, HTTP_CLIENT *HTTPClient)
Fill the users structure with the session information.
HTTPClientFindFirstHeader
UINT32 HTTPClientFindFirstHeader(HTTP_SESSION_HANDLE pSession, CHAR *pSearchClue, CHAR *pHeaderBuffer, UINT32 *nLength)
Initiate the headr searching functions and find the first header.
HTTP_VERB
enum _HTTP_VERB HTTP_VERB
HTTPClientReadData
UINT32 HTTPClientReadData(HTTP_SESSION_HANDLE pSession, VOID *pBuffer, UINT32 nBytesToRead, UINT32 nTimeout, UINT32 *nBytesRecived)
Read data from the server. Parse out the chunks data.
HTTPClientGetNextHeader
UINT32 HTTPClientGetNextHeader(HTTP_SESSION_HANDLE pSession, CHAR *pHeaderBuffer, UINT32 *nLength)
Find the next header.
HTTPClientWriteData
UINT32 HTTPClientWriteData(HTTP_SESSION_HANDLE pSession, VOID *pBuffer, UINT32 nBufferLength, UINT32 nTimeout)
Write data to the remote server.
HTTPClientSetProxy
UINT32 HTTPClientSetProxy(HTTP_SESSION_HANDLE pSession, CHAR *pProxyName, UINT16 nPort, CHAR *pUserName, CHAR *pPassword)
Sets all the proxy related parameters.
_HTTPParameters
Definition: wm_http_client.h:190
HTTPClientSetCredentials
UINT32 HTTPClientSetCredentials(HTTP_SESSION_HANDLE pSession, CHAR *pUserName, CHAR *pPassword)
Sets credentials for the target host.
HTTPParameters
struct _HTTPParameters HTTPParameters
wm_config.h
w800 chip inferface configure
tls_http_session_flags_t
u32 tls_http_session_flags_t
Definition: wm_http_client.h:154


W800 SDK APIs: doxy_out/include/driver/wm_i2c.h Source File

  • doxy_out
  • include
  • driver
wm_i2c.h
Go to the documentation of this file.
1 /**************************************************************************/
10 #ifndef __WM_I2C_H
11 #define __WM_I2C_H
12
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16
17 #include "wm_regs.h"
18 #include "wm_type_def.h"
19 #include "wm_cpu.h"
20 #include "wm_irq.h"
21
22 typedef struct
23 {
24 __IO uint32_t PRER_LO;
25 __IO uint32_t PRER_HI;
26 __IO uint32_t CTRL;
27 __O uint32_t TX_RX;
28 __O uint32_t CR_SR;
29 __I uint32_t TXR;
30 __I uint32_t CR;
31 }I2C_T;
32 #define I2C ((I2C_T *)(HR_I2C_BASE_ADDR))
33
60 void tls_i2c_init(u32 freq);
61
63 #define wm_i2c_int_mask(bl) do { tls_bitband_write(HR_I2C_CTRL, 6, bl);}while(0);
64
69 void tls_i2c_stop(void);
70
77 int tls_i2c_wait_ack(void);
78
88 void tls_i2c_write_byte(u8 data, u8 ifstart);
89
97 u8 tls_i2c_read_byte(u8 ifack, u8 ifstop);
98
105 void wm_i2c_transfer_done_register(void (*done)(void));
106
117 int wm_i2c_start_write_it(uint8_t devaddr, uint8_t wordaddr, uint8_t * buf, uint16_t len);
118
125 int wm_i2c_start_read_it(uint8_t devaddr, uint8_t wordaddr, uint8_t * buf, uint16_t len);
134 #ifdef __cplusplus
135 }
136 #endif
137
138 #endif
139
140 /*** (C) COPYRIGHT 2014 Winner Microelectronics Co., Ltd. ***/
__IO
#define __IO
Definition: wm_regs.h:68
wm_i2c_transfer_done_register
void wm_i2c_transfer_done_register(void(*done)(void))
This function is used to register i2c transfer done callback function.
wm_i2c_start_read_it
int wm_i2c_start_read_it(uint8_t devaddr, uint8_t wordaddr, uint8_t *buf, uint16_t len)
Get the data stored in data register of I2C module.
tls_i2c_wait_ack
int tls_i2c_wait_ack(void)
Waiting for ack signal.
I2C_T
Definition: wm_i2c.h:22
__O
#define __O
Definition: wm_regs.h:67
wm_regs.h
register & operation file
tls_i2c_write_byte
void tls_i2c_write_byte(u8 data, u8 ifstart)
Writes the data to data register of I2C module when ifstart one the start signal will be sent followe...
wm_type_def.h
WM type redefine.
tls_i2c_read_byte
u8 tls_i2c_read_byte(u8 ifack, u8 ifstop)
Get the data stored in data register of I2C module.
tls_i2c_init
void tls_i2c_init(u32 freq)
Init the I2C module.
wm_irq.h
interupt driver module
wm_i2c_start_write_it
int wm_i2c_start_write_it(uint8_t devaddr, uint8_t wordaddr, uint8_t *buf, uint16_t len)
Start writing through int mode.
__I
#define __I
Definition: wm_regs.h:65
tls_i2c_stop
void tls_i2c_stop(void)
send stop signal
wm_cpu.h
cpu driver module


W800 SDK APIs: doxy_out/include/wifi/wm_ieee80211.h Source File

  • doxy_out
  • include
  • wifi
wm_ieee80211.h
Go to the documentation of this file.
1
10 #ifndef WM_IEEE80211_H
11 #define WM_IEEE80211_H
12
13 /*
14 * DS bit usage
15 *
16 * TA = transmitter address
17 * RA = receiver address
18 * DA = destination address
19 * SA = source address
20 *
21 * ToDS FromDS A1(RA) A2(TA) A3 A4 Use
22 * -----------------------------------------------------------------
23 * 0 0 DA SA BSSID - IBSS/DLS
24 * 0 1 DA BSSID SA - AP -> STA
25 * 1 0 BSSID SA DA - AP <- STA
26 * 1 1 RA TA DA SA unspecified (WDS)
27 */
28
29 #define FCS_LEN 4
30
31 #define IEEE80211_FCTL_VERS 0x0003
32 #define IEEE80211_FCTL_FTYPE 0x000c
33 #define IEEE80211_FCTL_STYPE 0x00f0
34 #define IEEE80211_FCTL_TODS 0x0100
35 #define IEEE80211_FCTL_FROMDS 0x0200
36 #define IEEE80211_FCTL_MOREFRAGS 0x0400
37 #define IEEE80211_FCTL_RETRY 0x0800
38 #define IEEE80211_FCTL_PM 0x1000
39 #define IEEE80211_FCTL_MOREDATA 0x2000
40 #define IEEE80211_FCTL_PROTECTED 0x4000
41 #define IEEE80211_FCTL_ORDER 0x8000
42
43 #define IEEE80211_SCTL_FRAG 0x000F
44 #define IEEE80211_SCTL_SEQ 0xFFF0
45
46 #define IEEE80211_FTYPE_MGMT 0x0000
47 #define IEEE80211_FTYPE_CTL 0x0004
48 #define IEEE80211_FTYPE_DATA 0x0008
49
50 /* management */
51 #define IEEE80211_STYPE_ASSOC_REQ 0x0000
52 #define IEEE80211_STYPE_ASSOC_RESP 0x0010
53 #define IEEE80211_STYPE_REASSOC_REQ 0x0020
54 #define IEEE80211_STYPE_REASSOC_RESP 0x0030
55 #define IEEE80211_STYPE_PROBE_REQ 0x0040
56 #define IEEE80211_STYPE_PROBE_RESP 0x0050
57 #define IEEE80211_STYPE_BEACON 0x0080
58 #define IEEE80211_STYPE_ATIM 0x0090
59 #define IEEE80211_STYPE_DISASSOC 0x00A0
60 #define IEEE80211_STYPE_AUTH 0x00B0
61 #define IEEE80211_STYPE_DEAUTH 0x00C0
62 #define IEEE80211_STYPE_ACTION 0x00D0
63
64 /* control */
65 #define IEEE80211_STYPE_BACK_REQ 0x0080
66 #define IEEE80211_STYPE_BACK 0x0090
67 #define IEEE80211_STYPE_PSPOLL 0x00A0
68 #define IEEE80211_STYPE_RTS 0x00B0
69 #define IEEE80211_STYPE_CTS 0x00C0
70 #define IEEE80211_STYPE_ACK 0x00D0
71 #define IEEE80211_STYPE_CFEND 0x00E0
72 #define IEEE80211_STYPE_CFENDACK 0x00F0
73
74 /* data */
75 #define IEEE80211_STYPE_DATA 0x0000
76 #define IEEE80211_STYPE_DATA_CFACK 0x0010
77 #define IEEE80211_STYPE_DATA_CFPOLL 0x0020
78 #define IEEE80211_STYPE_DATA_CFACKPOLL 0x0030
79 #define IEEE80211_STYPE_NULLFUNC 0x0040
80 #define IEEE80211_STYPE_CFACK 0x0050
81 #define IEEE80211_STYPE_CFPOLL 0x0060
82 #define IEEE80211_STYPE_CFACKPOLL 0x0070
83 #define IEEE80211_STYPE_QOS_DATA 0x0080
84 #define IEEE80211_STYPE_QOS_DATA_CFACK 0x0090
85 #define IEEE80211_STYPE_QOS_DATA_CFPOLL 0x00A0
86 #define IEEE80211_STYPE_QOS_DATA_CFACKPOLL 0x00B0
87 #define IEEE80211_STYPE_QOS_NULLFUNC 0x00C0
88 #define IEEE80211_STYPE_QOS_CFACK 0x00D0
89 #define IEEE80211_STYPE_QOS_CFPOLL 0x00E0
90 #define IEEE80211_STYPE_QOS_CFACKPOLL 0x00F0
91
92
93 #define IEEE80211_STA_DEFAULT_LISTEN_INTERVAL 3
94 #define IEEE80211_STA_MIN_LISTEN_INTERVAL 1
95
96 /* miscellaneous IEEE 802.11 constants */
97 #define IEEE80211_MAX_FRAG_THRESHOLD 2352
98 #define IEEE80211_MAX_RTS_THRESHOLD 2353
99 #define IEEE80211_MAX_AID 2007
100 #define IEEE80211_MAX_TIM_LEN 251
101 /* Maximum size for the MA-UNITDATA primitive, 802.11 standard section
102 6.2.1.1.2.
103
104 802.11e clarifies the figure in section 7.1.2. The frame body is
105 up to 2304 octets long (maximum MSDU size) plus any crypt overhead. */
106 #define IEEE80211_MAX_DATA_LEN 2304
107 /* 30 byte 4 addr hdr, 2 byte QoS, 2304 byte MSDU, 12 byte crypt, 4 byte FCS */
108 #define IEEE80211_MAX_FRAME_LEN 2352
109
110 #define IEEE80211_MAX_SSID_LEN 32
111
112 #define IEEE80211_MAX_MESH_ID_LEN 32
113
114 #define IEEE80211_QOS_CTL_LEN 2
115 #define IEEE80211_QOS_CTL_TID_MASK 0x000F
116 #define IEEE80211_QOS_CTL_TAG1D_MASK 0x0007
117
118 #define IEEE80211_HT_CTL_LEN 4
119
120 /* U-APSD queue for WMM IEs sent by AP */
121 #define IEEE80211_WMM_IE_AP_QOSINFO_UAPSD (1<<7)
122
123 /* U-APSD queues for WMM IEs sent by STA */
124 #define IEEE80211_WMM_IE_STA_QOSINFO_AC_VO (1<<0)
125 #define IEEE80211_WMM_IE_STA_QOSINFO_AC_VI (1<<1)
126 #define IEEE80211_WMM_IE_STA_QOSINFO_AC_BK (1<<2)
127 #define IEEE80211_WMM_IE_STA_QOSINFO_AC_BE (1<<3)
128 #define IEEE80211_WMM_IE_STA_QOSINFO_AC_MASK 0x0f
129
130 /* U-APSD max SP length for WMM IEs sent by STA */
131 #define IEEE80211_WMM_IE_STA_QOSINFO_SP_ALL 0x00
132 #define IEEE80211_WMM_IE_STA_QOSINFO_SP_2 0x01
133 #define IEEE80211_WMM_IE_STA_QOSINFO_SP_4 0x02
134 #define IEEE80211_WMM_IE_STA_QOSINFO_SP_6 0x03
135 #define IEEE80211_WMM_IE_STA_QOSINFO_SP_MASK 0x03
136 #define IEEE80211_WMM_IE_STA_QOSINFO_SP_SHIFT 5
137
138 /* Parsed Information Elements */
139 struct ieee802_11_elems {
140 u8 *ie_start;
141 size_t total_len;
142
143 /* pointers to IEs */
144 u8 *ssid;
145 u8 *supp_rates;
146 u8 *fh_params;
147 u8 *ds_params;
148 u8 *cf_params;
149 u8 *tim;
150 u8 *ibss_params;
151 u8 *country_elem;
152 u8 *challenge;
153 u8 *erp_info;
154 u8 *ext_supp_rates;
155 u8 *wpa_ie;
156 u8 *rsn_ie;
157 u8 *wmm; /* WMM Information or Parameter Element */
158 u8 *wmm_param;
159 struct ieee80211_ht_cap *ht_cap_elem;
160 struct ieee80211_ht_info *ht_info_elem;
161 u8 *wmm_tspec;
162 u8 *wps_ie;
163 u8 *power_cap;
164 u8 *supp_channels;
165 u8 *mdie;
166 u8 *ftie;
167 u8 *timeout_int;
168 u8 *ch_switch_elem;
169 u8 *ht_capabilities;
170 u8 *ht_operation;
171 u8 *vendor_ht_cap;
172 u8 *p2p;
173 u8 *link_id;
174 u8 *pwr_constr_elem;
175 u8 *interworking;
176
177 u8 ssid_len;
178 u8 supp_rates_len;
179 u8 fh_params_len;
180 u8 ds_params_len;
181 u8 cf_params_len;
182 u8 tim_len;
183 u8 ibss_params_len;
184 u8 challenge_len;
185 u8 erp_info_len;
186 u8 ext_supp_rates_len;
187 u8 ch_switch_elem_len;
188 u8 wpa_ie_len;
189 u8 rsn_ie_len;
190 u8 wmm_len; /* 7 = WMM Information; 24 = WMM Parameter */
191 u8 wmm_param_len;
192 u8 wmm_tspec_len;
193 u8 wps_ie_len;
194 u8 power_cap_len;
195 u8 supp_channels_len;
196 u8 mdie_len;
197 u8 ftie_len;
198 u8 timeout_int_len;
199 u8 ht_capabilities_len;
200 u8 pwr_constr_elem_len;
201 u8 country_elem_len;
202 u8 ht_operation_len;
203 u8 vendor_ht_cap_len;
204 u8 p2p_len;
205 u8 interworking_len;
206
207 };
208
209 __packed struct ieee80211_hdr {
210 u16 frame_control;
211 u16 duration_id;
212 u8 addr1[6];
213 u8 addr2[6];
214 u8 addr3[6];
215 u16 seq_ctrl;
216 u8 addr4[6];
217 };
218
219 __packed struct ieee80211_hdr_3addr {
220 u16 frame_control;
221 u16 duration_id;
222 u8 addr1[6];
223 u8 addr2[6];
224 u8 addr3[6];
225 u16 seq_ctrl;
226 };
227
228 __packed struct ieee80211_qos_hdr {
229 u16 frame_control;
230 u16 duration_id;
231 u8 addr1[6];
232 u8 addr2[6];
233 u8 addr3[6];
234 u16 seq_ctrl;
235 u16 qos_ctrl;
236 };
237
238 typedef enum _phy_type{
239 phy_80211_b,
240 phy_80211_bg,
241 phy_80211_bgn,
242 phy_80211_n,
243 phy_80211_max
244 } phy_type;
245
246
247 #define IEEE80211_HDRLEN (sizeof(struct ieee80211_hdr_3addr))
248
259 static __inline int ieee80211_has_tods(u16 fc)
260 {
261 return (fc & IEEE80211_FCTL_TODS) != 0;
262 }
263
274 static __inline int ieee80211_has_fromds(u16 fc)
275 {
276 return (fc & IEEE80211_FCTL_FROMDS) != 0;
277 }
278
289 static __inline int ieee80211_has_a4(u16 fc)
290 {
291 u16 tmp = IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS;
292 return (fc & tmp) == tmp;
293 }
294
305 static __inline int ieee80211_has_morefrags(u16 fc)
306 {
307 return (fc & IEEE80211_FCTL_MOREFRAGS) != 0;
308 }
309
320 static __inline int ieee80211_has_retry(u16 fc)
321 {
322 return (fc & IEEE80211_FCTL_RETRY) != 0;
323 }
324
335 static __inline int ieee80211_has_pm(u16 fc)
336 {
337 return (fc & IEEE80211_FCTL_PM) != 0;
338 }
339
350 static __inline int ieee80211_has_moredata(u16 fc)
351 {
352 return (fc & IEEE80211_FCTL_MOREDATA) != 0;
353 }
354
365 static __inline int ieee80211_has_protected(u16 fc)
366 {
367 return (fc & IEEE80211_FCTL_PROTECTED) != 0;
368 }
369
380 static __inline int ieee80211_has_order(u16 fc)
381 {
382 return (fc & IEEE80211_FCTL_ORDER) != 0;
383 }
384
395 static __inline int ieee80211_is_mgmt(u16 fc)
396 {
397 return (fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_MGMT;
398 }
399
410 static __inline int ieee80211_is_ctl(u16 fc)
411 {
412 return (fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_CTL;
413 }
414
425 static __inline int ieee80211_is_data(u16 fc)
426 {
427 return (fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA;
428 }
429
440 static __inline int ieee80211_is_data_qos(u16 fc)
441 {
442 /*
443 * mask with QOS_DATA rather than IEEE80211_FCTL_STYPE as we just need
444 * to check the one bit
445 */
446 return (fc & (IEEE80211_FCTL_FTYPE | IEEE80211_STYPE_QOS_DATA)) ==
447 (IEEE80211_FTYPE_DATA | IEEE80211_STYPE_QOS_DATA);
448 }
449
460 static __inline int ieee80211_is_data_present(u16 fc)
461 {
462 /*
463 * mask with 0x40 and test that that bit is clear to only return TRUE
464 * for the data-containing substypes.
465 */
466 return (fc & (IEEE80211_FCTL_FTYPE | 0x40)) == (IEEE80211_FTYPE_DATA);
467 }
468
480 static __inline int ieee80211_is_assoc_req(u16 fc)
481 {
482 return (fc & (IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
483 (IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_ASSOC_REQ);
484 }
485
496 static __inline int ieee80211_is_assoc_resp(u16 fc)
497 {
498 return (fc & (IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
499 (IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_ASSOC_RESP);
500 }
501
512 static __inline int ieee80211_is_reassoc_req(u16 fc)
513 {
514 return (fc & (IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
515 (IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_REASSOC_REQ);
516 }
517
528 static __inline int ieee80211_is_reassoc_resp(u16 fc)
529 {
530 return (fc & (IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
531 (IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_REASSOC_RESP);
532 }
533
544 static __inline int ieee80211_is_probe_req(u16 fc)
545 {
546 return (fc & (IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
547 (IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_PROBE_REQ);
548 }
549
560 static __inline int ieee80211_is_probe_resp(u16 fc)
561 {
562 return (fc & (IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
563 (IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_PROBE_RESP);
564 }
565
576 static __inline int ieee80211_is_beacon(u16 fc)
577 {
578 return (fc & (IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
579 (IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_BEACON);
580 }
581
592 static __inline int ieee80211_is_atim(u16 fc)
593 {
594 return (fc & (IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
595 (IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_ATIM);
596 }
597
608 static __inline int ieee80211_is_disassoc(u16 fc)
609 {
610 return (fc & (IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
611 (IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_DISASSOC);
612 }
613
624 static __inline int ieee80211_is_auth(u16 fc)
625 {
626 return (fc & (IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
627 (IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_AUTH);
628 }
629
640 static __inline int ieee80211_is_deauth(u16 fc)
641 {
642 return (fc & (IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
643 (IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_DEAUTH);
644 }
645
656 static __inline int ieee80211_is_action(u16 fc)
657 {
658 return (fc & (IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
659 (IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_ACTION);
660 }
661
672 static __inline int ieee80211_is_back_req(u16 fc)
673 {
674 return (fc & (IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
675 (IEEE80211_FTYPE_CTL | IEEE80211_STYPE_BACK_REQ);
676 }
677
688 static __inline int ieee80211_is_back(u16 fc)
689 {
690 return (fc & (IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
691 (IEEE80211_FTYPE_CTL | IEEE80211_STYPE_BACK);
692 }
693
704 static __inline int ieee80211_is_pspoll(u16 fc)
705 {
706 return (fc & (IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
707 (IEEE80211_FTYPE_CTL | IEEE80211_STYPE_PSPOLL);
708 }
709
720 static __inline int ieee80211_is_rts(u16 fc)
721 {
722 return (fc & (IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
723 (IEEE80211_FTYPE_CTL | IEEE80211_STYPE_RTS);
724 }
725
736 static __inline int ieee80211_is_cts(u16 fc)
737 {
738 return (fc & (IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
739 (IEEE80211_FTYPE_CTL | IEEE80211_STYPE_CTS);
740 }
741
752 static __inline int ieee80211_is_ack(u16 fc)
753 {
754 return (fc & (IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
755 (IEEE80211_FTYPE_CTL | IEEE80211_STYPE_ACK);
756 }
757
768 static __inline int ieee80211_is_cfend(u16 fc)
769 {
770 return (fc & (IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
771 (IEEE80211_FTYPE_CTL | IEEE80211_STYPE_CFEND);
772 }
773
784 static __inline int ieee80211_is_cfendack(u16 fc)
785 {
786 return (fc & (IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
787 (IEEE80211_FTYPE_CTL | IEEE80211_STYPE_CFENDACK);
788 }
789
800 static __inline int ieee80211_is_nullfunc(u16 fc)
801 {
802 return (fc & (IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
803 (IEEE80211_FTYPE_DATA | IEEE80211_STYPE_NULLFUNC);
804 }
805
816 static __inline int ieee80211_is_qos_nullfunc(u16 fc)
817 {
818 return (fc & (IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
819 (IEEE80211_FTYPE_DATA | IEEE80211_STYPE_QOS_NULLFUNC);
820 }
821
827 __packed struct ieee80211_quiet_ie {
828 u8 count;
829 u8 period;
830 u16 duration;
831 u16 offset;
832 };
833
839 __packed struct ieee80211_msrment_ie {
840 u8 token;
841 u8 mode;
842 u8 type;
843 u8 request[1];
844 };
845
851 __packed struct ieee80211_channel_sw_ie {
852 u8 mode;
853 u8 new_ch_num;
854 u8 count;
855 };
856
862 __packed struct ieee80211_tim_ie {
863 u8 dtim_count;
864 u8 dtim_period;
865 u8 bitmap_ctrl;
866 /* variable size: 1 - 251 bytes */
867 u8 virtual_map[1];
868 };
869
875 __packed struct ieee80211_rann_ie {
876 u8 rann_flags;
877 u8 rann_hopcount;
878 u8 rann_ttl;
879 u8 rann_addr[6];
880 u32 rann_seq;
881 u32 rann_metric;
882 };
883
884 #define WLAN_SA_QUERY_TR_ID_LEN 2
885
886 struct ieee80211_mgmt {
887 u16 frame_control;
888 u16 duration;
889 u8 da[6];
890 u8 sa[6];
891 u8 bssid[6];
892 u16 seq_ctrl;
893 union {
894 struct {
895 u16 auth_alg;
896 u16 auth_transaction;
897 u16 status_code;
898 /* possibly followed by Challenge text */
899 u8 variable[0];
900 } __attribute__ ((packed)) auth;
901 struct {
902 u16 reason_code;
903 } __attribute__ ((packed)) deauth;
904 struct {
905 u16 capab_info;
906 u16 listen_interval;
907 /* followed by SSID and Supported rates */
908 u8 variable[0];
909 } assoc_req;
910 struct {
911 u16 capab_info;
912 u16 status_code;
913 u16 aid;
914 /* followed by Supported rates */
915 u8 variable[0];
916 } __attribute__ ((packed)) assoc_resp, reassoc_resp;
917 struct {
918 u16 capab_info;
919 u16 listen_interval;
920 u8 current_ap[6];
921 /* followed by SSID and Supported rates */
922 u8 variable[0];
923 } __attribute__ ((packed)) reassoc_req;
924 struct {
925 u16 reason_code;
926 } __attribute__ ((packed)) disassoc;
927 struct {
928 u64 timestamp;
929 u16 beacon_int;
930 u16 capab_info;
931 /* followed by some of SSID, Supported rates, FH Params, DS Params, CF
932 Params, IBSS Params, TIM */
933 u8 variable[0];
934 } __attribute__ ((packed)) beacon;
935 struct {
936 /* only variable items: SSID, Supported rates */
937 u8 variable[0];
938 } __attribute__ ((packed)) probe_req;
939 struct {
940 u64 timestamp;
941 u16 beacon_int;
942 u16 capab_info;
943 /* followed by some of SSID, Supported rates, FH Params, DS Params, CF
944 Params, IBSS Params */
945 u8 variable[0];
946 } __attribute__ ((packed)) probe_resp;
947 struct {
948 u8 category;
949 union {
950 struct {
951 u8 action_code;
952 u8 dialog_token;
953 u8 status_code;
954 u8 variable[0];
955 } __attribute__ ((packed)) wme_action;
956 struct{
957 u8 action_code;
958 u8 element_id;
959 u8 length;
960 struct ieee80211_channel_sw_ie sw_elem;
961 } __attribute__ ((packed)) chan_switch;
962 struct{
963 u8 action_code;
964 u8 channel_width;
965 } __attribute__ ((packed)) chan_width;
966 struct{
967 u8 action_code;
968 u8 dialog_token;
969 u8 element_id;
970 u8 length;
971 struct ieee80211_msrment_ie msr_elem;
972 } __attribute__ ((packed)) measurement;
973 struct{
974 u8 action_code;
975 u8 dialog_token;
976 u16 capab;
977 u16 timeout;
978 u16 start_seq_num;
979 } __attribute__ ((packed)) addba_req;
980 struct{
981 u8 action_code;
982 u8 dialog_token;
983 u16 status;
984 u16 capab;
985 u16 timeout;
986 } __attribute__ ((packed)) addba_resp;
987 struct{
988 u8 action_code;
989 u16 params;
990 u16 reason_code;
991 } __attribute__ ((packed)) delba;
992 struct{
993 u8 action_code;
994 /* capab_info for open and confirm, reason for close */
995 u16 aux;
996 /* Followed in plink_confirm by status code, AID and supported
997 rates, and directly by supported rates in plink_open and
998 plink_close */
999 u8 variable[0];
1000 } __attribute__ ((packed)) plink_action;
1001 struct{
1002 u8 action_code;
1003 u8 variable[0];
1004 } __attribute__ ((packed)) mesh_action;
1005 struct {
1006 u8 action;
1007 u8 trans_id[WLAN_SA_QUERY_TR_ID_LEN];
1008 } __attribute__ ((packed)) sa_query;
1009 struct {
1010 u8 action;
1011 u8 smps_control;
1012 } __attribute__ ((packed)) ht_smps;
1013 } u;
1014 } __attribute__ ((packed)) action;
1015 } u;
1016 } __attribute__ ((packed));
1017
1018 #if TLS_CONFIG_11N
1019 /* mgmt header + 1 byte category code */
1020 #define IEEE80211_MIN_ACTION_SIZE offsetof(struct ieee80211_mgmt, u.action.u)
1021
1022 #endif
1023
1024 /* Management MIC information element (IEEE 802.11w) */
1025 struct ieee80211_mmie {
1026 u8 element_id;
1027 u8 length;
1028 u16 key_id;
1029 u8 sequence_number[6];
1030 u8 mic[8];
1031 } __attribute__ ((packed));
1032
1033 /* Control frames */
1034 struct ieee80211_rts {
1035 u16 frame_control;
1036 u16 duration;
1037 u8 ra[6];
1038 u8 ta[6];
1039 } __attribute__ ((packed));
1040
1041 struct ieee80211_cts {
1042 u16 frame_control;
1043 u16 duration;
1044 u8 ra[6];
1045 } __attribute__ ((packed));
1046
1047 struct ieee80211_pspoll {
1048 u16 frame_control;
1049 u16 aid;
1050 u8 bssid[6];
1051 u8 ta[6];
1052 } __attribute__ ((packed));
1053
1060 struct ieee80211_bar {
1061 u16 frame_control;
1062 u16 duration;
1063 u8 ra[6];
1064 u8 ta[6];
1065 u16 control;
1066 u16 start_seq_num;
1067 } __attribute__ ((packed));
1068
1069 /* 802.11 BAR control masks */
1070 #define IEEE80211_BAR_CTRL_ACK_POLICY_NORMAL 0x0000
1071 #define IEEE80211_BAR_CTRL_CBMTID_COMPRESSED_BA 0x0004
1072
1073
1074 #define IEEE80211_HT_MCS_MASK_LEN 10
1075
1085 struct ieee80211_mcs_info {
1086 u8 rx_mask[IEEE80211_HT_MCS_MASK_LEN];
1087 u16 rx_highest;
1088 u8 tx_params;
1089 u8 reserved[3];
1090 } __attribute__ ((packed));
1091
1092 /* 802.11n HT capability MSC set */
1093 #define IEEE80211_HT_MCS_RX_HIGHEST_MASK 0x3ff
1094 #define IEEE80211_HT_MCS_TX_DEFINED 0x01
1095 #define IEEE80211_HT_MCS_TX_RX_DIFF 0x02
1096 /* value 0 == 1 stream etc */
1097 #define IEEE80211_HT_MCS_TX_MAX_STREAMS_MASK 0x0C
1098 #define IEEE80211_HT_MCS_TX_MAX_STREAMS_SHIFT 2
1099 #define IEEE80211_HT_MCS_TX_MAX_STREAMS 4
1100 #define IEEE80211_HT_MCS_TX_UNEQUAL_MODULATION 0x10
1101
1102 /*
1103 * 802.11n D5.0 20.3.5 / 20.6 says:
1104 * - indices 0 to 7 and 32 are single spatial stream
1105 * - 8 to 31 are multiple spatial streams using equal modulation
1106 * [8..15 for two streams, 16..23 for three and 24..31 for four]
1107 * - remainder are multiple spatial streams using unequal modulation
1108 */
1109 #define IEEE80211_HT_MCS_UNEQUAL_MODULATION_START 33
1110 #define IEEE80211_HT_MCS_UNEQUAL_MODULATION_START_BYTE \
1111 (IEEE80211_HT_MCS_UNEQUAL_MODULATION_START / 8)
1112
1119 struct ieee80211_ht_cap {
1120 u16 cap_info;
1121 u8 ampdu_params_info;
1122
1123 /* 16 bytes MCS information */
1124 struct ieee80211_mcs_info mcs;
1125
1126 u16 extended_ht_cap_info;
1127 u32 tx_BF_cap_info;
1128 u8 antenna_selection_info;
1129 } __attribute__ ((packed));
1130
1131 /* 802.11n HT capabilities masks (for cap_info) */
1132 #define IEEE80211_HT_CAP_LDPC_CODING 0x0001
1133 #define IEEE80211_HT_CAP_SUP_WIDTH_20_40 0x0002
1134 #define IEEE80211_HT_CAP_SM_PS 0x000C
1135 #define IEEE80211_HT_CAP_SM_PS_SHIFT 2
1136 /* Spatial Multiplexing Power Save Modes (for capability) */
1137 #define IEEE80211_HT_CAP_SM_PS_STATIC 0
1138 #define IEEE80211_HT_CAP_SM_PS_DYNAMIC 1
1139 #define IEEE80211_HT_CAP_SM_PS_INVALID 2
1140 #define IEEE80211_HT_CAP_SM_PS_DISABLED 3
1141
1142 #define IEEE80211_HT_CAP_GRN_FLD 0x0010
1143 #define IEEE80211_HT_CAP_SGI_20 0x0020
1144 #define IEEE80211_HT_CAP_SGI_40 0x0040
1145 #define IEEE80211_HT_CAP_TX_STBC 0x0080
1146 #define IEEE80211_HT_CAP_RX_STBC 0x0300
1147 #define IEEE80211_HT_CAP_RX_STBC_SHIFT 8
1148 #define IEEE80211_HT_CAP_RX_STBC_DISABLE 0
1149 #define IEEE80211_HT_CAP_RX_STBC_1 1
1150 #define IEEE80211_HT_CAP_RX_STBC_2 2
1151 #define IEEE80211_HT_CAP_RX_STBC_3 3
1152
1153 #define IEEE80211_HT_CAP_DELAY_BA 0x0400
1154 #define IEEE80211_HT_CAP_MAX_AMSDU 0x0800
1155 #define IEEE80211_HT_CAP_DSSSCCK40 0x1000
1156 #define IEEE80211_HT_CAP_RESERVED 0x2000
1157 #define IEEE80211_HT_CAP_40MHZ_INTOLERANT 0x4000
1158 #define IEEE80211_HT_CAP_LSIG_TXOP_PROT 0x8000
1159
1160 /* 802.11n HT capability AMPDU settings (for ampdu_params_info) */
1161 #define IEEE80211_HT_AMPDU_PARM_FACTOR 0x03
1162 #define IEEE80211_HT_AMPDU_PARM_DENSITY 0x1C
1163 #define IEEE80211_HT_AMPDU_PARM_DENSITY_SHIFT 2
1164
1165 /*
1166 * Maximum length of AMPDU that the STA can receive.
1167 * Length = 2 ^ (13 + max_ampdu_length_exp) - 1 (octets)
1168 */
1169 enum ieee80211_max_ampdu_length_exp {
1170 IEEE80211_HT_MAX_AMPDU_8K = 0,
1171 IEEE80211_HT_MAX_AMPDU_16K = 1,
1172 IEEE80211_HT_MAX_AMPDU_32K = 2,
1173 IEEE80211_HT_MAX_AMPDU_64K = 3
1174 };
1175
1176 /* 802.11n HT extended capability */
1177 #define IEEE80211_HT_EXT_CAP_HTC 0x0400
1178 #define IEEE80211_HT_EXT_CAP_RD 0x0800
1179
1180
1181 #define IEEE80211_HT_MAX_AMPDU_FACTOR 13
1182
1183 /* Minimum MPDU start spacing */
1184 enum ieee80211_min_mpdu_spacing {
1185 IEEE80211_HT_MPDU_DENSITY_NONE = 0, /* No restriction */
1186 IEEE80211_HT_MPDU_DENSITY_0_25 = 1, /* 1/4 usec */
1187 IEEE80211_HT_MPDU_DENSITY_0_5 = 2, /* 1/2 usec */
1188 IEEE80211_HT_MPDU_DENSITY_1 = 3, /* 1 usec */
1189 IEEE80211_HT_MPDU_DENSITY_2 = 4, /* 2 usec */
1190 IEEE80211_HT_MPDU_DENSITY_4 = 5, /* 4 usec */
1191 IEEE80211_HT_MPDU_DENSITY_8 = 6, /* 8 usec */
1192 IEEE80211_HT_MPDU_DENSITY_16 = 7 /* 16 usec */
1193 };
1194
1195 #define IEEE80211_HT_MPDU_DENSITY_SHIFT 2
1196
1202 /* ELEMENTID = 61, HT Operation element in 11n7.3.5.57
1203 */
1204
1205 __packed struct ieee80211_ht_info {
1206 u8 control_chan;
1207 u8 ht_param;
1208 u16 operation_mode;
1209 u16 stbc_param;
1210 u8 basic_set[16];
1211 };
1212
1213 /* for ht_param */
1214 #define IEEE80211_HT_PARAM_CHA_SEC_OFFSET 0x03
1215 #define IEEE80211_HT_PARAM_CHA_SEC_NONE 0x00
1216 #define IEEE80211_HT_PARAM_CHA_SEC_ABOVE 0x01
1217 #define IEEE80211_HT_PARAM_CHA_SEC_BELOW 0x03
1218 #define IEEE80211_HT_PARAM_CHAN_WIDTH_ANY 0x04
1219 #define IEEE80211_HT_PARAM_RIFS_MODE 0x08
1220 #define IEEE80211_HT_PARAM_SPSMP_SUPPORT 0x10
1221 #define IEEE80211_HT_PARAM_SERV_INTERVAL_GRAN 0xE0
1222
1223 /* for operation_mode */
1224 #define IEEE80211_HT_OP_MODE_PROTECTION 0x0003
1225 #define IEEE80211_HT_OP_MODE_PROTECTION_NONE 0
1226 #define IEEE80211_HT_OP_MODE_PROTECTION_NONMEMBER 1
1227 #define IEEE80211_HT_OP_MODE_PROTECTION_20MHZ 2
1228 #define IEEE80211_HT_OP_MODE_PROTECTION_NONHT_MIXED 3
1229 #define IEEE80211_HT_OP_MODE_NON_GF_STA_PRSNT 0x0004
1230 #define IEEE80211_HT_OP_MODE_NON_HT_STA_PRSNT 0x0010
1231
1232 /* for stbc_param */
1233 #define IEEE80211_HT_STBC_PARAM_DUAL_BEACON 0x0040
1234 #define IEEE80211_HT_STBC_PARAM_DUAL_CTS_PROT 0x0080
1235 #define IEEE80211_HT_STBC_PARAM_STBC_BEACON 0x0100
1236 #define IEEE80211_HT_STBC_PARAM_LSIG_TXOP_FULLPROT 0x0200
1237 #define IEEE80211_HT_STBC_PARAM_PCO_ACTIVE 0x0400
1238 #define IEEE80211_HT_STBC_PARAM_PCO_PHASE 0x0800
1239
1240
1241 /* block-ack parameters */
1242 #define IEEE80211_ADDBA_PARAM_POLICY_MASK 0x0002
1243 #define IEEE80211_ADDBA_PARAM_TID_MASK 0x003C
1244 #define IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK 0xFFA0
1245 #define IEEE80211_DELBA_PARAM_TID_MASK 0xF000
1246 #define IEEE80211_DELBA_PARAM_INITIATOR_MASK 0x0800
1247
1248 /*
1249 * A-PMDU buffer sizes
1250 * According to IEEE802.11n spec size varies from 8K to 64K (in powers of 2)
1251 */
1252 #define IEEE80211_MIN_AMPDU_BUF 0x8
1253 #define IEEE80211_MAX_AMPDU_BUF 0x40
1254
1255
1256 /* Spatial Multiplexing Power Save Modes (for capability) */
1257 #define WLAN_HT_CAP_SM_PS_STATIC 0
1258 #define WLAN_HT_CAP_SM_PS_DYNAMIC 1
1259 #define WLAN_HT_CAP_SM_PS_INVALID 2
1260 #define WLAN_HT_CAP_SM_PS_DISABLED 3
1261
1262 /* for SM power control field lower two bits */
1263 #define WLAN_HT_SMPS_CONTROL_DISABLED 0
1264 #define WLAN_HT_SMPS_CONTROL_STATIC 1
1265 #define WLAN_HT_SMPS_CONTROL_DYNAMIC 3
1266
1267 /* Authentication algorithms */
1268 #define WLAN_AUTH_OPEN 0
1269 #define WLAN_AUTH_SHARED_KEY 1
1270 #define WLAN_AUTH_FT 2
1271 #define WLAN_AUTH_LEAP 128
1272
1273 #define WLAN_AUTH_CHALLENGE_LEN 128
1274
1275 #define WLAN_CAPABILITY_ESS (1<<0)
1276 #define WLAN_CAPABILITY_IBSS (1<<1)
1277 #define WLAN_CAPABILITY_CF_POLLABLE (1<<2)
1278 #define WLAN_CAPABILITY_CF_POLL_REQUEST (1<<3)
1279 #define WLAN_CAPABILITY_PRIVACY (1<<4)
1280 #define WLAN_CAPABILITY_SHORT_PREAMBLE (1<<5)
1281 #define WLAN_CAPABILITY_PBCC (1<<6)
1282 #define WLAN_CAPABILITY_CHANNEL_AGILITY (1<<7)
1283
1284 /* 802.11h */
1285 #define WLAN_CAPABILITY_SPECTRUM_MGMT (1<<8)
1286 #define WLAN_CAPABILITY_QOS (1<<9)
1287 #define WLAN_CAPABILITY_SHORT_SLOT_TIME (1<<10)
1288 #define WLAN_CAPABILITY_DSSS_OFDM (1<<13)
1289 /* measurement */
1290 #define IEEE80211_SPCT_MSR_RPRT_MODE_LATE (1<<0)
1291 #define IEEE80211_SPCT_MSR_RPRT_MODE_INCAPABLE (1<<1)
1292 #define IEEE80211_SPCT_MSR_RPRT_MODE_REFUSED (1<<2)
1293
1294 #define IEEE80211_SPCT_MSR_RPRT_TYPE_BASIC 0
1295 #define IEEE80211_SPCT_MSR_RPRT_TYPE_CCA 1
1296 #define IEEE80211_SPCT_MSR_RPRT_TYPE_RPI 2
1297
1298
1299 /* 802.11g ERP information element */
1300 #define WLAN_ERP_NON_ERP_PRESENT (1<<0)
1301 #define WLAN_ERP_USE_PROTECTION (1<<1)
1302 #define WLAN_ERP_BARKER_PREAMBLE (1<<2)
1303
1304 /* WLAN_ERP_BARKER_PREAMBLE values */
1305 enum {
1306 WLAN_ERP_PREAMBLE_SHORT = 0,
1307 WLAN_ERP_PREAMBLE_LONG = 1,
1308 };
1309
1310 /* Status codes */
1311 enum ieee80211_statuscode {
1312 WLAN_STATUS_SUCCESS = 0,
1313 WLAN_STATUS_UNSPECIFIED_FAILURE = 1,
1314 WLAN_STATUS_CAPS_UNSUPPORTED = 10,
1315 WLAN_STATUS_REASSOC_NO_ASSOC = 11,
1316 WLAN_STATUS_ASSOC_DENIED_UNSPEC = 12,
1317 WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG = 13,
1318 WLAN_STATUS_UNKNOWN_AUTH_TRANSACTION = 14,
1319 WLAN_STATUS_CHALLENGE_FAIL = 15,
1320 WLAN_STATUS_AUTH_TIMEOUT = 16,
1321 WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA = 17,
1322 WLAN_STATUS_ASSOC_DENIED_RATES = 18,
1323 /* 802.11b */
1324 WLAN_STATUS_ASSOC_DENIED_NOSHORTPREAMBLE = 19,
1325 WLAN_STATUS_ASSOC_DENIED_NOPBCC = 20,
1326 WLAN_STATUS_ASSOC_DENIED_NOAGILITY = 21,
1327 /* 802.11h */
1328 WLAN_STATUS_ASSOC_DENIED_NOSPECTRUM = 22,
1329 WLAN_STATUS_ASSOC_REJECTED_BAD_POWER = 23,
1330 WLAN_STATUS_ASSOC_REJECTED_BAD_SUPP_CHAN = 24,
1331 /* 802.11g */
1332 WLAN_STATUS_ASSOC_DENIED_NOSHORTTIME = 25,
1333 WLAN_STATUS_ASSOC_DENIED_NODSSSOFDM = 26,
1334
1335 WLAN_STATUS_ASSOC_DENIED_NO_HT = 27,
1336 /* 802.11w */
1337 WLAN_STATUS_ASSOC_REJECTED_TEMPORARILY = 30,
1338 WLAN_STATUS_ROBUST_MGMT_FRAME_POLICY_VIOLATION = 31,
1339 /* 802.11i */
1340 WLAN_STATUS_INVALID_IE = 40,
1341 WLAN_STATUS_INVALID_GROUP_CIPHER = 41,
1342 WLAN_STATUS_INVALID_PAIRWISE_CIPHER = 42,
1343 WLAN_STATUS_INVALID_AKMP = 43,
1344 WLAN_STATUS_UNSUPP_RSN_VERSION = 44,
1345 WLAN_STATUS_INVALID_RSN_IE_CAP = 45,
1346 WLAN_STATUS_CIPHER_SUITE_REJECTED = 46,
1347 /* 802.11e */
1348 WLAN_STATUS_UNSPECIFIED_QOS = 32,
1349 WLAN_STATUS_ASSOC_DENIED_NOBANDWIDTH = 33,
1350 WLAN_STATUS_ASSOC_DENIED_LOWACK = 34,
1351 WLAN_STATUS_ASSOC_DENIED_UNSUPP_QOS = 35,
1352 WLAN_STATUS_REQUEST_DECLINED = 37,
1353 WLAN_STATUS_INVALID_QOS_PARAM = 38,
1354 WLAN_STATUS_CHANGE_TSPEC = 39,
1355 WLAN_STATUS_WAIT_TS_DELAY = 47,
1356 WLAN_STATUS_NO_DIRECT_LINK = 48,
1357 WLAN_STATUS_STA_NOT_PRESENT = 49,
1358 WLAN_STATUS_STA_NOT_QSTA = 50,
1359 WLAN_STATUS_ASSOC_DENIED_LISTEN_INT_TOO_LARGE = 51,
1360 };
1361
1362
1363 /* Reason codes */
1364 enum ieee80211_reasoncode {
1365 WLAN_REASON_UNSPECIFIED = 1,
1366 WLAN_REASON_PREV_AUTH_NOT_VALID = 2,
1367 WLAN_REASON_DEAUTH_LEAVING = 3,
1368 WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY = 4,
1369 WLAN_REASON_DISASSOC_AP_BUSY = 5,
1370 WLAN_REASON_CLASS2_FRAME_FROM_NONAUTH_STA = 6,
1371 WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA = 7,
1372 WLAN_REASON_DISASSOC_STA_HAS_LEFT = 8,
1373 WLAN_REASON_STA_REQ_ASSOC_WITHOUT_AUTH = 9,
1374 /* 802.11h */
1375 WLAN_REASON_DISASSOC_BAD_POWER = 10,
1376 WLAN_REASON_DISASSOC_BAD_SUPP_CHAN = 11,
1377 /* 802.11i */
1378 WLAN_REASON_INVALID_IE = 13,
1379 WLAN_REASON_MIC_FAILURE = 14,
1380 WLAN_REASON_4WAY_HANDSHAKE_TIMEOUT = 15,
1381 WLAN_REASON_GROUP_KEY_HANDSHAKE_TIMEOUT = 16,
1382 WLAN_REASON_IE_DIFFERENT = 17,
1383 WLAN_REASON_INVALID_GROUP_CIPHER = 18,
1384 WLAN_REASON_INVALID_PAIRWISE_CIPHER = 19,
1385 WLAN_REASON_INVALID_AKMP = 20,
1386 WLAN_REASON_UNSUPP_RSN_VERSION = 21,
1387 WLAN_REASON_INVALID_RSN_IE_CAP = 22,
1388 WLAN_REASON_IEEE8021X_FAILED = 23,
1389 WLAN_REASON_CIPHER_SUITE_REJECTED = 24,
1390 /* 802.11e */
1391 WLAN_REASON_DISASSOC_UNSPECIFIED_QOS = 32,
1392 WLAN_REASON_DISASSOC_QAP_NO_BANDWIDTH = 33,
1393 WLAN_REASON_DISASSOC_LOW_ACK = 34,
1394 WLAN_REASON_DISASSOC_QAP_EXCEED_TXOP = 35,
1395 WLAN_REASON_QSTA_LEAVE_QBSS = 36,
1396 WLAN_REASON_QSTA_NOT_USE = 37,
1397 WLAN_REASON_QSTA_REQUIRE_SETUP = 38,
1398 WLAN_REASON_QSTA_TIMEOUT = 39,
1399 WLAN_REASON_QSTA_CIPHER_NOT_SUPP = 45,
1400 };
1401
1402
1403 /* Information Element IDs */
1404 enum ieee80211_eid {
1405 WLAN_EID_SSID = 0,
1406 WLAN_EID_SUPP_RATES = 1,
1407 WLAN_EID_FH_PARAMS = 2,
1408 WLAN_EID_DS_PARAMS = 3,
1409 WLAN_EID_CF_PARAMS = 4,
1410 WLAN_EID_TIM = 5,
1411 WLAN_EID_IBSS_PARAMS = 6,
1412 WLAN_EID_CHALLENGE = 16,
1413
1414 WLAN_EID_COUNTRY = 7,
1415 WLAN_EID_HP_PARAMS = 8,
1416 WLAN_EID_HP_TABLE = 9,
1417 WLAN_EID_REQUEST = 10,
1418
1419 WLAN_EID_QBSS_LOAD = 11,
1420 WLAN_EID_EDCA_PARAM_SET = 12,
1421 WLAN_EID_TSPEC = 13,
1422 WLAN_EID_TCLAS = 14,
1423 WLAN_EID_SCHEDULE = 15,
1424 WLAN_EID_TS_DELAY = 43,
1425 WLAN_EID_TCLAS_PROCESSING = 44,
1426 WLAN_EID_QOS_CAPA = 46,
1427 /* 802.11s */
1428 WLAN_EID_MESH_CONFIG = 113,
1429 WLAN_EID_MESH_ID = 114,
1430 WLAN_EID_LINK_METRIC_REPORT = 115,
1431 WLAN_EID_CONGESTION_NOTIFICATION = 116,
1432 /* Note that the Peer Link IE has been replaced with the similar Peer
1433 Management IE. We will keep the former definition until mesh code is
1434 changed to comply with latest 802.11s drafts. */
1435 WLAN_EID_PEER_LINK = 55, /* no longer in 802.11s drafts */
1436 WLAN_EID_PEER_MGMT = 117,
1437 WLAN_EID_CHAN_SWITCH_PARAM = 118,
1438 WLAN_EID_MESH_AWAKE_WINDOW = 119,
1439 WLAN_EID_BEACON_TIMING = 120,
1440 WLAN_EID_MCCAOP_SETUP_REQ = 121,
1441 WLAN_EID_MCCAOP_SETUP_RESP = 122,
1442 WLAN_EID_MCCAOP_ADVERT = 123,
1443 WLAN_EID_MCCAOP_TEARDOWN = 124,
1444 WLAN_EID_GANN = 125,
1445 WLAN_EID_RANN = 126,
1446 WLAN_EID_PREQ = 130,
1447 WLAN_EID_PREP = 131,
1448 WLAN_EID_PERR = 132,
1449 WLAN_EID_PXU = 137,
1450 WLAN_EID_PXUC = 138,
1451 WLAN_EID_AUTH_MESH_PEER_EXCH = 139,
1452 WLAN_EID_MIC = 140,
1453
1454 WLAN_EID_PWR_CONSTRAINT = 32,
1455 WLAN_EID_PWR_CAPABILITY = 33,
1456 WLAN_EID_TPC_REQUEST = 34,
1457 WLAN_EID_TPC_REPORT = 35,
1458 WLAN_EID_SUPPORTED_CHANNELS = 36,
1459 WLAN_EID_CHANNEL_SWITCH = 37,
1460 WLAN_EID_MEASURE_REQUEST = 38,
1461 WLAN_EID_MEASURE_REPORT = 39,
1462 WLAN_EID_QUIET = 40,
1463 WLAN_EID_IBSS_DFS = 41,
1464
1465 WLAN_EID_ERP_INFO = 42,
1466 WLAN_EID_EXT_SUPP_RATES = 50,
1467
1468 WLAN_EID_HT_CAPABILITY = 45,
1469 WLAN_EID_HT_INFORMATION = 61,
1470
1471 WLAN_EID_RSN = 48,
1472 WLAN_EID_MMIE = 76,
1473 WLAN_EID_WPA = 221,
1474 WLAN_EID_GENERIC = 221,
1475 WLAN_EID_VENDOR_SPECIFIC = 221,
1476 WLAN_EID_QOS_PARAMETER = 222,
1477
1478 WLAN_EID_AP_CHAN_REPORT = 51,
1479 WLAN_EID_NEIGHBOR_REPORT = 52,
1480 WLAN_EID_RCPI = 53,
1481 WLAN_EID_BSS_AVG_ACCESS_DELAY = 63,
1482 WLAN_EID_ANTENNA_INFO = 64,
1483 WLAN_EID_RSNI = 65,
1484 WLAN_EID_MEASUREMENT_PILOT_TX_INFO = 66,
1485 WLAN_EID_BSS_AVAILABLE_CAPACITY = 67,
1486 WLAN_EID_BSS_AC_ACCESS_DELAY = 68,
1487 WLAN_EID_RRM_ENABLED_CAPABILITIES = 70,
1488 WLAN_EID_MULTIPLE_BSSID = 71,
1489 WLAN_EID_BSS_COEX_2040 = 72,
1490 WLAN_EID_OVERLAP_BSS_SCAN_PARAM = 74,
1491 WLAN_EID_EXT_CAPABILITY = 127,
1492
1493 WLAN_EID_MOBILITY_DOMAIN = 54,
1494 WLAN_EID_FAST_BSS_TRANSITION = 55,
1495 WLAN_EID_TIMEOUT_INTERVAL = 56,
1496 WLAN_EID_RIC_DATA = 57,
1497 WLAN_EID_RIC_DESCRIPTOR = 75,
1498
1499 WLAN_EID_DSE_REGISTERED_LOCATION = 58,
1500 WLAN_EID_SUPPORTED_REGULATORY_CLASSES = 59,
1501 WLAN_EID_EXT_CHANSWITCH_ANN = 60,
1502
1503 WLAN_EID_TIME_ZONE = 98,
1504 WLAN_EID_LINK_ID = 101,
1505 WLAN_EID_INTERWORKING = 107,
1506 WLAN_EID_ADV_PROTO = 108,
1507 WLAN_EID_ROAMING_CONSORTIUM = 111,
1508 WLAN_EID_EXT_CAPAB = 127,
1509
1510 };
1511
1512 /* Action category code */
1513 enum ieee80211_category {
1514 WLAN_CATEGORY_SPECTRUM_MGMT = 0,
1515 WLAN_CATEGORY_QOS = 1,
1516 WLAN_CATEGORY_DLS = 2,
1517 WLAN_CATEGORY_BACK = 3,
1518 WLAN_CATEGORY_PUBLIC = 4,
1519 WLAN_CATEGORY_HT = 7,
1520 WLAN_CATEGORY_SA_QUERY = 8,
1521 WLAN_CATEGORY_PROTECTED_DUAL_OF_ACTION = 9,
1522 WLAN_CATEGORY_WMM = 17,
1523 WLAN_CATEGORY_VENDOR_SPECIFIC_PROTECTED = 126,
1524 WLAN_CATEGORY_VENDOR_SPECIFIC = 127,
1525 };
1526
1527 /* SPECTRUM_MGMT action code */
1528 enum ieee80211_spectrum_mgmt_actioncode {
1529 WLAN_ACTION_SPCT_MSR_REQ = 0,
1530 WLAN_ACTION_SPCT_MSR_RPRT = 1,
1531 WLAN_ACTION_SPCT_TPC_REQ = 2,
1532 WLAN_ACTION_SPCT_TPC_RPRT = 3,
1533 WLAN_ACTION_SPCT_CHL_SWITCH = 4,
1534 };
1535
1536 /* HT action codes */
1537 enum ieee80211_ht_actioncode {
1538 WLAN_HT_ACTION_NOTIFY_CHANWIDTH = 0,
1539 WLAN_HT_ACTION_SMPS = 1,
1540 WLAN_HT_ACTION_PSMP = 2,
1541 WLAN_HT_ACTION_PCO_PHASE = 3,
1542 WLAN_HT_ACTION_CSI = 4,
1543 WLAN_HT_ACTION_NONCOMPRESSED_BF = 5,
1544 WLAN_HT_ACTION_COMPRESSED_BF = 6,
1545 WLAN_HT_ACTION_ASEL_IDX_FEEDBACK = 7,
1546 };
1547
1548 /* Security key length */
1549 enum ieee80211_key_len {
1550 WLAN_KEY_LEN_WEP40 = 5,
1551 WLAN_KEY_LEN_WEP104 = 13,
1552 WLAN_KEY_LEN_CCMP = 16,
1553 WLAN_KEY_LEN_TKIP = 32,
1554 WLAN_KEY_LEN_AES_CMAC = 16,
1555 };
1556
1557 /*
1558 * IEEE 802.11-2007 7.3.2.9 Country information element
1559 *
1560 * Minimum length is 8 octets, ie len must be evenly
1561 * divisible by 2
1562 */
1563
1564 /* Although the spec says 8 I'm seeing 6 in practice */
1565 #define IEEE80211_COUNTRY_IE_MIN_LEN 6
1566
1567 /*
1568 * For regulatory extension stuff see IEEE 802.11-2007
1569 * Annex I (page 1141) and Annex J (page 1147). Also
1570 * review 7.3.2.9.
1571 *
1572 * When dot11RegulatoryClassesRequired is TRUE and the
1573 * first_channel/reg_extension_id is >= 201 then the IE
1574 * compromises of the 'ext' struct represented below:
1575 *
1576 * - Regulatory extension ID - when generating IE this just needs
1577 * to be monotonically increasing for each triplet passed in
1578 * the IE
1579 * - Regulatory class - index into set of rules
1580 * - Coverage class - index into air propagation time (Table 7-27),
1581 * in microseconds, you can compute the air propagation time from
1582 * the index by multiplying by 3, so index 10 yields a propagation
1583 * of 10 us. Valid values are 0-31, values 32-255 are not defined
1584 * yet. A value of 0 inicates air propagation of <= 1 us.
1585 *
1586 * See also Table I.2 for Emission limit sets and table
1587 * I.3 for Behavior limit sets. Table J.1 indicates how to map
1588 * a reg_class to an emission limit set and behavior limit set.
1589 */
1590 #define IEEE80211_COUNTRY_EXTENSION_ID 201
1591
1592 /*
1593 * Channels numbers in the IE must be monotonically increasing
1594 * if dot11RegulatoryClassesRequired is not TRUE.
1595 *
1596 * If dot11RegulatoryClassesRequired is TRUE consecutive
1597 * subband triplets following a regulatory triplet shall
1598 * have monotonically increasing first_channel number fields.
1599 *
1600 * Channel numbers shall not overlap.
1601 *
1602 * Note that max_power is signed.
1603 */
1604 __packed struct ieee80211_country_ie_triplet {
1605 __packed union {
1606 __packed struct {
1607 u8 first_channel;
1608 u8 num_channels;
1609 s8 max_power;
1610 } chans;
1611 __packed struct {
1612 u8 reg_extension_id;
1613 u8 reg_class;
1614 u8 coverage_class;
1615 } ext;
1616 } u;
1617 };
1618
1619 enum ieee80211_timeout_interval_type {
1620 WLAN_TIMEOUT_REASSOC_DEADLINE = 1 /* 802.11r */ ,
1621 WLAN_TIMEOUT_KEY_LIFETIME = 2 /* 802.11r */ ,
1622 WLAN_TIMEOUT_ASSOC_COMEBACK = 3 /* 802.11w */ ,
1623 };
1624
1625 /* BACK action code */
1626 enum ieee80211_back_actioncode {
1627 WLAN_ACTION_ADDBA_REQ = 0,
1628 WLAN_ACTION_ADDBA_RESP = 1,
1629 WLAN_ACTION_DELBA = 2,
1630 };
1631
1632 /* BACK (block-ack) parties */
1633 enum ieee80211_back_parties {
1634 WLAN_BACK_RECIPIENT = 0,
1635 WLAN_BACK_INITIATOR = 1,
1636 WLAN_BACK_TIMER = 2,
1637 };
1638
1639 /* SA Query action */
1640 enum ieee80211_sa_query_action {
1641 WLAN_ACTION_SA_QUERY_REQUEST = 0,
1642 WLAN_ACTION_SA_QUERY_RESPONSE = 1,
1643 };
1644
1645
1646 /* A-MSDU 802.11n */
1647 #define IEEE80211_QOS_CONTROL_A_MSDU_PRESENT 0x0080
1648
1649 /* cipher suite selectors */
1650 #define WLAN_CIPHER_SUITE_USE_GROUP 0x000FAC00
1651 #define WLAN_CIPHER_SUITE_WEP40 0x000FAC01
1652 #define WLAN_CIPHER_SUITE_TKIP 0x000FAC02
1653 /* reserved: 0x000FAC03 */
1654 #define WLAN_CIPHER_SUITE_CCMP 0x000FAC04
1655 #define WLAN_CIPHER_SUITE_WEP104 0x000FAC05
1656 #define WLAN_CIPHER_SUITE_AES_CMAC 0x000FAC06
1657
1658 /* AKM suite selectors */
1659 #define WLAN_AKM_SUITE_8021X 0x000FAC01
1660 #define WLAN_AKM_SUITE_PSK 0x000FAC02
1661
1662 #define WLAN_MAX_KEY_LEN 32
1663
1664 #define WLAN_PMKID_LEN 16
1665
1679 static __inline u8 *ieee80211_get_qos_ctl(struct ieee80211_hdr *hdr)
1680 {
1681 if (ieee80211_has_a4(hdr->frame_control))
1682 return (u8 *) hdr + 30;
1683 else
1684 return (u8 *) hdr + 24;
1685 }
1686
1701 static __inline u8 *ieee80211_get_SA(struct ieee80211_hdr *hdr)
1702 {
1703 if (ieee80211_has_a4(hdr->frame_control))
1704 return hdr->addr4;
1705 if (ieee80211_has_fromds(hdr->frame_control))
1706 return hdr->addr3;
1707 return hdr->addr2;
1708 }
1709
1724 static __inline u8 *ieee80211_get_DA(struct ieee80211_hdr *hdr)
1725 {
1726 if (ieee80211_has_tods(hdr->frame_control))
1727 return hdr->addr3;
1728 else
1729 return hdr->addr1;
1730 }
1731
1742 static __inline bool ieee80211_is_robust_mgmt_frame(struct ieee80211_hdr *hdr)
1743 {
1744 if (ieee80211_is_disassoc(hdr->frame_control) ||
1745 ieee80211_is_deauth(hdr->frame_control))
1746 return TRUE;
1747
1748 if (ieee80211_is_action(hdr->frame_control)) {
1749 u8 *category;
1750
1751 /*
1752 * Action frames, excluding Public Action frames, are Robust
1753 * Management Frames. However, if we are looking at a Protected
1754 * frame, skip the check since the data may be encrypted and
1755 * the frame has already been found to be a Robust Management
1756 * Frame (by the other end).
1757 */
1758 if (ieee80211_has_protected(hdr->frame_control))
1759 return TRUE;
1760 category = ((u8 *) hdr) + 24;
1761 return *category != WLAN_CATEGORY_PUBLIC &&
1762 *category != WLAN_CATEGORY_HT &&
1763 *category != WLAN_CATEGORY_VENDOR_SPECIFIC;
1764 }
1765
1766 return FALSE;
1767 }
1768
1781 static __inline int ieee80211_fhss_chan_to_freq(int channel)
1782 {
1783 if ((channel > 1) && (channel < 96))
1784 return channel + 2400;
1785 else
1786 return -1;
1787 }
1788
1801 static __inline int ieee80211_freq_to_fhss_chan(int freq)
1802 {
1803 if ((freq > 2401) && (freq < 2496))
1804 return freq - 2400;
1805 else
1806 return -1;
1807 }
1808
1821 static __inline int ieee80211_dsss_chan_to_freq(int channel)
1822 {
1823 if ((channel > 0) && (channel < 14))
1824 return 2407 + (channel * 5);
1825 else if (channel == 14)
1826 return 2484;
1827 else
1828 return -1;
1829 }
1830
1844 static __inline int ieee80211_freq_to_dsss_chan(int freq)
1845 {
1846 if ((freq >= 2410) && (freq < 2475))
1847 return (freq - 2405) / 5;
1848 else if ((freq >= 2482) && (freq < 2487))
1849 return 14;
1850 else
1851 return -1;
1852 }
1853
1856 #define ieee80211_hr_chan_to_freq(chan) ieee80211_dsss_chan_to_freq(chan)
1857
1859 #define ieee80211_freq_to_hr_chan(freq) ieee80211_freq_to_dsss_chan(freq)
1860
1862 #define ieee80211_erp_chan_to_freq(chan) ieee80211_hr_chan_to_freq(chan)
1863
1864 #define ieee80211_freq_to_erp_chan(freq) ieee80211_freq_to_hr_chan(freq)
1865
1879 static __inline int ieee80211_ofdm_chan_to_freq(int s_freq, int channel)
1880 {
1881 if ((channel > 0) && (channel <= 200) && (s_freq >= 4000))
1882 return s_freq + (channel * 5);
1883 else
1884 return -1;
1885 }
1886
1901 static __inline int ieee80211_freq_to_ofdm_chan(int s_freq, int freq)
1902 {
1903 if ((freq > (s_freq + 2)) && (freq <= (s_freq + 1202)) && (s_freq >= 4000))
1904 return (freq + 2 - s_freq) / 5;
1905 else
1906 return -1;
1907 }
1908
1918 static __inline unsigned long ieee80211_tu_to_usec(unsigned long tu)
1919 {
1920 return 1024 * tu;
1921 }
1922
1935 static __inline bool ieee80211_check_tim(struct ieee80211_tim_ie *tim,
1936 u8 tim_len, u16 aid)
1937 {
1938 u8 mask;
1939 u8 index, indexn1, indexn2;
1940
1941 if (!tim || tim_len < sizeof(*tim))
1942 return FALSE;
1943
1944 aid &= 0x3fff;
1945 index = aid / 8;
1946 mask = 1 << (aid & 7);
1947
1948 indexn1 = tim->bitmap_ctrl & 0xfe;
1949 indexn2 = tim_len + indexn1 - 4;
1950
1951 if (index < indexn1 || index > indexn2)
1952 return FALSE;
1953
1954 index -= indexn1;
1955
1956 return !!(tim->virtual_map[index] & mask);
1957 }
1958
1959 #endif /* end of TLS_IEEE80211_H */
ieee80211_is_deauth
static __inline int ieee80211_is_deauth(u16 fc)
check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_DEAUTH
Definition: wm_ieee80211.h:640
ieee80211_is_pspoll
static __inline int ieee80211_is_pspoll(u16 fc)
check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_PSPOLL
Definition: wm_ieee80211.h:704
ieee80211_qos_hdr
Definition: wm_ieee80211.h:228
ieee80211_quiet_ie
Definition: wm_ieee80211.h:827
ieee80211_has_tods
static __inline int ieee80211_has_tods(u16 fc)
check if IEEE80211_FCTL_TODS is set
Definition: wm_ieee80211.h:259
ieee80211_is_robust_mgmt_frame
static __inline bool ieee80211_is_robust_mgmt_frame(struct ieee80211_hdr *hdr)
check if frame is a robust management frame
Definition: wm_ieee80211.h:1742
ieee80211_is_reassoc_req
static __inline int ieee80211_is_reassoc_req(u16 fc)
check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_REASSOC_REQ
Definition: wm_ieee80211.h:512
ieee80211_is_assoc_resp
static __inline int ieee80211_is_assoc_resp(u16 fc)
check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_ASSOC_RESP
Definition: wm_ieee80211.h:496
ieee80211_has_retry
static __inline int ieee80211_has_retry(u16 fc)
check if IEEE80211_FCTL_RETRY is set
Definition: wm_ieee80211.h:320
ieee80211_is_ack
static __inline int ieee80211_is_ack(u16 fc)
check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_ACK
Definition: wm_ieee80211.h:752
ieee80211_msrment_ie
Definition: wm_ieee80211.h:839
ieee80211_channel_sw_ie
Definition: wm_ieee80211.h:851
ieee80211_is_reassoc_resp
static __inline int ieee80211_is_reassoc_resp(u16 fc)
check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_REASSOC_RESP
Definition: wm_ieee80211.h:528
ieee80211_is_cfend
static __inline int ieee80211_is_cfend(u16 fc)
check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_CFEND
Definition: wm_ieee80211.h:768
ieee80211_is_ctl
static __inline int ieee80211_is_ctl(u16 fc)
check if type is IEEE80211_FTYPE_CTL
Definition: wm_ieee80211.h:410
ieee80211_has_order
static __inline int ieee80211_has_order(u16 fc)
check if IEEE80211_FCTL_ORDER is set
Definition: wm_ieee80211.h:380
ieee80211_tim_ie
Definition: wm_ieee80211.h:862
ieee80211_has_protected
static __inline int ieee80211_has_protected(u16 fc)
check if IEEE80211_FCTL_PROTECTED is set
Definition: wm_ieee80211.h:365
ieee80211_is_back
static __inline int ieee80211_is_back(u16 fc)
check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_BACK
Definition: wm_ieee80211.h:688
ieee80211_is_disassoc
static __inline int ieee80211_is_disassoc(u16 fc)
check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_DISASSOC
Definition: wm_ieee80211.h:608
ieee80211_is_probe_resp
static __inline int ieee80211_is_probe_resp(u16 fc)
check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_PROBE_RESP
Definition: wm_ieee80211.h:560
ieee80211_freq_to_fhss_chan
static __inline int ieee80211_freq_to_fhss_chan(int freq)
get channel
Definition: wm_ieee80211.h:1801
ieee80211_is_atim
static __inline int ieee80211_is_atim(u16 fc)
check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_ATIM
Definition: wm_ieee80211.h:592
ieee80211_has_a4
static __inline int ieee80211_has_a4(u16 fc)
check if IEEE80211_FCTL_TODS and IEEE80211_FCTL_FROMDS are set
Definition: wm_ieee80211.h:289
__attribute__
Definition: wm_bt_def.h:242
ieee80211_hdr_3addr
Definition: wm_ieee80211.h:219
ieee80211_has_moredata
static __inline int ieee80211_has_moredata(u16 fc)
check if IEEE80211_FCTL_MOREDATA is set
Definition: wm_ieee80211.h:350
ieee80211_is_qos_nullfunc
static __inline int ieee80211_is_qos_nullfunc(u16 fc)
check if frame is a QoS nullfunc frame
Definition: wm_ieee80211.h:816
ieee80211_is_action
static __inline int ieee80211_is_action(u16 fc)
check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_ACTION
Definition: wm_ieee80211.h:656
ieee80211_has_fromds
static __inline int ieee80211_has_fromds(u16 fc)
check if IEEE80211_FCTL_FROMDS is set
Definition: wm_ieee80211.h:274
ieee80211_mcs_info
Definition: wm_ieee80211.h:1085
ieee80211_pspoll
Definition: wm_ieee80211.h:1047
ieee80211_hdr
Definition: wm_ieee80211.h:209
ieee80211_fhss_chan_to_freq
static __inline int ieee80211_fhss_chan_to_freq(int channel)
get channel frequency
Definition: wm_ieee80211.h:1781
ieee80211_rts
Definition: wm_ieee80211.h:1034
ieee80211_cts
Definition: wm_ieee80211.h:1041
ieee80211_is_rts
static __inline int ieee80211_is_rts(u16 fc)
check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_RTS
Definition: wm_ieee80211.h:720
ieee80211_is_auth
static __inline int ieee80211_is_auth(u16 fc)
check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_AUTH
Definition: wm_ieee80211.h:624
ieee80211_is_mgmt
static __inline int ieee80211_is_mgmt(u16 fc)
check if type is IEEE80211_FTYPE_MGMT
Definition: wm_ieee80211.h:395
ieee80211_has_morefrags
static __inline int ieee80211_has_morefrags(u16 fc)
check if IEEE80211_FCTL_MOREFRAGS is set
Definition: wm_ieee80211.h:305
ieee80211_freq_to_dsss_chan
static __inline int ieee80211_freq_to_dsss_chan(int freq)
get channel
Definition: wm_ieee80211.h:1844
ieee80211_is_nullfunc
static __inline int ieee80211_is_nullfunc(u16 fc)
check if frame is a regular (non-QoS) nullfunc frame
Definition: wm_ieee80211.h:800
ieee80211_dsss_chan_to_freq
static __inline int ieee80211_dsss_chan_to_freq(int channel)
get channel center frequency
Definition: wm_ieee80211.h:1821
ieee802_11_elems
Definition: wm_ieee80211.h:139
ieee80211_get_SA
static __inline u8 * ieee80211_get_SA(struct ieee80211_hdr *hdr)
get pointer to SA
Definition: wm_ieee80211.h:1701
ieee80211_get_qos_ctl
static __inline u8 * ieee80211_get_qos_ctl(struct ieee80211_hdr *hdr)
get pointer to qos control bytes
Definition: wm_ieee80211.h:1679
ieee80211_is_beacon
static __inline int ieee80211_is_beacon(u16 fc)
check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_BEACON
Definition: wm_ieee80211.h:576
ieee80211_mgmt
Definition: wm_ieee80211.h:886
ieee80211_tu_to_usec
static __inline unsigned long ieee80211_tu_to_usec(unsigned long tu)
convert time units (TU) to microseconds
Definition: wm_ieee80211.h:1918
ieee80211_is_back_req
static __inline int ieee80211_is_back_req(u16 fc)
check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_BACK_REQ
Definition: wm_ieee80211.h:672
ieee80211_ht_cap
Definition: wm_ieee80211.h:1119
ieee80211_freq_to_ofdm_chan
static __inline int ieee80211_freq_to_ofdm_chan(int s_freq, int freq)
get channel
Definition: wm_ieee80211.h:1901
ieee80211_ofdm_chan_to_freq
static __inline int ieee80211_ofdm_chan_to_freq(int s_freq, int channel)
get channel center frequency
Definition: wm_ieee80211.h:1879
ieee80211_bar
Definition: wm_ieee80211.h:1060
ieee80211_is_data
static __inline int ieee80211_is_data(u16 fc)
check if type is IEEE80211_FTYPE_DATA
Definition: wm_ieee80211.h:425
ieee80211_is_data_present
static __inline int ieee80211_is_data_present(u16 fc)
check if type is IEEE80211_FTYPE_DATA and has data
Definition: wm_ieee80211.h:460
ieee80211_has_pm
static __inline int ieee80211_has_pm(u16 fc)
check if IEEE80211_FCTL_PM is set
Definition: wm_ieee80211.h:335
ieee80211_check_tim
static __inline bool ieee80211_check_tim(struct ieee80211_tim_ie *tim, u8 tim_len, u16 aid)
check if AID bit is set in TIM
Definition: wm_ieee80211.h:1935
ieee80211_ht_info
Definition: wm_ieee80211.h:1205
ieee80211_is_data_qos
static __inline int ieee80211_is_data_qos(u16 fc)
check if type is IEEE80211_FTYPE_DATA and IEEE80211_STYPE_QOS_DATA is set
Definition: wm_ieee80211.h:440
ieee80211_is_probe_req
static __inline int ieee80211_is_probe_req(u16 fc)
check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_PROBE_REQ
Definition: wm_ieee80211.h:544
ieee80211_country_ie_triplet
Definition: wm_ieee80211.h:1604
ieee80211_get_DA
static __inline u8 * ieee80211_get_DA(struct ieee80211_hdr *hdr)
get pointer to DA
Definition: wm_ieee80211.h:1724
ieee80211_mmie
Definition: wm_ieee80211.h:1025
ieee80211_is_assoc_req
static __inline int ieee80211_is_assoc_req(u16 fc)
check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_ASSOC_REQ
Definition: wm_ieee80211.h:480
ieee80211_is_cts
static __inline int ieee80211_is_cts(u16 fc)
check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_CTS
Definition: wm_ieee80211.h:736
ieee80211_is_cfendack
static __inline int ieee80211_is_cfendack(u16 fc)
check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_CFENDACK
Definition: wm_ieee80211.h:784
ieee80211_rann_ie
Definition: wm_ieee80211.h:875


W800 SDK APIs: doxy_out/include/wm_include.h Source File

  • doxy_out
  • include
wm_include.h
Go to the documentation of this file.
1
10 #ifndef __WM_INCLUDE_H__
11 #define __WM_INCLUDE_H__
12
67 #include <stdio.h>
68 #include <stdlib.h>
69 #include "wm_type_def.h"
70 #include "wm_uart.h"
71 #include "wm_gpio.h"
72 #include "wm_hostspi.h"
73 #include "wm_socket.h"
74 #include "wm_sockets.h"
75 #include "wm_wifi.h"
76 #include "wm_hspi.h"
77 #include "wm_pwm.h"
78 #include "wm_params.h"
79 #include "wm_osal.h"
80 #include "wm_netif.h"
81 #include "wm_efuse.h"
82 #include "wm_mem.h"
83 #include "wm_demo.h"
84 #include "wm_regs.h"
85
86
87 #endif
wm_osal.h
WM OS adapter layer.
wm_regs.h
register & operation file
wm_pwm.h
pwm driver module
wm_socket.h
socket Module
wm_sockets.h
socket apis
wm_type_def.h
WM type redefine.
wm_uart.h
uart Driver Module
wm_wifi.h
Wi-Fi API.
wm_gpio.h
GPIO Driver Module.
wm_hspi.h
High speed spi slave Module.
wm_efuse.h
virtual efuse Driver Module
wm_hostspi.h
host spi Driver Module
wm_params.h
param manager Module
wm_netif.h
ETHERNET INIT Interface.


W800 SDK APIs: doxy_out/include/driver/wm_internal_flash.h Source File

  • doxy_out
  • include
  • driver
wm_internal_flash.h
Go to the documentation of this file.
1
11 #ifndef WM_INTERNAL_FLASH_H
12 #define WM_INTERNAL_FLASH_H
13
14 #include "wm_type_def.h"
15 #include "wm_osal.h"
16
17 typedef volatile unsigned char vu8;
18 typedef volatile unsigned short vu16;
19 typedef volatile unsigned long vu32;
20
21 #define M8(adr) (*((vu8 *) (adr)))
22 #define M16(adr) (*((vu16*) (adr)))
23 #define M32(adr) (*((vu32*) (adr)))
24
25
26 #define INSIDE_FLS_SECTOR_SIZE 0x1000
27 #define INSIDE_FLS_PAGE_SIZE 256
28
29
30 #define INSIDE_FLS_BASE_ADDR 0x8000000UL
31 #define INSIDE_FLS_SECBOOT_ADDR (INSIDE_FLS_BASE_ADDR + 0x02000)
32
33
34
35 enum TYPE_FLASH_ID{
36 SPIFLASH_MID_GD = 0xC8,
37 SPIFLASH_MID_ESMT = 0x1C,
38 SPIFLASH_MID_PUYA = 0x85,
39 SPIFLASH_MID_WINBOND = 0xEF,
40 SPIFLASH_MID_FUDANMICRO = 0xA1,
41 SPIFLASH_MID_BOYA = 0x68,
42 SPIFLASH_MID_XMC = 0x20,
43 SPIFLASH_MID_XTX = 0x0B,
44 SPIFLASH_MID_TSINGTENG = 0xEB, /*UNIGROUP TSINGTENG*/
45 SPIFLASH_MID_TSINGTENG_1MB_4MB = 0xCD, /*UNIGROUP TSINGTENG*/
46 };
47
48 typedef union {
49 struct {
50 uint32_t _reserved0: 1;
51 uint32_t code_decrypt: 1;
52 uint32_t dbus_decrypt: 1;
53 uint32_t data_decrypt: 1;
54 uint32_t prikey_sel: 3;
55 uint32_t decrypt_start: 1;
56 uint32_t _reserved2: 24;
57 } b;
58 uint32_t w;
59 } FLASH_ENCRYPT_CTRL_Type;
60
61
65 typedef struct
66 {
67 vu32 ACR;
68 vu32 KEYR;
69 vu32 SR;
70 vu32 CR;
71 vu32 AR;
72 } FLASH_TypeDef;
73
74 #define FLASH_HS 0x00000001
75
77 #define RDPRT_KEY 0x5AA5
78 #define FLASH_KEY1 0x57696E6E
79 #define FLASH_KEY2 0x65724D69
80 #define FLASH_KEY3 0x63726F21
81
83 #define FLASH_PG 0x00000001
84 #define FLASH_PER 0x00000002
85 #define FLASH_MER 0x00000004
86 #define FLASH_STRT 0x00000008
87 #define FLASH_LOCK 0x00000020
88 #define FLASH_ERRIE 0x00000040
89 #define FLASH_EOPIE 0x00000080
90
92 #define FLASH_BSY 0x00000001
93 #define FLASH_PGERR 0x00000002
94 #define FLASH_EOP 0x00000004
95
96
97 #define TLS_FLS_STATUS_OK (0)
98 #define TLS_FLS_STATUS_EINVAL (1)
99 #define TLS_FLS_STATUS_EBUSY (2)
100 #define TLS_FLS_STATUS_EPERM (3)
101 #define TLS_FLS_STATUS_ENOSUPPORT (4)
102 #define TLS_FLS_STATUS_EEXIST (5)
103 #define TLS_FLS_STATUS_ENOMEM (6)
104 #define TLS_FLS_STATUS_EOVERFLOW (7)
105 #define TLS_FLS_STATUS_ENODEV (8)
106 #define TLS_FLS_STATUS_EDEV (9)
107 #define TLS_FLS_STATUS_EIO (10)
108 #define TLS_FLS_STATUS_ENODRV (11)
109
110 #define TLS_FLS_PARAM_TYPE_ID (0)
111 #define TLS_FLS_PARAM_TYPE_SIZE (1)
112 #define TLS_FLS_PARAM_TYPE_PAGE_SIZE (2)
113 #define TLS_FLS_PARAM_TYPE_PROG_SIZE (3)
114 #define TLS_FLS_PARAM_TYPE_SECTOR_SIZE (4)
115
116 #define TLS_FLS_FLAG_UNDER_PROTECT (1<<0)
117 #define TLS_FLS_FLAG_FAST_READ (1<<1)
118 #define TLS_FLS_FLAG_AAAI (1<<2)
119
120 #define CMD_START_Pos 8U
121 #define CMD_START_Msk (1UL << CMD_START_Pos)
124 typedef struct {
125 uint16_t eraseSize;
126 uint16_t pageSize;
127 } FLASH_OTP_WR_PARAM_ST;
128
132 struct tls_inside_fls
133 {
134 tls_os_sem_t *fls_lock;
135 unsigned char flashid;
136 unsigned int density;
137 FLASH_OTP_WR_PARAM_ST OTPWRParam;
138 };
139
170 int tls_flash_unlock(void);
171
181 int tls_flash_lock(void);
182
183
193 void tls_fls_sem_lock(void);
194
204 void tls_fls_sem_unlock(void);
205
216 int tls_fls_read_unique_id(unsigned char *uuid);
217
229 int tls_fls_init(void);
230
243 int tls_fls_read(u32 addr, u8 * buf, u32 len);
244
245
261 int tls_fls_write(u32 addr, u8 * buf, u32 len);
262
277 int tls_fls_write_without_erase(u32 addr, u8 *buf, u32 len);
278
279
290 int tls_fls_erase(u32 sector);
291
301 void tls_fls_sys_param_postion_init(void);
302
315 int tls_fls_otp_read(u32 addr, u8 *buf, u32 len);
316
332 int tls_fls_otp_write(u32 addr, u8 *buf, u32 len);
333
343 int tls_fls_otp_lock(void);
344
345 #endif /* WM_INTERNAL_FLASH_H */
FLASH_OTP_WR_PARAM_ST
Definition: wm_internal_flash.h:124
FLASH_ENCRYPT_CTRL_Type
Definition: wm_internal_flash.h:48
FLASH_TypeDef::KEYR
vu32 KEYR
Definition: wm_internal_flash.h:68
tls_fls_sem_lock
void tls_fls_sem_lock(void)
This function is used to get the flash semaphore.
tls_flash_unlock
int tls_flash_unlock(void)
This function is used to unlock flash protect area [0x0~0x2000].
tls_fls_otp_read
int tls_fls_otp_read(u32 addr, u8 *buf, u32 len)
This function is used to read data from the security registers.
wm_osal.h
WM OS adapter layer.
tls_fls_write
int tls_fls_write(u32 addr, u8 *buf, u32 len)
This function is used to write data into the flash.
FLASH_TypeDef::SR
vu32 SR
Definition: wm_internal_flash.h:69
FLASH_ENCRYPT_CTRL_Type::@2::_reserved0
uint32_t _reserved0
Definition: wm_internal_flash.h:50
tls_inside_fls
Definition: wm_internal_flash.h:132
FLASH_ENCRYPT_CTRL_Type::@2::dbus_decrypt
uint32_t dbus_decrypt
Definition: wm_internal_flash.h:52
tls_fls_otp_write
int tls_fls_otp_write(u32 addr, u8 *buf, u32 len)
This function is used to write data into the security registers.
tls_fls_read
int tls_fls_read(u32 addr, u8 *buf, u32 len)
This function is used to read data from the flash.
FLASH_TypeDef::ACR
vu32 ACR
Definition: wm_internal_flash.h:67
tls_fls_sys_param_postion_init
void tls_fls_sys_param_postion_init(void)
This function is used to initialize system parameter postion by flash density.
FLASH_ENCRYPT_CTRL_Type::w
uint32_t w
Definition: wm_internal_flash.h:58
FLASH_TypeDef
Definition: wm_internal_flash.h:65
FLASH_ENCRYPT_CTRL_Type::@2::code_decrypt
uint32_t code_decrypt
Definition: wm_internal_flash.h:51
tls_fls_sem_unlock
void tls_fls_sem_unlock(void)
This function is used to release the flash semaphore.
FLASH_ENCRYPT_CTRL_Type::@2::_reserved2
uint32_t _reserved2
Definition: wm_internal_flash.h:56
wm_type_def.h
WM type redefine.
FLASH_ENCRYPT_CTRL_Type::@2::data_decrypt
uint32_t data_decrypt
Definition: wm_internal_flash.h:53
tls_os_sem_t
void tls_os_sem_t
Definition: wm_osal.h:53
FLASH_TypeDef::AR
vu32 AR
Definition: wm_internal_flash.h:71
tls_fls_otp_lock
int tls_fls_otp_lock(void)
This function is used to lock the security registers.
tls_flash_lock
int tls_flash_lock(void)
This function is used to lock flash protect area [0x0~0x2000].
tls_fls_read_unique_id
int tls_fls_read_unique_id(unsigned char *uuid)
This function is used to read the unique id of the internal flash.
FLASH_TypeDef::CR
vu32 CR
Definition: wm_internal_flash.h:70
tls_fls_erase
int tls_fls_erase(u32 sector)
This function is used to erase the appointed sector.
FLASH_ENCRYPT_CTRL_Type::@2::decrypt_start
uint32_t decrypt_start
Definition: wm_internal_flash.h:55
tls_fls_init
int tls_fls_init(void)
This function is used to initial flash module structer.
FLASH_ENCRYPT_CTRL_Type::@2::prikey_sel
uint32_t prikey_sel
Definition: wm_internal_flash.h:54
tls_fls_write_without_erase
int tls_fls_write_without_erase(u32 addr, u8 *buf, u32 len)
This function is used to write data into the flash without erase.


W800 SDK APIs: doxy_out/include/driver/wm_io.h Source File

  • doxy_out
  • include
  • driver
wm_io.h
Go to the documentation of this file.
1
10 #ifndef WM_IO_H
11 #define WM_IO_H
12
13
14 #define TLS_IO_AB_OFFSET (0x40011400 - 0x40011200)
15
17 enum tls_io_name {
18 WM_IO_PA_00 = 0,
19 WM_IO_PA_01,
20 WM_IO_PA_02,
21 WM_IO_PA_03,
22 WM_IO_PA_04,
23 WM_IO_PA_05,
24 WM_IO_PA_06,
25 WM_IO_PA_07,
26 WM_IO_PA_08,
27 WM_IO_PA_09,
28 WM_IO_PA_10,
29 WM_IO_PA_11,
30 WM_IO_PA_12,
31 WM_IO_PA_13,
32 WM_IO_PA_14,
33 WM_IO_PA_15,
35 WM_IO_PB_00,
36 WM_IO_PB_01,
37 WM_IO_PB_02,
38 WM_IO_PB_03,
39 WM_IO_PB_04,
40 WM_IO_PB_05,
41 WM_IO_PB_06,
42 WM_IO_PB_07,
43 WM_IO_PB_08,
44 WM_IO_PB_09,
45 WM_IO_PB_10,
46 WM_IO_PB_11,
47 WM_IO_PB_12,
48 WM_IO_PB_13,
49 WM_IO_PB_14,
50 WM_IO_PB_15,
51 WM_IO_PB_16,
52 WM_IO_PB_17,
53 WM_IO_PB_18,
54 WM_IO_PB_19,
55 WM_IO_PB_20,
56 WM_IO_PB_21,
57 WM_IO_PB_22,
58 WM_IO_PB_23,
59 WM_IO_PB_24,
60 WM_IO_PB_25,
61 WM_IO_PB_26,
62 WM_IO_PB_27,
63 WM_IO_PB_28,
64 WM_IO_PB_29,
65 WM_IO_PB_30,
66 WM_IO_PB_31
67 };
68
70 #define WM_IO_OPTION1 1
71
72 #define WM_IO_OPTION2 2
73
74 #define WM_IO_OPTION3 3
75
76 #define WM_IO_OPTION4 4
77
78 #define WM_IO_OPTION5 5
79
80 #define WM_IO_OPTION6 6
81
82 #define WM_IO_OPTION7 7
83
84
85
86
87 /* io option1 */
88 #define WM_IO_OPT1_I2C_DAT WM_IO_OPTION1
89 #define WM_IO_OPT1_PWM1 WM_IO_OPTION1
90 #define WM_IO_OPT1_PWM2 WM_IO_OPTION1
91 #define WM_IO_OPT1_PWM3 WM_IO_OPTION1
92 #define WM_IO_OPT1_PWM4 WM_IO_OPTION1
93 #define WM_IO_OPT1_PWM5 WM_IO_OPTION1
94 #define WM_IO_OPT1_UART0_RXD WM_IO_OPTION1
95 #define WM_IO_OPT1_UART0_TXD WM_IO_OPTION1
96 #define WM_IO_OPT1_PWM_BRAKE WM_IO_OPTION1
97 #define WM_IO_OPT1_I2S_M_EXTCLK WM_IO_OPTION1
98 #define WM_IO_OPT1_SPI_M_DO WM_IO_OPTION1
99 #define WM_IO_OPT1_SPI_M_DI WM_IO_OPTION1
100 #define WM_IO_OPT1_SPI_M_CS WM_IO_OPTION1
101 #define WM_IO_OPT1_SPI_M_CK WM_IO_OPTION1
102 #define WM_IO_OPT1_I2S_S_RL WM_IO_OPTION1
103 #define WM_IO_OPT1_I2S_S_SCL WM_IO_OPTION1
104 #define WM_IO_OPT1_I2S_S_SDA WM_IO_OPTION1
105 #define WM_IO_OPT1_I2S_M_RL WM_IO_OPTION1
106 #define WM_IO_OPT1_I2S_M_SCL WM_IO_OPTION1
107 #define WM_IO_OPT1_I2S_M_SDA WM_IO_OPTION1
108 #define WM_IO_OPT1_JTAG_RST WM_IO_OPTION1
109 #define WM_IO_OPT1_JTAG_TDO WM_IO_OPTION1
110 #define WM_IO_OPT1_JTAG_TDI WM_IO_OPTION1
111 #define WM_IO_OPT1_JTAG_TCK_SWDCK WM_IO_OPTION1
112 #define WM_IO_OPT1_JTAG_TMS_SWDAT WM_IO_OPTION1
113 #define WM_IO_OPT1_UART1_RXD WM_IO_OPTION1
114 #define WM_IO_OPT1_UART1_TXD WM_IO_OPTION1
115 #define WM_IO_OPT1_UART1_RTS WM_IO_OPTION1
116 #define WM_IO_OPT1_UART1_CTS WM_IO_OPTION1
117 #define WM_IO_OPT1_SDIO_DAT WM_IO_OPTION1
118
119 /* io option2 */
120 #define WM_IO_OPT2_PWM1 WM_IO_OPTION2
121 #define WM_IO_OPT2_PWM2 WM_IO_OPTION2
122 #define WM_IO_OPT2_PWM3 WM_IO_OPTION2
123 #define WM_IO_OPT2_PWM4 WM_IO_OPTION2
124 #define WM_IO_OPT2_PWM5 WM_IO_OPTION2
125 #define WM_IO_OPT2_SPI_M_DO WM_IO_OPTION2
126 #define WM_IO_OPT2_SPI_M_DI WM_IO_OPTION2
127 #define WM_IO_OPT2_SPI_M_CS WM_IO_OPTION2
128 #define WM_IO_OPT2_SPI_M_CK WM_IO_OPTION2
129 #define WM_IO_OPT2_I2C_SCL WM_IO_OPTION2
130 #define WM_IO_OPT2_I2S_M_EXTCLK WM_IO_OPTION2
131 #define WM_IO_OPT2_UART1_RXD WM_IO_OPTION2
132 #define WM_IO_OPT2_UART1_TXD WM_IO_OPTION2
133 #define WM_IO_OPT2_UART1_RTS WM_IO_OPTION2
134 #define WM_IO_OPT2_UART1_CTS WM_IO_OPTION2
135 #define WM_IO_OPT2_I2C_DAT WM_IO_OPTION2
136 #define WM_IO_OPT2_PWM_BRAKE WM_IO_OPTION2
137 #define WM_IO_OPT2_UART0_RTS WM_IO_OPTION2
138 #define WM_IO_OPT2_UART0_CTS WM_IO_OPTION2
139 #define WM_IO_OPT2_SDIO_DAT WM_IO_OPTION2
140 #define WM_IO_OPT2_HSPI_CK WM_IO_OPTION2
141 #define WM_IO_OPT2_HSPI_INT WM_IO_OPTION2
142 #define WM_IO_OPT2_HSPI_CS WM_IO_OPTION2
143 #define WM_IO_OPT2_HSPI_DI WM_IO_OPTION2
144 #define WM_IO_OPT2_HSPI_DO WM_IO_OPTION2
145
146 /* io option3 */
147 #define WM_IO_OPT3_UART0_RXD WM_IO_OPTION3
148 #define WM_IO_OPT3_UART0_TXD WM_IO_OPTION3
149 #define WM_IO_OPT3_UART0_RTS WM_IO_OPTION3
150 #define WM_IO_OPT3_UART0_CTS WM_IO_OPTION3
151 #define WM_IO_OPT3_SPI_M_DO WM_IO_OPTION3
152 #define WM_IO_OPT3_SPI_M_DI WM_IO_OPTION3
153 #define WM_IO_OPT3_SPI_M_CS WM_IO_OPTION3
154 #define WM_IO_OPT3_SDIO_CK WM_IO_OPTION3
155 #define WM_IO_OPT3_SDIO_CMD WM_IO_OPTION3
156 #define WM_IO_OPT3_SDIO_DAT WM_IO_OPTION3
157
158 /* io option4 */
159 #define WM_IO_OPT4_I2S_M_MCLK WM_IO_OPTION4
160 #define WM_IO_OPT4_I2S_M_RL WM_IO_OPTION4
161 #define WM_IO_OPT4_I2S_M_SCL WM_IO_OPTION4
162 #define WM_IO_OPT4_I2S_M_SDA WM_IO_OPTION4
163
164 /* io option5 */
165 #define WM_IO_OPT5_GPIO WM_IO_OPTION5
166
167 /* io option6 */
168 #define WM_IO_OPT6_ADC WM_IO_OPTION6
169 #define WM_IO_OPT6_LCD_COM WM_IO_OPTION6
170 #define WM_IO_OPT6_LCD_SEG WM_IO_OPTION6
171
172
173 /* io option7 */
174 #define WM_IO_OPT7_TOUCH_SENSOR WM_IO_OPTION7
175
176
177
188 void tls_io_cfg_set(enum tls_io_name name, u8 option);
189
190
200 int tls_io_cfg_get(enum tls_io_name name);
201
202
203 #endif /* end of WM_IO_H */
204
WM_IO_PB_11
Definition: wm_io.h:46
WM_IO_PA_01
Definition: wm_io.h:19
WM_IO_PB_24
Definition: wm_io.h:59
WM_IO_PA_00
Definition: wm_io.h:18
WM_IO_PB_22
Definition: wm_io.h:57
WM_IO_PB_09
Definition: wm_io.h:44
WM_IO_PB_15
Definition: wm_io.h:50
WM_IO_PB_26
Definition: wm_io.h:61
WM_IO_PB_05
Definition: wm_io.h:40
WM_IO_PB_28
Definition: wm_io.h:63
tls_io_name
tls_io_name
Definition: wm_io.h:17
WM_IO_PA_04
Definition: wm_io.h:22
WM_IO_PA_03
Definition: wm_io.h:21
WM_IO_PA_05
Definition: wm_io.h:23
tls_io_cfg_set
void tls_io_cfg_set(enum tls_io_name name, u8 option)
This function is used to config io function.
tls_io_cfg_get
int tls_io_cfg_get(enum tls_io_name name)
This function is used to get io function config.
WM_IO_PB_23
Definition: wm_io.h:58
WM_IO_PB_00
Definition: wm_io.h:35
WM_IO_PA_10
Definition: wm_io.h:28
WM_IO_PA_09
Definition: wm_io.h:27
WM_IO_PB_03
Definition: wm_io.h:38
WM_IO_PB_13
Definition: wm_io.h:48
WM_IO_PA_07
Definition: wm_io.h:25
WM_IO_PA_11
Definition: wm_io.h:29
WM_IO_PB_30
Definition: wm_io.h:65
WM_IO_PB_06
Definition: wm_io.h:41
WM_IO_PB_04
Definition: wm_io.h:39
WM_IO_PB_08
Definition: wm_io.h:43
WM_IO_PB_31
Definition: wm_io.h:66
WM_IO_PB_25
Definition: wm_io.h:60
WM_IO_PB_07
Definition: wm_io.h:42
WM_IO_PB_27
Definition: wm_io.h:62
WM_IO_PB_01
Definition: wm_io.h:36
WM_IO_PB_29
Definition: wm_io.h:64
WM_IO_PA_02
Definition: wm_io.h:20
WM_IO_PA_15
Definition: wm_io.h:33
WM_IO_PB_18
Definition: wm_io.h:53
WM_IO_PB_10
Definition: wm_io.h:45
WM_IO_PA_12
Definition: wm_io.h:30
WM_IO_PB_16
Definition: wm_io.h:51
WM_IO_PB_02
Definition: wm_io.h:37
WM_IO_PB_21
Definition: wm_io.h:56
WM_IO_PA_06
Definition: wm_io.h:24
WM_IO_PB_12
Definition: wm_io.h:47
WM_IO_PB_14
Definition: wm_io.h:49
WM_IO_PB_19
Definition: wm_io.h:54
WM_IO_PA_13
Definition: wm_io.h:31
WM_IO_PA_08
Definition: wm_io.h:26
WM_IO_PA_14
Definition: wm_io.h:32
WM_IO_PB_20
Definition: wm_io.h:55
WM_IO_PB_17
Definition: wm_io.h:52


W800 SDK APIs: doxy_out/include/driver/wm_irq.h Source File

  • doxy_out
  • include
  • driver
wm_irq.h
Go to the documentation of this file.
1
11 #ifndef WM_IRQ_H
12 #define WM_IRQ_H
13
14 #include "wm_type_def.h"
15
16 typedef void (*intr_handler_func) (void *);
17
21 typedef struct tls_irq_handler
22 {
23 void (*handler) (void *);
24 void *data;
25 u32 counter;
26 } tls_irq_handler_t;
27
57 void tls_irq_init(void);
58
70 void tls_irq_register_handler(u8 vec_no, intr_handler_func handler, void *data);
71
72
82 void tls_irq_enable(u8 vec_no);
83
93 void tls_irq_disable(u8 vec_no);
94
95
105 u8 tls_get_isr_count(void);
106
116 int csi_kernel_intrpt_enter(void);
117
127 int csi_kernel_intrpt_exit(void);
128
129 void tls_irq_priority(u8 vec_no, u32 prio);
130
131
140 #endif /* WM_IRQ_H */
tls_irq_init
void tls_irq_init(void)
This function is used to initial system interrupt.
tls_irq_disable
void tls_irq_disable(u8 vec_no)
This function is used to disable interrupt.
csi_kernel_intrpt_enter
int csi_kernel_intrpt_enter(void)
This function is used to enter interrupt.
tls_irq_enable
void tls_irq_enable(u8 vec_no)
This function is used to enable interrupt.
wm_type_def.h
WM type redefine.
tls_irq_register_handler
void tls_irq_register_handler(u8 vec_no, intr_handler_func handler, void *data)
This function is used to register interrupt handler function.
tls_irq_handler
Definition: wm_irq.h:21
csi_kernel_intrpt_exit
int csi_kernel_intrpt_exit(void)
This function is used to exit from interrupt.
tls_get_isr_count
u8 tls_get_isr_count(void)
This function is used to get the isr count.


W800 SDK APIs: doxy_out/include/driver/wm_lcd.h Source File

  • doxy_out
  • include
  • driver
wm_lcd.h
Go to the documentation of this file.
1
11 #ifndef __WM_LCD_H
12 #define __WM_LCD_H
13
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17
18 #include "wm_regs.h"
19 #include <stdbool.h>
20
25 typedef struct
26 {
28 __IO uint32_t CTRL;
30 __IO uint32_t FRAMECNT;
31 __IO uint32_t COM0;
32 __IO uint32_t COM1;
33 __IO uint32_t COM2;
34 __IO uint32_t COM3;
35 __IO uint32_t COM4;
36 __IO uint32_t COM5;
37 __IO uint32_t COM6;
38 __IO uint32_t COM7;
40 __IO uint32_t COM_EN;
42 __IO uint32_t SEG_EN;
43 } LCD_T;
45 #define LCD ((LCD_T *)HR_LCD_REG_BASE)
46
47 typedef enum
48 {
50 BIAS_STATIC = LCD_BIAS_STATIC,
52 BIAS_ONEHALF = LCD_BIAS_ONEHALF,
54 BIAS_ONETHIRD = LCD_BIAS_ONETHIRD,
56 BIAS_ONEFOURTH = LCD_BIAS_ONEFOURTH,
57 } LCD_BiasDef;
58
59 typedef enum
60 {
62 VLCD27 = LCD_VLCD_27,
64 VLCD29 = LCD_VLCD_29,
66 VLCD31 = LCD_VLCD_31,
68 VLCD33 = LCD_VLCD_33,
69 } LCD_VlcdDef;
70
71 typedef enum
72 {
74 DUTY_STATIC = LCD_DUTY_STATIC,
76 DUTY_ONEHALF = LCD_DUTY_ONEHALF,
78 DUTY_ONETHIRD = LCD_DUTY_ONETHIRD,
80 DUTY_ONEFOURTH = LCD_DUTY_ONEFOURTH,
82 DUTY_ONEFIFTH = LCD_DUTY_ONEFIFTH,
84 DUTY_ONESIXTH = LCD_DUTY_ONESIXTH,
86 DUTY_ONESEVENTH = LCD_DUTY_ONESEVENTH,
88 DUTY_ONEEIGHTH = LCD_DUTY_ONEEIGHTH,
89 } LCD_DutyDef;
90
91 typedef struct tls_lcd_options
92 {
94 bool enable;
96 LCD_BiasDef bias;
98 LCD_DutyDef duty;
100 LCD_VlcdDef vlcd;
102 uint8_t com_number;
104 uint16_t fresh_rate;
105 } tls_lcd_options_t;
106
107
133 void tls_lcd_fresh_ratio(uint8_t com_num, uint16_t freq);
134
139 void tls_lcd_init(tls_lcd_options_t *opts);
140
146 void tls_lcd_fresh_rate(uint16_t freq);
147
155 void tls_lcd_seg_set(int com, int bit, int on_off);
156
165 void tls_lcd_vlcd_sel(LCD_VlcdDef vlcd);
166
180 void tls_lcd_duty_set(LCD_DutyDef duty);
181
191 void tls_lcd_bias_set(LCD_BiasDef bias);
192
197 #define TLS_LCD_CLK_ENABLE(enable) \
198 do { \
199 tls_bitband_write(HR_CLK_BASE_ADDR, HR_CLK_LCD_GATE_Pos, enable); \
200 } while(0)
201
202
208 #define TLS_LCD_ENABLE(enable) \
209 do { \
210 tls_bitband_write(HR_LCD_CR, LCD_CR_EN_Pos, enable); \
211 } while(0)
212
218 #define TLS_LCD_POWERDOWM(enable) \
219 do { \
220 tls_bitband_write(HR_LCD_CR, LCD_CR_PD_Pos, enable); \
221 } while(0)
222
231 #ifdef __cplusplus
232 }
233 #endif
234
235 #endif
236
237
238 /*** (C) COPYRIGHT 2014 Winner Microelectronics Co., Ltd. ***/
__IO
#define __IO
Definition: wm_regs.h:68
VLCD27
Definition: wm_lcd.h:62
LCD_VlcdDef
LCD_VlcdDef
Definition: wm_lcd.h:59
DUTY_ONEFOURTH
Definition: wm_lcd.h:80
LCD_BiasDef
LCD_BiasDef
Definition: wm_lcd.h:47
BIAS_ONEFOURTH
Definition: wm_lcd.h:56
BIAS_STATIC
Definition: wm_lcd.h:50
LCD_T::CTRL
__IO uint32_t CTRL
Definition: wm_lcd.h:28
BIAS_ONEHALF
Definition: wm_lcd.h:52
DUTY_ONESEVENTH
Definition: wm_lcd.h:86
tls_lcd_seg_set
void tls_lcd_seg_set(int com, int bit, int on_off)
Turn on or clear a segment.
tls_lcd_fresh_rate
void tls_lcd_fresh_rate(uint16_t freq)
Initialize LCD Frame Counter.
wm_regs.h
register & operation file
LCD_DutyDef
LCD_DutyDef
Definition: wm_lcd.h:71
tls_lcd_options::com_number
uint8_t com_number
Definition: wm_lcd.h:102
DUTY_ONEFIFTH
Definition: wm_lcd.h:82
DUTY_ONEHALF
Definition: wm_lcd.h:76
VLCD29
Definition: wm_lcd.h:64
tls_lcd_options::bias
LCD_BiasDef bias
Definition: wm_lcd.h:96
tls_lcd_options::fresh_rate
uint16_t fresh_rate
Definition: wm_lcd.h:104
LCD_T::COM_EN
__IO uint32_t COM_EN
Definition: wm_lcd.h:40
tls_lcd_options::duty
LCD_DutyDef duty
Definition: wm_lcd.h:98
tls_lcd_fresh_ratio
void tls_lcd_fresh_ratio(uint8_t com_num, uint16_t freq)
Initialize LCD Frame Counter.
VLCD31
Definition: wm_lcd.h:66
DUTY_ONESIXTH
Definition: wm_lcd.h:84
tls_lcd_bias_set
void tls_lcd_bias_set(LCD_BiasDef bias)
Set the bias of LCD module.
VLCD33
Definition: wm_lcd.h:68
LCD_T::FRAMECNT
__IO uint32_t FRAMECNT
Definition: wm_lcd.h:30
tls_lcd_options
Definition: wm_lcd.h:91
tls_lcd_vlcd_sel
void tls_lcd_vlcd_sel(LCD_VlcdDef vlcd)
Select the voltage of LCD module.
LCD_T
LCD Register Declaration.
Definition: wm_lcd.h:25
tls_lcd_options::vlcd
LCD_VlcdDef vlcd
Definition: wm_lcd.h:100
LCD_T::SEG_EN
__IO uint32_t SEG_EN
Definition: wm_lcd.h:42
DUTY_ONETHIRD
Definition: wm_lcd.h:78
tls_lcd_init
void tls_lcd_init(tls_lcd_options_t *opts)
initialize the LCD module
BIAS_ONETHIRD
Definition: wm_lcd.h:54
DUTY_STATIC
Definition: wm_lcd.h:74
tls_lcd_duty_set
void tls_lcd_duty_set(LCD_DutyDef duty)
Set the duty of LCD module.
DUTY_ONEEIGHTH
Definition: wm_lcd.h:88


W800 SDK APIs: doxy_out/include/app/wm_netif2.1.3.h Source File

  • doxy_out
  • include
  • app
wm_netif2.1.3.h
Go to the documentation of this file.
1
11 #ifndef WM_NETIF2_0_3_H
12 #define WM_NETIF2_0_3_H
13
14 #include "wm_config.h"
15 #include "wm_type_def.h"
16 #include "wm_sockets.h"
17 #include "wm_wifi.h"
18 #include "wm_params.h"
19
21 #define NETIF_WIFI_JOIN_SUCCESS 0x1
22
23 #define NETIF_WIFI_JOIN_FAILED 0x2
24
25 #define NETIF_WIFI_DISCONNECTED 0x3
26
27 #define NETIF_IP_NET_UP 0x4
28
29 #define NETIF_WIFI_SOFTAP_SUCCESS 0x5
30
31 #define NETIF_WIFI_SOFTAP_FAILED 0x6
32
33 #define NETIF_WIFI_SOFTAP_CLOSED 0x7
34
35 #define NETIF_IP_NET2_UP 0x8
36
37 #define NETIF_IPV6_NET_UP 0x9
38
40 #define IPADDR_TYPE_V4 0U
41 #define IPADDR_TYPE_V6 6U
42 #define IPADDR_TYPE_ANY 46U
43
44 #define IPV6_ADDR_MAX_NUM 3
45
46 #if 0
47 struct ip_addr {
48 u32_t addr;
49 };
50
51 typedef struct ip_addr ip_addr_t;
52 #endif
53 #if 0
54 struct ip4_addr {
55 u32_t addr;
56 };
57 typedef struct ip4_addr ip4_addr_t;
58
59 struct ip6_addr {
60 u32_t addr[4];
61 };
62 typedef struct ip6_addr ip6_addr_t;
63
64 #if (TLS_CONFIG_IPV4 && TLS_CONFIG_IPV6)
65 typedef struct _ip_addr {
66 union {
67 ip6_addr_t ip6;
68 ip4_addr_t ip4;
69 } u_addr;
70 u8_t type;
71 } ip_addr_t;
72 #else
73 #if TLS_CONFIG_IPV4
74 typedef ip4_addr_t ip_addr_t;
75 #else
76 typedef ip6_addr_t ip_addr_t;
77 #endif
78 #endif
79 #endif
80 struct tls_ethif {
81 ip_addr_t ip_addr;
82 ip_addr_t netmask;
83 ip_addr_t gw;
84 #if TLS_CONFIG_IPV6
85 ip_addr_t ip6_addr[IPV6_ADDR_MAX_NUM];
86 #endif
87 ip_addr_t dns1;
88 ip_addr_t dns2;
89 u8 status; //0:net down; 1:net up
90 #if TLS_CONFIG_IPV6
91 u8 ipv6_status[IPV6_ADDR_MAX_NUM]; //0:net down; 1:net up
92 #endif
93 };
94
95 //type defination of netif status changed callback.
96 typedef void (*tls_netif_status_event_fn)(u8 status);
97
128 int tls_ethernet_init(void);
129
140 struct tls_ethif * tls_netif_get_ethif(void);
141
151 void tls_netif_set_status(u8 status);
152
163 err_t tls_dhcp_start(void);
164
175 err_t tls_dhcp_stop(void);
176
189 err_t tls_netif_set_addr(ip_addr_t *ipaddr,
190 ip_addr_t *netmask,
191 ip_addr_t *gw);
192
204 void tls_netif_dns_setserver(u8 numdns, ip_addr_t *dnsserver);
205
217 err_t tls_netif_set_up(void);
218
230 err_t tls_netif_set_down(void);
231
243 err_t tls_netif_add_status_event(tls_netif_status_event_fn event_fn);
244
256 err_t tls_netif_remove_status_event(tls_netif_status_event_fn event_fn);
257
267 struct netif *tls_get_netif(void);
268
269 #if TLS_CONFIG_AP
270
279 INT8S tls_dhcps_start(void);
280
290 void tls_dhcps_stop(void);
291
302 INT8S tls_dnss_start(INT8U * DnsName);
303
313 void tls_dnss_stop(void);
314
324 ip_addr_t *tls_dhcps_getip(const u8_t *mac);
325
335 u8 *tls_dhcps_getmac(const ip_addr_t *ip);
336 #endif //TLS_CONFIG_AP
337
338 #if TLS_CONFIG_RMMS
339
348 INT8S tls_rmms_start(void);
349
359 void tls_rmms_stop(void);
360 #endif
361
362 #if TLS_CONFIG_AP
363
374 err_t tls_netif2_set_up(void);
375
387 err_t tls_netif2_set_down(void);
388
402 err_t tls_netif2_set_addr(ip_addr_t *ipaddr,
403 ip_addr_t *netmask,
404 ip_addr_t *gw);
405 /***************************************************************************
406 * Function: tls_dhcps_setdns
407 * Description: Set dhcp server's dns address.
408 *
409 * Input: numdns: the index of the DNS server to set must be less than DNS_MAX_SERVERS
410 *
411 * Output: None
412 *
413 * Return: None
414 *
415 * Date : 2015-3-10
416 ****************************************************************************/
426 void tls_dhcps_setdns(u8_t numdns);
427 #endif
428
437 #endif //WM_NETIF_H
tls_dhcps_start
s8 tls_dhcps_start(void)
This function is used to start DHCP Server for a network interface.
tls_get_netif
struct netif * tls_get_netif(void)
This function is used to get pointer of netif.
tls_dnss_start
s8 tls_dnss_start(u8 *dnsname)
This function is used to start DNS service.
tls_ethernet_init
int tls_ethernet_init(void)
This function is used to initialize TCP/IP Stack.
tls_netif_remove_status_event
err_t tls_netif_remove_status_event(tls_netif_status_event_fn event_fn)
This function is used to remove netif status changed callback function from event list...
tls_dhcps_setdns
void tls_dhcps_setdns(u8 numdns)
This function is used to set DHCP server&#39;s DNS address.
tls_dhcps_stop
void tls_dhcps_stop(void)
This function is used to stop DHCP server.
tls_netif_set_down
err_t tls_netif_set_down(void)
This function is used to bring down an interface,disabling any traffic processing.
tls_netif_set_addr
err_t tls_netif_set_addr(ip_addr_t *ipaddr, ip_addr_t *netmask, ip_addr_t *gw)
This function is used to change IP information.
wm_sockets.h
socket apis
tls_netif_get_ethif
struct tls_ethif * tls_netif_get_ethif(void)
This function is used to get IP information stored in tls_ethif struct.
tls_netif_add_status_event
err_t tls_netif_add_status_event(tls_netif_status_event_fn event_fn)
This function is used to add netif status changed callback to event list,if exists, do nothing.
tls_dhcp_stop
err_t tls_dhcp_stop(void)
This function is used to stop DHCP client.
wm_type_def.h
WM type redefine.
tls_netif_dns_setserver
void tls_netif_dns_setserver(u8 numdns, ip_addr_t *dnsserver)
This function is used to set dns servers.
tls_netif_set_up
err_t tls_netif_set_up(void)
This function is used to bring up an interface,available for processing traffic.
tls_ethif
Definition: wm_netif2.1.3.h:80
tls_dnss_stop
void tls_dnss_stop(void)
This function is used to stop DNS service.
tls_dhcp_start
err_t tls_dhcp_start(void)
This function is used to start DHCP Client.
wm_wifi.h
Wi-Fi API.
tls_netif_set_status
void tls_netif_set_status(u8 status)
This function is used to set tls_ethif status.
wm_params.h
param manager Module
wm_config.h
w800 chip inferface configure
tls_dhcps_getip
ip_addr_t * tls_dhcps_getip(const u8 *mac)
This function is used to get station&#39;s IP address by MAC address.


W800 SDK APIs: doxy_out/include/app/wm_netif.h Source File

  • doxy_out
  • include
  • app
wm_netif.h
Go to the documentation of this file.
1
10 #ifndef WM_NETIF_H
11 #define WM_NETIF_H
12 #include "wm_config.h"
13 #include "wm_netif2.1.3.h"
14 #endif /* WM_NETIF_H */
15
wm_netif2.1.3.h
netif213 module
wm_config.h
w800 chip inferface configure


W800 SDK APIs: doxy_out/include/app/wm_ntp.h Source File

  • doxy_out
  • include
  • app
wm_ntp.h
Go to the documentation of this file.
1
11 #ifndef WM_NTP_H
12 #define WM_NTP_H
13
14 #include "wm_type_def.h"
15
45 u32 tls_ntp_client(void);
46
58 int tls_ntp_set_server(char *ipaddr, int server_no);
59
69 int tls_ntp_query_sntpcfg(void);
70
79 #endif /* WM_NTP_H */
80
tls_ntp_client
u32 tls_ntp_client(void)
This function is used to get network time.
tls_ntp_query_sntpcfg
int tls_ntp_query_sntpcfg(void)
This function is used to query params of the ntp servers.
tls_ntp_set_server
int tls_ntp_set_server(char *ipaddr, int server_no)
This function is used to set ntp servers.
wm_type_def.h
WM type redefine.


W800 SDK APIs: doxy_out/include/os/wm_os_config.h Source File

  • doxy_out
  • include
  • os
wm_os_config.h
Go to the documentation of this file.
1
11 #ifndef __WM_OS_CONFIG_H__
12 #define __WM_OS_CONFIG_H__
13 #define OS_CFG_ON 1
14 #define OS_CFG_OFF 0
15
16 #undef TLS_OS_FREERTOS
17 #define TLS_OS_FREERTOS OS_CFG_ON /*FreeRTOS need to modify wm_config.inc*/
18 #endif


W800 SDK APIs: doxy_out/include/os/wm_osal.h Source File

  • doxy_out
  • include
  • os
wm_osal.h
Go to the documentation of this file.
1
11 #ifndef WM_OSAL_H
12 #define WM_OSAL_H
13
14 #include <stdio.h>
15 #include <stdlib.h>
16 #include "wm_config.h"
17 #include <core_804.h>
18 #include "wm_type_def.h"
19
21 extern const unsigned int HZ;
22
24 typedef long os_time_t;
26 struct os_time {
27 os_time_t sec;
28 os_time_t usec;
29 };
31 enum TLS_OS_TYPE{
32 OS_UCOSII = 0,
33 OS_FREERTOS = 1,
34 OS_MAX_NUM
35 };
36
38 #ifdef OS_STK
39 #undef OS_STK
40 #endif
41 typedef unsigned int OS_STK;
42
44 #ifdef OS_CPU_SR
45 #undef OS_CPU_SR
46 #endif
47 typedef unsigned int OS_CPU_SR;
49 typedef void * tls_os_task_t;
51 typedef void tls_os_timer_t;
53 typedef void tls_os_sem_t;
55 typedef void tls_os_queue_t;
57 typedef void tls_os_mailbox_t;
59 typedef void tls_os_mutex_t;
61 typedef void (*TLS_OS_TIMER_CALLBACK)(void *ptmr, void *parg);
62
64 #define TLS_OS_TIMER_OPT_ONE_SHORT 1u
65
66 #define TLS_OS_TIMER_OPT_PERIOD 2u
67
69 typedef enum tls_os_status {
70 TLS_OS_SUCCESS = 0,
71 TLS_OS_ERROR,
72 TLS_OS_ERR_TIMEOUT,
73 } tls_os_status_t;
74
104 void tls_os_timer_init(void);
105
115 void tls_os_time_tick(void *p);
116
126 void tls_os_init(void *arg);
127
137 void tls_os_start_scheduler(void);
138
149 int tls_os_get_type(void);
150
193 tls_os_status_t tls_os_task_create(tls_os_task_t *task,
194 const char* name,
195 void (*entry)(void* param),
196 void* param,
197 u8 *stk_start,
198 u32 stk_size,
199 u32 prio,
200 u32 flag);
201
217 tls_os_status_t tls_os_task_del(u8 prio, void (*freefun)(void));
218
233 tls_os_status_t tls_os_task_del_by_task_handle(void *handle, void (*freefun)(void));
234
235 tls_os_task_t tls_os_task_id();
236
237 u8 tls_os_task_schedule_state();
238
239
240
266 tls_os_status_t tls_os_mutex_create(u8 prio, tls_os_mutex_t **mutex);
267
295 tls_os_status_t tls_os_mutex_delete(tls_os_mutex_t *mutex);
296
319 tls_os_status_t tls_os_mutex_acquire(tls_os_mutex_t *mutex,
320 u32 wait_time);
321
333 tls_os_status_t tls_os_mutex_release(tls_os_mutex_t *mutex);
334
353 tls_os_status_t tls_os_sem_create(tls_os_sem_t **sem, u32 cnt);
354
355
368 tls_os_status_t tls_os_sem_delete(tls_os_sem_t *sem);
369
388 tls_os_status_t tls_os_sem_acquire(tls_os_sem_t *sem,
389 u32 wait_time);
390
402 tls_os_status_t tls_os_sem_release(tls_os_sem_t *sem);
403
420 tls_os_status_t tls_os_sem_set(tls_os_sem_t *sem, u16 cnt);
421
422 u16 tls_os_sem_get_count(tls_os_sem_t *sem);
423
424
438 tls_os_status_t tls_os_queue_create(tls_os_queue_t **queue, u32 queue_size);
439
452 tls_os_status_t tls_os_queue_delete(tls_os_queue_t *queue);
453
467 tls_os_status_t tls_os_queue_send(tls_os_queue_t *queue,
468 void *msg,
469 u32 msg_size);
470
471
485 tls_os_status_t tls_os_queue_send_to_front(tls_os_queue_t *queue,
486 void *msg,
487 u32 msg_size);
488
489
503 tls_os_status_t tls_os_queue_send_to_back(tls_os_queue_t *queue,
504 void *msg,
505 u32 msg_size);
506
518 tls_os_status_t tls_os_queue_flush(tls_os_queue_t *queue);
519
520
540 tls_os_status_t tls_os_queue_receive(tls_os_queue_t *queue,void **msg,
541 u32 msg_size,
542 u32 wait_time);
543
544 u8 tls_os_queue_is_empty(tls_os_queue_t *queue);
545
556 u32 tls_os_queue_space_available(tls_os_queue_t *queue);
557
558 tls_os_status_t tls_os_queue_remove(tls_os_queue_t *queue, void* msg, u32 msg_size);
559
560
574 tls_os_status_t tls_os_mailbox_create(tls_os_mailbox_t **mailbox, u32 mailbox_size);
575
588 tls_os_status_t tls_os_mailbox_delete(tls_os_mailbox_t *mailbox);
589
603 tls_os_status_t tls_os_mailbox_send(tls_os_mailbox_t *mailbox,void *msg);
604
626 tls_os_status_t tls_os_mailbox_receive(tls_os_mailbox_t *mailbox,
627 void **msg,
628 u32 wait_time);
629
641 u32 tls_os_get_time(void);
642
653 u32 tls_os_set_critical(void);
654
665 void tls_os_release_critical(u32 cpu_sr);
666
667
695 tls_os_status_t tls_os_timer_create(tls_os_timer_t **timer,
696 TLS_OS_TIMER_CALLBACK callback,
697 void *callback_arg,
698 u32 period,
699 bool repeat,
700 u8 *name);
701
712 void tls_os_timer_start(tls_os_timer_t *timer);
713
714 /*
715 ************************************************************************************************************************
716 * CHANGE A TIMER WAIT TIME
717 *
718 * Description: This function is called by your application code to change a timer wait time.
719 *
720 * Arguments : timer Is a pointer to an OS_TMR
721 *
722 * ticks is the wait time
723 ************************************************************************************************************************
724 */
725 void tls_os_timer_change(tls_os_timer_t *timer, u32 ticks);
726
737 void tls_os_timer_stop(tls_os_timer_t *timer);
738
750 tls_os_status_t tls_os_timer_delete(tls_os_timer_t *timer);
751
769 void tls_os_time_delay(u32 ticks);
770
771 u8 tls_os_timer_active(tls_os_timer_t *timer);
772
773 u32 tls_os_timer_expirytime(tls_os_timer_t *timer);
774
775
776
786 void tls_os_disp_task_stat_info(void);
787
788 u8 tls_get_isr_count(void);
789
790
799 #endif /* end of WM_OSAL_H */
800
tls_os_get_type
int tls_os_get_type(void)
This function is used to get OS type.
os_time_t
long os_time_t
Definition: wm_osal.h:24
OS_CPU_SR
unsigned int OS_CPU_SR
Definition: wm_osal.h:47
os_time
Definition: wm_osal.h:26
tls_os_status_t
enum tls_os_status tls_os_status_t
tls_os_queue_flush
tls_os_status_t tls_os_queue_flush(tls_os_queue_t *queue)
This function is used to flush the contents of the message queue.
tls_os_mailbox_t
void tls_os_mailbox_t
Definition: wm_osal.h:57
tls_os_mailbox_create
tls_os_status_t tls_os_mailbox_create(tls_os_mailbox_t **mailbox, u32 mailbox_size)
This function creates a message mailbox if free event control blocks are available.
tls_os_init
void tls_os_init(void *arg)
This function is used to initialize OS common resource.
tls_os_queue_send_to_front
tls_os_status_t tls_os_queue_send_to_front(tls_os_queue_t *queue, void *msg, u32 msg_size)
This function sends a message to a head of the queue.
tls_os_mailbox_delete
tls_os_status_t tls_os_mailbox_delete(tls_os_mailbox_t *mailbox)
This function deletes a mailbox and readies all of the tasks pending on the this mailbox.
tls_os_mailbox_receive
tls_os_status_t tls_os_mailbox_receive(tls_os_mailbox_t *mailbox, void **msg, u32 wait_time)
This function waits for a message to be sent to a mailbox.
tls_os_task_create
tls_os_status_t tls_os_task_create(tls_os_task_t *task, const char *name, void(*entry)(void *param), void *param, u8 *stk_start, u32 stk_size, u32 prio, u32 flag)
This function is used to create a task. Tasks can either be created prior to the start of multitaskin...
tls_os_queue_send
tls_os_status_t tls_os_queue_send(tls_os_queue_t *queue, void *msg, u32 msg_size)
This function sends a message to a queue.
tls_os_time_delay
void tls_os_time_delay(u32 ticks)
This function is called to delay execution of the currently running task until the specified number o...
tls_os_mutex_delete
tls_os_status_t tls_os_mutex_delete(tls_os_mutex_t *mutex)
This function deletes a mutual exclusion semaphore and readies all tasks pending on the it...
TLS_OS_TIMER_CALLBACK
void(* TLS_OS_TIMER_CALLBACK)(void *ptmr, void *parg)
Definition: wm_osal.h:61
tls_os_task_del_by_task_handle
tls_os_status_t tls_os_task_del_by_task_handle(void *handle, void(*freefun)(void))
This function allows you to delete a task. The calling task can delete itself by taks&#39;s handler...
tls_os_mutex_release
tls_os_status_t tls_os_mutex_release(tls_os_mutex_t *mutex)
This function releases a mutual exclusion semaphore.
tls_os_timer_stop
void tls_os_timer_stop(tls_os_timer_t *timer)
This function is called by your application code to stop a timer.
tls_os_queue_delete
tls_os_status_t tls_os_queue_delete(tls_os_queue_t *queue)
This function deletes a message queue and readies all tasks pending on the queue. ...
tls_os_timer_create
tls_os_status_t tls_os_timer_create(tls_os_timer_t **timer, TLS_OS_TIMER_CALLBACK callback, void *callback_arg, u32 period, bool repeat, u8 *name)
This function is called by your application code to create a timer.
tls_os_sem_release
tls_os_status_t tls_os_sem_release(tls_os_sem_t *sem)
This function signals a semaphore.
tls_os_queue_receive
tls_os_status_t tls_os_queue_receive(tls_os_queue_t *queue, void **msg, u32 msg_size, u32 wait_time)
This function waits for a message to be sent to a queue.
tls_os_timer_init
void tls_os_timer_init(void)
This function is used to register OS tick timer irq.
tls_os_disp_task_stat_info
void tls_os_disp_task_stat_info(void)
This function is used to display all the tasks&#39; detail status.
OS_STK
unsigned int OS_STK
Definition: wm_osal.h:41
tls_os_release_critical
void tls_os_release_critical(u32 cpu_sr)
This function is used to enable interrupts by preserving the state of interrupts. ...
tls_os_queue_send_to_back
tls_os_status_t tls_os_queue_send_to_back(tls_os_queue_t *queue, void *msg, u32 msg_size)
This function sends a message to a tail of the queue.
tls_os_timer_delete
tls_os_status_t tls_os_timer_delete(tls_os_timer_t *timer)
This function is called by your application code to delete a timer.
wm_type_def.h
WM type redefine.
tls_os_start_scheduler
void tls_os_start_scheduler(void)
This function is used to start task scheduler.
tls_os_mutex_acquire
tls_os_status_t tls_os_mutex_acquire(tls_os_mutex_t *mutex, u32 wait_time)
This function waits for a mutual exclusion semaphore.
tls_os_timer_t
void tls_os_timer_t
Definition: wm_osal.h:51
tls_os_sem_create
tls_os_status_t tls_os_sem_create(tls_os_sem_t **sem, u32 cnt)
This function creates a semaphore.
tls_os_sem_t
void tls_os_sem_t
Definition: wm_osal.h:53
HZ
const unsigned int HZ
tls_os_mutex_t
void tls_os_mutex_t
Definition: wm_osal.h:59
tls_os_status
tls_os_status
Definition: wm_osal.h:69
TLS_OS_TYPE
TLS_OS_TYPE
Definition: wm_osal.h:31
tls_os_set_critical
u32 tls_os_set_critical(void)
This function is used to disable interrupts by preserving the state of interrupts.
tls_os_timer_start
void tls_os_timer_start(tls_os_timer_t *timer)
This function is called by your application code to start a timer.
tls_os_queue_t
void tls_os_queue_t
Definition: wm_osal.h:55
tls_os_queue_create
tls_os_status_t tls_os_queue_create(tls_os_queue_t **queue, u32 queue_size)
This function creates a message queue if free event cont rol blocks are available.
tls_os_queue_space_available
u32 tls_os_queue_space_available(tls_os_queue_t *queue)
Return the number of free spaces available in a queue. This is equal to the number of items that can ...
tls_os_mutex_create
tls_os_status_t tls_os_mutex_create(u8 prio, tls_os_mutex_t **mutex)
This function creates a mutual exclusion semaphore.
tls_os_task_t
void * tls_os_task_t
Definition: wm_osal.h:49
tls_os_sem_acquire
tls_os_status_t tls_os_sem_acquire(tls_os_sem_t *sem, u32 wait_time)
This function waits for a semaphore.
tls_os_mailbox_send
tls_os_status_t tls_os_mailbox_send(tls_os_mailbox_t *mailbox, void *msg)
This function sends a message to a mailbox.
tls_os_task_del
tls_os_status_t tls_os_task_del(u8 prio, void(*freefun)(void))
This function allows you to delete a task. The calling task can delete itself by its own priority num...
tls_os_get_time
u32 tls_os_get_time(void)
This function is used by your application to obtain the current value of the 32-bit counter which kee...
tls_os_sem_set
tls_os_status_t tls_os_sem_set(tls_os_sem_t *sem, u16 cnt)
This function sets the semaphore count to the value specified as an argument.Typically,this value would be 0.You would typically use this function when a semaphore is used as a signaling mechanism and, you want to reset the count value.
tls_os_time_tick
void tls_os_time_tick(void *p)
This function is used to tick handler.
tls_get_isr_count
u8 tls_get_isr_count(void)
This function is used to get the isr count.
wm_config.h
w800 chip inferface configure
tls_os_sem_delete
tls_os_status_t tls_os_sem_delete(tls_os_sem_t *sem)
This function deletes a semaphore and readies all tasks pending on this semaphore.


W800 SDK APIs: doxy_out/include/platform/wm_params.h Source File

  • doxy_out
  • include
  • platform
wm_params.h
Go to the documentation of this file.
1
10 #ifndef TLS_PARAMS_H
11 #define TLS_PARAMS_H
12
13 #include "wm_type_def.h"
14
15 /***************************************************************************************
16 ID | Data Type
17 ***************************************************************************************
18 TLS_PARAM_ID_SSID | struct tls_param_ssid ssid
19 TLS_PARAM_ID_ENCRY | u8 encry
20 TLS_PARAM_ID_KEY | struct tls_param_key key
21 TLS_PARAM_ID_IP | struct tls_param_ip ipcfg
22 TLS_PARAM_ID_AUTOMODE | u8 auto_mode
23 TLS_PARAM_ID_DEFSOCKET | N/A
24 TLS_PARAM_ID_BSSID | struct tls_param_bssid bssid
25 TLS_PARAM_ID_CHANNEL | u8 channel
26 TLS_PARAM_ID_CHANNEL_EN | u8 channel_enable
27 TLS_PARAM_ID_COUNTRY_REGION | u8 wireless_region
28 TLS_PARAM_ID_WPROTOCOL | u8 wireless_protocol
29 TLS_PARAM_ID_ADHOC_AUTOCREATE | N/A
30 TLS_PARAM_ID_ROAMING | u8 auto_roam
31 TLS_PARAM_ID_AUTO_RETRY_CNT | N/A
32 TLS_PARAM_ID_WBGR | struct tls_param_bgr wbgr
33 TLS_PARAM_ID_USRINTF | N/A
34 TLS_PARAM_ID_AUTO_TRIGGER_LENGTH | N/A
35 TLS_PARAM_ID_DEBUG_MODE | N/A
36 TLS_PARAM_ID_HARDVERSION | struct tls_param_hardware_version hardware_v
37 TLS_PARAM_ID_BRDSSID | u8 ssid_broadcast_enable
38 TLS_PARAM_ID_DNSNAME | u8 local_dnsname[32]
39 TLS_PARAM_ID_DEVNAME | u8 local_device_name[32]
40 TLS_PARAM_ID_PSM | u8 auto_powersave
41 TLS_PARAM_ID_ORAY_CLIENT | N/A
42 TLS_PARAM_ID_UPNP | N/A
43 TLS_PARAM_ID_UART | struct tls_param_uart uart_cfg
44 TLS_PARAM_ID_WPS | struct tls_param_wps wps
45 TLS_PARAM_ID_AUTO_TRIGGER_PERIOD | N/A
46 TLS_PARAM_ID_ESCAPE_CHAR | N/A
47 TLS_PARAM_ID_ESCAPE_PERIOD | N/A
48 TLS_PARAM_ID_IO_MODE | N/A
49 TLS_PARAM_ID_CMD_MODE | N/A
50 TLS_PARAM_ID_PASSWORD | u8 PassWord[6]
51 TLS_PARAM_ID_CHANNEL_LIST | u16 channellist
52 TLS_PARAM_ID_WEBS_CONFIG | struct tls_webs_cfg WebsCfg
53 TLS_PARAM_ID_ONESHOT_CFG | u8 oneshotflag
54 TLS_PARAM_ID_SHA1 | N/A
55 TLS_PARAM_ID_ORIGIN_KEY | N/A
56 TLS_PARAM_ID_ORIGIN_SSID | N/A
57 TLS_PARAM_ID_AUTO_RECONNECT | u8 auto_reconnect
58 ***************************************************************************************/
59
60 #define TLS_PARAM_STATUS_OK (0)
61 #define TLS_PARAM_STATUS_EINVALID (1)
62 #define TLS_PARAM_STATUS_EMEM (2)
63 #define TLS_PARAM_STATUS_EIO (3)
64 #define TLS_PARAM_STATUS_EPERM (4)
65 #define TLS_PARAM_STATUS_EINVALIDID (5)
66
68 #define TLS_PARAM_INIT_MAGIC (0xffffffff)
69
70 #define TLS_PARAM_MAGIC (0x4947414d)
71
73 #define TLS_PARAM_PARTITION_NUM (2)
74
76 #define TLS_PARAM_ID_ALL (-1)
77 #define TLS_PARAM_ID_SSID (0)
78 #define TLS_PARAM_ID_ENCRY (1)
79 #define TLS_PARAM_ID_KEY (2)
80 #define TLS_PARAM_ID_IP (3)
81 #define TLS_PARAM_ID_AUTOMODE (4)
82 #define TLS_PARAM_ID_DEFSOCKET (5)
83 #define TLS_PARAM_ID_BSSID (6)
84 #define TLS_PARAM_ID_CHANNEL (7)
85 #define TLS_PARAM_ID_CHANNEL_EN (8)
86 #define TLS_PARAM_ID_COUNTRY_REGION (9)
87 #define TLS_PARAM_ID_WPROTOCOL (10)
88 #define TLS_PARAM_ID_ADHOC_AUTOCREATE (11)
89 #define TLS_PARAM_ID_ROAMING (12)
90 #define TLS_PARAM_ID_AUTO_RETRY_CNT (13)
91 #define TLS_PARAM_ID_WBGR (14)
92 #define TLS_PARAM_ID_USRINTF (15)
93 #define TLS_PARAM_ID_AUTO_TRIGGER_LENGTH (16)
94 #define TLS_PARAM_ID_DEBUG_MODE (17)
95 #define TLS_PARAM_ID_HARDVERSION (18)
96 #define TLS_PARAM_ID_BRDSSID (19)
97 #define TLS_PARAM_ID_DNSNAME (20)
98 #define TLS_PARAM_ID_DEVNAME (21)
99 #define TLS_PARAM_ID_PSM (22)
100 #define TLS_PARAM_ID_ORAY_CLIENT (23)
101 #define TLS_PARAM_ID_UPNP (24)
102 #define TLS_PARAM_ID_UART (26)
103 #define TLS_PARAM_ID_WPS (27)
104 #define TLS_PARAM_ID_AUTO_TRIGGER_PERIOD (28)
105 #define TLS_PARAM_ID_ESCAPE_CHAR (29)
106 #define TLS_PARAM_ID_ESCAPE_PERIOD (30)
107 #define TLS_PARAM_ID_IO_MODE (31)
108 #define TLS_PARAM_ID_CMD_MODE (32)
109 #define TLS_PARAM_ID_PASSWORD (33)
110 #define TLS_PARAM_ID_CHANNEL_LIST (34)
111 #define TLS_PARAM_ID_WEBS_CONFIG (35)
112 #define TLS_PARAM_ID_ONESHOT_CFG (36)
113 #define TLS_PARAM_ID_SHA1 (37)
114 #define TLS_PARAM_ID_ORIGIN_KEY (38)
115 #define TLS_PARAM_ID_ORIGIN_SSID (39)
116 #define TLS_PARAM_ID_AUTO_RECONNECT (40)
117 #define TLS_PARAM_ID_QUICK_CONNECT (41)
118 #define TLS_PARAM_ID_KEY_CHANGE (42)
119 #define TLS_PARAM_ID_SSID_CHANGE (43)
120 #define TLS_PARAM_ID_SOFTAP_SSID (44)
121 #define TLS_PARAM_ID_SOFTAP_PSK (45)
122 #define TLS_PARAM_ID_SOFTAP_ENCRY (46)
123 #define TLS_PARAM_ID_SOFTAP_KEY (47)
124 #define TLS_PARAM_ID_SOFTAP_IP (48)
125 #define TLS_PARAM_ID_SOFTAP_CHANNEL (49)
126 #define TLS_PARAM_ID_SOFTAP_WBGR (50)
127
128 #define TLS_PARAM_ID_SNTP_SERVER1 (51)
129 #define TLS_PARAM_ID_SNTP_SERVER2 (52)
130 #define TLS_PARAM_ID_SNTP_SERVER3 (53)
131 #define TLS_PARAM_ID_TEM_OFFSET (54)
132
134 #define TLS_PARAM_ID_BT_ADAPTER (55)
135 #define TLS_PARAM_ID_BT_REMOTE_DEVICE_1 (56)
136 #define TLS_PARAM_ID_BT_REMOTE_DEVICE_2 (57)
137 #define TLS_PARAM_ID_BT_REMOTE_DEVICE_3 (58)
138
139 #define TLS_PARAM_ID_BT_REMOTE_DEVICE_4 (59)
140 #define TLS_PARAM_ID_BT_REMOTE_DEVICE_5 (60)
141 #define TLS_PARAM_ID_BT_REMOTE_DEVICE_6 (61)
142 #define TLS_PARAM_ID_BT_REMOTE_DEVICE_7 (62)
143 #define TLS_PARAM_ID_BT_REMOTE_DEVICE_8 (63)
144 #define TLS_PARAM_ID_BT_REMOTE_DEVICE_9 (64)
145 #define TLS_PARAM_ID_BT_REMOTE_DEVICE_10 (65)
146
147 #define TLS_PARAM_ID_MAX (66)
148
150 #define TLS_PARAM_PHY_11BG_MIXED (0)
151 #define TLS_PARAM_PHY_11B (1)
152 #define TLS_PARAM_PHY_11BGN_MIXED (2)
153
154 #define TLS_PARAM_TX_RATEIDX_1M (0)
155 #define TLS_PARAM_TX_RATEIDX_2M (1)
156 #define TLS_PARAM_TX_RATEIDX_5_5M (2)
157 #define TLS_PARAM_TX_RATEIDX_11M (3)
158 #define TLS_PARAM_TX_RATEIDX_6M (4)
159 #define TLS_PARAM_TX_RATEIDX_9M (5)
160 #define TLS_PARAM_TX_RATEIDX_12M (6)
161 #define TLS_PARAM_TX_RATEIDX_18M (7)
162 #define TLS_PARAM_TX_RATEIDX_24M (8)
163 #define TLS_PARAM_TX_RATEIDX_36M (9)
164 #define TLS_PARAM_TX_RATEIDX_48M (10)
165 #define TLS_PARAM_TX_RATEIDX_54M (11)
166 #define TLS_PARAM_TX_RATEIDX_MCS0 (12)
167 #define TLS_PARAM_TX_RATEIDX_MCS1 (13)
168 #define TLS_PARAM_TX_RATEIDX_MCS2 (14)
169 #define TLS_PARAM_TX_RATEIDX_MCS3 (15)
170 #define TLS_PARAM_TX_RATEIDX_MCS4 (16)
171 #define TLS_PARAM_TX_RATEIDX_MCS5 (17)
172 #define TLS_PARAM_TX_RATEIDX_MCS6 (18)
173 #define TLS_PARAM_TX_RATEIDX_MCS7 (19)
174 #define TLS_PARAM_TX_RATEIDX_MCS8 (20)
175 #define TLS_PARAM_TX_RATEIDX_MCS9 (21)
176 #define TLS_PARAM_TX_RATEIDX_MCS10 (22)
177 #define TLS_PARAM_TX_RATEIDX_MCS11 (23)
178 #define TLS_PARAM_TX_RATEIDX_MCS12 (24)
179 #define TLS_PARAM_TX_RATEIDX_MCS13 (25)
180 #define TLS_PARAM_TX_RATEIDX_MCS14 (26)
181 #define TLS_PARAM_TX_RATEIDX_MCS15 (27)
182 #define TLS_PARAM_TX_RATEIDX_MCS32 (28)
183
184
186 #define TLS_PARAM_SSIDBRD_DISABLE (0)
187 #define TLS_PARAM_SSIDBRD_ENABLE (1)
188
189 #define TLS_PARAM_ROAM_DISABLE (0)
190 #define TLS_PARAM_ROAM_ENABLE (1)
191
193 #define TLS_PARAM_PSM_DISABLE (0)
194 #define TLS_PARAM_PSM_ENABLE (1)
195
196 #define TLS_PARAM_DDNS_DISABLE (0)
197 #define TLS_PARAM_DDNS_ENABLE (1)
198
199 #define TLS_PARAM_AUTO_CREATE_ADHOC_DISABLE (0)
200 #define TLS_PARAM_AUTO_CREATE_ADHOC_ENABLE (1)
201
202 #define TLS_PARAM_WPS_DISABLE (0)
203 #define TLS_PARAM_WPS_ENABLE (1)
204 #define TLS_PARAM_WPS_MODE_PIN (0)
205 #define TLS_PARAM_WPS_MODE_PBC (1)
206 #define TLS_PARAM_WPS_FLAG_NEGOTIATED (1 << 0)
207
208 #define TLS_PARAM_UPNP_DISABLE (0)
209 #define TLS_PARAM_UPNP_ENABLE (1)
210
212 #define TLS_PARAM_IEEE80211_INFRA (1)
213 #define TLS_PARAM_IEEE80211_ADHOC (2)
214 #define TLS_PARAM_IEEE80211_SOFTAP (4)
215
217 #define TLS_PARAM_MANUAL_MODE (0)
218 #define TLS_PARAM_AUTO_MODE (1)
219
220 #define TLS_PARAM_ALWAYS_ONLINE_ENABLE (1)
221 #define TLS_PARAM_ALWAYS_ONLINE_DISABLE (0)
222
224 #define TLS_PARAM_DHCP_ENABLE (1)
225 #define TLS_PARAM_DHCP_DISABLE (0)
226
228 #define TLS_PARAM_REGION_0_BG_BAND (0) /* 1-11 */
229 #define TLS_PARAM_REGION_1_BG_BAND (1) /* 1-13 */
230 #define TLS_PARAM_REGION_2_BG_BAND (2) /* 10-11 */
231 #define TLS_PARAM_REGION_3_BG_BAND (3) /* 10-13 */
232 #define TLS_PARAM_REGION_4_BG_BAND (4) /* 14 */
233 #define TLS_PARAM_REGION_5_BG_BAND (5) /* 1-14 */
234 #define TLS_PARAM_REGION_6_BG_BAND (6) /* 3-9 */
235 #define TLS_PARAM_REGION_7_BG_BAND (7) /* 5-13 */
236 #define TLS_PARAM_REGION_MAXIMUM_BG_BAND TLS_PARAM_REGION_7_BG_BAND
237
239 #define TLS_PARAM_ENCRY_OPEN (0)
240 #define TLS_PARAM_ENCRY_WEP64 (1)
241 #define TLS_PARAM_ENCRY_WEP128 (2)
242 #define TLS_PARAM_ENCRY_WPA_PSK_TKIP (3)
243 #define TLS_PARAM_ENCRY_WPA_PSK_AES (4)
244 #define TLS_PARAM_ENCRY_WPA2_PSK_TKIP (5)
245 #define TLS_PARAM_ENCRY_WPA2_PSK_AES (6)
246
248 #define TLS_PARAM_USR_INTF_LUART (0)
249 #define TLS_PARAM_USR_INTF_HUART (1)
250 #define TLS_PARAM_USR_INTF_HSPI (2)
251 #define TLS_PARAM_USR_INTF_HSDIO (3)
252
254 #define TLS_PARAM_UART_BAUDRATE_B600 (600)
255 #define TLS_PARAM_UART_BAUDRATE_B1200 (1200)
256 #define TLS_PARAM_UART_BAUDRATE_B1800 (1800)
257 #define TLS_PARAM_UART_BAUDRATE_B2400 (2400)
258 #define TLS_PARAM_UART_BAUDRATE_B4800 (4800)
259 #define TLS_PARAM_UART_BAUDRATE_B9600 (9600)
260 #define TLS_PARAM_UART_BAUDRATE_B19200 (19200)
261 #define TLS_PARAM_UART_BAUDRATE_B38400 (38400)
262 #define TLS_PARAM_UART_BAUDRATE_B57600 (57600)
263 #define TLS_PARAM_UART_BAUDRATE_B115200 (115200)
264 #define TLS_PARAM_HUART_BAUDRATE_B230400 (230400)
265 #define TLS_PARAM_HUART_BAUDRATE_B460800 (460800)
266 #define TLS_PARAM_HUART_BAUDRATE_B921600 (921600)
267 #define TLS_PARAM_HUART_BAUDRATE_B1000000 (1000000)
268 #define TLS_PARAM_HUART_BAUDRATE_B1250000 (1250000)
269 #define TLS_PARAM_HUART_BAUDRATE_B1500000 (1500000)
270 #define TLS_PARAM_HUART_BAUDRATE_B2000000 (2000000)
271
273 #define TLS_PARAM_UART_PARITY_NONE (0)
274 #define TLS_PARAM_UART_PARITY_EVEN (1)
275 #define TLS_PARAM_UART_PARITY_ODD (2)
276 #define TLS_PARAM_UART_PARITY_MARK (3)
277 #define TLS_PARAM_UART_PARITY_SPACE (4)
278
280 #define TLS_PARAM_UART_STOPBITS_1BITS (0)
281 #define TLS_PARAM_UART_STOPBITS_2BITS (1)
282
284 #define TLS_PARAM_UART_FLOW_DISABLE (0)
285 #define TLS_PARAM_UART_FLOW_ENABLE (1)
286 #define TLS_PARAM_HSPI_MAX_SCLK (33000000)
287
288 #define TLS_PARAM_SOCKET_TCP (0)
289 #define TLS_PARAM_SOCKET_UDP (1)
290 #define TLS_PARAM_SOCKET_CLIENT (0)
291 #define TLS_PARAM_SOCKET_SERVER (1)
292 #define TLS_PARAM_SOCKET_DEFAULT_PORT (60000)
293
295 struct tls_param_hardware_version {
296 u8 mark;
297 u8 main;
298 u8 sub;
299 u8 material;
300 u8 year;
301 u8 week;
302 u8 res[2];
303 };
304
306 struct tls_param_bssid {
307 u8 bssid_enable;
308 u8 res;
309 u8 bssid[6];
310 };
311
313 struct tls_param_ssid {
314 u8 ssid[32];
315 u32 ssid_len;
316 };
317
319 struct tls_param_tem_offset {
320 u8 offset_len;
321 s32 offset;
322 };
323
325 struct tls_param_key {
326 u8 psk[64];
327 u8 key_length;
328 u8 key_index;
329 u8 key_format;
330 u8 res;
331 };
332
334 struct tls_param_original_key {
335 u8 psk[64];
336 u32 key_length;
337 };
338
340 struct tls_param_sha1{
341 u8 psk_set;
342 u8 psk[32];
343 };
344
346 struct tls_param_bgr {
347 u8 bg;
348 u8 max_rate;
349 u8 res[2];
350 };
351
353 struct tls_param_ip {
354 u8 dhcp_enable;
355 u8 res[3];
356 u8 ip[4];
357 u8 netmask[4];
358 u8 gateway[4];
359 u8 dns1[4];
360 u8 dns2[4];
361 };
362
364 struct tls_param_uart {
365 u32 baudrate;
366 u8 stop_bits;
367 u8 parity;
368 u8 flow;
369 u8 charsize;
370 };
371
373 struct tls_param_socket {
374 u8 protocol;
375 u8 client_or_server;
376 u16 port_num;
377 u8 host[32];
378 };
379
380 struct tls_param_wps {
381 u8 wps_enable;
382 u8 mode;
383 u8 flag;
384 u8 res;
385 u8 pin[8];
386 };
387
389 struct tls_param_oray_client {
390 u32 oray_client_enable;
391 u8 oray_client_user[32];
392 u8 oray_client_pass[32];
393 };
394
396 struct tls_webs_cfg {
397 u8 AutoRun;
398 u8 Reserved;
399 u16 PortNum;
400 };
401
403 typedef struct tls_user_param{
404
405 u8 wireless_protocol;
406 u8 auto_mode;
407 u8 dhcp_enable;
408 u8 user_port_mode;
409
410 u8 ip[4];
411 u8 netmask[4];
412 u8 gateway[4];
413 u8 dns[4];
414
415 u32 baudrate;
416
417 u8 socket_protocol;
418 u8 socket_client_or_server;
419 u16 socket_port_num;
420 u8 socket_host[32];
421 u8 auto_powersave;
422 u8 PassWord[6];
423 }ST_Wm_User_Param;
424 typedef struct {
425 u32 valid_tag; /*0xdeadbeaf means valid*/
426 u32 valid_bit;
427 u8 bd_addr[6]; /*Local Address*/
428 uint8_t name_len;
429 u8 name[16]; /*Local Name*/
430 u32 class_of_device; /*Class of Device*/
431 u8 io_cap;
432 u8 discoverable;
433 u8 connectable;
434 u8 bt_auth_req;
435 u8 mode; /*Adv, Initiator, ......*/
436 u8 ble_auth_req;
437 u8 ir[16];
438 u8 irk[16];
439 u8 dhk[16];
440 u8 er[16];
441 } bt_adapter_t;
442
443 typedef struct {
444 u32 valid_tag; /*0xdeadbeaf means valid*/
445 u8 in_use;
446 u32 valid_bit;
447 u8 bd_addr[6];
448 u8 name[16];
449 u8 name_len;
450 u32 class_of_device;
451 u32 available_service;
452 u8 link_key[16];
453 u8 key_type;
454 u8 io_cap;
455 u8 pin_length;
456 u8 device_type;
457 u8 reconnect_needed;
458 u8 ble_addr_type;
459 /* KEY_PENC */
460 u8 key_penc[28];
461 /* KEY_PID */
462 u8 key_pid[23];
463 /* KEY_PID */
464 u8 key_lid[23];
465 /* KEY_PCSRK */
466 u8 key_pcsrk[24];
467 /* KEY_LCSRK */
468 u8 key_lcsrk[24];
469 /* KEY_LENC */
470 u8 key_lenc[20];
471 u32 manufacturer;
472 u32 lmpver;
473 u32 lmpsubver;
474
475 } bt_remote_device_t;
476
509 int tls_param_init(void);
510
522 void tls_param_load_factory_default(void);
523
538 int tls_param_set(int id, void *argv, bool to_flash);
539
554 int tls_param_get(int id, void *argv, bool from_flash);
555
568 int tls_param_to_flash(int id);
569
580 void tls_restore_param_from_backup(void);
581
595 int tls_param_to_default(void);
596
608 int tls_param_save_user_default(void);
609
621 int tls_param_save_user(struct tls_user_param *user_param);
622
633 u8 tls_param_get_updp_mode(void);
634
644 void tls_param_set_updp_mode(u8 mode);
645
656 int tls_param_get_program_param(u32 *pBase);
657
671 int tls_param_set_program_param(u32 base, u32 totallen, u32 checksum);
672
687 int tls_param_get_bt_param_address(int id, int from_flash);
688
689
698 #endif /* WM_PARAM_H */
699
tls_param_tem_offset
Definition: wm_params.h:319
bt_adapter_t
Definition: wm_params.h:424
tls_param_bssid
Definition: wm_params.h:306
tls_param_oray_client
Definition: wm_params.h:389
tls_param_original_key
Definition: wm_params.h:334
tls_param_load_factory_default
void tls_param_load_factory_default(void)
This function is used to load the system&#39;s default parameters.
tls_user_param
Definition: wm_params.h:403
tls_param_set
int tls_param_set(int id, void *argv, bool to_flash)
This function is used to set one system parameter by its id.
tls_param_ssid
Definition: wm_params.h:313
tls_restore_param_from_backup
void tls_restore_param_from_backup(void)
This function is used to recovery the parameters from the backup area to the parameter area...
tls_param_get_program_param
int tls_param_get_program_param(u32 *pBase)
This function is used to get program param.
tls_param_get_updp_mode
u8 tls_param_get_updp_mode(void)
This function is used to get updp mode.(updp:update user default parameters)
tls_param_uart
Definition: wm_params.h:364
tls_param_set_updp_mode
void tls_param_set_updp_mode(u8 mode)
This function is used to set updp mode.
bt_remote_device_t
Definition: wm_params.h:443
tls_param_to_flash
int tls_param_to_flash(int id)
This function is used to write parameter into flash.
tls_param_sha1
Definition: wm_params.h:340
tls_param_set_program_param
int tls_param_set_program_param(u32 base, u32 totallen, u32 checksum)
This function is used to set program base,image len,and checksum.
tls_param_hardware_version
Definition: wm_params.h:295
tls_webs_cfg
Definition: wm_params.h:396
tls_param_save_user_default
int tls_param_save_user_default(void)
This function is used to write user&#39;s parameters into the flash.
tls_param_ip
Definition: wm_params.h:353
wm_type_def.h
WM type redefine.
tls_param_get_bt_param_address
int tls_param_get_bt_param_address(int id, int from_flash)
This function is used to get bt param offset located in system param area.
tls_param_key
Definition: wm_params.h:325
tls_param_init
int tls_param_init(void)
This function is used to initialize parameter&#39;s manage module.
tls_param_save_user
int tls_param_save_user(struct tls_user_param *user_param)
This function is used to modify user&#39;s default parameters, then write them into flash.
tls_param_get
int tls_param_get(int id, void *argv, bool from_flash)
This function is used to get one system parameter by its id.
tls_param_wps
Definition: wm_params.h:380
ST_Wm_User_Param
struct tls_user_param ST_Wm_User_Param
tls_param_bgr
Definition: wm_params.h:346
tls_param_to_default
int tls_param_to_default(void)
This function is used to load default parametes into ram.
tls_param_socket
Definition: wm_params.h:373


W800 SDK APIs: doxy_out/include/driver/wm_pmu.h Source File

  • doxy_out
  • include
  • driver
wm_pmu.h
Go to the documentation of this file.
1
10 #ifndef WM_PMU_H
11 #define WM_PMU_H
12
13 #include "wm_type_def.h"
14
16 typedef enum {
17 TLS_PERIPHERAL_TYPE_I2C = (1 << 0),
18 TLS_PERIPHERAL_TYPE_UART0 = (1 << 1),
19 TLS_PERIPHERAL_TYPE_UART1 = (1 << 2),
20 TLS_PERIPHERAL_TYPE_UART2 = (1 << 3),
21 TLS_PERIPHERAL_TYPE_UART3 = (1 << 4),
22 TLS_PERIPHERAL_TYPE_UART4 = (1 << 5),
24 TLS_PERIPHERAL_TYPE_UART5 = (1 << 6),
26 TLS_PERIPHERAL_TYPE_LSPI = (1 << 7),
27 TLS_PERIPHERAL_TYPE_DMA = (1 << 8),
29 TLS_PERIPHERAL_TYPE_TIMER = (1 << 10),
30 TLS_PERIPHERAL_TYPE_GPIO = (1 << 11),
31 TLS_PERIPHERAL_TYPE_SDADC = (1 << 12),
32 TLS_PERIPHERAL_TYPE_PWM = (1 << 13),
33 TLS_PERIPHERAL_TYPE_LCD = (1 << 14),
34 TLS_PERIPHERAL_TYPE_I2S = (1 << 15),
35 TLS_PERIPHERAL_TYPE_RSA = (1 << 16),
36 TLS_PERIPHERAL_TYPE_GPSEC = (1 << 17),
38 TLS_PERIPHERAL_TYPE_SDIO_MASTER = (1<<18),
39 TLS_PERIPHERAL_TYPE_PSRAM = (1<<19),
40 TLS_PERIPHERAL_TYPE_BT = (1<<20),
41 TLS_PERIPHERAL_TYPE_TOUCH_SENSOR = (1 << 21)
42 }tls_peripheral_type_s;
43
45 typedef void (*tls_pmu_irq_callback)(void *arg);
46
82 void tls_pmu_timer1_isr_register(tls_pmu_irq_callback callback, void *arg);
83
84
99 void tls_pmu_timer0_isr_register(tls_pmu_irq_callback callback, void *arg);
100
101
116 void tls_pmu_gpio_isr_register(tls_pmu_irq_callback callback, void *arg);
117
118
133 void tls_pmu_sdio_isr_register(tls_pmu_irq_callback callback, void *arg);
134
135
147 void tls_pmu_clk_select(u8 bypass);
148
149
159 void tls_pmu_timer0_start(u16 second);
160
161
171 void tls_pmu_timer0_stop(void);
172
173
174
184 void tls_pmu_timer1_start(u16 msec);
185
186
196 void tls_pmu_timer1_stop(void);
197
198
199
209 void tls_pmu_standby_start(void);
210
211
221 void tls_pmu_sleep_start(void);
222
232 void tls_close_peripheral_clock(tls_peripheral_type_s devices);
233
243 void tls_open_peripheral_clock(tls_peripheral_type_s devices);
252 #endif
253
254
TLS_PERIPHERAL_TYPE_GPIO
Definition: wm_pmu.h:30
TLS_PERIPHERAL_TYPE_GPSEC
Definition: wm_pmu.h:36
TLS_PERIPHERAL_TYPE_I2C
Definition: wm_pmu.h:17
tls_open_peripheral_clock
void tls_open_peripheral_clock(tls_peripheral_type_s devices)
This function is used to open peripheral&#39;s clock.
TLS_PERIPHERAL_TYPE_BT
Definition: wm_pmu.h:40
TLS_PERIPHERAL_TYPE_UART3
Definition: wm_pmu.h:21
TLS_PERIPHERAL_TYPE_UART5
Definition: wm_pmu.h:24
TLS_PERIPHERAL_TYPE_LSPI
Definition: wm_pmu.h:26
TLS_PERIPHERAL_TYPE_UART4
Definition: wm_pmu.h:22
TLS_PERIPHERAL_TYPE_UART0
Definition: wm_pmu.h:18
tls_pmu_timer1_start
void tls_pmu_timer1_start(u16 msec)
This function is used to start pmu timer1.
tls_pmu_irq_callback
void(* tls_pmu_irq_callback)(void *arg)
Definition: wm_pmu.h:45
TLS_PERIPHERAL_TYPE_PSRAM
Definition: wm_pmu.h:39
tls_pmu_sdio_isr_register
void tls_pmu_sdio_isr_register(tls_pmu_irq_callback callback, void *arg)
This function is used to register pmu sdio interrupt.
tls_pmu_timer0_isr_register
void tls_pmu_timer0_isr_register(tls_pmu_irq_callback callback, void *arg)
This function is used to register pmu timer0 interrupt.
tls_pmu_timer1_stop
void tls_pmu_timer1_stop(void)
This function is used to stop pmu timer1.
tls_pmu_gpio_isr_register
void tls_pmu_gpio_isr_register(tls_pmu_irq_callback callback, void *arg)
This function is used to register pmu gpio interrupt.
TLS_PERIPHERAL_TYPE_PWM
Definition: wm_pmu.h:32
TLS_PERIPHERAL_TYPE_LCD
Definition: wm_pmu.h:33
TLS_PERIPHERAL_TYPE_UART1
Definition: wm_pmu.h:19
TLS_PERIPHERAL_TYPE_TOUCH_SENSOR
Definition: wm_pmu.h:41
wm_type_def.h
WM type redefine.
TLS_PERIPHERAL_TYPE_RSA
Definition: wm_pmu.h:35
TLS_PERIPHERAL_TYPE_TIMER
Definition: wm_pmu.h:29
TLS_PERIPHERAL_TYPE_I2S
Definition: wm_pmu.h:34
tls_pmu_sleep_start
void tls_pmu_sleep_start(void)
This function is used to start pmu goto sleep.
TLS_PERIPHERAL_TYPE_UART2
Definition: wm_pmu.h:20
tls_pmu_standby_start
void tls_pmu_standby_start(void)
This function is used to start pmu goto standby.
tls_pmu_clk_select
void tls_pmu_clk_select(u8 bypass)
This function is used to select pmu clk.
tls_close_peripheral_clock
void tls_close_peripheral_clock(tls_peripheral_type_s devices)
This function is used to close peripheral&#39;s clock.
TLS_PERIPHERAL_TYPE_SDADC
Definition: wm_pmu.h:31
TLS_PERIPHERAL_TYPE_SDIO_MASTER
Definition: wm_pmu.h:38
tls_pmu_timer1_isr_register
void tls_pmu_timer1_isr_register(tls_pmu_irq_callback callback, void *arg)
This function is used to register pmu timer1 interrupt.
tls_peripheral_type_s
tls_peripheral_type_s
Definition: wm_pmu.h:16
TLS_PERIPHERAL_TYPE_DMA
Definition: wm_pmu.h:27
tls_pmu_timer0_stop
void tls_pmu_timer0_stop(void)
This function is used to stop pmu timer0.
tls_pmu_timer0_start
void tls_pmu_timer0_start(u16 second)
This function is used to start pmu timer0.


W800 SDK APIs: doxy_out/include/driver/wm_pwm.h Source File

  • doxy_out
  • include
  • driver
wm_pwm.h
Go to the documentation of this file.
1
10 #ifndef WM_PWM_H
11 #define WM_PWM_H
12
13 #include "wm_type_def.h"
14
15
17 #define PWM_CHANNEL_MAX_NUM 5
18
20 enum tls_pwm_out_mode
21 {
22 WM_PWM_OUT_MODE_BRAKE = 0,
23 WM_PWM_OUT_MODE_ALLSYC,
24 WM_PWM_OUT_MODE_2SYC,
25 WM_PWM_OUT_MODE_MC,
26 WM_PWM_OUT_MODE_INDPT
27 };
28
30 enum tls_pwm_cap_int_type{
31 WM_PWM_CAP_RISING_EDGE_INT,
32 WM_PWM_CAP_FALLING_EDGE_INT,
33 WM_PWM_CAP_RISING_FALLING_EDGE_INT,
34 WM_PWM_CAP_DMA_INT
35 };
36
38 enum tls_pwm_out_en_state{
39 WM_PWM_OUT_EN_STATE_TRI,
40 WM_PWM_OUT_EN_STATE_OUT
41 };
42
44 enum tls_pwm_cnt_type{
45 WM_PWM_CNT_TYPE_EDGE_ALLGN_CAP,
46 WM_PWM_CNT_TYPE_EDGE_ALIGN_OUT,
47 WM_PWM_CNT_TYPE_CENTER_ALIGN
48 };
49
51 enum tls_pwm_loop_type{
52 WM_PWM_LOOP_TYPE_SINGLE,
53 WM_PWM_LOOP_TYPE_LOOP
54 };
55
57 enum tls_pwm_waveform_inversion{
58 WM_PWM_WAVEFORM_NOINVERSION,
59 WM_PWM_WAVEFORM_INVERSION
60 };
61
63 enum tls_pwm_brake_out_level{
64 WM_PWM_BRAKE_OUT_HIGH,
65 WM_PWM_BRAKE_OUT_LOW
66 };
67
69 typedef struct _pwm_init_param{
70 enum tls_pwm_out_mode mode;
71 u8 channel;
72 u16 clkdiv;
73 u8 period;
74 u8 duty;
75 bool dten;
76 u8 dtclkdiv;
77 u8 dtcnt;
78 enum tls_pwm_cnt_type cnt_type;
79 enum tls_pwm_loop_type loop_type;
80 bool inverse_en;
81 u8 pnum;
82 bool pnum_int;
83 }pwm_init_param;
84
114 void tls_pwm_isr_register(void (*callback)(void));
115
127 int tls_pwm_duty_config(u8 channel, u8 duty);
128
141 int tls_pwm_freq_config(u8 channel, u16 clkdiv, u8 period);
142
154 int tls_pwm_out_mode_config(u8 channel, enum tls_pwm_out_mode mode);
155
167 int tls_pwm_cnt_type_config(u8 channel, enum tls_pwm_cnt_type cnt_type);
168
180 int tls_pwm_loop_mode_config(u8 channel, enum tls_pwm_loop_type loop_mode);
181
194 int tls_pwm_out_inverse_cmd(u8 channel, bool en);
195
207 int tls_pwm_stoptime_by_period_config(u8 channel, u8 pnum);
208
220 int tls_pwm_output_en_cmd(u8 channel, bool en);
221
235 int tls_pwm_deadzone_config(u8 channel, bool dten, u8 dtclkdiv, u8 dtcnt);
236
248 int tls_pwm_capture_inverse_cmd(u8 channel, bool en);
249
262 int tls_pwm_brake_mode_config(u8 channel, bool en, enum tls_pwm_brake_out_level brok);
263
274 int tls_pwm_capture_mode_config(u8 channel);
275
287 int tls_pwm_stoptime_irq_cmd(u8 channel, bool en);
288
301 int tls_pwm_capture_irq_type_config(u8 channel, enum tls_pwm_cap_int_type int_type);
302
313 int tls_pwm_out_init(pwm_init_param *pwm_param);
314
328 int tls_pwm_cap_init(u8 channel, u16 clkdiv, bool inverse_en, enum tls_pwm_cap_int_type int_type);
329
340 int tls_pwm_start(u8 channel);
341
352 void tls_pwm_freq_set(u8 channel, u32 freq);
353
364 void tls_pwm_duty_set(u8 channel, u8 duty);
365
378 int tls_pwm_init(u8 channel,u32 freq, u8 duty, u8 pnum);
379
390 int tls_pwm_stop(u8 channel);
391
400 #endif /* WM_PWM_H */
_pwm_init_param::cnt_type
enum tls_pwm_cnt_type cnt_type
Definition: wm_pwm.h:78
tls_pwm_freq_config
int tls_pwm_freq_config(u8 channel, u16 clkdiv, u8 period)
This function is used to set frequency.
_pwm_init_param::dtclkdiv
u8 dtclkdiv
Definition: wm_pwm.h:76
WM_PWM_OUT_MODE_BRAKE
Definition: wm_pwm.h:22
_pwm_init_param::dtcnt
u8 dtcnt
Definition: wm_pwm.h:77
WM_PWM_CNT_TYPE_EDGE_ALIGN_OUT
Definition: wm_pwm.h:46
tls_pwm_init
int tls_pwm_init(u8 channel, u32 freq, u8 duty, u8 pnum)
This function is used to initial pwm.
tls_pwm_capture_inverse_cmd
int tls_pwm_capture_inverse_cmd(u8 channel, bool en)
This function is used to set whether to inverse the capture input.
tls_pwm_cnt_type_config
int tls_pwm_cnt_type_config(u8 channel, enum tls_pwm_cnt_type cnt_type)
This function is used to set the counting mode.
WM_PWM_LOOP_TYPE_LOOP
Definition: wm_pwm.h:53
WM_PWM_LOOP_TYPE_SINGLE
Definition: wm_pwm.h:52
WM_PWM_OUT_EN_STATE_TRI
Definition: wm_pwm.h:39
_pwm_init_param::pnum_int
bool pnum_int
Definition: wm_pwm.h:82
tls_pwm_capture_mode_config
int tls_pwm_capture_mode_config(u8 channel)
This function is used to enable the capture mode.
tls_pwm_cap_int_type
tls_pwm_cap_int_type
Definition: wm_pwm.h:30
tls_pwm_cnt_type
tls_pwm_cnt_type
Definition: wm_pwm.h:44
_pwm_init_param::clkdiv
u16 clkdiv
Definition: wm_pwm.h:72
tls_pwm_out_mode
tls_pwm_out_mode
Definition: wm_pwm.h:20
_pwm_init_param::inverse_en
bool inverse_en
Definition: wm_pwm.h:80
tls_pwm_waveform_inversion
tls_pwm_waveform_inversion
Definition: wm_pwm.h:57
WM_PWM_CNT_TYPE_CENTER_ALIGN
Definition: wm_pwm.h:47
WM_PWM_CAP_RISING_EDGE_INT
Definition: wm_pwm.h:31
tls_pwm_duty_config
int tls_pwm_duty_config(u8 channel, u8 duty)
This function is used to set duty radio.
WM_PWM_CAP_RISING_FALLING_EDGE_INT
Definition: wm_pwm.h:33
_pwm_init_param::mode
enum tls_pwm_out_mode mode
Definition: wm_pwm.h:70
tls_pwm_freq_set
void tls_pwm_freq_set(u8 channel, u32 freq)
This function is used to stop pwm.
WM_PWM_OUT_EN_STATE_OUT
Definition: wm_pwm.h:40
_pwm_init_param::channel
u8 channel
Definition: wm_pwm.h:71
tls_pwm_loop_mode_config
int tls_pwm_loop_mode_config(u8 channel, enum tls_pwm_loop_type loop_mode)
This function is used to set whether to loop.
WM_PWM_OUT_MODE_MC
Definition: wm_pwm.h:25
tls_pwm_deadzone_config
int tls_pwm_deadzone_config(u8 channel, bool dten, u8 dtclkdiv, u8 dtcnt)
This function is used to set the dead time.
tls_pwm_stoptime_by_period_config
int tls_pwm_stoptime_by_period_config(u8 channel, u8 pnum)
This function is used to set the number of period to be generated.
tls_pwm_stoptime_irq_cmd
int tls_pwm_stoptime_irq_cmd(u8 channel, bool en)
This function is used to set the interrupt about the number of period.
_pwm_init_param::loop_type
enum tls_pwm_loop_type loop_type
Definition: wm_pwm.h:79
WM_PWM_CAP_DMA_INT
Definition: wm_pwm.h:34
WM_PWM_BRAKE_OUT_LOW
Definition: wm_pwm.h:65
WM_PWM_CAP_FALLING_EDGE_INT
Definition: wm_pwm.h:32
tls_pwm_out_mode_config
int tls_pwm_out_mode_config(u8 channel, enum tls_pwm_out_mode mode)
This function is used to set the output mode.
_pwm_init_param::duty
u8 duty
Definition: wm_pwm.h:74
_pwm_init_param
Definition: wm_pwm.h:69
WM_PWM_OUT_MODE_INDPT
Definition: wm_pwm.h:26
tls_pwm_cap_init
int tls_pwm_cap_init(u8 channel, u16 clkdiv, bool inverse_en, enum tls_pwm_cap_int_type int_type)
This function is used to initial pwm(capture mode)
wm_type_def.h
WM type redefine.
WM_PWM_OUT_MODE_ALLSYC
Definition: wm_pwm.h:23
tls_pwm_output_en_cmd
int tls_pwm_output_en_cmd(u8 channel, bool en)
This function is used to set output enable.
tls_pwm_duty_set
void tls_pwm_duty_set(u8 channel, u8 duty)
This function is used to set duty radio.
tls_pwm_brake_mode_config
int tls_pwm_brake_mode_config(u8 channel, bool en, enum tls_pwm_brake_out_level brok)
This function is used to set break mode.
tls_pwm_brake_out_level
tls_pwm_brake_out_level
Definition: wm_pwm.h:63
_pwm_init_param::period
u8 period
Definition: wm_pwm.h:73
tls_pwm_isr_register
void tls_pwm_isr_register(void(*callback)(void))
This function is used to register the pwm interrupt callback function.
_pwm_init_param::pnum
u8 pnum
Definition: wm_pwm.h:81
WM_PWM_WAVEFORM_INVERSION
Definition: wm_pwm.h:59
tls_pwm_capture_irq_type_config
int tls_pwm_capture_irq_type_config(u8 channel, enum tls_pwm_cap_int_type int_type)
This function is used to set the interrupt about the capture.
tls_pwm_out_inverse_cmd
int tls_pwm_out_inverse_cmd(u8 channel, bool en)
This function is used to set whether to inverse the output.
tls_pwm_stop
int tls_pwm_stop(u8 channel)
This function is used to stop pwm.
_pwm_init_param::dten
bool dten
Definition: wm_pwm.h:75
WM_PWM_WAVEFORM_NOINVERSION
Definition: wm_pwm.h:58
tls_pwm_out_init
int tls_pwm_out_init(pwm_init_param *pwm_param)
This function is used to initial pwm(out mode)
pwm_init_param
struct _pwm_init_param pwm_init_param
WM_PWM_OUT_MODE_2SYC
Definition: wm_pwm.h:24
tls_pwm_loop_type
tls_pwm_loop_type
Definition: wm_pwm.h:51
tls_pwm_out_en_state
tls_pwm_out_en_state
Definition: wm_pwm.h:38
WM_PWM_CNT_TYPE_EDGE_ALLGN_CAP
Definition: wm_pwm.h:45
WM_PWM_BRAKE_OUT_HIGH
Definition: wm_pwm.h:64
tls_pwm_start
int tls_pwm_start(u8 channel)
This function is used to start pwm.


W800 SDK APIs: doxy_out/include/wm_ram_config.h Source File

  • doxy_out
  • include
wm_ram_config.h
Go to the documentation of this file.
1
10 #ifndef __WM_RAM_CONFIG_H__
11 #define __WM_RAM_CONFIG_H__
12 #include "wm_config.h"
13
14 /*see gcc_csky.ld in directory ld/w800,__heap_end must be bigger than 0x20028000
15 if __heap_end is lower than 0x20028000,then SLAVE_HSPI_SDIO_ADDR must be changed to 0x20028000 or bigger.
16 */
17 extern unsigned int __heap_end;
18 extern unsigned int __heap_start;
19
20 /*High speed SPI or SDIO buffer to exchange data*/
21 #define SLAVE_HSPI_SDIO_ADDR ((unsigned int)(&__heap_end))
22
23 #if TLS_CONFIG_HS_SPI
24 #define SLAVE_HSPI_MAX_SIZE (0x2000)
25 #else
26 #define SLAVE_HSPI_MAX_SIZE (0x0)
27 #endif
28
29 /*Wi-Fi use buffer to exchange data*/
30 #define WIFI_MEM_START_ADDR (SLAVE_HSPI_SDIO_ADDR + SLAVE_HSPI_MAX_SIZE)
31
32 /*Store reboot reason by RAM's Last Word*/
33 #define SYS_REBOOT_REASON_ADDRESS (0x20047EFC)
34
35 enum SYS_REBOOT_REASON
36 {
37 REBOOT_REASON_POWER_ON = 0, /*power on or reset button*/
38 REBOOT_REASON_STANDBY = 1, /*chip standby*/
39 REBOOT_REASON_EXCEPTION = 2, /*exception reset*/
40 REBOOT_REASON_WDG_TIMEOUT = 3, /*watchdog timeout*/
41 REBOOT_REASON_ACTIVE = 4, /*user active reset*/
42 REBOOT_REASON_MAX
43 };
44
45 #endif /*__WM_RAM_CONFIG_H__*/
46
wm_config.h
w800 chip inferface configure


W800 SDK APIs: doxy_out/include/wm_regs.h Source File

  • doxy_out
  • include
wm_regs.h
Go to the documentation of this file.
1
10 #ifndef WM_REGS_H
11 #define WM_REGS_H
12
13 typedef volatile unsigned char vu8;
14 typedef volatile unsigned short vu16;
15 typedef volatile unsigned long vu32;
16
17 #define M8(adr) (*((vu8 *) (adr)))
18 #define M16(adr) (*((vu16*) (adr)))
19 #define M32(adr) (*((vu32*) (adr)))
20
21 #define ATTRIBUTE_ISR __attribute__((isr))
22
23 typedef enum IRQn
24 {
25 /****** W800 specific Interrupt Numbers *********************************************************/
26 SDIO_IRQn = 0,
27 MAC_IRQn = 1,
28 RF_CFG_IRQn = 2,
29 SEC_IRQn = 3,
30 DMA_Channel0_IRQn = 4,
31 DMA_Channel1_IRQn = 5,
32 DMA_Channel2_IRQn = 6,
33 DMA_Channel3_IRQn = 7,
34 DMA_Channel4_7_IRQn = 8,
35 DMA_BRUST_IRQn = 9,
36 I2C_IRQn = 10,
37 ADC_IRQn = 11,
38 SPI_LS_IRQn = 12,
39 SPI_HS_IRQn = 13,
40 GPIOA_IRQn = 14,
41 GPIOB_IRQn = 15,
42 UART0_IRQn = 16,
43 UART1_IRQn = 17,
44 TOUCH_IRQn = 18,
45 UART24_IRQn = 19,
46 BLE_IRQn = 20,
47 BT_IRQn = 21,
48 PWM_IRQn = 22,
49 I2S_IRQn = 23,
50 SIDO_HOST_IRQn = 24,
51 SYS_TICK_IRQn = 25,
52 RSA_IRQn = 26,
53 CRYPTION_IRQn = 27,
54 FLASH_IRQn = 28,
55 PMU_IRQn = 29,
56 TIMER_IRQn = 30,
57 WDG_IRQn = 31,
58 } IRQn_Type;
59
60 //#include "core_cm3.h"
61 #include "wm_type_def.h"
62 #ifdef __cplusplus
63 #define __I volatile
64 #else
65 #define __I volatile const
66 #endif
67 #define __O volatile
68 #define __IO volatile
71 typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
72 typedef volatile unsigned int TLS_REG; /* Hardware register definition */
73
74 #ifndef BIT
75 #define BIT(x) (1UL << (x))
76 #endif
77
78 #define APB_CLK (40000000) /* 40MHz */
79
80 #define DEVICE_BASE_ADDR 0x40000000
81
82
83 /***************************************************************
84 * SDIO Reg
85 ***************************************************************/
86 #define HR_SDIO_BASE_ADDR (DEVICE_BASE_ADDR + 0x2400)
87 #define HR_SDIO_CIS0 (HR_SDIO_BASE_ADDR + 0x008)
88 #define HR_SDIO_CIS1 (HR_SDIO_BASE_ADDR + 0x00C)
89 #define HR_SDIO_CSA (HR_SDIO_BASE_ADDR + 0x010)
90 #define HR_SDIO_READ (HR_SDIO_BASE_ADDR + 0x014)
91 #define HR_SDIO_WRITE (HR_SDIO_BASE_ADDR + 0x018)
92 #define HR_SDIO_INTEN (HR_SDIO_BASE_ADDR + 0x030)
93 #define HR_SDIO_OCR (HR_SDIO_BASE_ADDR + 0x034)
94 #define HR_SDIO_CIA (HR_SDIO_BASE_ADDR + 0x024)
95 #define HR_SDIO_PROG (HR_SDIO_BASE_ADDR + 0x028)
96
97 /***************************************************************
98 * SDIO HOST Reg
99 ***************************************************************/
100 #define HR_SDIO_HOST_BASE_ADDR (DEVICE_BASE_ADDR + 0xA00)
101 #define HR_SDIO_HOST_MMC_CTRL (HR_SDIO_HOST_BASE_ADDR + 0x0)
102
103 /***************************************************************
104 * HSPI Reg
105 ***************************************************************/
106 #define HR_HSPI_BASE_ADDR (DEVICE_BASE_ADDR + 0x2600)
107 #define HR_HSPI_CLEAR_FIFO (HR_HSPI_BASE_ADDR)
108 #define HR_HSPI_SPI_CFG (HR_HSPI_BASE_ADDR + 0x04)
109 #define HR_HSPI_MODE_CFG (HR_HSPI_BASE_ADDR + 0x08)
110 #define HR_HSPI_INT_MASK (HR_HSPI_BASE_ADDR + 0x0C)
111 #define HR_HSPI_INT_STTS (HR_HSPI_BASE_ADDR + 0x10)
112 #define HR_HSPI_RXDAT_LEN (HR_HSPI_BASE_ADDR + 0x18)
113
114 /***************************************************************
115 * Inner Flash Reg
116 ***************************************************************/
117 #define HR_FLASH_BASE_ADDR (DEVICE_BASE_ADDR + 0x2000)
118 #define HR_FLASH_CMD_ADDR (HR_FLASH_BASE_ADDR + 0x000)
119 #define HR_FLASH_CMD_START (HR_FLASH_BASE_ADDR + 0x004)
120 #define HR_FLASH_CR (HR_FLASH_BASE_ADDR + 0x008)
121 #define HR_FLASH_ADDR (HR_FLASH_BASE_ADDR + 0x010)
122 #define HR_FLASH_ENCRYPT_CTRL (HR_FLASH_BASE_ADDR + 0x014)
123 #define HR_FLASH_KEY_STATUS (HR_FLASH_BASE_ADDR + 0x018)
124 /***************************************************************
125 * SDIO WRAPPER Register
126 ***************************************************************/
127 #define HR_SDIO_WRAPPER_BASE_ADDR (DEVICE_BASE_ADDR + 0x2800)
128 #define HR_SDIO_INT_SRC (HR_SDIO_WRAPPER_BASE_ADDR + 0x000)
129 #define HR_SDIO_INT_MASK (HR_SDIO_WRAPPER_BASE_ADDR + 0x004)
130 #define HR_SDIO_UPCMDVALID (HR_SDIO_WRAPPER_BASE_ADDR + 0x008)
131 #define HR_SDIO_DOWNCMDVALID (HR_SDIO_WRAPPER_BASE_ADDR + 0x00C)
132 #define HR_SDIO_TXBD_LINKEN (HR_SDIO_WRAPPER_BASE_ADDR + 0x010)
133 #define HR_SDIO_TXBD_ADDR (HR_SDIO_WRAPPER_BASE_ADDR + 0x014)
134 #define HR_SDIO_TXEN (HR_SDIO_WRAPPER_BASE_ADDR + 0x018)
135 #define HR_SDIO_TX_STTS (HR_SDIO_WRAPPER_BASE_ADDR + 0x01C)
136 #define HR_SDIO_RXBD_LINKEN (HR_SDIO_WRAPPER_BASE_ADDR + 0x020)
137 #define HR_SDIO_RXBD_ADDR (HR_SDIO_WRAPPER_BASE_ADDR + 0x024)
138 #define HR_SDIO_RXEN (HR_SDIO_WRAPPER_BASE_ADDR + 0x028)
139 #define HR_SDIO_RX_STTS (HR_SDIO_WRAPPER_BASE_ADDR + 0x02C)
140 #define HR_SDIO_CMD_ADDR (HR_SDIO_WRAPPER_BASE_ADDR + 0x030)
141 #define HR_SDIO_CMD_SIZE (HR_SDIO_WRAPPER_BASE_ADDR + 0x034)
142
143 /* SDIO interrupt bit definition */
144 #define SDIO_WP_INT_SRC_CMD_DOWN (1UL<<3)
145 #define SDIO_WP_INT_SRC_CMD_UP (1UL<<2)
146 #define SDIO_WP_INT_SRC_DATA_DOWN (1UL<<1)
147 #define SDIO_WP_INT_SRC_DATA_UP (1UL<<0)
148
149
150 /***************************************************************
151 * DMA Reg
152 ***************************************************************/
153 #define HR_DMA_BASE_ADDR (DEVICE_BASE_ADDR + 0x800)
154 #define HR_DMA_INT_MASK (HR_DMA_BASE_ADDR + 0x0)
155 #define HR_DMA_INT_SRC (HR_DMA_BASE_ADDR + 0x4)
156 #define HR_DMA_CHNL_SEL (HR_DMA_BASE_ADDR + 0x08)
157 #define HR_DMA_CHNL0_SRC_ADDR (HR_DMA_BASE_ADDR + 0x10)
158 #define HR_DMA_CHNL0_DEST_ADDR (HR_DMA_BASE_ADDR + 0x14)
159 #define HR_DMA_CHNL0_SRC_WRAP_ADDR (HR_DMA_BASE_ADDR + 0x18)
160 #define HR_DMA_CHNL0_DEST_WRAP_ADDR (HR_DMA_BASE_ADDR + 0x1C)
161 #define HR_DMA_CHNL0_WRAP_SIZE (HR_DMA_BASE_ADDR + 0x20)
162 #define HR_DMA_CHNL0_CHNL_CTRL (HR_DMA_BASE_ADDR + 0x24)
163 #define HR_DMA_CHNL0_DMA_MODE (HR_DMA_BASE_ADDR + 0x28)
164 #define HR_DMA_CHNL0_DMA_CTRL (HR_DMA_BASE_ADDR + 0x2C)
165 #define HR_DMA_CHNL0_DMA_STATUS (HR_DMA_BASE_ADDR + 0x30)
166 #define HR_DMA_CHNL0_LINK_DEST_ADDR (HR_DMA_BASE_ADDR + 0x34)
167 #define HR_DMA_CHNL0_CURRENT_DEST_ADDR (HR_DMA_BASE_ADDR + 0x38)
168
169 #define DMA_STARTADDRESS HR_DMA_BASE_ADDR
170 #define DMA_INTMASK_REG (*(volatile unsigned int*)(DMA_STARTADDRESS+0x000))
171 #define DMA_INTSRC_REG (*(volatile unsigned int*)(DMA_STARTADDRESS+0x004))
172 #define DMA_CHANNEL_SEL (*(volatile unsigned int*)(DMA_STARTADDRESS+0x008))
173 #define DMA_CHNL_REG_BASE (DMA_STARTADDRESS+0x010)
174 #define DMA_SRCADDR_REG(ch) (*(volatile unsigned int*)(DMA_CHNL_REG_BASE + 0x30 * (ch /*- 1*/) +0x00))
175 #define DMA_DESTADDR_REG(ch) (*(volatile unsigned int*)(DMA_CHNL_REG_BASE + 0x30 * (ch /*- 1*/) +0x04))
176 #define DMA_SRCWRAPADDR_REG(ch) (*(volatile unsigned int*)(DMA_CHNL_REG_BASE + 0x30 * (ch /*- 1*/) +0x08))
177 #define DMA_DESTWRAPADDR_REG(ch) (*(volatile unsigned int*)(DMA_CHNL_REG_BASE + 0x30 * (ch /*- 1*/) +0x0C))
178 #define DMA_WRAPSIZE_REG(ch) (*(volatile unsigned int*)(DMA_CHNL_REG_BASE + 0x30 * (ch /*- 1*/) +0x10))
179 #define DMA_CHNLCTRL_REG(ch) (*(volatile unsigned int*)(DMA_CHNL_REG_BASE + 0x30 * (ch /*- 1*/) +0x14))
180 #define DMA_MODE_REG(ch) (*(volatile unsigned int*)(DMA_CHNL_REG_BASE + 0x30 * (ch /*- 1*/) +0x18))
181 #define DMA_CTRL_REG(ch) (*(volatile unsigned int*)(DMA_CHNL_REG_BASE + 0x30 * (ch /*- 1*/) +0x1C))
182 #define DMA_STATUS_REG(ch) (*(volatile unsigned int*)(DMA_CHNL_REG_BASE + 0x30 * (ch /*- 1*/) +0x20))
183 #define DMA_DESC_ADDR_REG(ch) (*(volatile unsigned int*)(DMA_CHNL_REG_BASE + 0x30 * (ch /*- 1*/) +0x24))
184 #define DMA_CURRDESTADDR_REG(ch) (*(volatile unsigned int*)(DMA_CHNL_REG_BASE + 0x30 * (ch /*- 1*/) +0x28))
185
186 #define DMA_CHNL_CTRL_CHNL_ON (1<<0)
187 #define DMA_CHNL_CTRL_CHNL_OFF (1<<1)
188
189 #define DMA_MODE_HARD_MODE (1<<0)
190 #define DMA_MODE_CHAIN_MODE (1<<1)
191
192 #define DMA_MODE_SEL_MASK (0xF<<2)
193 #define DMA_MODE_SEL_UART_RX (0<<2)
194 #define DMA_MODE_SEL_UART_TX (1<<2)
195 #define DMA_MODE_SEL_PWM0 (2<<2)
196 #define DMA_DODE_SEL_PWM1 (3<<2)
197 #define DMA_MODE_SEL_LSSPI_RX (4<<2)
198 #define DMA_MODE_SEL_LSSPI_TX (5<<2)
199 #define DMA_MODE_SEL_SDADC_CH0 (6<<2)
200 #define DMA_MODE_SEL_SDADC_CH1 (7<<2)
201 #define DMA_MODE_SEL_SDADC_CH2 (8<<2)
202 #define DMA_MODE_SEL_SDADC_CH3 (9<<2)
203 #define DMA_MODE_SEL_I2S_RX (10<<2)
204 #define DMA_MODE_SEL_I2S_TX (11<<2)
205 #define DMA_MODE_SEL_SDIOHOST (12<<2)
206
207 #define DMA_MODE_CHAIN_LINK_EN (1<<6)
208
209 #define DMA_CTRL_AUTO_RELOAD (1<<0)
210 #define DMA_CTRL_SRC_ADDR_INC (1<<1)
211 #define DMA_CTRL_SRC_ADDR_CIR (3<<1)
212 #define DMA_CTRL_DEST_ADDR_INC (1<<3)
213 #define DMA_CTRL_DEST_ADDR_CIR (3<<3)
214 #define DMA_CTRL_DATA_SIZE_BYTE (0<<5)
215 #define DMA_CTRL_DATA_SIZE_SHORT (1<<5)
216 #define DMA_CTRL_DATA_SIZE_WORD (2<<5)
217 #define DMA_CTRL_BURST_SIZE1 (0<<7)
218 #define DMA_CTRL_BURST_SIZE4 (1<<7)
219
220 #define DMA_CTRL_TOTAL_MASK (0xFFF<<8)
221 #define DMA_CTRL_TOTAL_SIZE(n) (n<<8)
222
223 /***************************************************************
224 * PMU Reg
225 ***************************************************************/
226 #define HR_PMU_BASE_ADDR (DEVICE_BASE_ADDR + 0xD00)
227 #define HR_PMU_PS_CR (HR_PMU_BASE_ADDR + 0x00)
228 #define HR_PMU_TIMER0 (HR_PMU_BASE_ADDR + 0x04)
229 #define HR_PMU_TIMER1 (HR_PMU_BASE_ADDR + 0x08)
230 #define HR_PMU_RTC_CTRL1 (HR_PMU_BASE_ADDR + 0x0C)
231 #define HR_PMU_RTC_CTRL2 (HR_PMU_BASE_ADDR + 0x10)
232 #define HR_PMU_INTERRUPT_SRC (HR_PMU_BASE_ADDR + 0x14)
233 #define HR_PMU_INTERRUPT_MASK (HR_PMU_BASE_ADDR + 0x18)
234 #define HR_PMU_WLAN_STTS (HR_PMU_BASE_ADDR + 0x1C)
235 #define HR_PMU_BK_REG (HR_PMU_BASE_ADDR + 0x20)
236
237 #define PMU_TIMER0_NTERRUPT_SRC (1UL << 0)
238 #define PMU_TIMER1_NTERRUPT_SRC (1UL << 1)
239 #define PMU_GPIO_NTERRUPT_SRC (1UL << 2)
240
241
242 /***************************************************************
243 * system clock and bus clock Reg
244 ***************************************************************/
245 #define HR_CLK_BASE_ADDR (DEVICE_BASE_ADDR + 0xE00)
246 #define HR_CLK_GATE_EN HR_CLK_BASE_ADDR
247 #define HR_CLK_SOFT_CLK_MASK (HR_CLK_BASE_ADDR + 0x04)
248 #define HR_CLK_BBP_CLT_CTRL (HR_CLK_BASE_ADDR + 0x08)
249 #define HR_CLK_RST_CTL (HR_CLK_BASE_ADDR + 0x0c)
250 #define HR_CLK_DIV_CTL (HR_CLK_BASE_ADDR + 0x10)
251 #define HR_CLK_SEL_CTL (HR_CLK_BASE_ADDR + 0x14)
252 #define HR_OSC_32K_REG (HR_CLK_BASE_ADDR + 0x14)
253 #define HR_CLK_I2S_CTL (HR_CLK_BASE_ADDR + 0x18)
254 #define HR_CLK_RST_STA (HR_CLK_BASE_ADDR + 0x1C)
255
256 /***************************************************************
257 * ÄÚ´æÄ£¿é¼Ä´æÆ÷¶¨Òå
258 ***************************************************************/
259 #define HR_MEM_BASE_ADDR (DEVICE_BASE_ADDR + 0xF00)
260 #define HR_MEM_TXBUF_BASE_ADDR (HR_MEM_BASE_ADDR + 0x00)
261 #define HR_MEM_RXBUF_BASE_ADDR (HR_MEM_BASE_ADDR + 0x04)
262 #define HR_MEM_BUF_NUM_CFG (HR_MEM_BASE_ADDR + 0x08)
263 #define HR_MEM_BUF_SIZE_CFG (HR_MEM_BASE_ADDR + 0x0C)
264 #define HR_MEM_AGGR_CFG (HR_MEM_BASE_ADDR + 0x10)
265 #define HR_MEM_BUF_EN (HR_MEM_BASE_ADDR + 0x14)
266
267 /***************************************************************
268 * PSRAM CTRL Register
269 ****************************************************************/
270 #define HR_PSRRAM_BASE_ADDR (DEVICE_BASE_ADDR + 0x2200)
271 #define HR_PSRAM_CTRL_ADDR (HR_PSRRAM_BASE_ADDR+ 0x00)
272 #define HR_PSRAM_OVERTIMER_ADDR (HR_PSRRAM_BASE_ADDR+ 0x04)
273
274 /* APB BaseAddr*/
275 #define HR_APB_BASE_ADDR 0x40010000
276
277 /***************************************************************
278 * I2C Reg
279 ***************************************************************/
280 #define HR_I2C_BASE_ADDR (HR_APB_BASE_ADDR)
281 #define HR_I2C_PRER_LO (HR_I2C_BASE_ADDR + 0x0)
282 #define HR_I2C_PRER_HI (HR_I2C_BASE_ADDR + 0x04)
283 #define HR_I2C_CTRL (HR_I2C_BASE_ADDR + 0x08)
284 #define HR_I2C_TX_RX (HR_I2C_BASE_ADDR + 0x0C)
285 #define HR_I2C_CR_SR (HR_I2C_BASE_ADDR + 0x10)
286 #define HR_I2C_TXR (HR_I2C_BASE_ADDR + 0x14)
287 #define HR_I2C_CR (HR_I2C_BASE_ADDR + 0x18)
288
289
290 #define I2C_CTRL_INT_DISABLE (0x1UL<<6)
291 #define I2C_CTRL_ENABLE (0x1UL<<7)
292
293 #define I2C_CR_STA (0x1UL<<7)
294 #define I2C_CR_STO (0x1UL<<6)
295 #define I2C_CR_RD (0x1UL<<5)
296 #define I2C_CR_WR (0x1UL<<4)
297 #define I2C_CR_NAK (0x1UL<<3)
298 #define I2C_CR_IACK (0x1UL)
299
300 #define I2C_SR_NAK (0x1UL<<7)
301 #define I2C_SR_BUSY (0x1UL<<6)
302 #define I2C_SR_TIP (0x1UL<<1)
303 #define I2C_SR_IF (0x1UL)
304
305
306 /***************************************************************
307 * SD ADC Reg
308 ***************************************************************/
309 #define HR_SD_ADC_BASE_ADDR (HR_APB_BASE_ADDR + 0x200)
310 #define HR_SD_ADC_RESULT_REG ((HR_SD_ADC_BASE_ADDR+0x000))
311 #define HR_SD_ADC_ANA_CTRL ((HR_SD_ADC_BASE_ADDR+0x004))
312 #define HR_SD_ADC_PGA_CTRL ((HR_SD_ADC_BASE_ADDR+0x008))
313 #define HR_SD_ADC_TEMP_CTRL ((HR_SD_ADC_BASE_ADDR+0x00C))
314 #define HR_SD_ADC_CTRL ((HR_SD_ADC_BASE_ADDR+0x010))
315 #define HR_SD_ADC_INT_STATUS ((HR_SD_ADC_BASE_ADDR+0x014))
316 #define HR_SD_ADC_CMP_VALUE ((HR_SD_ADC_BASE_ADDR+0x018))
317
318
319 /***************************************************************
320 *Low Speed SPI Reg
321 ***************************************************************/
322 #define HR_SPI_BASE_ADDR (HR_APB_BASE_ADDR + 0x400)
323 #define HR_SPI_CHCFG_REG (HR_SPI_BASE_ADDR + 0x000)
324 #define HR_SPI_SPICFG_REG (HR_SPI_BASE_ADDR + 0x004)
325 #define HR_SPI_CLKCFG_REG (HR_SPI_BASE_ADDR + 0x008)
326 #define HR_SPI_MODECFG_REG (HR_SPI_BASE_ADDR + 0x00C)
327 #define HR_SPI_INT_MASK_REG (HR_SPI_BASE_ADDR + 0x010)
328 #define HR_SPI_INT_STATUS_REG (HR_SPI_BASE_ADDR + 0x014)
329 #define HR_SPI_STATUS_REG (HR_SPI_BASE_ADDR + 0x018)
330 #define HR_SPI_TIMEOUT_REG (HR_SPI_BASE_ADDR + 0x01C)
331 #define HR_SPI_TXDATA_REG (HR_SPI_BASE_ADDR + 0x020)
332 #define HR_SPI_TRANSLEN_REG (HR_SPI_BASE_ADDR + 0x024)
333 #define HR_SPI_SLV_XMIT_LEN_REG (HR_SPI_BASE_ADDR + 0x028)
334 #define HR_SPI_RXDATA_REG (HR_SPI_BASE_ADDR + 0x030)
335
336
337 #define SPIM_STARTADDRESS (HR_APB_BASE_ADDR + 0x400)
338 #define SPIM_CHCFG_REG (*(volatile unsigned int*)(SPIM_STARTADDRESS+0x000))
339 #define SPIM_SPICFG_REG (*(volatile unsigned int*)(SPIM_STARTADDRESS+0x004))
340 #define SPIM_CLKCFG_REG (*(volatile unsigned int*)(SPIM_STARTADDRESS+0x008))
341 #define SPIM_MODECFG_REG (*(volatile unsigned int*)(SPIM_STARTADDRESS+0x00C))
342 #define SPIM_INTEN_REG (*(volatile unsigned int*)(SPIM_STARTADDRESS+0x010))
343 #define SPIM_INTSRC_REG (*(volatile unsigned int*)(SPIM_STARTADDRESS+0x014))
344 #define SPIM_SPISTATUS_REG (*(volatile unsigned int*)(SPIM_STARTADDRESS+0x018))
345 #define SPIM_SPITIMEOUT_REG (*(volatile unsigned int*)(SPIM_STARTADDRESS+0x01C))
346 #define SPIM_TXDATA_REG (*(volatile unsigned int*)(SPIM_STARTADDRESS+0x020))
347 #define SPIM_TRANSLEN_REG (*(volatile unsigned int*)(SPIM_STARTADDRESS+0x024))
348 #define SPIM_RXDATA_REG (*(volatile unsigned int*)(SPIM_STARTADDRESS+0x030))
349
350
351 /*RSA Reg*/
352 #define RSA_BASE_ADDRESS 0x40000000
353 #define RSAXBUF (*((volatile unsigned long *) (RSA_BASE_ADDRESS + 0x0 )))
354 #define RSAYBUF (*((volatile unsigned long *) (RSA_BASE_ADDRESS + 0x100 )))
355 #define RSAMBUF (*((volatile unsigned long *) (RSA_BASE_ADDRESS + 0x200 )))
356 #define RSADBUF (*((volatile unsigned long *) (RSA_BASE_ADDRESS + 0x300 )))
357 #define RSACON (*((volatile unsigned long *) (RSA_BASE_ADDRESS + 0x400 )))
358 #define RSAMC (*((volatile unsigned long *) (RSA_BASE_ADDRESS + 0x404 )))
359 #define RSAN (*((volatile unsigned long *) (RSA_BASE_ADDRESS + 0x408 )))
360
361
362
363 /* Bits Definitions of "CH_CFG" */
364 #define SPI_RX_INVALID_BITS(n) ((n) << 23)
365 #define SPI_CLEAR_FIFOS (1U << 22)
366 #define SPI_CONTINUE_MODE (1U << 21)
367 #define SPI_RX_CHANNEL_ON (1U << 20)
368 #define SPI_RX_CHANNEL_OFF (0U << 20)
369 #define SPI_TX_CHANNEL_ON (1U << 19)
370 #define SPI_TX_CHANNEL_OFF (0U << 19)
371 #define SPI_VALID_CLKS_NUM(n) ((n) << 3)
372 #define SPI_CS_LOW (0U << 2)
373 #define SPI_CS_HIGH (1U << 2)
374 #define SPI_FORCE_SPI_CS_OUT (1U << 1)
375 #define SPI_START (1U << 0)
376
377 /* Bits Definitions of "SPI_CFG" */
378 #define SPI_FRAME_FORMAT_MOTO (0U << 17)
379 #define SPI_FRAME_FORMAT_TI (1U << 17)
380 #define SPI_FRAME_FORMAT_MICROWAIRE (2U << 17)
381 #define SPI_TX_PIN_ALWS_DRIVER (1U << 16)
382 #define SPI_CS_HOLD(n) ((n) << 12)
383 #define CS_HOLD_1_CLKS 0
384 #define CS_HOLD_2_CLKS 1
385 #define CS_HOLD_4_CLKS 2
386 #define CS_HOLD_8_CLKS 3
387 #define CS_HOLD_16_CLKS 4
388 #define CS_HOLD_32_CLKS 5
389 #define CS_HOLD_64_CLKS 6
390 #define CS_HOLD_127_CLKS 7
391 #define SPI_CS_SETUP(n) ((n) << 9)
392 #define CS_SETUP_1_CLKS 0
393 #define CS_SETUP_2_CLKS 1
394 #define CS_SETUP_4_CLKS 2
395 #define CS_SETUP_8_CLKS 3
396 #define CS_SETUP_16_CLKS 4
397 #define CS_SETUP_32_CLKS 5
398 #define CS_SETUP_64_CLKS 6
399 #define CS_SETUP_127_CLKS 7
400 #define SPI_DATA_OUT_DELAY(n) ((n) << 7)
401 #define DATA_OUT_DELAY_1_CLKS 0
402 #define DATA_OUT_DELAY_2_CLKS 1
403 #define DATA_OUT_DELAY_3_CLKS 2
404 #define DATA_OUT_DELAY_0_CLKS 3
405 #define SPI_FRAME_DELAY(n) ((n) << 4)
406 #define FRAME_DELAY_1_CLKS 0
407 #define FRAME_DELAY_2_CLKS 1
408 #define FRAME_DELAY_4_CLKS 2
409 #define FRAME_DELAY_8_CLKS 3
410 #define FRAME_DELAY_16_CLKS 4
411 #define FRAME_DELAY_32_CLKS 5
412 #define FRAME_DELAY_64_CLKS 6
413 #define FRAME_DELAY_127_CLKS 7
414 #define SPI_LITTLE_ENDIAN (0 << 3)
415 #define SPI_BIG_ENDIAN (1 << 3)
416 #define SPI_SET_MASTER_SLAVE(mode) ((mode) << 2)
417 #define SPI_MASTER 1
418 #define SPI_SLAVE 0
419 #define SPI_SET_CPHA(n) ((n) << 1)
420 #define SPI_SET_CPOL(n) ((n) << 0)
421
422 /* Bits Definitions of "CLK_CFG" */
423 #define SPI_GET_SCLK_DIVIDER(clk) ((APB_CLK)/((clk) * 2) - 1)/*In HZ*/
424 #define SPI_SCLK_DIVIDER(n) ((n) << 0)
425
426 /* Bits Definitions of "MODE_CFG" */
427 #define SPI_RX_TRIGGER_LEVEL(n) ((n) << 6)
428 #define SPI_TX_TRIGGER_LEVEL(n) ((n) << 2)
429 #define SPI_RX_DMA_ON (1 << 1)
430 #define SPI_RX_DMA_OFF (0 << 1)
431 #define SPI_TX_DMA_ON (1 << 0)
432 #define SPI_TX_DMA_OFF (0 << 0)
433
434 /* Bits Definitions of SPI interrupt register(SPI_INT_MASK and SPI_INT_SOURCE) */
435 #define SPI_INT_MASK_ALL 0xffU
436 #define SPI_INT_CLEAR_ALL 0xffU
437 #define SPI_INT_TIMEOUT (1U << 7)
438 #define SPI_INT_TRANSFER_DONE (1U << 6)
439 #define SPI_INT_RX_OVERRUN (1U << 5)
440 #define SPI_INT_RX_UNDERRUN (1U << 4)
441 #define SPI_INT_TX_OVERRUN (1U << 3)
442 #define SPI_INT_TX_UNDERRUN (1U << 2)
443 #define SPI_INT_RX_FIFO_RDY (1U << 1)
444 #define SPI_INT_TX_FIFO_RDY (1U << 0)
445
446 /* Bits Definitions of "SPI_STATUS" */
447 #define SPI_IS_BUSY(value) ((((value) & (1 << 12)) != 0) ? 1 : 0)
448 #define SPI_GET_RX_FIFO_CNT(value) (((value) & 0xFC0) >> 6)
449 #define SPI_GET_TX_FIFO_CNT(value) ((value) & 0x3F)
450
451 /* Bits Definitions of "SPI_TIMEOUT" */
452 #define SPI_TIMER_EN (1U << 31)
453 #define SPI_TIME_OUT(n) (((((n) * (APB_CLK)) / 1000) & ~(0x01U << 31)) << 0)
454
455 /***************************************************************
456 * UART Reg
457 ***************************************************************/
458 #define HR_UART0_BASE_ADDR (HR_APB_BASE_ADDR + 0x600)
459 #define HR_UART1_BASE_ADDR (HR_APB_BASE_ADDR + 0x800)
460 #define HR_UART2_BASE_ADDR (HR_APB_BASE_ADDR + 0xA00)
461 #define HR_UART3_BASE_ADDR (HR_APB_BASE_ADDR + 0xC00)
462 #define HR_UART4_BASE_ADDR (HR_APB_BASE_ADDR + 0xE00)
463
464 #define HR_UART0_LINE_CTRL (HR_UART0_BASE_ADDR + 0x0)
465 #define HR_UART0_FLOW_CTRL (HR_UART0_BASE_ADDR + 0x04)
466 #define HR_UART0_DMA_CTRL (HR_UART0_BASE_ADDR + 0x08)
467 #define HR_UART0_FIFO_CTRL (HR_UART0_BASE_ADDR + 0x0C)
468 #define HR_UART0_BAUD_RATE_CTRL (HR_UART0_BASE_ADDR + 0x10)
469 #define HR_UART0_INT_MASK (HR_UART0_BASE_ADDR + 0x14)
470 #define HR_UART0_INT_SRC (HR_UART0_BASE_ADDR + 0x18)
471 #define HR_UART0_FIFO_STATUS (HR_UART0_BASE_ADDR + 0x1C)
472 #define HR_UART0_TX_WIN (HR_UART0_BASE_ADDR + 0x20)
473 #define HR_UART0_RX_WIN (HR_UART0_BASE_ADDR + 0x30)
474
475 #define HR_UART1_LINE_CTRL (HR_UART1_BASE_ADDR + 0x0)
476 #define HR_UART1_FLOW_CTRL (HR_UART1_BASE_ADDR + 0x04)
477 #define HR_UART1_DMA_CTRL (HR_UART1_BASE_ADDR + 0x08)
478 #define HR_UART1_FIFO_CTRL (HR_UART1_BASE_ADDR + 0x0C)
479 #define HR_UART1_BAUD_RATE_CTRL (HR_UART1_BASE_ADDR + 0x10)
480 #define HR_UART1_INT_MASK (HR_UART1_BASE_ADDR + 0x14)
481 #define HR_UART1_INT_SRC (HR_UART1_BASE_ADDR + 0x18)
482 #define HR_UART1_FIFO_STATUS (HR_UART1_BASE_ADDR + 0x1C)
483 #define HR_UART1_TX_WIN (HR_UART1_BASE_ADDR + 0x20)
484 #define HR_UART1_RX_WIN (HR_UART1_BASE_ADDR + 0x30)
485
486 #define HR_UART2_LINE_CTRL (HR_UART2_BASE_ADDR + 0x0)
487 #define HR_UART2_FLOW_CTRL (HR_UART2_BASE_ADDR + 0x04)
488 #define HR_UART2_DMA_CTRL (HR_UART2_BASE_ADDR + 0x08)
489 #define HR_UART2_FIFO_CTRL (HR_UART2_BASE_ADDR + 0x0C)
490 #define HR_UART2_BAUD_RATE_CTRL (HR_UART2_BASE_ADDR + 0x10)
491 #define HR_UART2_INT_MASK (HR_UART2_BASE_ADDR + 0x14)
492 #define HR_UART2_INT_SRC (HR_UART2_BASE_ADDR + 0x18)
493 #define HR_UART2_FIFO_STATUS (HR_UART2_BASE_ADDR + 0x1C)
494 #define HR_UART2_TX_WIN (HR_UART2_BASE_ADDR + 0x20)
495 #define HR_UART2_RX_WIN (HR_UART2_BASE_ADDR + 0x30)
496 #define HR_UART2_GUARD_TIME (HR_UART2_BASE_ADDR + 0x40)
497 #define HR_UART2_WAIT_TIME (HR_UART2_BASE_ADDR + 0x44)
498 #define HR_UART2_GT (HR_UART2_BASE_ADDR + 0x40)
499 #define HR_UART2_WT (HR_UART2_BASE_ADDR + 0x44)
500
501 #define HR_UART3_LINE_CTRL (HR_UART3_BASE_ADDR + 0x0)
502 #define HR_UART3_FLOW_CTRL (HR_UART3_BASE_ADDR + 0x04)
503 #define HR_UART3_DMA_CTRL (HR_UART3_BASE_ADDR + 0x08)
504 #define HR_UART3_FIFO_CTRL (HR_UART3_BASE_ADDR + 0x0C)
505 #define HR_UART3_BAUD_RATE_CTRL (HR_UART3_BASE_ADDR + 0x10)
506 #define HR_UART3_INT_MASK (HR_UART3_BASE_ADDR + 0x14)
507 #define HR_UART3_INT_SRC (HR_UART3_BASE_ADDR + 0x18)
508 #define HR_UART3_FIFO_STATUS (HR_UART3_BASE_ADDR + 0x1C)
509 #define HR_UART3_TX_WIN (HR_UART3_BASE_ADDR + 0x20)
510 #define HR_UART3_RX_WIN (HR_UART3_BASE_ADDR + 0x30)
511
512 #define HR_UART4_LINE_CTRL (HR_UART4_BASE_ADDR + 0x0)
513 #define HR_UART4_FLOW_CTRL (HR_UART4_BASE_ADDR + 0x04)
514 #define HR_UART4_DMA_CTRL (HR_UART4_BASE_ADDR + 0x08)
515 #define HR_UART4_FIFO_CTRL (HR_UART4_BASE_ADDR + 0x0C)
516 #define HR_UART4_BAUD_RATE_CTRL (HR_UART4_BASE_ADDR + 0x10)
517 #define HR_UART4_INT_MASK (HR_UART4_BASE_ADDR + 0x14)
518 #define HR_UART4_INT_SRC (HR_UART4_BASE_ADDR + 0x18)
519 #define HR_UART4_FIFO_STATUS (HR_UART4_BASE_ADDR + 0x1C)
520 #define HR_UART4_TX_WIN (HR_UART4_BASE_ADDR + 0x20)
521 #define HR_UART4_RX_WIN (HR_UART4_BASE_ADDR + 0x30)
522
523 /*
524 * Line Control Register bits definition
525 * ULCON0 ULCON1 Register
526 */
527 /* bit 0-1 : Word length */
528 #define ULCON_WL5 0x00
529 #define ULCON_WL6 0x01
530 #define ULCON_WL7 0x02
531 #define ULCON_WL8 0x03
532 #define ULCON_WL_MASK 0x03
533 /* bit 2 : Number of stop bits */
534 #define ULCON_STOP_2 0x04 /* 2 stop bit */
535 /* bit 3-4 : Parity mode */
536 #define ULCON_PMD_MASK 0x18
537 #define ULCON_PMD_EN 0x08 /* no parity */
538 #define ULCON_PMD_ODD 0x18 /* odd parity */
539 #define ULCON_PMD_EVEN 0x08 /* even parity */
540 /* bit 6 uart tx enable */
541 #define ULCON_TX_EN 0x40
542 #define ULCON_RX_EN 0x80
543 /* bit 6 : Infra-red mode */
544 #define ULCON_INFRA_RED 0x80
545
546 /*
547 * auto flow control register bits definition
548 */
549 #define UFC_ENABLE 0x01
550 #define UFC_SW_RTS_SET 0x02
551 #define UFC_RTS_TRIGGER_LVL_4_BYTE (0<<2)
552 #define UFC_RTS_TRIGGER_LVL_8_BYTE (1<<2)
553 #define UFC_RTS_TRIGGER_LVL_12_BYTE (2<<2)
554 #define UFC_RTS_TRIGGER_LVL_16_BYTE (3<<2)
555 #define UFC_RTS_TRIGGER_LVL_20_BYTE (4<<2)
556 #define UFC_RTS_TRIGGER_LVL_24_BYTE (5<<2)
557 #define UFC_RTS_TRIGGER_LVL_28_BYTE (6<<2)
558 #define UFC_RTS_TRIGGER_LVL_31_BYTE (7<<2)
559
560 #define UFC_TX_FIFO_RESET 0x01
561 #define UFC_RX_FIFO_RESET 0x02
562 #define UFC_TX_FIFO_LVL_ZERO (0<<2)
563 #define UFC_TX_FIFO_LVL_4_BYTE (1<<2)
564 #define UFC_TX_FIFO_LVL_8_BYTE (2<<2)
565 #define UFC_TX_FIFO_LVL_16_BYTE (3<<2)
566 #define UFC_RX_FIFO_LVL_ZERO (0<<4)
567 #define UFC_RX_FIFO_LVL_4_BYTE (1<<4)
568 #define UFC_RX_FIFO_LVL_8_BYTE (2<<4)
569 #define UFC_RX_FIFO_LVL_16_BYTE (3<<4)
570
571 /* dma control */
572 #define UDMA_RX_FIFO_TIMEOUT (1<<2)
573 #define UDMA_RX_FIFO_TIMEOUT_SHIFT (3)
574
575 /*
576 * uart interrupt source register bits definition
577 */
578 #define UIS_TX_FIFO_EMPTY (1UL<<0)
579 #define UIS_TX_FIFO (1UL<<1)
580 #define UIS_RX_FIFO (1UL<<2)
581 #define UIS_RX_FIFO_TIMEOUT (1UL<<3)
582 #define UIS_CTS_CHNG (1UL<<4)
583 #define UIS_BREAK (1UL<<5)
584 #define UIS_FRM_ERR (1UL<<6)
585 #define UIS_PARITY_ERR (1UL<<7)
586 #define UIS_OVERRUN (1UL<<8)
587
588 /*
589 * fifo status register bits definition
590 */
591 /* bit 0-5 : tx fifo count */
592 #define UFS_TX_FIFO_CNT_MASK 0x3F
593 /* bit 6-11 : rx fifo count */
594 #define UFS_RX_FIFO_CNT_MASK 0x3C0
595 #define UFS_CST_STS (1UL<<12)
596
597 /***************************************************************
598 * GPIO Reg
599 ***************************************************************/
600 #define HR_GPIO_BASE_ADDR (HR_APB_BASE_ADDR + 0x1200)
601 #define HR_GPIO_DATA (HR_GPIO_BASE_ADDR + 0x0)
602 #define HR_GPIO_DATA_EN (HR_GPIO_BASE_ADDR + 0x04)
603 #define HR_GPIO_DIR (HR_GPIO_BASE_ADDR + 0x08)
604 #define HR_GPIO_PULLUP_EN (HR_GPIO_BASE_ADDR + 0x0C)
605 #define HR_GPIO_AF_SEL (HR_GPIO_BASE_ADDR + 0x10)
606 #define HR_GPIO_AF_S1 (HR_GPIO_BASE_ADDR + 0x14)
607 #define HR_GPIO_AF_S0 (HR_GPIO_BASE_ADDR + 0x18)
608 #define HR_GPIO_PULLDOWN_EN (HR_GPIO_BASE_ADDR + 0x1C)
609 #define HR_GPIO_IS (HR_GPIO_BASE_ADDR + 0x20)
610 #define HR_GPIO_IBE (HR_GPIO_BASE_ADDR + 0x24)
611 #define HR_GPIO_IEV (HR_GPIO_BASE_ADDR + 0x28)
612 #define HR_GPIO_IE (HR_GPIO_BASE_ADDR + 0x2c)
613 #define HR_GPIO_RIS (HR_GPIO_BASE_ADDR + 0x30)
614 #define HR_GPIO_MIS (HR_GPIO_BASE_ADDR + 0x34)
615 #define HR_GPIO_IC (HR_GPIO_BASE_ADDR + 0x38)
616
617 #define HR_GPIOA_BASE_ADDR (HR_APB_BASE_ADDR + 0x1200)
618 #define HR_GPIOA_DATA (HR_GPIOA_BASE_ADDR + 0x0)
619 #define HR_GPIOA_DATA_EN (HR_GPIOA_BASE_ADDR + 0x04)
620 #define HR_GPIOA_DATA_DIR (HR_GPIOA_BASE_ADDR + 0x08)
621 #define HR_GPIOA_DATA_PULLEN (HR_GPIOA_BASE_ADDR + 0x0c)
622 #define HR_GPIOA_AFSEL (HR_GPIOA_BASE_ADDR + 0x10)
623 #define HR_GPIOA_AFS1 (HR_GPIOA_BASE_ADDR + 0x14)
624 #define HR_GPIOA_AFS0 (HR_GPIOA_BASE_ADDR + 0x18)
625 #define HR_GPIOA_IS (HR_GPIOA_BASE_ADDR + 0x20)
626 #define HR_GPIOA_IBE (HR_GPIOA_BASE_ADDR + 0x24)
627 #define HR_GPIOA_IEV (HR_GPIOA_BASE_ADDR + 0x28)
628 #define HR_GPIOA_IE (HR_GPIOA_BASE_ADDR + 0x2C)
629 #define HR_GPIOA_RIS (HR_GPIOA_BASE_ADDR + 0x30)
630 #define HR_GPIOA_MIS (HR_GPIOA_BASE_ADDR + 0x34)
631 #define HR_GPIOA_IC (HR_GPIOA_BASE_ADDR + 0x38)
632
633 #define HR_GPIOB_BASE_ADDR (HR_APB_BASE_ADDR + 0x1400)
634 #define HR_GPIOB_DATA (HR_GPIOB_BASE_ADDR + 0x0)
635 #define HR_GPIOB_DATA_EN (HR_GPIOB_BASE_ADDR + 0x04)
636 #define HR_GPIOB_DATA_DIR (HR_GPIOB_BASE_ADDR + 0x08)
637 #define HR_GPIOB_DATA_PULLEN (HR_GPIOB_BASE_ADDR + 0x0c)
638 #define HR_GPIOB_AFSEL (HR_GPIOB_BASE_ADDR + 0x10)
639 #define HR_GPIOB_AFS1 (HR_GPIOB_BASE_ADDR + 0x14)
640 #define HR_GPIOB_AFS0 (HR_GPIOB_BASE_ADDR + 0x18)
641 #define HR_GPIOB_IS (HR_GPIOB_BASE_ADDR + 0x20)
642 #define HR_GPIOB_IBE (HR_GPIOB_BASE_ADDR + 0x24)
643 #define HR_GPIOB_IEV (HR_GPIOB_BASE_ADDR + 0x28)
644 #define HR_GPIOB_IE (HR_GPIOB_BASE_ADDR + 0x2C)
645 #define HR_GPIOB_RIS (HR_GPIOB_BASE_ADDR + 0x30)
646 #define HR_GPIOB_MIS (HR_GPIOB_BASE_ADDR + 0x34)
647 #define HR_GPIOB_IC (HR_GPIOB_BASE_ADDR + 0x38)
648
649
650 #define IO_PA_BASE_ADDR (HR_APB_BASE_ADDR + 0x1200)
651 #define IO_PA_DATA (*(volatile unsigned int*)(IO_PA_BASE_ADDR + 0x0))
652 #define IO_PA_EN (*(volatile unsigned int*)(IO_PA_BASE_ADDR + 0x4))
653 #define IO_PA_DIR (*(volatile unsigned int*)(IO_PA_BASE_ADDR + 0x8))
654 #define IO_PA_REN (*(volatile unsigned int*)(IO_PA_BASE_ADDR + 0xC))
655 #define IO_PA_AFSEL (*(volatile unsigned int*)(IO_PA_BASE_ADDR + 0x10))
656 #define IO_PA_AFS1 (*(volatile unsigned int*)(IO_PA_BASE_ADDR + 0x14))
657 #define IO_PA_AFS0 (*(volatile unsigned int*)(IO_PA_BASE_ADDR + 0x18))
658
659 #define IO_PB_BASE_ADDR (HR_APB_BASE_ADDR + 0x1400)
660 #define IO_PB_DATA (*(volatile unsigned int*)(IO_PB_BASE_ADDR + 0x0))
661 #define IO_PB_EN (*(volatile unsigned int*)(IO_PB_BASE_ADDR + 0x4))
662 #define IO_PB_DIR (*(volatile unsigned int*)(IO_PB_BASE_ADDR + 0x8))
663 #define IO_PB_REN (*(volatile unsigned int*)(IO_PB_BASE_ADDR + 0xC))
664 #define IO_PB_AFSEL (*(volatile unsigned int*)(IO_PB_BASE_ADDR + 0x10))
665 #define IO_PB_AFS1 (*(volatile unsigned int*)(IO_PB_BASE_ADDR + 0x14))
666 #define IO_PB_AFS0 (*(volatile unsigned int*)(IO_PB_BASE_ADDR + 0x18))
667
668 /***************************************************************
669 * TIMER Reg
670 ***************************************************************/
671 #define HR_TIMER_BASE_ADDR (HR_APB_BASE_ADDR + 0x1800)
672 #define HR_TIMER_CFG (HR_TIMER_BASE_ADDR + 0x0)
673 #define HR_TIMER0_5_CSR (HR_TIMER_BASE_ADDR + 0x04)
674 #define HR_TIMER0_PRD (HR_TIMER_BASE_ADDR + 0x08)
675 #define HR_TIMER1_PRD (HR_TIMER_BASE_ADDR + 0x0C)
676 #define HR_TIMER2_PRD (HR_TIMER_BASE_ADDR + 0x10)
677 #define HR_TIMER3_PRD (HR_TIMER_BASE_ADDR + 0x14)
678 #define HR_TIMER4_PRD (HR_TIMER_BASE_ADDR + 0x18)
679 #define HR_TIMER5_PRD (HR_TIMER_BASE_ADDR + 0x1C)
680 #define HR_TIMER0_CNT (HR_TIMER_BASE_ADDR + 0x20)
681 #define HR_TIMER1_CNT (HR_TIMER_BASE_ADDR + 0x24)
682 #define HR_TIMER2_CNT (HR_TIMER_BASE_ADDR + 0x28)
683 #define HR_TIMER3_CNT (HR_TIMER_BASE_ADDR + 0x2C)
684 #define HR_TIMER4_CNT (HR_TIMER_BASE_ADDR + 0x30)
685 #define HR_TIMER5_CNT (HR_TIMER_BASE_ADDR + 0x34)
686
687 /* timer csr bits defintion */
688 #define TLS_TIMER_MS_UNIT(n) (1UL<<(0+5*n))
689 #define TLS_TIMER_ONE_TIME(n) (1UL<<(1+5*n))
690 #define TLS_TIMER_EN(n) (1UL<<(2+5*n))
691 #define TLS_TIMER_INT_EN(n) (1UL<<(3+5*n))
692 #define TLS_TIMER_INT_CLR(n) (1UL<<(4+5*n))
693
694 /***************************************************************
695 * WATCH DOG Reg
696 ***************************************************************/
697 #define HR_WDG_BASE_ADDR (HR_APB_BASE_ADDR + 0x1600)
698 #define HR_WDG_LOAD_VALUE (HR_WDG_BASE_ADDR + 0x00)
699 #define HR_WDG_CUR_VALUE (HR_WDG_BASE_ADDR + 0x04)
700 #define HR_WDG_CTRL (HR_WDG_BASE_ADDR + 0x08)
701 #define HR_WDG_INT_CLR (HR_WDG_BASE_ADDR + 0x0C)
702 #define HR_WDG_INT_SRC (HR_WDG_BASE_ADDR + 0x10)
703 #define HR_WDG_INT_MIS (HR_WDG_BASE_ADDR + 0x14)
704 #define HR_WDG_LOCK (HR_WDG_BASE_ADDR + 0x40)
705
707 #define HR_CLK_LCD_GATE_Pos (14)
708
709 /***********************************************************/
713 #define HR_LCD_REG_BASE (HR_APB_BASE_ADDR + 0x1C00) //(0x4001 1C00)
714 #define HR_LCD_CR (HR_LCD_REG_BASE+0x000)
715 #define HR_LCD_FRAME_CNT (HR_LCD_REG_BASE+0x004)
716 #define HR_LCD_COM0_SEG (HR_LCD_REG_BASE+0x008)
717 #define HR_LCD_COM1_SEG (HR_LCD_REG_BASE+0x00C)
718 #define HR_LCD_COM2_SEG (HR_LCD_REG_BASE+0x010)
719 #define HR_LCD_COM3_SEG (HR_LCD_REG_BASE+0x014)
720 #define HR_LCD_COM4_SEG (HR_LCD_REG_BASE+0x018)
721 #define HR_LCD_COM5_SEG (HR_LCD_REG_BASE+0x01C)
722 #define HR_LCD_COM6_SEG (HR_LCD_REG_BASE+0x020)
723 #define HR_LCD_COM7_SEG (HR_LCD_REG_BASE+0x024)
724 #define HR_LCD_COM_EN (HR_LCD_REG_BASE+0x028)
725 #define HR_LCD_SEG_EN (HR_LCD_REG_BASE+0x02C)
726
727 #define LCD_CR_EN_Pos (8)
728 #define LCD_CR_PD_Pos (9)
729
730 #define LCD_VDD_ON (1UL<<9)
731 #define LCD_VDD_OFF (0UL<<9)
732 #define LCD_EN (1UL<<8)
733
734 #define LCD_BIAS_MASK (3UL<<6)
735 #define LCD_BIAS_MASK_Pos (6)
736 #define LCD_BIAS_ONEFOURTH (0UL<<6)
737 #define LCD_BIAS_ONEHALF (1UL<<6)
738 #define LCD_BIAS_ONETHIRD (2UL<<6)
739 #define LCD_BIAS_STATIC (3UL<<6)
740
741 #define LCD_VLCD_MASK (7UL<<3)
742 #define LCD_VLCD_MASK_Pos (3)
743 #define LCD_VLCD_27 (0UL<<3)
744 #define LCD_VLCD_29 (1UL<<3)
745 #define LCD_VLCD_31 (2UL<<3)
746 #define LCD_VLCD_33 (3UL<<3)
747
748 #define LCD_DUTY_MASK (7UL<<0)
749 #define LCD_DUTY_MASK_Pos (0)
750 #define LCD_DUTY_STATIC (0UL<<0)
751 #define LCD_DUTY_ONEHALF (1UL<<0)
752 #define LCD_DUTY_ONETHIRD (2UL<<0)
753 #define LCD_DUTY_ONEFOURTH (3UL<<0)
754 #define LCD_DUTY_ONEFIFTH (4UL<<0)
755 #define LCD_DUTY_ONESIXTH (5UL<<0)
756 #define LCD_DUTY_ONESEVENTH (6UL<<0)
757 #define LCD_DUTY_ONEEIGHTH (7UL<<0)
758
759 /***********************************************************/
762 #define HR_CLK_I2S_GATE_Pos (10)
763
764
765 #define HR_I2S_REG_BASE (HR_APB_BASE_ADDR+0x2000)
766 #define HR_I2S_CTRL (HR_I2S_REG_BASE+0x000)
767 #define HR_I2S_INT_MASK (HR_I2S_REG_BASE+0x004)
768 #define HR_I2S_INT_SRC (HR_I2S_REG_BASE+0x008)
769 #define HR_I2S_STATUS (HR_I2S_REG_BASE+0x00C)
770 #define HR_I2S_TX (HR_I2S_REG_BASE+0x010)
771 #define HR_I2S_RX (HR_I2S_REG_BASE+0x014)
772
773 /*****************************************************************/
774 /* APB2SPI modem spi access register definition(BT) */
775 /*****************************************************************/
776 #define APB2SPI_REG_BASE (HR_APB_BASE_ADDR+ 0x2200)
777 #define APB2SPI_REG_CFG (APB2SPI_REG_BASE+ 0x0000)
778 #define APB2SPI_REG_PS_CR (APB2SPI_REG_BASE+ 0x0004)
779 #define APB2SPI_REG_TX_DATA (APB2SPI_REG_BASE+ 0x0008)
780 #define APB2SPI_REG_RX_DATA (APB2SPI_REG_BASE+ 0x000C)
781
782 /******************************************************************************/
783 /* */
784 /* PWM */
785 /* */
786 /******************************************************************************/
787 #define HR_PWM_REG_BASE (HR_APB_BASE_ADDR+0x1E00)
788 #define HR_PWM_CLKDIV01 (HR_PWM_REG_BASE+0x0000)
789 #define HR_PWM_CLKDIV23 (HR_PWM_REG_BASE+0x0004)
790 #define HR_PWM_CTL (HR_PWM_REG_BASE+0x0008)
791 #define HR_PWM_PERIOD (HR_PWM_REG_BASE+0x000C)
792 #define HR_PWM_PNUM (HR_PWM_REG_BASE+0x0010)
793 #define HR_PWM_CMPDAT (HR_PWM_REG_BASE+0x0014)
794 #define HR_PWM_DTCTL (HR_PWM_REG_BASE+0x0018)
795 #define HR_PWM_INTEN (HR_PWM_REG_BASE+0x001C)
796 #define HR_PWM_INTSTS (HR_PWM_REG_BASE+0x0020)
797 #define HR_PWM_CAPDAT (HR_PWM_REG_BASE+0x0024)
798 #define HR_PWM_BRKCTL (HR_PWM_REG_BASE+0x0028)
799 #define HR_PWM_CH4_REG1 (HR_PWM_REG_BASE+0x002C)
800 #define HR_PWM_CH4_REG2 (HR_PWM_REG_BASE+0x0030)
801 #define HR_PWM_CAP2DAT (HR_PWM_REG_BASE+0x0034)
802 #define HR_PWM_CAP2CTL (HR_PWM_REG_BASE+0x0038)
803
804
805 /******************************************************************************/
806 /* */
807 /* TOUCH SENSOR */
808 /* */
809 /******************************************************************************/
810 #define HR_TC_REG_BASE (HR_APB_BASE_ADDR+0x2400)
811
812 #define HR_TC_CONFIG (HR_TC_REG_BASE+0x0000)
813 #define SCAN_PERID_SHIFT_BIT (26)
814 #define CAPDET_CNT_SHIFT_BIT (20)
815 #define TOUCH_SENSOR_SEL_SHIFT_BIT (4)
816 #define TOUCH_SENSOR_EN_BIT (0)
817
818 #define HR_TC1_TRESHOLD_REG (HR_TC_REG_BASE+0x0004)
819 #define HR_TC1_COUNT_REG (HR_TC_REG_BASE+0x0004)
820
821 #define HR_TC2_TRESHOLD_REG (HR_TC_REG_BASE+0x0008)
822 #define HR_TC2_COUNT_REG (HR_TC_REG_BASE+0x0008)
823
824 #define HR_TC3_TRESHOLD_REG (HR_TC_REG_BASE+0x000C)
825 #define HR_TC3_COUNT_REG (HR_TC_REG_BASE+0x000C)
826
827 #define HR_TC4_TRESHOLD_REG (HR_TC_REG_BASE+0x0010)
828 #define HR_TC4_COUNT_REG (HR_TC_REG_BASE+0x0010)
829
830 #define HR_TC5_TRESHOLD_REG (HR_TC_REG_BASE+0x0014)
831 #define HR_TC5_COUNT_REG (HR_TC_REG_BASE+0x0014)
832
833 #define HR_TC6_TRESHOLD_REG (HR_TC_REG_BASE+0x0018)
834 #define HR_TC6_COUNT_REG (HR_TC_REG_BASE+0x0018)
835
836 #define HR_TC7_TRESHOLD_REG (HR_TC_REG_BASE+0x001C)
837 #define HR_TC7_COUNT_REG (HR_TC_REG_BASE+0x001C)
838
839 #define HR_TC8_TRESHOLD_REG (HR_TC_REG_BASE+0x0020)
840 #define HR_TC8_COUNT_REG (HR_TC_REG_BASE+0x0020)
841
842 #define HR_TC9_TRESHOLD_REG (HR_TC_REG_BASE+0x0024)
843 #define HR_TC9_COUNT_REG (HR_TC_REG_BASE+0x0024)
844
845 #define HR_TC10_TRESHOLD_REG (HR_TC_REG_BASE+0x0028)
846 #define HR_TC10_COUNT_REG (HR_TC_REG_BASE+0x0028)
847
848 #define HR_TC11_TRESHOLD_REG (HR_TC_REG_BASE+0x002C)
849 #define HR_TC11_COUNT_REG (HR_TC_REG_BASE+0x002C)
850
851 #define HR_TC12_TRESHOLD_REG (HR_TC_REG_BASE+0x0030)
852 #define HR_TC12_COUNT_REG (HR_TC_REG_BASE+0x0030)
853
854 #define HR_TC13_TRESHOLD_REG (HR_TC_REG_BASE+0x0034)
855 #define HR_TC13_COUNT_REG (HR_TC_REG_BASE+0x0034)
856
857 #define HR_TC14_TRESHOLD_REG (HR_TC_REG_BASE+0x0038)
858 #define HR_TC14_COUNT_REG (HR_TC_REG_BASE+0x0038)
859
860 #define HR_TC15_TRESHOLD_REG (HR_TC_REG_BASE+0x003C)
861 #define HR_TC15_COUNT_REG (HR_TC_REG_BASE+0x003C)
862
863 #define HR_TC16_TRESHOLD_REG (HR_TC_REG_BASE+0x0040)
864 #define HR_TC16_COUNT_REG (HR_TC_REG_BASE+0x0040)
865
866 #define HR_TC_INT_EN (HR_TC_REG_BASE+0x0044) /*bit 31:16*/
867 #define HR_TC_INT_STATUS (HR_TC_REG_BASE+0x0044) /*bit 15:0*/
868
869
900 static __inline void tls_reg_write32(unsigned int reg, unsigned int val)
901 {
902 *(TLS_REG *)reg = val;
903 }
904
905
915 static __inline unsigned int tls_reg_read32(unsigned int reg)
916 {
917 unsigned int val = *(TLS_REG *)reg;
918 return val;
919 }
920
921
934 static __inline void tls_bitband_write(volatile unsigned int addr, unsigned int bit, unsigned int val)
935 {
936 unsigned int temp;
937
938 temp = (M32(addr) & ~(1 << bit)) | (val << bit);
939
940 *((volatile unsigned int * )addr) = temp;
941 }
942
954 static __inline unsigned int tls_bitband_read(volatile unsigned int addr, unsigned int bit)
955 {
956 unsigned int temp;
957
958 temp = (M32(addr) >> bit) & 0x1;
959
960 return *((volatile unsigned int *)temp);
961 }
962
963
972 #endif /* WM_REGS_H */
973
UART24_IRQn
Definition: wm_regs.h:45
I2S_IRQn
Definition: wm_regs.h:49
DMA_Channel3_IRQn
Definition: wm_regs.h:33
DMA_BRUST_IRQn
Definition: wm_regs.h:35
IRQn
IRQn
Definition: wm_regs.h:23
MAC_IRQn
Definition: wm_regs.h:27
PMU_IRQn
Definition: wm_regs.h:55
SPI_LS_IRQn
Definition: wm_regs.h:38
BT_IRQn
Definition: wm_regs.h:47
FLASH_IRQn
Definition: wm_regs.h:54
SDIO_IRQn
Definition: wm_regs.h:26
CRYPTION_IRQn
Definition: wm_regs.h:53
I2C_IRQn
Definition: wm_regs.h:36
tls_reg_write32
static __inline void tls_reg_write32(unsigned int reg, unsigned int val)
This function is used to write value to register or memory.
Definition: wm_regs.h:900
ADC_IRQn
Definition: wm_regs.h:37
UART1_IRQn
Definition: wm_regs.h:43
GPIOB_IRQn
Definition: wm_regs.h:41
TOUCH_IRQn
Definition: wm_regs.h:44
RF_CFG_IRQn
Definition: wm_regs.h:28
SPI_HS_IRQn
Definition: wm_regs.h:39
UART0_IRQn
Definition: wm_regs.h:42
tls_reg_read32
static __inline unsigned int tls_reg_read32(unsigned int reg)
This function is used to read value from register or memory.
Definition: wm_regs.h:915
DMA_Channel2_IRQn
Definition: wm_regs.h:32
wm_type_def.h
WM type redefine.
DMA_Channel1_IRQn
Definition: wm_regs.h:31
SYS_TICK_IRQn
Definition: wm_regs.h:51
DMA_Channel0_IRQn
Definition: wm_regs.h:30
BLE_IRQn
Definition: wm_regs.h:46
PWM_IRQn
Definition: wm_regs.h:48
tls_bitband_write
static __inline void tls_bitband_write(volatile unsigned int addr, unsigned int bit, unsigned int val)
This function is used to write specified bit through bit-band alias region.
Definition: wm_regs.h:934
RSA_IRQn
Definition: wm_regs.h:52
DMA_Channel4_7_IRQn
Definition: wm_regs.h:34
TIMER_IRQn
Definition: wm_regs.h:56
SEC_IRQn
Definition: wm_regs.h:29
SIDO_HOST_IRQn
Definition: wm_regs.h:50
GPIOA_IRQn
Definition: wm_regs.h:40
WDG_IRQn
Definition: wm_regs.h:57
tls_bitband_read
static __inline unsigned int tls_bitband_read(volatile unsigned int addr, unsigned int bit)
This function is used to read a single bit from address by bit-band alias region. ...
Definition: wm_regs.h:954


W800 SDK APIs: doxy_out/include/driver/wm_rtc.h Source File

  • doxy_out
  • include
  • driver
wm_rtc.h
Go to the documentation of this file.
1
10 #ifndef WM_RTC_H
11 #define WM_RTC_H
12
13 #include <time.h>
14 #include "wm_type_def.h"
15
17 typedef void (*tls_rtc_irq_callback)(void *arg);
18
48 void tls_set_rtc(struct tm *tblock);
49
59 void tls_get_rtc(struct tm *tblock);
60
75 void tls_rtc_isr_register(tls_rtc_irq_callback callback, void *arg);
76
86 void tls_rtc_timer_start(struct tm *tblock);
87
97 void tls_rtc_timer_stop(void);
98
99
108 #endif
109
tls_rtc_isr_register
void tls_rtc_isr_register(tls_rtc_irq_callback callback, void *arg)
This function is used to register pmu rtc interrupt.
tls_rtc_timer_start
void tls_rtc_timer_start(struct tm *tblock)
This function is used to start pmu rtc timer.
tls_get_rtc
void tls_get_rtc(struct tm *tblock)
This function is used to get pmu rtc time.
tls_rtc_timer_stop
void tls_rtc_timer_stop(void)
This function is used to stop pmu rtc timer.
wm_type_def.h
WM type redefine.
tls_set_rtc
void tls_set_rtc(struct tm *tblock)
This function is used to set pmu rtc time.
tls_rtc_irq_callback
void(* tls_rtc_irq_callback)(void *arg)
Definition: wm_rtc.h:17


W800 SDK APIs: doxy_out/include/net/wm_socket2.1.3.h Source File

  • doxy_out
  • include
  • net
wm_socket2.1.3.h
Go to the documentation of this file.
1
10 #ifndef WM_SOCKET2_1_3_H
11 #define WM_SOCKET2_1_3_H
12
13 #include "wm_type_def.h"
14 #include "wm_netif.h"
15 #include "lwip/err.h"
16 #include "lwip/pbuf.h"
17
18
19 //socket state defination
20 #define NETCONN_STATE_NONE 0
21 #define NETCONN_STATE_WAITING 1
22 #define NETCONN_STATE_CONNECTED 2
23 #define NETCONN_STATE_CLOSED 3
24
25 //socket event defination
26 #define NET_EVENT_TCP_JOINED 0
27 #define NET_EVENT_TCP_DISCONNECT 1
28 #define NET_EVENT_TCP_CONNECTED 2
29 #define NET_EVENT_TCP_CONNECT_FAILED 3
30 #define NET_EVENT_UDP_START 4
31 #define NET_EVENT_UDP_START_FAILED 5
32
33 #define TLS_MAX_SOCKET_NUM 4
34 #define TLS_MAX_NETCONN_NUM 20
35
48 typedef void (*socket_err_fn)(u8 skt_num, err_t err);
49
66 typedef err_t (*socket_recv_fn)(u8 skt_num, struct pbuf *p, err_t err);
67
88 typedef err_t (*socket_recv_ip_rpt_fn)(u8 skt_num, u16 datalen, u8 *ipsrc, u16 port, err_t err);
89
102 typedef err_t (*socket_connected_fn)(u8 skt_num, err_t err);
103
113 typedef err_t (*socket_poll_fn)(u8 skt_num);
114
127 typedef err_t (*socket_accept_fn)(u8 skt_num, err_t err);
128
139 typedef void(*socket_state_changed_fn)(u8 skt_num, u8 event, u8 state);
140
141 enum tls_socket_protocol{
142 SOCKET_PROTO_TCP, /* TCP Protocol */
143 SOCKET_PROTO_UDP, /* UDP Protocol */
144 };
145
146 enum tls_socket_cs_mode{
147 SOCKET_CS_MODE_CLIENT, /* Client mode */
148 SOCKET_CS_MODE_SERVER, /* Server mode */
149 };
150
151 struct tls_socket_desc {
152 enum tls_socket_cs_mode cs_mode; /* Server mode or Client mode, Only for tcp protocol is valid */
153 enum tls_socket_protocol protocol; /* TCP Protocol or UDP Protocol */
154 ip_addr_t ip_addr; /* Remote ip address, for tcp client mode is remote server's ip address; for tcp server mode can be any address. */
155 /* for udp is remote server's ip address */
156 u16 port; /* port, for tcp client mode is remote server's port; for tcp server mode is local listen port .
157 for udp is remote server's port */
158 u16 localport; /* local port, for udp and tcp client is local listen port, for tcp server means nothing, tcp server always listen at port */
159 char host_name[32]; /* remote host name, not support for now */
160 u8 host_len; /* the length of host name */
161 u32 timeout; /* poll timeout, not implemented for now */
162 socket_err_fn errf; /* a pointer to socket_err_fn */
163 socket_recv_fn recvf; /* a pointer to socket_recv_fn */
164 socket_connected_fn connf; /* a pointer to socket_connected_fn */
165 socket_poll_fn pollf; /* a pointer to socket_poll_fn */
166 socket_accept_fn acceptf; /* a pointer to socket_accept_fn */
167 socket_state_changed_fn state_changed; /* a pointer to socket_state_changed_fn */
168 socket_recv_ip_rpt_fn recvwithipf; /*recv skt info report*/
169 };
170
179 int tls_socket_create(struct tls_socket_desc * skd);
180
193 int tls_socket_send(u8 skt_num, void *pdata, u16 len);
194
203 int tls_socket_close(u8 skt_num);
204
205 struct tls_skt_status_ext_t {
206 u8 socket;
207 u8 status;
208 enum tls_socket_protocol protocol;
209 u8 host_ipaddr[4];
210 u16 remote_port;
211 u16 local_port;
212 };
213
214 struct tls_skt_status_t {
215 u32 socket_cnt;
216 struct tls_skt_status_ext_t skts_ext[1];
217 };
230 int tls_socket_get_status(u8 skt_num, u8 *buf, u32 bufsize);
231
248 int tls_socket_udp_sendto(u16 localport, u8 *ip_addr, u16 port, void *pdata, u16 len);
249
250 #endif
251
tls_skt_status_t
Definition: wm_socket2.1.3.h:214
socket_recv_fn
err_t(* socket_recv_fn)(u8 skt_num, struct pbuf *p, err_t err)
This Function prototype for socket receive callback functions. Called when data has been received...
Definition: wm_socket2.1.3.h:66
socket_accept_fn
err_t(* socket_accept_fn)(u8 skt_num, err_t err)
This Function prototype for tcp accept callback functions. Called when a new connection can be accept...
Definition: wm_socket2.1.3.h:127
socket_state_changed_fn
void(* socket_state_changed_fn)(u8 skt_num, u8 event, u8 state)
This Function prototype for socket state changed callback functions. Called when socket the sockte&#39;s ...
Definition: wm_socket2.1.3.h:139
tls_socket_close
int tls_socket_close(u8 skt_num)
This function is called by your application code to close the socket, and the related resources would...
socket_connected_fn
err_t(* socket_connected_fn)(u8 skt_num, err_t err)
This Function prototype for tcp connected callback functions. Called when connected to the remote sid...
Definition: wm_socket2.1.3.h:102
tls_skt_status_ext_t
Definition: wm_socket2.1.3.h:205
wm_type_def.h
WM type redefine.
tls_socket_desc
Definition: wm_socket2.1.3.h:151
tls_socket_get_status
int tls_socket_get_status(u8 skt_num, u8 *buf, u32 bufsize)
This function is called by your application code to get the socket status of specified socket num...
tls_socket_create
int tls_socket_create(struct tls_socket_desc *skd)
This function is called by your application code to create a socket.
tls_socket_udp_sendto
int tls_socket_udp_sendto(u16 localport, u8 *ip_addr, u16 port, void *pdata, u16 len)
This function is called by your application code to send data by udp socket.
socket_err_fn
void(* socket_err_fn)(u8 skt_num, err_t err)
This Function prototype for tcp error callback functions. Called when receives a RST or is unexpected...
Definition: wm_socket2.1.3.h:48
tls_socket_send
int tls_socket_send(u8 skt_num, void *pdata, u16 len)
This function is called by your application code to send data by the socket.
socket_recv_ip_rpt_fn
err_t(* socket_recv_ip_rpt_fn)(u8 skt_num, u16 datalen, u8 *ipsrc, u16 port, err_t err)
This Function prototype for socket srce ip callback functions. Called when data has been received...
Definition: wm_socket2.1.3.h:88
wm_netif.h
ETHERNET INIT Interface.
socket_poll_fn
err_t(* socket_poll_fn)(u8 skt_num)
This Function prototype for tcp poll callback functions. Called periodically.
Definition: wm_socket2.1.3.h:113


W800 SDK APIs: doxy_out/include/net/wm_socket.h Source File

  • doxy_out
  • include
  • net
wm_socket.h
Go to the documentation of this file.
1
11 #ifndef WM_SOCKET_H
12 #define WM_SOCKET_H
13 #include "wm_config.h"
14 #include "wm_socket2.1.3.h"
15
16
17 #endif
wm_socket2.1.3.h
socket2.1.3 apis
wm_config.h
w800 chip inferface configure


W800 SDK APIs: doxy_out/include/net/wm_sockets2.1.3.h Source File

  • doxy_out
  • include
  • net
wm_sockets2.1.3.h
Go to the documentation of this file.
1
10 #ifndef WM_SOCKET_API2_1_3_H
11 #define WM_SOCKET_API2_1_3_H
12
13 #include <stdio.h>
14 #include "wm_type_def.h"
15 #include "wm_config.h"
16 #include <time.h>
17
18 #include "lwip/ip_addr.h"
19 #include "lwip/sockets.h"
20 #include "lwip/netdb.h"
21
22 extern void print_ipaddr(ip_addr_t *ip);
23 extern struct netif *wm_ip4_route_src(const ip4_addr_t *dest, const ip4_addr_t *src);
24
25 #endif
26
wm_type_def.h
WM type redefine.
wm_config.h
w800 chip inferface configure


W800 SDK APIs: doxy_out/include/net/wm_sockets.h Source File

  • doxy_out
  • include
  • net
wm_sockets.h
Go to the documentation of this file.
1
10 #ifndef WM_SOCKET_API_H
11 #define WM_SOCKET_API_H
12 #include "wm_config.h"
13 #include "wm_sockets2.1.3.h"
14 #endif
15
wm_sockets2.1.3.h
sockets2.1.3 apis
wm_config.h
w800 chip inferface configure


W800 SDK APIs: doxy_out/include/driver/wm_timer.h Source File

  • doxy_out
  • include
  • driver
wm_timer.h
Go to the documentation of this file.
1
10 #ifndef WM_TIMER_H
11 #define WM_TIMER_H
12
13 #include "wm_type_def.h"
15 #define WM_TIMER_ID_INVALID 0xFF
16
18 typedef void (*tls_timer_irq_callback)(void *arg);
19
21 enum tls_timer_unit{
22 TLS_TIMER_UNIT_US = 0,
23 TLS_TIMER_UNIT_MS
24 };
25
27 struct tls_timer_cfg {
28 enum tls_timer_unit unit;
29 u32 timeout;
30 bool is_repeat;
31 tls_timer_irq_callback callback;
32 void *arg;
33 };
34
69 u8 tls_timer_create(struct tls_timer_cfg *cfg);
70
80 void tls_timer_start(u8 timer_id);
81
91 void tls_timer_stop(u8 timer_id);
92
104 void tls_timer_change(u8 timer_id, u32 newtime);
105
115 u32 tls_timer_read(u8 timer_id);
116
126 void tls_timer_destroy(u8 timer_id);
127
136 #endif /* WM_TIMER_H */
137
tls_timer_cfg::is_repeat
bool is_repeat
Definition: wm_timer.h:30
tls_timer_read
u32 tls_timer_read(u8 timer_id)
This function is used to read a timer&#39;s current value.
tls_timer_stop
void tls_timer_stop(u8 timer_id)
This function is used to stop a timer.
tls_timer_irq_callback
void(* tls_timer_irq_callback)(void *arg)
Definition: wm_timer.h:18
tls_timer_cfg::unit
enum tls_timer_unit unit
Definition: wm_timer.h:28
tls_timer_create
u8 tls_timer_create(struct tls_timer_cfg *cfg)
This function is used to create a timer.
TLS_TIMER_UNIT_US
Definition: wm_timer.h:22
tls_timer_cfg::arg
void * arg
Definition: wm_timer.h:32
tls_timer_change
void tls_timer_change(u8 timer_id, u32 newtime)
This function is used to change a timer wait time.
TLS_TIMER_UNIT_MS
Definition: wm_timer.h:23
wm_type_def.h
WM type redefine.
tls_timer_cfg::timeout
u32 timeout
Definition: wm_timer.h:29
tls_timer_destroy
void tls_timer_destroy(u8 timer_id)
This function is used to delete a timer.
tls_timer_cfg
Definition: wm_timer.h:27
tls_timer_start
void tls_timer_start(u8 timer_id)
This function is used to start a timer.
tls_timer_cfg::callback
tls_timer_irq_callback callback
Definition: wm_timer.h:31
tls_timer_unit
tls_timer_unit
Definition: wm_timer.h:21


W800 SDK APIs: doxy_out/include/driver/wm_touchsensor.h Source File

  • doxy_out
  • include
  • driver
wm_touchsensor.h
Go to the documentation of this file.
1
10 #include "wm_type_def.h"
11
24 int tls_touchsensor_init_config(u32 sensorno, u8 scan_period, u8 window, u32 enable);
25
35 int tls_touchsensor_chan_config(u32 sensorno);
36
48 int tls_touchsensor_scan_config(u8 scanperiod, u8 window, u8 bias);
49
57 int tls_touchsensor_scan_start(void);
58
66 int tls_touchsensor_scan_stop(void);
67
68
78 int tls_touchsensor_deinit(u32 sensorno);
79
80
91 int tls_touchsensor_threshold_config(u32 sensorno, u8 threshold);
92
93
103 int tls_touchsensor_countnum_get(u32 sensorno);
104
114 int tls_touchsensor_irq_enable(u32 sensorno);
115
125 int tls_touchsensor_irq_disable(u32 sensorno);
126
136 void tls_touchsensor_irq_register(void (*callback)(u32 status));
137
147 int tls_touchsensor_irq_status_get(u32 sensorno);
148
149
150
tls_touchsensor_scan_start
int tls_touchsensor_scan_start(void)
This function is used to start touch scan.
tls_touchsensor_irq_enable
int tls_touchsensor_irq_enable(u32 sensorno)
This function is used to enable touch sensor&#39;s irq.
tls_touchsensor_irq_register
void tls_touchsensor_irq_register(void(*callback)(u32 status))
This function is used to register touch sensor&#39;s irq callback.
tls_touchsensor_irq_disable
int tls_touchsensor_irq_disable(u32 sensorno)
This function is used to disable touch sensor&#39;s irq.
tls_touchsensor_deinit
int tls_touchsensor_deinit(u32 sensorno)
This function is used to deinit touch sensor&#39;s selection and disable touch.
tls_touchsensor_scan_stop
int tls_touchsensor_scan_stop(void)
This function is used to stop touch scan.
tls_touchsensor_countnum_get
int tls_touchsensor_countnum_get(u32 sensorno)
This function is used to get touch sensor&#39;s count number.
wm_type_def.h
WM type redefine.
tls_touchsensor_scan_config
int tls_touchsensor_scan_config(u8 scanperiod, u8 window, u8 bias)
This function is used to initialize touch general configuration.
tls_touchsensor_threshold_config
int tls_touchsensor_threshold_config(u32 sensorno, u8 threshold)
This function is used to set threshold per touch sensor.
tls_touchsensor_irq_status_get
int tls_touchsensor_irq_status_get(u32 sensorno)
This function is used to get touch sensor&#39;s irq status.
tls_touchsensor_init_config
int tls_touchsensor_init_config(u32 sensorno, u8 scan_period, u8 window, u32 enable)
This function is used to initialize touch sensor.
tls_touchsensor_chan_config
int tls_touchsensor_chan_config(u32 sensorno)
This function is used to initialize touch scan channel.


W800 SDK APIs: doxy_out/include/wm_type_def.h Source File

  • doxy_out
  • include
wm_type_def.h
Go to the documentation of this file.
1
10 #ifndef __WM_TYPE_DEF_H__
11 #define __WM_TYPE_DEF_H__
12 #include <stdbool.h>
13
14 #ifdef u8
15 #undef u8
16 #endif
17 #ifdef s8
18 #undef s8
19 #endif
20 #ifdef u16
21 #undef u16
22 #endif
23 #ifdef s16
24 #undef s16
25 #endif
26 #ifdef u32
27 #undef u32
28 #endif
29 #ifdef s32
30 #undef s32
31 #endif
32 #ifdef u64
33 #undef u64
34 #endif
35 #ifdef s64
36 #undef s64
37 #endif
38
39 #ifdef u_char
40 #undef u_char
41 #endif
42 typedef unsigned char u_char;
43
44 #ifdef INT8U
45 #undef INT8U
46 #endif
47 typedef unsigned char INT8U;
48
49 #ifdef INT8S
50 #undef INT8S
51 #endif
52 typedef signed char INT8S;
53
54 //typedef unsigned char bool;
55 typedef unsigned char u8;
56 typedef signed char s8;
57 typedef unsigned short u16;
58 typedef signed short s16;
59 typedef unsigned int u32;
60 typedef signed int s32;
61 typedef unsigned long long u64;
62 typedef long long s64;
63
64 #if defined(_NEWLIB_VERSION_H__)
65 #ifdef int32_t
66 #undef int32_t
67 typedef int int32_t;
68 #endif
69
70 #ifdef uint32_t
71 #undef uint32_t
72 typedef unsigned int uint32_t;
73 #endif
74 #endif
75
76 #if defined(__MINILIBC__)
77 typedef int int32_t;
78 typedef unsigned int uint32_t;
79 #endif
80
81 #ifdef int32
82 #undef int32
83 #endif
84 typedef int int32;
85
86 #ifdef uint32
87 #undef uint32
88 #endif
89 typedef unsigned int uint32;
90
91 #ifdef int16
92 #undef int16
93 #endif
94 typedef short int16;
95
96 #ifdef uint16
97 #undef uint16
98 #endif
99 typedef unsigned short uint16;
100
101 #ifdef ULONG
102 #undef ULONG
103 #endif
104 typedef unsigned long ULONG;
105
106 #ifdef u8_t
107 #undef u8_t
108 #endif
109 typedef unsigned char u8_t;
110
111 #ifdef uint8_t
112 #undef uint8_t
113 #endif
114 typedef unsigned char uint8_t;
115
116 #ifdef u16_t
117 #undef u16_t
118 #endif
119 typedef unsigned short u16_t;
120
121 #ifdef uint16_t
122 #undef uint16_t
123 #endif
124 typedef unsigned short uint16_t;
125
126 #ifdef u32_t
127 #undef u32_t
128 #endif
129 typedef unsigned int u32_t;
130
131
132 #ifdef s8_t
133 #undef s8_t
134 #endif
135 typedef signed char s8_t;
136
137 #ifdef s16_t
138 #undef s16_t
139 #endif
140 typedef signed short s16_t;
141
142 #ifdef s32_t
143 #undef s32_t
144 #endif
145 typedef signed int s32_t;
146 #if (GCC_COMPILE==0)
147 #ifdef size_t
148 #undef size_t
149 #endif
150 typedef unsigned int size_t;
151 #endif
152
153 #ifdef err_t
154 #undef err_t
155 #endif
156 typedef signed char err_t;
157
158
159 #ifdef mem_ptr_t
160 #undef mem_ptr_t
161 #endif
162 typedef unsigned int mem_ptr_t;
163
164 #ifdef TRUE
165 #undef TRUE
166 #endif
167 #define TRUE 1
168
169 #ifdef FALSE
170 #undef FALSE
171 #endif
172 #define FALSE 0
173
174 #define true 1
175 #define false 0
176
177 #define WM_SUCCESS 0
178 #define WM_FAILED -1
179
180 #ifndef IGNORE_PARAMETER
181 #define IGNORE_PARAMETER(x) ((x) = (x))
182 #endif
183
184 #endif


W800 SDK APIs: doxy_out/include/driver/wm_uart.h Source File

  • doxy_out
  • include
  • driver
wm_uart.h
Go to the documentation of this file.
1
10 #ifndef WM_UART_H
11 #define WM_UART_H
12 #include "list.h"
13 //#include "wm_regs.h"
14 #include "wm_type_def.h"
15 #include "wm_osal.h"
16
17 #define TLS_UART_RX_BUF_SIZE 4096
18 #define TLS_UART_TX_BUF_SIZE 4096
19 #define WAKEUP_CHARS 256
20
21 #define MBOX_MSG_UART_RX 1
22 #define MBOX_MSG_UART_TX 2
23
24
26 #define UART_BAUDRATE_B600 600
27 #define UART_BAUDRATE_B1200 1200
28 #define UART_BAUDRATE_B1800 1800
29 #define UART_BAUDRATE_B2400 2400
30 #define UART_BAUDRATE_B4800 4800
31 #define UART_BAUDRATE_B9600 9600
32 #define UART_BAUDRATE_B19200 19200
33 #define UART_BAUDRATE_B38400 38400
34 #define UART_BAUDRATE_B57600 57600
35 #define UART_BAUDRATE_B115200 115200
36 #define UART_BAUDRATE_B230400 230400
37 #define UART_BAUDRATE_B460800 460800
38 #define UART_BAUDRATE_B921600 921600
39 #define UART_BAUDRATE_B1000000 1000000
40 #define UART_BAUDRATE_B1250000 1250000
41 #define UART_BAUDRATE_B1500000 1500000
42 #define UART_BAUDRATE_B2000000 2000000
43
44 #define UART_RX_INT_FLAG (UIS_RX_FIFO | UIS_RX_FIFO_TIMEOUT | UIS_BREAK |\
45 UIS_OVERRUN | UIS_FRM_ERR | UIS_PARITY_ERR)
46 #define UART_RX_ERR_INT_FLAG (UIS_BREAK | UIS_FRM_ERR | \
47 UIS_PARITY_ERR)
48
49 #define UART_TX_INT_FLAG (UIS_TX_FIFO | UIS_TX_FIFO_EMPTY)
50
52 #define CIRC_CNT(head,tail,size) (((head) - (tail)) & ((size)-1))
53
57 #define CIRC_SPACE(head,tail,size) CIRC_CNT((tail),((head)+1),(size))
58
62 #define CIRC_CNT_TO_END(head,tail,size) \
63 ({int end = (size) - (tail); \
64 int n = ((head) + end) & ((size)-1); \
65 n < end ? n : end;})
66
68 #define CIRC_SPACE_TO_END(head,tail,size) \
69 ({int end = (size) - 1 - (head); \
70 int n = (end + (tail)) & ((size)-1); \
71 n <= end ? n : end+1;})
72
73 #define CIRC_SPACE_TO_END_FULL(head,tail,size) \
74 ({int end = (size) - 1 - (head); \
75 int n = (end + (tail)) & ((size)-1); \
76 n < end ? n : end+1;})
77
78 #define uart_circ_empty(circ) ((circ)->head == (circ)->tail)
79 #define uart_circ_chars_pending(circ) \
80 (CIRC_CNT((circ)->head, (circ)->tail, TLS_UART_TX_BUF_SIZE))
81
85 struct tls_uart_baud_rate
86 {
87 u32 baud_rate;
88 u16 ubdiv;
89 u16 ubdiv_frac;
90 };
91
92
96 enum
97 {
98 TLS_UART_0 = 0,
99 TLS_UART_1 = 1,
100 TLS_UART_2 = 2,
101 TLS_UART_3 = 3,
102 TLS_UART_4 = 4,
103 TLS_UART_5 = 5,
104 TLS_UART_MAX = 6,
105 };
106
107
111 typedef enum TLS_UART_PMODE
112 {
113 TLS_UART_PMODE_DISABLED = 0,
114 TLS_UART_PMODE_ODD = 1,
115 TLS_UART_PMODE_EVEN = 2,
116 TLS_UART_PMODE_MARK = 3,
117 TLS_UART_PMODE_SPACE = 4,
118 } TLS_UART_PMODE_T;
119
123 typedef enum TLS_UART_CHSIZE
124 {
125 TLS_UART_CHSIZE_5BIT = (0x00 << 0),
126 TLS_UART_CHSIZE_6BIT = (0x01 << 0),
127 TLS_UART_CHSIZE_7BIT = (0x02 << 0),
128 TLS_UART_CHSIZE_8BIT = (0x03 << 0),
129 } TLS_UART_CHSIZE_T;
130
134 typedef enum TLS_UART_FLOW_CTRL_MODE
135 {
136 TLS_UART_FLOW_CTRL_NONE,
137 TLS_UART_FLOW_CTRL_HARDWARE,
138 } TLS_UART_FLOW_CTRL_MODE_T;
139
143 typedef enum TLS_UART_RX_FLOW_CTRL_FLAG
144 {
145 TLS_UART_RX_DISABLE,
146 TLS_UART_RX_ENABLE,
147 } TLS_UART_RX_FLOW_CTRL_FLAG_T;
148
152 typedef enum TLS_UART_STOPBITS
153 {
154 TLS_UART_ONE_STOPBITS,
155 TLS_UART_TWO_STOPBITS,
156 } TLS_UART_STOPBITS_T;
157
158
162 typedef enum TLS_UART_STATUS
163 {
164 TLS_UART_STATUS_OK,
165 TLS_UART_STATUS_ERROR,
166 } TLS_UART_STATUS_T;
167
168
172 typedef enum TLS_UART_MODE
173 {
174 TLS_UART_MODE_POLL,
175 TLS_UART_MODE_INT,
176 } TLS_UART_MODE_T;
177
181 struct tls_uart_icount
182 {
183 u32 cts;
184 u32 dsr;
185 u32 rng;
186 u32 dcd;
187 u32 rx;
188 u32 tx;
189 u32 frame;
190 u32 overrun;
191 u32 parity;
192 u32 brk;
193 u32 buf_overrun;
194 };
195
196
197
201 typedef struct tls_uart_options
202 {
203 u32 baudrate;
205 TLS_UART_CHSIZE_T charlength;
207 TLS_UART_PMODE_T paritytype;
209 TLS_UART_FLOW_CTRL_MODE_T flow_ctrl;
211 TLS_UART_STOPBITS_T stopbits;
213 } tls_uart_options_t;
214
215
219 typedef struct tls_uart_circ_buf
220 {
221 volatile u8 *buf;
222 volatile u32 head;
223 volatile u32 tail;
224 } tls_uart_circ_buf_t;
225
226 #if TLS_CONFIG_CMD_NET_USE_LIST_FTR
227
230 typedef struct tls_uart_net_buf
231 {
232 struct dl_list list;
233 char *buf;
234 void *pbuf;
235 u16 buflen;
236 u16 offset;
237 } tls_uart_net_buf_t;
238
239 typedef struct tls_uart_net_msg
240 {
241 struct dl_list tx_msg_pending_list;
242 } tls_uart_net_msg_t;
243 #endif
244
245
249 typedef struct TLS_UART_REGS
250 {
251 u32 UR_LC;
252 u32 UR_FC;
253 u32 UR_DMAC;
254 u32 UR_FIFOC;
255 u32 UR_BD;
256 u32 UR_INTM;
257 u32 UR_INTS;
258 u32 UR_FIFOS;
259 u32 UR_TXW;
260 u32 UR_RES0;
261 u32 UR_RES1;
262 u32 UR_RES2;
263 u32 UR_RXW;
264 } TLS_UART_REGS_T;
265
266
270 typedef struct tls_uart_port
271 {
272 u32 uart_no;
274 u32 uart_irq_no;
276 u32 plus_char_cnt;
277
278 TLS_UART_MODE_T uart_mode;
280 struct tls_uart_options opts;
282 int fcStatus;
284 enum TLS_UART_RX_FLOW_CTRL_FLAG rxstatus;
285
286 u32 tx_fifofull;
288 TLS_UART_REGS_T volatile *regs;
290 struct tls_uart_icount icount;
292 struct tls_uart_circ_buf recv;
294 // struct tls_uart_circ_buf xmit;
295
296 struct dl_list tx_msg_pending_list;
297
298 struct dl_list tx_msg_to_be_freed_list;
299
300 u8 hw_stopped;
301
302 tls_os_sem_t *tx_sem;
303
304 char *buf_ptr;
305
306 u16 buf_len;
307
308 s16(*rx_callback) (u16 len, void* priv_data);
309
310 s16(*tx_callback) (struct tls_uart_port * port);
311 s16(*tx_sent_callback) (struct tls_uart_port * port);
312
313 bool tx_dma_on;
314 bool rx_dma_on;
315
316 void *priv_data;
317 } tls_uart_port_t;
318
322 typedef struct tls_uart_tx_msg
323 {
324 struct dl_list list;
325 char *buf;
326 u16 buflen;
327 u16 offset;
328 void (*finish_callback) (void *arg);
329 void *callback_arg;
330 } tls_uart_tx_msg_t;
331
366 int tls_uart_port_init(u16 uart_no, tls_uart_options_t * opts, u8 modeChoose);
367
368
379 void tls_uart_rx_callback_register(u16 uart_no, s16(*rx_callback) (u16 len, void* user_data), void* user_data);
380
381 void tls_uart_rx_byte_callback_flag(u16 uart_no, u8 flag);
382
391 void tls_uart_tx_callback_register(u16 uart_no, s16(*tx_callback) (struct tls_uart_port *port));
392
393
405 int tls_uart_read(u16 uart_no, u8 * buf, u16 readsize);
406
418 int tls_uart_try_read(u16 uart_no, int32_t read_size);
419
420
433 int tls_uart_write(u16 uart_no, char *buf, u16 writesize);
434
435
448 int tls_uart_dma_write(char *buf, u16 writesize, void (*cmpl_callback) (void *p), u16 uart_no);
449
450
462 int tls_uart_set_parity(u16 uart_no, TLS_UART_PMODE_T paritytype);
463
464
476 int tls_uart_set_baud_rate(u16 uart_no, u32 baudrate);
477
489 int tls_uart_set_stop_bits(u16 uart_no, TLS_UART_STOPBITS_T stopbits);
490
498 void tls_uart_push(int uart_no, u8* data, int length);
499
500
514 int tls_uart_write_async(u16 uart_no, char *buf, u16 writesize);
515
525 void tls_uart_tx_sent_callback_register(u16 uart_no, s16(*tx_callback) (struct tls_uart_port *port));
526
527
528
529 #endif /* WM_UART_H */
TLS_UART_PMODE_MARK
Definition: wm_uart.h:116
TLS_UART_REGS::UR_TXW
u32 UR_TXW
Definition: wm_uart.h:259
tls_uart_icount
Definition: wm_uart.h:181
tls_uart_port
Definition: wm_uart.h:270
tls_uart_baud_rate
Definition: wm_uart.h:85
TLS_UART_REGS::UR_INTM
u32 UR_INTM
Definition: wm_uart.h:256
tls_uart_port::uart_irq_no
u32 uart_irq_no
Definition: wm_uart.h:274
tls_uart_port::uart_no
u32 uart_no
Definition: wm_uart.h:272
wm_osal.h
WM OS adapter layer.
TLS_UART_REGS::UR_LC
u32 UR_LC
Definition: wm_uart.h:251
tls_uart_options
Definition: wm_uart.h:201
tls_uart_set_stop_bits
int tls_uart_set_stop_bits(u16 uart_no, TLS_UART_STOPBITS_T stopbits)
This function is used to set uart stop bits.
tls_uart_port::opts
struct tls_uart_options opts
Definition: wm_uart.h:280
tls_uart_options::charlength
TLS_UART_CHSIZE_T charlength
Definition: wm_uart.h:205
tls_uart_port::tx_fifofull
u32 tx_fifofull
Definition: wm_uart.h:286
TLS_UART_REGS::UR_RXW
u32 UR_RXW
Definition: wm_uart.h:263
tls_uart_dma_write
int tls_uart_dma_write(char *buf, u16 writesize, void(*cmpl_callback)(void *p), u16 uart_no)
This function is used to transfer data with DMA.
tls_uart_read
int tls_uart_read(u16 uart_no, u8 *buf, u16 readsize)
This function is used to copy circular buffer data to user buffer.
TLS_UART_MODE_POLL
Definition: wm_uart.h:174
TLS_UART_REGS
Definition: wm_uart.h:249
tls_uart_tx_msg
Definition: wm_uart.h:322
tls_uart_try_read
int tls_uart_try_read(u16 uart_no, int32_t read_size)
This function is used to check the available data in the cache buffer.
TLS_UART_PMODE
TLS_UART_PMODE
Definition: wm_uart.h:111
TLS_UART_CHSIZE
TLS_UART_CHSIZE
Definition: wm_uart.h:123
tls_uart_port::regs
TLS_UART_REGS_T volatile * regs
Definition: wm_uart.h:288
TLS_UART_REGS::UR_DMAC
u32 UR_DMAC
Definition: wm_uart.h:253
tls_uart_port_init
int tls_uart_port_init(u16 uart_no, tls_uart_options_t *opts, u8 modeChoose)
This function is used to initial uart port.
TLS_UART_PMODE_ODD
Definition: wm_uart.h:114
tls_uart_options::stopbits
TLS_UART_STOPBITS_T stopbits
Definition: wm_uart.h:211
tls_uart_port::recv
struct tls_uart_circ_buf recv
Definition: wm_uart.h:292
TLS_UART_REGS::UR_FIFOS
u32 UR_FIFOS
Definition: wm_uart.h:258
TLS_UART_MODE
TLS_UART_MODE
Definition: wm_uart.h:172
tls_uart_tx_sent_callback_register
void tls_uart_tx_sent_callback_register(u16 uart_no, s16(*tx_callback)(struct tls_uart_port *port))
This function is used to register uart tx sent callback function.
tls_uart_port::fcStatus
int fcStatus
Definition: wm_uart.h:282
tls_uart_circ_buf
Definition: wm_uart.h:219
TLS_UART_REGS::UR_FIFOC
u32 UR_FIFOC
Definition: wm_uart.h:254
dl_list
Definition: list.h:22
TLS_UART_PMODE_EVEN
Definition: wm_uart.h:115
tls_uart_tx_callback_register
void tls_uart_tx_callback_register(u16 uart_no, s16(*tx_callback)(struct tls_uart_port *port))
This function is used to register uart tx interrupt.
tls_uart_options::baudrate
u32 baudrate
Definition: wm_uart.h:203
tls_uart_rx_callback_register
void tls_uart_rx_callback_register(u16 uart_no, s16(*rx_callback)(u16 len, void *user_data), void *user_data)
This function is used to register uart rx interrupt.
tls_uart_set_baud_rate
int tls_uart_set_baud_rate(u16 uart_no, u32 baudrate)
This function is used to set uart baudrate.
wm_type_def.h
WM type redefine.
tls_uart_options::paritytype
TLS_UART_PMODE_T paritytype
Definition: wm_uart.h:207
TLS_UART_CHSIZE_8BIT
Definition: wm_uart.h:128
tls_uart_port::uart_mode
TLS_UART_MODE_T uart_mode
Definition: wm_uart.h:278
tls_os_sem_t
void tls_os_sem_t
Definition: wm_osal.h:53
tls_uart_write_async
int tls_uart_write_async(u16 uart_no, char *buf, u16 writesize)
This function is used to transfer data asynchronously.
tls_uart_port::icount
struct tls_uart_icount icount
Definition: wm_uart.h:290
TLS_UART_CHSIZE_6BIT
Definition: wm_uart.h:126
TLS_UART_PMODE_SPACE
Definition: wm_uart.h:117
tls_uart_options::flow_ctrl
TLS_UART_FLOW_CTRL_MODE_T flow_ctrl
Definition: wm_uart.h:209
TLS_UART_CHSIZE_7BIT
Definition: wm_uart.h:127
TLS_UART_REGS::UR_FC
u32 UR_FC
Definition: wm_uart.h:252
TLS_UART_PMODE_DISABLED
Definition: wm_uart.h:113
TLS_UART_CHSIZE_5BIT
Definition: wm_uart.h:125
tls_uart_set_parity
int tls_uart_set_parity(u16 uart_no, TLS_UART_PMODE_T paritytype)
This function is used to set uart parity.
TLS_UART_REGS::UR_BD
u32 UR_BD
Definition: wm_uart.h:255
tls_uart_write
int tls_uart_write(u16 uart_no, char *buf, u16 writesize)
This function is used to transfer data synchronously.
TLS_UART_MODE_INT
Definition: wm_uart.h:175
TLS_UART_REGS::UR_INTS
u32 UR_INTS
Definition: wm_uart.h:257


W800 SDK APIs: doxy_out/include/driver/wm_watchdog.h Source File

  • doxy_out
  • include
  • driver
wm_watchdog.h
Go to the documentation of this file.
1
10 #ifndef WM_WATCHDOG_H
11 #define WM_WATCHDOG_H
12
42 void tls_watchdog_clr(void);
43
53 void tls_watchdog_init(u32 usec);
54
64 void tls_watchdog_deinit(void);
65
75 void tls_sys_reset(void);
76
86 void tls_sys_set_reboot_reason(u32 reason);
87
97 int tls_sys_get_reboot_reason(void);
98
99
108 #endif /* WM_WATCHDOG_H */
109
tls_watchdog_clr
void tls_watchdog_clr(void)
This function is used to feed the dog.
tls_watchdog_deinit
void tls_watchdog_deinit(void)
This function is used to deinit watchdog.
tls_sys_set_reboot_reason
void tls_sys_set_reboot_reason(u32 reason)
This function is used to set reboot reason.
tls_sys_get_reboot_reason
int tls_sys_get_reboot_reason(void)
This function is used to get reboot reason.
tls_watchdog_init
void tls_watchdog_init(u32 usec)
This function is used to init and start the watchdog.
tls_sys_reset
void tls_sys_reset(void)
This function is used to reset the system.


W800 SDK APIs: doxy_out/include/app/wm_webserver.h Source File

  • doxy_out
  • include
  • app
wm_webserver.h
Go to the documentation of this file.
1
11 #ifndef __WEBSERVER_H__
12 #define __WEBSERVER_H__
13
43 void tls_webserver_init(void);
44
54 void tls_webserver_deinit(void);
55
64 #endif /*__WEBSERVER_H__*/
65
tls_webserver_init
void tls_webserver_init(void)
This function is used to start WEB SERVER service.
tls_webserver_deinit
void tls_webserver_deinit(void)
This function is used to deinit WEB SERVER service.


W800 SDK APIs: doxy_out/include/wifi/wm_wifi.h Source File

  • doxy_out
  • include
  • wifi
wm_wifi.h
Go to the documentation of this file.
1
10 #ifndef TLS_WIFI_FUNC_H
11 #define TLS_WIFI_FUNC_H
12
13 /* Return Error definition*/
15 #define WM_WIFI_ERR_SSID -1
16
17 #define WM_WIFI_ERR_KEY -2
18
19 #define WM_WIFI_WPS_BUSY -3
20
21 #define WM_WIFI_SCANNING_BUSY -4
22
23 #define WM_WIFI_STA_BUSY -5
24
25 /* error number definition */
27 #define WM_WIFI_ENOERR 0
28
29 #define WM_WIFI_ENOAP 1
30
31 #define WM_WIFI_EKEY 2
32
33 #define WM_WIFI_ELSI 3
34
35
36 #ifndef ETH_ALEN
37
38 #define ETH_ALEN 6
39 #endif
40
41 /* bss type definition*/
42 #ifndef IEEE80211_MODE_INFRA
43
44 #define IEEE80211_MODE_INFRA 1
45
46 #define IEEE80211_MODE_IBSS 2
47
48 #define IEEE80211_MODE_AP 4
49 #endif
50
52 #define IEEE80211_ENCRYT_NONE 0
53
54 #define IEEE80211_ENCRYT_WEP40 1
55
56 #define IEEE80211_ENCRYT_WEP104 2
57
58 #define IEEE80211_ENCRYT_TKIP_WPA 3
59
60 #define IEEE80211_ENCRYT_CCMP_WPA 4
61
62 #define IEEE80211_ENCRYT_TKIP_WPA2 5
63
64 #define IEEE80211_ENCRYT_CCMP_WPA2 6
65
66 #define IEEE80211_ENCRYT_AUTO_WPA 7
67
68 #define IEEE80211_ENCRYT_AUTO_WPA2 8
69
70 #ifdef TLS_CONFIG_WPS
71
72 #define WPS_PIN_LEN 8
73 #endif
74
76 #define WIFI_AUTO_CNT_FLAG_SET 1
77
78 #define WIFI_AUTO_CNT_FLAG_GET 0
79
81 #define WIFI_AUTO_CNT_OFF 0x0
82
83 #define WIFI_AUTO_CNT_ON 0x1
84
85 #define WIFI_AUTO_CNT_TMP_OFF 0x3
86
88 #define WIFI_JOIN_SUCCESS 0x1
89
90 #define WIFI_JOIN_FAILED 0x2
91
92 #define WIFI_DISCONNECTED 0x3
93
94 #define WIFI_SOFTAP_SUCCESS 0x4
95
96 #define WIFI_SOFTAP_FAILED 0x5
97
98 #define WIFI_SOFTAP_CLOSED 0x6
99
100
101 enum tls_wifi_auth_mode {
102 WM_WIFI_AUTH_MODE_OPEN = 0,
103 WM_WIFI_AUTH_MODE_WEP_AUTO = 3,
104 WM_WIFI_AUTH_MODE_WPA_PSK_TKIP = 4,
105 WM_WIFI_AUTH_MODE_WPA_PSK_CCMP = 8,
106 WM_WIFI_AUTH_MODE_WPA_PSK_AUTO = (WM_WIFI_AUTH_MODE_WPA_PSK_TKIP | WM_WIFI_AUTH_MODE_WPA_PSK_CCMP),
107 WM_WIFI_AUTH_MODE_WPA2_PSK_TKIP = 16,
108 WM_WIFI_AUTH_MODE_WPA2_PSK_CCMP = 32,
109 WM_WIFI_AUTH_MODE_WPA2_PSK_AUTO = (WM_WIFI_AUTH_MODE_WPA2_PSK_TKIP | WM_WIFI_AUTH_MODE_WPA2_PSK_CCMP),
110 WM_WIFI_AUTH_MODE_WPA_WPA2_PSK_TKIP = (WM_WIFI_AUTH_MODE_WPA_PSK_TKIP | WM_WIFI_AUTH_MODE_WPA2_PSK_TKIP),
111 WM_WIFI_AUTH_MODE_WPA_WPA2_PSK_CCMP = (WM_WIFI_AUTH_MODE_WPA_PSK_CCMP | WM_WIFI_AUTH_MODE_WPA2_PSK_CCMP),
112 WM_WIFI_AUTH_MODE_WPA_WPA2_PSK_AUTO = (WM_WIFI_AUTH_MODE_WPA_PSK_AUTO | WM_WIFI_AUTH_MODE_WPA2_PSK_AUTO),
113 WM_WIFI_AUTH_MODE_UNKNOWN = 128
114 };
115
117 enum tls_wifi_encrypt_mode {
118 WM_WIFI_ECN_MODE_OPEN = 0,
119 WM_WIFI_ECN_MODE_WEP = 1,
120 WM_WIFI_ECN_MODE_WPA_PSK = 2,
121 WM_WIFI_ECN_MODE_WPA2_PSK = 3,
122 WM_WIFI_ECN_MODE_WPA_WPA2_PSK = 4,
123 WM_WIFI_ECN_MODE_UNKNOWN = 5,
124 };
125
127 enum tls_wifi_cipher_mode{
128 WM_WIFI_CIPHER_NONE = 0,
129 WM_WIFI_CIPHER_WEP40 = 1,
130 WM_WIFI_CIPHER_WEP104 = 2,
131 WM_WIFI_CIPHER_TKIP = 3,
132 WM_WIFI_CIPHER_CCMP = 4,
133 WM_WIFI_CIPHER_TKIP_AND_CCMP = 5,
134 WM_WIFI_CIPHER_AES_CMAC_128 = 6,
135 };
136
137
139 enum tls_wifi_states {
140 WM_WIFI_DISCONNECTED,
141 WM_WIFI_SCANNING,
142 WM_WIFI_JOINING,
143 WM_WIFI_JOINED
144 };
145
147 enum tls_wifi_mgmt_type {
148 WM_WIFI_MGMT_TYPE_ASSOC_REQ = 0x0000,
149 WM_WIFI_MGMT_TYPE_ASSOC_RESP = 0x0010,
150 WM_WIFI_MGMT_TYPE_REASSOC_REQ = 0x0020,
151 WM_WIFI_MGMT_TYPE_REASSOC_RESP = 0x0030,
152 WM_WIFI_MGMT_TYPE_PROBE_REQ = 0x0040,
153 WM_WIFI_MGMT_TYPE_PROBE_RESP = 0x0050,
154 WM_WIFI_MGMT_TYPE_BEACON = 0x0080,
155 WM_WIFI_MGMT_TYPE_ATIM = 0x0090,
156 WM_WIFI_MGMT_TYPE_DISASSOC = 0x00A0,
157 WM_WIFI_MGMT_TYPE_AUTH = 0x00B0,
158 WM_WIFI_MGMT_TYPE_DEAUTH = 0x00C0,
159 WM_WIFI_MGMT_TYPE_ACTION = 0x00D0
160 };
161
163 enum tls_wifi_tx_rate {
164 WM_WIFI_TX_RATEIDX_1M = 0,
165 WM_WIFI_TX_RATEIDX_2M,
166 WM_WIFI_TX_RATEIDX_5_5M,
167 WM_WIFI_TX_RATEIDX_11M,
168 WM_WIFI_TX_RATEIDX_6M,
169 WM_WIFI_TX_RATEIDX_9M,
170 WM_WIFI_TX_RATEIDX_12M,
171 WM_WIFI_TX_RATEIDX_18M,
172 WM_WIFI_TX_RATEIDX_24M,
173 WM_WIFI_TX_RATEIDX_36M,
174 WM_WIFI_TX_RATEIDX_48M,
175 WM_WIFI_TX_RATEIDX_54M,
176 WM_WIFI_TX_RATEIDX_MCS0,
177 WM_WIFI_TX_RATEIDX_MCS1,
178 WM_WIFI_TX_RATEIDX_MCS2,
179 WM_WIFI_TX_RATEIDX_MCS3,
180 WM_WIFI_TX_RATEIDX_MCS4,
181 WM_WIFI_TX_RATEIDX_MCS5,
182 WM_WIFI_TX_RATEIDX_MCS6,
183 WM_WIFI_TX_RATEIDX_MCS7,
184 WM_WIFI_TX_RATEIDX_MCS8,
185 WM_WIFI_TX_RATEIDX_MCS9,
186 WM_WIFI_TX_RATEIDX_MCS10,
187 WM_WIFI_TX_RATEIDX_MCS11,
188 WM_WIFI_TX_RATEIDX_MCS12,
189 WM_WIFI_TX_RATEIDX_MCS13,
190 WM_WIFI_TX_RATEIDX_MCS14,
191 WM_WIFI_TX_RATEIDX_MCS15,
192 WM_WIFI_TX_RATEIDX_MCS32
193 };
194
195 enum tls_wifi_oneshot_result_type {
196 WM_WIFI_ONESHOT_TYPE_SSIDPWD,
197 WM_WIFI_ONESHOT_TYPE_CUSTOMDATA
198 };
199
200 enum tls_wifi_client_event_type {
201 WM_WIFI_CLIENT_EVENT_ONLINE,
202 WM_WIFI_CLIENT_EVENT_OFFLINE
203 };
204
205 enum tls_wifi_op_mode{
206 STATION_MODE = 1,
207 SOFTAP_MODE,
208 STATIONAP_MODE
209 };
210
212 struct tls_curr_bss_t{
213 u8 bssid[ETH_ALEN];
214 u8 ssid[32];
215 u8 ssid_len;
216 u8 channel;
217 u8 type;
220 u8 encryptype;
225 u8 rssi;
226 };
227
229 struct tls_key_info_t{
230 u8 format;
231 u8 index;
232 u8 key_len;
233 u8 key[64];
234 };
235
237 struct tls_softap_info_t{
238 u8 ssid[33];
239 u8 encrypt;
243 u8 channel;
244 struct tls_key_info_t keyinfo;
245 };
246
248 struct tls_ip_info_t{
249 u8 ip_addr[4];
250 u8 netmask[4];
251 u8 dnsname[32];
252 };
253
255 struct tls_ibss_info_t{
256 u8 ssid[33];
257 u8 encrypt;
262 u8 channel;
263 struct tls_key_info_t keyinfo;
264 };
265
267 struct tls_ibssip_info_t{
268 u8 ip[4];
269 u8 netmask[4];
270 u8 gateway[4];
271 u8 dns1[4];
272 u8 dns2[4];
273 };
274
276 struct tls_bss_info_t {
277 u8 bssid[ETH_ALEN];
278 u8 mode;
279 u8 channel;
280 u8 privacy;
281 u8 ssid_len;
282 u8 rssi;
283 u8 ssid[32];
284 u32 max_data_rate;
285 bool wps_support;
286 };
287
289 struct tls_scan_bss_t {
290 u32 count;
291 u32 length;
292 struct tls_bss_info_t bss[1];
293 };
294
296 struct tls_bss_info_format2_t {
297 u8 ecn;
298 u8 rssi;
299 u8 ssid[32];
300 u8 ssid_len;
301 u8 bssid[ETH_ALEN];
302 u8 channel;
303 s16 freq_offset;
304 s16 freqcal_val;
305 s8 pairwise_cipher;
306 s8 group_cipher;
307 u8 bgn;
308 bool wps_support;
309 };
310
312 struct tls_scan_bss_format2_t {
313 u32 count;
314 u32 length;
315 struct tls_bss_info_format2_t bss[1];
316 };
317
319 struct tls_sta_info_t {
320 u8 mac_addr[ETH_ALEN];
321 };
322
324 struct tls_wifi_ext_t {
325 u8 rssi;
326 u8 rx_rate;
327 };
328
330 struct tls_wifi_hdr_mac_t {
331 u8 da_addr[ETH_ALEN];
332 u8 sa_addr[ETH_ALEN];
333 u8 bssid[ETH_ALEN];
334 };
335
337 struct tls_wifi_tx_rate_t {
338 enum tls_wifi_tx_rate tx_rate;
339 u8 tx_gain;
342 u8 retry_times;
343 };
344
346 struct tls_wifi_scan_param_t{
347 u16 scan_type;
348 u16 scan_times;
349 u16 scan_chanlist;
350 u16 scan_chinterval;
351 };
352
354 typedef void (*tls_wifi_data_recv_callback)(u8* data, u32 data_len);
355
357 typedef void (*tls_wifi_psm_prechipsleep_callback)(void);
358
360 typedef void (*tls_wifi_psm_chipsleep_callback)(u32 sleeptime);
361
363 typedef void (*tls_wifi_psm_postchipsleep_callback)(void);
364
365
367 typedef int (*net_rx_data_cb)(const u8 *bssid, u8 *buf, u32 buf_len);
368
370 typedef void (*tls_wifi_data_ext_recv_callback)(u8* data, u32 data_len, struct tls_wifi_ext_t *ext);
371
391 void tls_wifi_set_listen_mode(u8 enable);
392
403 u8 tls_wifi_get_listen_mode(void);
404
416 u8 tls_filter_mcast_mac(u8 *mac, u8 receive);
417
430 void tls_wifi_set_bcast_mac_filter(u8 *mac, u8 receive, u8 clear);
431
441 void tls_wifi_restore_bcast_mac_filter(void);
442
443
453 void tls_wifi_data_recv_cb_register(tls_wifi_data_recv_callback callback);
454
465 void tls_wifi_data_ext_recv_cb_register(tls_wifi_data_ext_recv_callback callback);
466
467
478 void tls_wifi_mgmt_ext_recv_cb_register(tls_wifi_data_ext_recv_callback callback);
479
492 void tls_wifi_psm_chipsleep_cb_register(tls_wifi_psm_chipsleep_callback sleepcallback,
493 tls_wifi_psm_prechipsleep_callback precallback,
494 tls_wifi_psm_postchipsleep_callback postcallback);
495
505 void tls_wifi_set_psm_chipsleep_flag(u32 flag);
506
516 u32 tls_wifi_get_psm_chipsleep_flag(void);
517
518
533 int tls_wifi_set_oneshot_flag(u8 flag);
534
548 int tls_wifi_get_oneshot_flag(void);
549
551 typedef void (*tls_wifi_oneshot_result_callback)(enum tls_wifi_oneshot_result_type type);
552
563 void tls_wifi_oneshot_result_cb_register(tls_wifi_oneshot_result_callback callback);
564
575 void tls_wifi_get_oneshot_ssidpwd(u8 *ssid, u8 *pwd);
576
586 void tls_wifi_get_oneshot_customdata(u8 *data);
587
597 void tls_wifi_change_chanel(u32 chanid);
598
611 int tls_wifi_scan(void);
612
625 int tls_wifi_passive_scan(void);
626
627
643 int tls_wifi_scan_by_param(struct tls_wifi_scan_param_t *scan_param);
644
645
659 void tls_wifi_scan_result_cb_register(void (*callback)(void));
660
678 int tls_wifi_get_scan_rslt(u8* buf, u32 buffer_size);
679
680
681 /***************************************************************************
682 * Function: tls_wifi_get_scan_rslt_format2
683 *
684 * Description: get result of last scan for format2 result
685 *
686 * Input: buffer: address to store returned BSS info
687 * buffer_size: the length of the buffer
688 * Output: BSS info got by last scan
689 *
690 * Return: WM_SUCCESS: return ok;
691 * WM_FAILED: failed to get result;
692 * Note: user need to memalloc a buffer in advance. size for one item of scan result is @ref struct tls_bss_info_format2_t
693 * the buffer size depends how many items user wants.
694 * Date : 2022-6-07
695 ****************************************************************************/
696 int tls_wifi_get_scan_rslt_format2(u8* buf, u32 buffer_size);
697
698
712 int tls_wifi_softap_create(struct tls_softap_info_t* apinfo, struct tls_ip_info_t* ipinfo);
713
714
724 void tls_wifi_softap_destroy(void);
725
735 enum tls_wifi_states tls_wifi_softap_get_state(void);
736
738 typedef void (*tls_wifi_client_event_callback)(u8 *mac, enum tls_wifi_client_event_type event);
739
749 void tls_wifi_softap_client_event_register(tls_wifi_client_event_callback callback);
750
764 void tls_wifi_get_authed_sta_info(u32 *sta_num, u8 *buf, u32 buf_size);
765
779 int tls_wifi_ibss_create(struct tls_ibss_info_t *ibssinfo, struct tls_ibssip_info_t *ipinfo);
780
792 void tls_wifi_disconnect(void);
793
794 /* void *connectinfo (about 1024 bytes buf) */
795 int tls_wifi_faslink_connect(void *connectinfo);
796
797 /* void *connectinfo (about 1024 bytes buf) */
798 int tls_wifi_get_fastlink_info(void *connectinfo);
799
817 int tls_wifi_connect(u8 *ssid, u8 ssid_len, u8 *pwd, u8 pwd_len);
818
836 int tls_wifi_connect_by_bssid(u8 *bssid, u8 *pwd, u8 pwd_len);
837
858 int tls_wifi_connect_by_ssid_bssid(u8 *ssid, u8 ssid_len, u8 *bssid, u8 *pwd, u8 pwd_len );
859
860
881 int tls_wifi_auto_connect_flag(u8 opt, u8* mode);
882
899 void tls_wifi_status_change_cb_register(void (*callback)(u8 status));
900
910 void tls_wifi_get_current_bss(struct tls_curr_bss_t* bss);
911
912 /*********************************************************************************************************
913 Wifi WPS API
914 *********************************************************************************************************/
915 #ifdef TLS_CONFIG_WPS
916
927 int tls_wps_get_pin(u8* pin);
928
940 int tls_wps_set_pin(u8* pin, u8 pin_len);
941
956 int tls_wps_start_pin(void);
957
971 int tls_wps_start_pbc(void);
972 #endif
973
983 void tls_ethernet_data_rx_callback(net_rx_data_cb callback);
984 #if TLS_CONFIG_AP_OPT_FWD
985
995 void tls_ethernet_ip_rx_callback(net_rx_data_cb callback);
996 #endif
997
1008 void tls_wifi_set_psflag(bool enable, bool alwaysflag);
1009
1020 u32 tls_wifi_get_psflag(void);
1021
1034 void tls_wifi_send_oneshotdata(u8 *dst, const u8 *ssid, u8 ssid_len);
1035
1045 u8 tls_wifi_get_tx_gain_max(enum tls_wifi_tx_rate tx_rate);
1046
1061 int tls_wifi_send_mgmt(enum tls_wifi_mgmt_type type, struct tls_wifi_hdr_mac_t *mac, u8 *ie, u16 ie_len, struct tls_wifi_tx_rate_t *tx);
1062
1079 int tls_wifi_send_data(struct tls_wifi_hdr_mac_t *mac, u8 *data, u16 data_len, struct tls_wifi_tx_rate_t *tx);
1080
1090 enum tls_wifi_states tls_wifi_get_state(void);
1091
1102 int tls_wifi_get_errno(void);
1103
1113 void tls_wifi_perror(const char *info);
1114
1125 const char *tls_wifi_get_errinfo(int eno);
1126
1141 int tls_wifi_mem_cfg(u32 startmem, u8 txcnt, u8 rxcnt);
1142
1153 int tls_wifi_softap_set_sta_num(unsigned char ap_sta_num);
1154
1165 int tls_wifi_softap_del_station(unsigned char* hwaddr);
1166
1176 int tls_wifi_softap_add_blacksta(unsigned char *hwaddr);
1177
1178
1188 int tls_wifi_softap_del_blacksta(unsigned char *hwaddr);
1189
1201 int tls_wifi_softap_get_blackinfo(u32 *sta_num, u8 *buf, u32 buf_size);
1202
1203
1213 void tls_wifi_enable_log(bool enable);
1214
1224 void tls_wifi_set_tempcomp_flag(int flag);
1225
1235 u8 tls_wifi_get_tempcomp_flag(void);
1236
1247 void tls_wifi_set_fixed_rate(u32 fixrateindex, u32 retrycnt);
1248
1249
1259 int tls_wifi_cfg_listen_interval(u16 listen_interval);
1260
1270 int tls_wifi_cfg_connect_timeout(u16 timeout);
1271
1281 int tls_wifi_cfg_connect_scan_mode(u32 mode);
1282
1293 int tls_wifi_cfg_connect_pci(u32 pci_en);
1294
1304 int tls_wifi_set_11b_digital_gain(u8 value);
1305
1315 u8 tls_wifi_get_11b_digital_gain(void);
1316
1326 int tls_wifi_set_11n_digital_gain(u8 value);
1327
1337 u8 tls_wifi_get_11n_digital_gain(void);
1338
1339
1340
1349 int tls_wl_get_isr_count(void);
1350
1351 #endif /* TLS_WIFI_FUNC_H */
1352
tls_curr_bss_t::bssid
u8 bssid[ETH_ALEN]
Definition: wm_wifi.h:213
tls_ip_info_t
Definition: wm_wifi.h:248
tls_ip_info_t::netmask
u8 netmask[4]
Definition: wm_wifi.h:250
tls_ibss_info_t::channel
u8 channel
Definition: wm_wifi.h:262
WM_WIFI_TX_RATEIDX_18M
Definition: wm_wifi.h:171
tls_ibssip_info_t::dns1
u8 dns1[4]
Definition: wm_wifi.h:271
tls_wifi_softap_client_event_register
void tls_wifi_softap_client_event_register(tls_wifi_client_event_callback callback)
This function is used to register client event.
tls_wifi_send_mgmt
int tls_wifi_send_mgmt(enum tls_wifi_mgmt_type type, struct tls_wifi_hdr_mac_t *mac, u8 *ie, u16 ie_len, struct tls_wifi_tx_rate_t *tx)
This function is used to send 802.11 management packet.
tls_wifi_psm_chipsleep_callback
void(* tls_wifi_psm_chipsleep_callback)(u32 sleeptime)
Definition: wm_wifi.h:360
tls_wifi_get_tempcomp_flag
u8 tls_wifi_get_tempcomp_flag(void)
This function is used to get temperature compensation flag.
tls_wifi_set_bcast_mac_filter
void tls_wifi_set_bcast_mac_filter(u8 *mac, u8 receive, u8 clear)
This function is used to set mac filter.
tls_curr_bss_t::ssid_len
u8 ssid_len
Definition: wm_wifi.h:215
tls_wifi_encrypt_mode
tls_wifi_encrypt_mode
Definition: wm_wifi.h:117
tls_curr_bss_t::ssid
u8 ssid[32]
Definition: wm_wifi.h:214
tls_wifi_mem_cfg
int tls_wifi_mem_cfg(u32 startmem, u8 txcnt, u8 rxcnt)
This function is used to customize wifi tx&rx memory.
WM_WIFI_ECN_MODE_OPEN
Definition: wm_wifi.h:118
WM_WIFI_TX_RATEIDX_MCS8
Definition: wm_wifi.h:184
WM_WIFI_AUTH_MODE_WPA_WPA2_PSK_AUTO
Definition: wm_wifi.h:112
tls_ibssip_info_t::ip
u8 ip[4]
Definition: wm_wifi.h:268
tls_wifi_hdr_mac_t::bssid
u8 bssid[ETH_ALEN]
Definition: wm_wifi.h:333
tls_wifi_set_oneshot_flag
int tls_wifi_set_oneshot_flag(u8 flag)
This function is used to set oneshot config flag.
tls_ip_info_t::ip_addr
u8 ip_addr[4]
Definition: wm_wifi.h:249
tls_ip_info_t::dnsname
u8 dnsname[32]
Definition: wm_wifi.h:251
tls_wifi_set_tempcomp_flag
void tls_wifi_set_tempcomp_flag(int flag)
This function is used to set temperature compensation flag.
tls_bss_info_t
Definition: wm_wifi.h:276
tls_key_info_t::key
u8 key[64]
Definition: wm_wifi.h:233
tls_wifi_hdr_mac_t::sa_addr
u8 sa_addr[ETH_ALEN]
Definition: wm_wifi.h:332
tls_wifi_scan_param_t::scan_chanlist
u16 scan_chanlist
Definition: wm_wifi.h:349
WM_WIFI_ECN_MODE_UNKNOWN
Definition: wm_wifi.h:123
tls_bss_info_t::max_data_rate
u32 max_data_rate
Definition: wm_wifi.h:284
WM_WIFI_TX_RATEIDX_1M
Definition: wm_wifi.h:164
tls_wifi_mgmt_type
tls_wifi_mgmt_type
Definition: wm_wifi.h:147
tls_softap_info_t::ssid
u8 ssid[33]
Definition: wm_wifi.h:238
tls_wifi_get_tx_gain_max
u8 tls_wifi_get_tx_gain_max(enum tls_wifi_tx_rate tx_rate)
This function is used to get max gain by rate index.
tls_wifi_get_11b_digital_gain
u8 tls_wifi_get_11b_digital_gain(void)
This function is used to get 11b&#39;s gain value.
net_rx_data_cb
int(* net_rx_data_cb)(const u8 *bssid, u8 *buf, u32 buf_len)
Definition: wm_wifi.h:367
tls_wifi_softap_get_blackinfo
int tls_wifi_softap_get_blackinfo(u32 *sta_num, u8 *buf, u32 buf_size)
This function used to get stations from blacklist.
WM_WIFI_ECN_MODE_WEP
Definition: wm_wifi.h:119
WM_WIFI_DISCONNECTED
Definition: wm_wifi.h:140
tls_bss_info_t::privacy
u8 privacy
Definition: wm_wifi.h:280
tls_scan_bss_format2_t
Definition: wm_wifi.h:312
tls_wifi_softap_destroy
void tls_wifi_softap_destroy(void)
This function is used to destroy soft ap.
tls_wifi_scan_param_t
Definition: wm_wifi.h:346
WM_WIFI_TX_RATEIDX_24M
Definition: wm_wifi.h:172
tls_ibssip_info_t::netmask
u8 netmask[4]
Definition: wm_wifi.h:269
tls_wifi_data_ext_recv_cb_register
void tls_wifi_data_ext_recv_cb_register(tls_wifi_data_ext_recv_callback callback)
This function is used to register recv wifi extended data callback function.
tls_wifi_tx_rate_t::retry_times
u8 retry_times
Definition: wm_wifi.h:342
WM_WIFI_TX_RATEIDX_MCS12
Definition: wm_wifi.h:188
tls_wifi_softap_set_sta_num
int tls_wifi_softap_set_sta_num(unsigned char ap_sta_num)
This function is used to set max sta num.
tls_softap_info_t::encrypt
u8 encrypt
Definition: wm_wifi.h:239
tls_wifi_status_change_cb_register
void tls_wifi_status_change_cb_register(void(*callback)(u8 status))
This function is used to register wifi status changed callback function.
WM_WIFI_TX_RATEIDX_36M
Definition: wm_wifi.h:173
WM_WIFI_ECN_MODE_WPA_PSK
Definition: wm_wifi.h:120
tls_wifi_tx_rate_t::tx_gain
u8 tx_gain
Definition: wm_wifi.h:339
WM_WIFI_TX_RATEIDX_MCS4
Definition: wm_wifi.h:180
tls_wifi_connect_by_bssid
int tls_wifi_connect_by_bssid(u8 *bssid, u8 *pwd, u8 pwd_len)
This function is used to connect AP by BSSID.
tls_bss_info_format2_t::ssid
u8 ssid[32]
Definition: wm_wifi.h:299
WM_WIFI_TX_RATEIDX_MCS1
Definition: wm_wifi.h:177
tls_wifi_get_psflag
u32 tls_wifi_get_psflag(void)
This function is used to get current powersave flag.
WM_WIFI_TX_RATEIDX_48M
Definition: wm_wifi.h:174
tls_wifi_mgmt_ext_recv_cb_register
void tls_wifi_mgmt_ext_recv_cb_register(tls_wifi_data_ext_recv_callback callback)
This function is used to register recv wifi management frame callback function.
tls_wifi_tx_rate
tls_wifi_tx_rate
Definition: wm_wifi.h:163
WM_WIFI_TX_RATEIDX_54M
Definition: wm_wifi.h:175
WM_WIFI_TX_RATEIDX_MCS5
Definition: wm_wifi.h:181
WM_WIFI_TX_RATEIDX_MCS3
Definition: wm_wifi.h:179
tls_wifi_cfg_connect_pci
int tls_wifi_cfg_connect_pci(u32 pci_en)
This function is used to set pci flag.
tls_curr_bss_t::type
u8 type
Definition: wm_wifi.h:217
tls_curr_bss_t::channel
u8 channel
Definition: wm_wifi.h:216
WM_WIFI_MGMT_TYPE_DISASSOC
Definition: wm_wifi.h:156
ETH_ALEN
#define ETH_ALEN
Definition: wm_wifi.h:38
tls_wifi_get_state
enum tls_wifi_states tls_wifi_get_state(void)
This function is used to get current Wi-Fi State.
WM_WIFI_MGMT_TYPE_PROBE_RESP
Definition: wm_wifi.h:153
tls_sta_info_t::mac_addr
u8 mac_addr[ETH_ALEN]
Definition: wm_wifi.h:320
tls_bss_info_format2_t
Definition: wm_wifi.h:296
tls_curr_bss_t::rssi
u8 rssi
Definition: wm_wifi.h:225
tls_bss_info_t::rssi
u8 rssi
Definition: wm_wifi.h:282
WM_WIFI_MGMT_TYPE_REASSOC_REQ
Definition: wm_wifi.h:150
WM_WIFI_TX_RATEIDX_MCS9
Definition: wm_wifi.h:185
tls_wifi_set_11n_digital_gain
int tls_wifi_set_11n_digital_gain(u8 value)
This function is used to set 11n&#39;s digital gain.
WM_WIFI_TX_RATEIDX_MCS7
Definition: wm_wifi.h:183
tls_wifi_scan_by_param
int tls_wifi_scan_by_param(struct tls_wifi_scan_param_t *scan_param)
scan AP ,user can set channellist,scan times and switch interval per channel
tls_scan_bss_format2_t::count
u32 count
Definition: wm_wifi.h:313
tls_scan_bss_t::count
u32 count
Definition: wm_wifi.h:290
tls_bss_info_format2_t::wps_support
bool wps_support
Definition: wm_wifi.h:308
tls_wifi_restore_bcast_mac_filter
void tls_wifi_restore_bcast_mac_filter(void)
This function is used to restore mac filter to normal mode.
tls_wifi_connect_by_ssid_bssid
int tls_wifi_connect_by_ssid_bssid(u8 *ssid, u8 ssid_len, u8 *bssid, u8 *pwd, u8 pwd_len)
This function is used to connect AP by SSID an BSSID.
WM_WIFI_AUTH_MODE_OPEN
Definition: wm_wifi.h:102
tls_wifi_get_listen_mode
u8 tls_wifi_get_listen_mode(void)
This function is used to get listen mode.
tls_scan_bss_t
Definition: wm_wifi.h:289
tls_wifi_send_oneshotdata
void tls_wifi_send_oneshotdata(u8 *dst, const u8 *ssid, u8 ssid_len)
This function is used to send oneshot data to other sta.
tls_wifi_client_event_callback
void(* tls_wifi_client_event_callback)(u8 *mac, enum tls_wifi_client_event_type event)
Definition: wm_wifi.h:738
WM_WIFI_MGMT_TYPE_REASSOC_RESP
Definition: wm_wifi.h:151
tls_wifi_hdr_mac_t
Definition: wm_wifi.h:330
WM_WIFI_TX_RATEIDX_MCS6
Definition: wm_wifi.h:182
tls_ethernet_data_rx_callback
void tls_ethernet_data_rx_callback(net_rx_data_cb callback)
This function is used to register ETHERNET data rx callback function.
tls_bss_info_format2_t::ssid_len
u8 ssid_len
Definition: wm_wifi.h:300
tls_scan_bss_t::length
u32 length
Definition: wm_wifi.h:291
WM_WIFI_MGMT_TYPE_AUTH
Definition: wm_wifi.h:157
tls_bss_info_format2_t::bgn
u8 bgn
Definition: wm_wifi.h:307
tls_bss_info_format2_t::bssid
u8 bssid[ETH_ALEN]
Definition: wm_wifi.h:301
tls_wifi_disconnect
void tls_wifi_disconnect(void)
This function is used to destroy or leave Wi-Fi network.
tls_ibss_info_t::encrypt
u8 encrypt
Definition: wm_wifi.h:257
WM_WIFI_AUTH_MODE_WPA2_PSK_AUTO
Definition: wm_wifi.h:109
WM_WIFI_TX_RATEIDX_MCS11
Definition: wm_wifi.h:187
tls_wifi_scan_result_cb_register
void tls_wifi_scan_result_cb_register(void(*callback)(void))
Before calling tls_wifi_scan() , application should call this function to register the call back func...
WM_WIFI_MGMT_TYPE_PROBE_REQ
Definition: wm_wifi.h:152
tls_wifi_oneshot_result_callback
void(* tls_wifi_oneshot_result_callback)(enum tls_wifi_oneshot_result_type type)
Definition: wm_wifi.h:551
WM_WIFI_TX_RATEIDX_MCS2
Definition: wm_wifi.h:178
WM_WIFI_TX_RATEIDX_6M
Definition: wm_wifi.h:168
tls_key_info_t::index
u8 index
Definition: wm_wifi.h:231
tls_softap_info_t::channel
u8 channel
Definition: wm_wifi.h:243
tls_curr_bss_t::encryptype
u8 encryptype
Definition: wm_wifi.h:220
tls_scan_bss_format2_t::length
u32 length
Definition: wm_wifi.h:314
WM_WIFI_MGMT_TYPE_DEAUTH
Definition: wm_wifi.h:158
tls_ibssip_info_t
Definition: wm_wifi.h:267
tls_wifi_passive_scan
int tls_wifi_passive_scan(void)
This function is used to trigger scan AP.
WM_WIFI_TX_RATEIDX_2M
Definition: wm_wifi.h:165
tls_wifi_psm_chipsleep_cb_register
void tls_wifi_psm_chipsleep_cb_register(tls_wifi_psm_chipsleep_callback sleepcallback, tls_wifi_psm_prechipsleep_callback precallback, tls_wifi_psm_postchipsleep_callback postcallback)
This function is used to register chipsleep callback function when using chip sleep for powersaving...
tls_sta_info_t
Definition: wm_wifi.h:319
tls_filter_mcast_mac
u8 tls_filter_mcast_mac(u8 *mac, u8 receive)
This function is used to filter multicast frames.
tls_ibss_info_t
Definition: wm_wifi.h:255
tls_bss_info_format2_t::freqcal_val
s16 freqcal_val
Definition: wm_wifi.h:304
WM_WIFI_AUTH_MODE_WEP_AUTO
Definition: wm_wifi.h:103
tls_ibssip_info_t::dns2
u8 dns2[4]
Definition: wm_wifi.h:272
tls_wifi_get_errno
int tls_wifi_get_errno(void)
This function is used to get current error number during joining AP.
tls_wifi_data_ext_recv_callback
void(* tls_wifi_data_ext_recv_callback)(u8 *data, u32 data_len, struct tls_wifi_ext_t *ext)
Definition: wm_wifi.h:370
tls_bss_info_format2_t::channel
u8 channel
Definition: wm_wifi.h:302
tls_curr_bss_t
Definition: wm_wifi.h:212
tls_bss_info_format2_t::group_cipher
s8 group_cipher
Definition: wm_wifi.h:306
tls_bss_info_format2_t::rssi
u8 rssi
Definition: wm_wifi.h:298
WM_WIFI_MGMT_TYPE_ATIM
Definition: wm_wifi.h:155
tls_wifi_get_authed_sta_info
void tls_wifi_get_authed_sta_info(u32 *sta_num, u8 *buf, u32 buf_size)
This function is used to get the authed sta list.
tls_wifi_get_errinfo
const char * tls_wifi_get_errinfo(int eno)
This function is used to get wifi error.
WM_WIFI_MGMT_TYPE_ACTION
Definition: wm_wifi.h:159
tls_wifi_softap_create
int tls_wifi_softap_create(struct tls_softap_info_t *apinfo, struct tls_ip_info_t *ipinfo)
This function is used to create soft ap.
tls_wifi_softap_del_blacksta
int tls_wifi_softap_del_blacksta(unsigned char *hwaddr)
This function used to accept sta joining softap that sta in balck list.
tls_wifi_scan
int tls_wifi_scan(void)
This function is used to trigger scan AP.
tls_wifi_change_chanel
void tls_wifi_change_chanel(u32 chanid)
This function is used to change channel actively.
tls_wifi_tx_rate_t::tx_rate
enum tls_wifi_tx_rate tx_rate
Definition: wm_wifi.h:338
tls_softap_info_t::keyinfo
struct tls_key_info_t keyinfo
Definition: wm_wifi.h:244
WM_WIFI_TX_RATEIDX_MCS13
Definition: wm_wifi.h:189
WM_WIFI_AUTH_MODE_WPA_PSK_TKIP
Definition: wm_wifi.h:104
WM_WIFI_JOINED
Definition: wm_wifi.h:143
WM_WIFI_ECN_MODE_WPA_WPA2_PSK
Definition: wm_wifi.h:122
tls_wifi_set_psflag
void tls_wifi_set_psflag(bool enable, bool alwaysflag)
This function is used to set powersave flag.
tls_key_info_t::key_len
u8 key_len
Definition: wm_wifi.h:232
tls_wifi_auth_mode
tls_wifi_auth_mode
Definition: wm_wifi.h:101
tls_scan_bss_t::bss
struct tls_bss_info_t bss[1]
Definition: wm_wifi.h:292
tls_wifi_set_fixed_rate
void tls_wifi_set_fixed_rate(u32 fixrateindex, u32 retrycnt)
This function is used to get temperature compensation flag.
tls_wifi_perror
void tls_wifi_perror(const char *info)
This function is used to print current error during joining AP.
tls_bss_info_t::bssid
u8 bssid[ETH_ALEN]
Definition: wm_wifi.h:277
tls_wifi_ext_t
Definition: wm_wifi.h:324
tls_wifi_softap_add_blacksta
int tls_wifi_softap_add_blacksta(unsigned char *hwaddr)
This function used to add sta to black list for softap.
WM_WIFI_JOINING
Definition: wm_wifi.h:142
WM_WIFI_TX_RATEIDX_11M
Definition: wm_wifi.h:167
tls_ibss_info_t::keyinfo
struct tls_key_info_t keyinfo
Definition: wm_wifi.h:263
WM_WIFI_AUTH_MODE_WPA2_PSK_TKIP
Definition: wm_wifi.h:107
tls_wifi_data_recv_cb_register
void tls_wifi_data_recv_cb_register(tls_wifi_data_recv_callback callback)
This function is used to register recv wifi data callback function.
tls_bss_info_format2_t::freq_offset
s16 freq_offset
Definition: wm_wifi.h:303
tls_wifi_get_oneshot_flag
int tls_wifi_get_oneshot_flag(void)
This function is used to get one shot flag.
tls_wifi_psm_postchipsleep_callback
void(* tls_wifi_psm_postchipsleep_callback)(void)
Definition: wm_wifi.h:363
tls_wifi_get_scan_rslt
int tls_wifi_get_scan_rslt(u8 *buf, u32 buffer_size)
This function is used to get scan result.
tls_wifi_cipher_mode
tls_wifi_cipher_mode
Definition: wm_wifi.h:127
tls_wifi_tx_rate_t
Definition: wm_wifi.h:337
tls_bss_info_format2_t::ecn
u8 ecn
Definition: wm_wifi.h:297
tls_wifi_get_oneshot_customdata
void tls_wifi_get_oneshot_customdata(u8 *data)
This function is used to get one shot custom data.
tls_ibssip_info_t::gateway
u8 gateway[4]
Definition: wm_wifi.h:270
tls_bss_info_format2_t::pairwise_cipher
s8 pairwise_cipher
Definition: wm_wifi.h:305
tls_wifi_get_oneshot_ssidpwd
void tls_wifi_get_oneshot_ssidpwd(u8 *ssid, u8 *pwd)
This function is used to get one shot ssid and password information.
tls_wifi_hdr_mac_t::da_addr
u8 da_addr[ETH_ALEN]
Definition: wm_wifi.h:331
WM_WIFI_TX_RATEIDX_MCS10
Definition: wm_wifi.h:186
tls_wifi_enable_log
void tls_wifi_enable_log(bool enable)
This function is used to set some information display in the process of wifi networking.
WM_WIFI_TX_RATEIDX_MCS15
Definition: wm_wifi.h:191
WM_WIFI_AUTH_MODE_WPA2_PSK_CCMP
Definition: wm_wifi.h:108
WM_WIFI_MGMT_TYPE_ASSOC_RESP
Definition: wm_wifi.h:149
tls_key_info_t
Definition: wm_wifi.h:229
tls_wifi_get_psm_chipsleep_flag
u32 tls_wifi_get_psm_chipsleep_flag(void)
This function is used to get chipsleep valid flag.
WM_WIFI_ECN_MODE_WPA2_PSK
Definition: wm_wifi.h:121
tls_wifi_send_data
int tls_wifi_send_data(struct tls_wifi_hdr_mac_t *mac, u8 *data, u16 data_len, struct tls_wifi_tx_rate_t *tx)
This function is used to send an 802.11 frame.
tls_wifi_cfg_listen_interval
int tls_wifi_cfg_listen_interval(u16 listen_interval)
This function is used to set listen_interval (dummy interface)
WM_WIFI_TX_RATEIDX_5_5M
Definition: wm_wifi.h:166
tls_bss_info_t::ssid_len
u8 ssid_len
Definition: wm_wifi.h:281
WM_WIFI_SCANNING
Definition: wm_wifi.h:141
tls_key_info_t::format
u8 format
Definition: wm_wifi.h:230
tls_wifi_get_11n_digital_gain
u8 tls_wifi_get_11n_digital_gain(void)
This function is used to get 11n&#39;s gain value.
tls_scan_bss_format2_t::bss
struct tls_bss_info_format2_t bss[1]
Definition: wm_wifi.h:315
WM_WIFI_TX_RATEIDX_9M
Definition: wm_wifi.h:169
tls_softap_info_t
Definition: wm_wifi.h:237
tls_bss_info_t::channel
u8 channel
Definition: wm_wifi.h:279
tls_bss_info_t::ssid
u8 ssid[32]
Definition: wm_wifi.h:283
tls_wifi_softap_get_state
enum tls_wifi_states tls_wifi_softap_get_state(void)
This function is used to get soft ap&#39;s state.
tls_ibss_info_t::ssid
u8 ssid[33]
Definition: wm_wifi.h:256
tls_wifi_ext_t::rssi
u8 rssi
Definition: wm_wifi.h:325
tls_bss_info_t::wps_support
bool wps_support
Definition: wm_wifi.h:285
WM_WIFI_AUTH_MODE_WPA_PSK_AUTO
Definition: wm_wifi.h:106
tls_wifi_set_11b_digital_gain
int tls_wifi_set_11b_digital_gain(u8 value)
This function is used to set 11b&#39;s digital gain.
tls_wifi_states
tls_wifi_states
Definition: wm_wifi.h:139
tls_wifi_ext_t::rx_rate
u8 rx_rate
Definition: wm_wifi.h:326
tls_wifi_data_recv_callback
void(* tls_wifi_data_recv_callback)(u8 *data, u32 data_len)
Definition: wm_wifi.h:354
tls_wifi_psm_prechipsleep_callback
void(* tls_wifi_psm_prechipsleep_callback)(void)
Definition: wm_wifi.h:357
WM_WIFI_AUTH_MODE_WPA_PSK_CCMP
Definition: wm_wifi.h:105
WM_WIFI_TX_RATEIDX_MCS14
Definition: wm_wifi.h:190
tls_wifi_auto_connect_flag
int tls_wifi_auto_connect_flag(u8 opt, u8 *mode)
Set auto connect mode: Enable/Disable. Get auto connect mode parameter.
tls_wifi_cfg_connect_scan_mode
int tls_wifi_cfg_connect_scan_mode(u32 mode)
This function is used to configure scan mode.
tls_wifi_softap_del_station
int tls_wifi_softap_del_station(unsigned char *hwaddr)
This function is used to deauth sta connected to softap.
tls_wifi_ibss_create
int tls_wifi_ibss_create(struct tls_ibss_info_t *ibssinfo, struct tls_ibssip_info_t *ipinfo)
This function is used to create or join ibss.
tls_wifi_set_psm_chipsleep_flag
void tls_wifi_set_psm_chipsleep_flag(u32 flag)
This function is used to set chipsleep valid flag.
tls_wifi_scan_param_t::scan_chinterval
u16 scan_chinterval
Definition: wm_wifi.h:350
tls_wifi_oneshot_result_cb_register
void tls_wifi_oneshot_result_cb_register(tls_wifi_oneshot_result_callback callback)
before calling tls_wifi_get_oneshot_ssidpwd or tls_wifi_get_oneshot_customdata, application should ca...
tls_wifi_get_current_bss
void tls_wifi_get_current_bss(struct tls_curr_bss_t *bss)
This function is used to get AP&#39;s info.
tls_wifi_connect
int tls_wifi_connect(u8 *ssid, u8 ssid_len, u8 *pwd, u8 pwd_len)
This function is used to connect AP.
WM_WIFI_TX_RATEIDX_12M
Definition: wm_wifi.h:170
WM_WIFI_TX_RATEIDX_MCS0
Definition: wm_wifi.h:176
WM_WIFI_MGMT_TYPE_BEACON
Definition: wm_wifi.h:154
tls_bss_info_t::mode
u8 mode
Definition: wm_wifi.h:278
WM_WIFI_MGMT_TYPE_ASSOC_REQ
Definition: wm_wifi.h:148
tls_wifi_set_listen_mode
void tls_wifi_set_listen_mode(u8 enable)
This function is used to enable/disable listen mode.
tls_wifi_scan_param_t::scan_times
u16 scan_times
Definition: wm_wifi.h:348
WM_WIFI_TX_RATEIDX_MCS32
Definition: wm_wifi.h:192
tls_wifi_cfg_connect_timeout
int tls_wifi_cfg_connect_timeout(u16 timeout)
This function is used to set connect timeout.


W800 SDK APIs: doxy_out/include/wm_wifi_config.h Source File

  • doxy_out
  • include
wm_wifi_config.h
Go to the documentation of this file.
1
10 #ifndef __WM_WIFI_CONFIG_H__
11 #define __WM_WIFI_CONFIG_H__
12
13 #define CFG_WIFI_ON 1
14 #define CFG_WIFI_OFF 0
15
16 /*******************WIFI INFO**************************
17 Below Switch Only for Reference!!!
18 ********************************************************/
19 #define TLS_CONFIG_AP CFG_WIFI_ON
20 #define TLS_CONFIG_11N CFG_WIFI_ON
21
22 #define TLS_CONFIG_USE_VENDOR_IE CFG_WIFI_OFF
23
24 #define TLS_CONFIG_SOFTAP_11N (CFG_WIFI_ON&& TLS_CONFIG_AP)
25
26 #define TLS_CONFIG_AP_BEACON_SOFT (CFG_OFF && TLS_CONFIG_AP)
27 #define TLS_CONFIG_AP_OPT_PS (CFG_ON && TLS_CONFIG_AP)/* SOFTAP POWER SAVE */
28 #define TLS_CONFIG_AP_OPT_FWD (CFG_ON && TLS_CONFIG_AP)/* IP PACKET FORWARD */
29
30 #define TLS_CONFIG_WPS CFG_WIFI_OFF /* WPS&EAPOL should be enabled together */
31 #define TLS_IEEE8021X_EAPOL CFG_WIFI_OFF
32
33 #define TLS_CONFIG_1SSID_MULTI_PWD CFG_WIFI_ON
34
35 #define TLS_CONFIG_FAST_JOIN_NET CFG_WIFI_ON
36
37 #define TLS_CONFIG_LOG_PRINT CFG_WIFI_ON
38
39 #define TLS_SCAN_TASK_DYNAMIC_CREATE_FTR CFG_WIFI_ON
40
41 #define TLS_BSS_MGMT_TASK_DYNAMIC_CREATE_FTR CFG_WIFI_ON
42
43 #endif /*__WM_WIFI_CONFIG_H__*/
44


W800 SDK APIs: doxy_out/include/app/wm_wifi_oneshot.h Source File

  • doxy_out
  • include
  • app
wm_wifi_oneshot.h
Go to the documentation of this file.
1
11 #ifndef WM_WIFI_ONESHOT_H
12 #define WM_WIFI_ONESHOT_H
13 #include <stdio.h>
14 #include <stdlib.h>
15 #include <string.h>
16 #include <wm_type_def.h>
17 #if (GCC_COMPILE==1)
18 #include "wm_ieee80211_gcc.h"
19 #else
20 #include <wm_ieee80211.h>
21 #endif
22 #include "wm_config.h"
23 #include "wm_bt_config.h"
24
26 #define CONFIG_ONESHOT_MAC_FILTER 0
27 extern int tls_filter_module_srcmac(u8 *mac);
28
29
30
31 #define ONESHOT_ON 1
32 #define ONESHOT_OFF 0
33
34 /* ONE SHOT */
36 #define TLS_CONFIG_UDP_ONE_SHOT ONESHOT_ON
37
39 #define TLS_CONFIG_UDP_LSD_SPECIAL (ONESHOT_ON&& TLS_CONFIG_UDP_ONE_SHOT)
40
41 #define TLS_CONFIG_ONESHOT_DELAY_SPECIAL ONESHOT_ON
42
44 #define TLS_CONFIG_AP_MODE_ONESHOT (ONESHOT_ON && TLS_CONFIG_AP)
45 #define TLS_CONFIG_WEB_SERVER_MODE (ONESHOT_ON && TLS_CONFIG_AP_MODE_ONESHOT)
46 #define TLS_CONFIG_SOCKET_MODE (ONESHOT_ON && TLS_CONFIG_AP_MODE_ONESHOT)
47
48
50 #define TLS_CONFIG_AIRKISS_MODE_ONESHOT (ONESHOT_ON && TLS_CONFIG_UDP_ONE_SHOT)
51 #define AIRKISS_USE_SELF_WRITE 1
52
53
55 #define TLS_CONFIG_BLE_WIFI_ONESHOT (ONESHOT_ON && (WM_BLE_INCLUDED == CFG_ON || WM_NIMBLE_INCLUDED == CFG_ON))
56
57 typedef enum{
58 ONESHOT_SCAN_START,
59 ONESHOT_SCAN_FINISHED,
60 ONESHOT_SWITCH_CHANNEL,
61 ONESHOT_STOP_TMP_CHAN_SWITCH,
62 ONESHOT_STOP_CHAN_SWITCH,
63 ONESHOT_HANDSHAKE_TIMEOUT,
64 ONESHOT_RECV_TIMEOUT,
65 ONESHOT_RECV_ERR,
66 ONESHOT_STOP_DATA_CLEAR,
67 ONESHOT_NET_UP,
68 AP_SOCK_S_MSG_SOCKET_RECEIVE_DATA,
69 AP_WEB_S_MSG_RECEIVE_DATA,
70 AP_SOCK_S_MSG_SOCKET_CREATE,
71 AP_SOCK_S_MSG_WJOIN_FAILD,
72 }ONESHOT_MSG_ENUM;
73
110 int tls_wifi_set_oneshot_flag(u8 flag);
111
127 int tls_wifi_get_oneshot_flag(void);
128
147 u8 tls_wifi_dataframe_recv(struct ieee80211_hdr *hdr, u32 data_len);
148
149 #if TLS_CONFIG_AIRKISS_MODE_ONESHOT
150
159 void oneshot_airkiss_send_reply(void);
171 void tls_airkiss_recv(u8 *data, u16 data_len);
181 void tls_airkiss_start(void);
191 void tls_airkiss_stop(void);
192
202 void tls_oneshot_airkiss_change_channel(void);
203 #endif /*TLS_CONFIG_AIRKISS_MODE_ONESHOT*/
204
214 int wm_oneshot_task_init(void);
215
225 void tls_oneshot_switch_channel_tim_stop(struct ieee80211_hdr *hdr);
226
236 void tls_oneshot_switch_channel_tim_temp_stop(void);
237
249 int tls_oneshot_if_use_bssid(u8 *ssid, u8 *ssid_len, u8 *bssid);
250
262 void tls_oneshot_find_chlist(u8 *ssid, u8 ssid_len, u16 *chlist);
263
275 void wm_oneshot_netif_status_event(u8 status );
276
277 #if TLS_CONFIG_WEB_SERVER_MODE
278
289 void tls_oneshot_send_web_connect_msg(void);
290 #endif
291
292 #endif /*WM_WIFI_ONESHOT_H*/
293
tls_oneshot_if_use_bssid
int tls_oneshot_if_use_bssid(u8 *ssid, u8 *ssid_len, u8 *bssid)
handle if use bssid to connect wifi.
tls_airkiss_start
void tls_airkiss_start(void)
This function is used to start airkiss.
tls_oneshot_switch_channel_tim_temp_stop
void tls_oneshot_switch_channel_tim_temp_stop(void)
This function is used to stop oneshot temp timer.
tls_wifi_set_oneshot_flag
int tls_wifi_set_oneshot_flag(u8 flag)
This function is used to set oneshot flag.
tls_wifi_dataframe_recv
u8 tls_wifi_dataframe_recv(struct ieee80211_hdr *hdr, u32 data_len)
Handle wild packets coming from the air.
wm_oneshot_task_init
int wm_oneshot_task_init(void)
This function is used to init oneshot task.
wm_oneshot_netif_status_event
void wm_oneshot_netif_status_event(u8 status)
This function is to deal with oneshot event according netif status.
ieee80211_hdr
Definition: wm_ieee80211.h:209
tls_airkiss_stop
void tls_airkiss_stop(void)
This function is used to stop airkiss.
tls_airkiss_recv
void tls_airkiss_recv(u8 *data, u16 data_len)
This function is used to deal with airkiss&#39;s wild packet.
wm_type_def.h
WM type redefine.
tls_oneshot_find_chlist
void tls_oneshot_find_chlist(u8 *ssid, u8 ssid_len, u16 *chlist)
Find channel according to ssid.
tls_wifi_get_oneshot_flag
int tls_wifi_get_oneshot_flag(void)
This function is used to get oneshot flag.
tls_oneshot_switch_channel_tim_stop
void tls_oneshot_switch_channel_tim_stop(struct ieee80211_hdr *hdr)
This function is used to stop oneshot timer.
wm_bt_config.h
WM bluetooth model configure.
oneshot_airkiss_send_reply
void oneshot_airkiss_send_reply(void)
This function is used to acknowledge app when airkiss process is done.
wm_ieee80211.h
IEEE802.11 protocol type define.
tls_oneshot_airkiss_change_channel
void tls_oneshot_airkiss_change_channel(void)
This function is used to change channel for airkiss.
wm_config.h
w800 chip inferface configure


W800 SDK APIs: doxy_out/include/platform/wm_wl_mbox.h Source File

  • doxy_out
  • include
  • platform
wm_wl_mbox.h
Go to the documentation of this file.
1
10 #ifndef __TLS_WL_MBOX_H__
11 #define __TLS_WL_MBOX_H__
12
13 #include "wm_type_def.h"
14 #include "wm_osal.h"
15
17 #define SYS_ARCH_TIMEOUT 0xffffffffUL
18
20 typedef tls_os_queue_t * tls_mbox_t;
21
33 s8 tls_mbox_new(tls_mbox_t *mbox, int size);
34
45 int tls_mbox_valid(tls_mbox_t mbox);
46
57 void tls_mbox_post(tls_mbox_t mbox, void *msg);
58
70 s8 tls_mbox_trypost(tls_mbox_t mbox, void *msg);
71
84 u32 tls_arch_mbox_fetch(tls_mbox_t mbox, void **msg, u32 timeout);
85
86 #endif
87
tls_mbox_post
void tls_mbox_post(tls_mbox_t mbox, void *msg)
Sends a message to a mailbox.
tls_mbox_t
tls_os_queue_t * tls_mbox_t
Definition: wm_wl_mbox.h:20
tls_mbox_new
s8 tls_mbox_new(tls_mbox_t *mbox, int size)
Create a malibox.
wm_osal.h
WM OS adapter layer.
tls_mbox_trypost
s8 tls_mbox_trypost(tls_mbox_t mbox, void *msg)
Posts the msg to the mailbox.
tls_arch_mbox_fetch
u32 tls_arch_mbox_fetch(tls_mbox_t mbox, void **msg, u32 timeout)
Waits for a message within specified time.
wm_type_def.h
WM type redefine.
tls_os_queue_t
void tls_os_queue_t
Definition: wm_osal.h:55
tls_mbox_valid
int tls_mbox_valid(tls_mbox_t mbox)
Check if an mbox is valid/allocated.


W800 SDK APIs: doxy_out/include/platform/wm_wl_task.h Source File

  • doxy_out
  • include
  • platform
wm_wl_task.h
Go to the documentation of this file.
1
10 #ifndef __TLS_WL_TASK_H__
11 #define __TLS_WL_TASK_H__
12
13 #include "wm_type_def.h"
14 #include "wm_wl_mbox.h"
15 #include "wm_wl_timers.h"
16 //#include "ithread.h"
17
18 #define TLS_TASK_START_PRIO 0
19 #define TASK_WL_PRIO 9
20 #define TASK_WL_PRIO_MAX 12
21 #define TLS_SUPPLICANT_TASK_PRIO (TASK_WL_PRIO_MAX + 1)
22 #define TLS_SUPPLICANT_TIMER_TASK_PRIO (TASK_WL_PRIO_MAX + 2)
23 #define TLS_LWIP_TASK_PRIO (TASK_WL_PRIO_MAX + 3)
24 #define TLS_SYS_TASK_PRIO (TASK_WL_PRIO_MAX + 5)
25 #define TLS_HOSTIF_TASK_PRIO (TASK_WL_PRIO_MAX + 6)
26 #define TLS_SPI_SCHEDULER_TASK_PRIO (TASK_WL_PRIO_MAX + 7)
27 #define TLS_FWUP_TASK_PRIO (TASK_WL_PRIO_MAX + 8)
28 #define TLS_HTTP_CLIENT_TASK_PRIO (TASK_WL_PRIO_MAX + 9)
29 #define AP_SOCKET_S_TASK_PRIO (TASK_WL_PRIO_MAX + 10)
30 #define TLS_UPNP_TASK_PRIO (TASK_WL_PRIO_MAX + 11)
31 #define TLS_ONESHOT_TASK_PRIO (TASK_WL_PRIO_MAX + 15)
32 #define TLS_ONESHOT_SPEC_TASK_PRIO (TASK_WL_PRIO_MAX + 16)
33
34
35 #define TLS_MBOX_ALL_COUNT 8
36 #define TLS_MBOX_ID_WL_TASK 0
37 #define TLS_MBOX_ID_HOSTIF_TASK 1
38 #define TLS_MBOX_ID_JDCLOUD_SERVER 2
39 #define TLS_MBOX_ID_JDCLOUD_DATA 3
40 #define TLS_MBOX_ID_UPNP_HD 4
41 #define TLS_MBOX_ID_UPNP_COMMON 5
42 #define TLS_MBOX_ID_UPNP_GENA 6
43 #define TLS_MBOX_ID_UPNP_MINISERVER 7
44
45 #define TLS_TIMEO_ALL_COUONT 9
46 #define TLS_TIMEO_ID_NULL 0
47 #define TLS_TIMEO_ID_WL_TASK 1
48 #define TLS_TIMEO_ID_HOSTIF_TASK 2
49 #define TLS_TIMEO_ID_JDCLOUD_SERVER 3
50 #define TLS_TIMEO_ID_JDCLOUD_DATA 4
51 #define TLS_TIMEO_ID_UPNP_HD 5
52 #define TLS_TIMEO_ID_UPNP_COMMON 6
53 #define TLS_TIMEO_ID_UPNP_GENA 7
54 #define TLS_TIMEO_ID_UPNP_MINISERVER 8
55
56 #define TLS_MSG_ALL_COUONT 9
57 #define TLS_MSG_ID_TX_MGMT_CMPLT 0
58 #define TLS_MSG_ID_MLME_TASK 1
59 #define TLS_MSG_ID_UART_SENT_FREE 2
60 #define TLS_MSG_ID_UART0_RX 3
61 #define TLS_MSG_ID_HSPI_RX_CMD 4
62 #define TLS_MSG_ID_HSPI_RX_DATA 5
63 #define TLS_MSG_ID_HSPI_TX_DATA 6
64 #define TLS_MSG_ID_TX_DATA_CMPLT 7
65 #define TLS_MSG_ID_UART1_RX 8
66
68 typedef tls_os_sem_t * tls_sem_t;
69
71 typedef void *(*start_routine)(void *arg);
72
74 enum task_msg_type {
75 TASK_MSG_TIMEOUT,
76 TASK_MSG_UNTIMEOUT,
77 TASK_MSG_CALLBACK_WITH_BLOCK,
78 TASK_MSG_CALLBACK,
79 TASK_MSG_CALLBACK_STATIC,
80 TASK_MSG_NULL
81 };
82
84 struct task_msg {
85 enum task_msg_type type;
86 tls_sem_t *sem;
87 union {
88 struct {
89 start_routine function;
90 void *ctx;
91 } cb;
92 struct {
93 start_routine function;
94 void *ctx;
95 u8 cnt;
96 } cbs;
97 struct {
98 u32 msecs;
99 tls_timeout_handler h;
100 void *arg;
101 } tmo;
102 } msg;
103 };
104
106 struct task_parameter{
107 u8 task_id;
108 const char * name;
109 u8 *stk_start;
110 u32 stk_size;
111 u8 mbox_size;
112 u8 mbox_id;
113 u8 timeo_id;
114 };
115
126 s8 tls_wl_task_init(void);
127
138 s8 tls_wl_task_run(struct task_parameter *task_param);
139
154 s8 tls_wl_task_callback_static(struct task_parameter *task_param,
155 start_routine function, void *ctx, u8 block, u8 msg_id);
156
170 s8 tls_wl_task_callback(struct task_parameter *task_param,
171 start_routine function, void *ctx, u8 block);
172
186 s8 tls_wl_task_add_timeout(struct task_parameter *task_param, u32 msecs,
187 tls_timeout_handler h, void *arg);
188
201 s8 tls_wl_task_untimeout(struct task_parameter *task_param,
202 tls_timeout_handler h, void *arg);
203
204 #endif
205
task_parameter::stk_size
u32 stk_size
Definition: wm_wl_task.h:110
tls_timeout_handler
void(* tls_timeout_handler)(void *arg)
Definition: wm_wl_timers.h:17
tls_wl_task_untimeout
s8 tls_wl_task_untimeout(struct task_parameter *task_param, tls_timeout_handler h, void *arg)
Stop or delay the timer to expire.
task_parameter
Definition: wm_wl_task.h:106
wm_wl_timers.h
task APIs
task_parameter::timeo_id
u8 timeo_id
Definition: wm_wl_task.h:113
task_msg_type
task_msg_type
Definition: wm_wl_task.h:74
start_routine
void *(* start_routine)(void *arg)
Definition: wm_wl_task.h:71
task_parameter::task_id
u8 task_id
Definition: wm_wl_task.h:107
tls_wl_task_add_timeout
s8 tls_wl_task_add_timeout(struct task_parameter *task_param, u32 msecs, tls_timeout_handler h, void *arg)
Add a timer to the task.
task_parameter::stk_start
u8 * stk_start
Definition: wm_wl_task.h:109
task_msg
Definition: wm_wl_task.h:84
tls_wl_task_run
s8 tls_wl_task_run(struct task_parameter *task_param)
Running the task.
task_parameter::name
const char * name
Definition: wm_wl_task.h:108
tls_wl_task_callback_static
s8 tls_wl_task_callback_static(struct task_parameter *task_param, start_routine function, void *ctx, u8 block, u8 msg_id)
Running the callback function.
wm_type_def.h
WM type redefine.
tls_wl_task_init
s8 tls_wl_task_init(void)
Task initialized.
tls_os_sem_t
void tls_os_sem_t
Definition: wm_osal.h:53
tls_sem_t
tls_os_sem_t * tls_sem_t
Definition: wm_wl_task.h:68
tls_wl_task_callback
s8 tls_wl_task_callback(struct task_parameter *task_param, start_routine function, void *ctx, u8 block)
Running the callback function.
wm_wl_mbox.h
mailbox (mbox) APIs
task_parameter::mbox_id
u8 mbox_id
Definition: wm_wl_task.h:112
task_parameter::mbox_size
u8 mbox_size
Definition: wm_wl_task.h:111


W800 SDK APIs: doxy_out/include/platform/wm_wl_timers.h Source File

  • doxy_out
  • include
  • platform
wm_wl_timers.h
Go to the documentation of this file.
1
10 #ifndef __TLS_WL_TIMERS_H__
11 #define __TLS_WL_TIMERS_H__
12
13 #include "wm_type_def.h"
14 #include "wm_wl_mbox.h"
15
17 typedef void (* tls_timeout_handler)(void *arg);
18
31 void tls_timeout_p(u8 timeo_assigned, u32 msecs, tls_timeout_handler handler, void *arg);
32
45 void tls_untimeout_p(u8 timeo_assigned, tls_timeout_handler handler, void *arg);
46
59 void tls_timeouts_mbox_fetch_p(u8 timeo_assigned, tls_mbox_t mbox, void **msg);
60
71 s8 tls_wl_timer_init(void);
72
73 #endif
74
tls_timeout_handler
void(* tls_timeout_handler)(void *arg)
Definition: wm_wl_timers.h:17
tls_mbox_t
tls_os_queue_t * tls_mbox_t
Definition: wm_wl_mbox.h:20
tls_wl_timer_init
s8 tls_wl_timer_init(void)
Initialize the timer.
tls_timeouts_mbox_fetch_p
void tls_timeouts_mbox_fetch_p(u8 timeo_assigned, tls_mbox_t mbox, void **msg)
Wait (forever) for a message to arrive in an mbox. While waiting, timeouts are processed.
wm_type_def.h
WM type redefine.
tls_untimeout_p
void tls_untimeout_p(u8 timeo_assigned, tls_timeout_handler handler, void *arg)
Go through timeout list (for this task only) and remove the first matching entry, even though the tim...
wm_wl_mbox.h
mailbox (mbox) APIs
tls_timeout_p
void tls_timeout_p(u8 timeo_assigned, u32 msecs, tls_timeout_handler handler, void *arg)
Create a one-shot timer (aka timeout)