Mistake on this page?
Report an issue in GitHub or email us
mx_wifi_slip.h
Go to the documentation of this file.
1 /**
2  ******************************************************************************
3  * @file mx_wifi_slip.h
4  * @author MCD Application Team
5  * @brief Header for mx_wifi_slip.c module
6  ******************************************************************************
7  * @attention
8  *
9  * Copyright (c) 2021 STMicroelectronics.
10  * All rights reserved.
11  *
12  * This software is licensed under terms that can be found in the LICENSE file
13  * in the root directory of this software component.
14  * If no LICENSE file comes with this software, it is provided AS-IS.
15  *
16  ******************************************************************************
17  */
18 
19 /* Define to prevent recursive inclusion -------------------------------------*/
20 #ifndef MX_WIFI_SLIP_H
21 #define MX_WIFI_SLIP_H
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif /* __cplusplus */
26 
27 /* Includes ------------------------------------------------------------------*/
28 #include "mx_wifi_conf.h"
29 
30 /*
31  * CONFIGURATIONS
32  */
33 #define MX_WIFI_SLIP_DEBUG
34 
35 
36 /* SLIP_PACKET
37  * |--------+---------+--------|
38  * | START | PAYLOAD | END |
39  * |--------+---------+--------|
40  * | 1Bytes | nBytes | 1Bytes |
41  * |--------+---------+--------|
42  */
43 
44 /*
45  * API
46  */
47 
48 /* transfer HCI data to SLIP data,
49  * return the SLIP buffer */
50 uint8_t *slip_transfer(uint8_t *data, uint16_t len, uint16_t *outlen);
51 
52 /* PHY receive one serial byte to SLIP,
53  * return SLIP frame
54  * NOTE: use slip_buf_free to free slip buffer if data process finished. */
55 mx_buf_t *slip_input_byte(uint8_t data);
56 
57 /* free slip frame buffer returned by slip_input_byte */
58 void slip_buf_free(uint8_t *buf);
59 
60 enum
61 {
62  SLIP_START = 0xC0,
63  SLIP_END = 0xD0,
64  SLIP_ESCAPE = 0xDB,
65  SLIP_ESCAPE_START = 0xDC,
66  SLIP_ESCAPE_ES = 0xDD,
67  SLIP_ESCAPE_END = 0xDE
68 };
69 
70 #ifdef __cplusplus
71 }
72 #endif /* __cplusplus */
73 
74 #endif /* MX_WIFI_SLIP_H */
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.