Mistake on this page?
Report an issue in GitHub or email us
wsf_bufio.h
Go to the documentation of this file.
1 /*************************************************************************************************/
2 /*!
3  * \file wsf_bufio.h
4  *
5  * \brief Buffer I/O service.
6  *
7  * Copyright (c) 2009-2018 Arm Ltd. All Rights Reserved.
8  *
9  * Copyright (c) 2019-2020 Packetcraft, Inc.
10  *
11  * Licensed under the Apache License, Version 2.0 (the "License");
12  * you may not use this file except in compliance with the License.
13  * You may obtain a copy of the License at
14  *
15  * http://www.apache.org/licenses/LICENSE-2.0
16  *
17  * Unless required by applicable law or agreed to in writing, software
18  * distributed under the License is distributed on an "AS IS" BASIS,
19  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20  * See the License for the specific language governing permissions and
21  * limitations under the License.
22  */
23 /*************************************************************************************************/
24 #ifndef WSF_BUF_IO_H
25 #define WSF_BUF_IO_H
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
31 /*! \addtogroup WSF_BUF_IO_API
32  * \{ */
33 
34 
35 /**************************************************************************************************
36  Macros
37 **************************************************************************************************/
38 
39 /**************************************************************************************************
40  Data Types
41 **************************************************************************************************/
42 
43 /**************************************************************************************************
44  Callback Function Datatypes
45 **************************************************************************************************/
46 
47 /*! \brief Buffer IO UART Rx callback. */
48 typedef void (*WsfBufIoUartRxCback_t)(uint8_t rxByte);
49 
50 /**************************************************************************************************
51  Function Declarations
52 **************************************************************************************************/
53 
54 /*************************************************************************************************/
55 /*!
56  * \brief Initialize the platform UART.
57  *
58  * \param pBuf Tx Buffer pointer.
59  * \param size Length of buffer.
60  *
61  * \return memory used.
62  */
63 /*************************************************************************************************/
64 uint32_t WsfBufIoUartInit(void *pBuf, uint32_t size);
65 
66 /*************************************************************************************************/
67 /*!
68  * \brief Register the platform UART RX callback.
69  *
70  * \param[in] Callback function for UART RX.
71  */
72 /*************************************************************************************************/
74 
75 /*************************************************************************************************/
76 /*!
77  * \brief Transmit buffer on platform UART.
78  *
79  * \param pBuf Buffer to transmit.
80  * \param len Length of buffer in octets.
81  */
82 /*************************************************************************************************/
83 bool_t WsfBufIoWrite(const uint8_t *pBuf, uint32_t len);
84 
85 /*! \} */ /* WSF_BUF_IO_API */
86 
87 #ifdef __cplusplus
88 };
89 #endif
90 
91 #endif /* WSF_BUF_IO_H */
void(* WsfBufIoUartRxCback_t)(uint8_t rxByte)
Buffer IO UART Rx callback.
Definition: wsf_bufio.h:48
bool_t WsfBufIoWrite(const uint8_t *pBuf, uint32_t len)
Transmit buffer on platform UART.
void WsfBufIoUartRegister(WsfBufIoUartRxCback_t rxCback)
Register the platform UART RX callback.
uint32_t WsfBufIoUartInit(void *pBuf, uint32_t size)
Initialize the platform UART.
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.