VSF Documented
fifo2req_usart.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Copyright(C)2009-2022 by VSF Team *
3 * *
4 * Licensed under the Apache License, Version 2.0 (the "License"); *
5 * you may not use this file except in compliance with the License. *
6 * You may obtain a copy of the License at *
7 * *
8 * http://www.apache.org/licenses/LICENSE-2.0 *
9 * *
10 * Unless required by applicable law or agreed to in writing, software *
11 * distributed under the License is distributed on an "AS IS" BASIS, *
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
13 * See the License for the specific language governing permissions and *
14 * limitations under the License. *
15 * *
16 ****************************************************************************/
17
18#ifndef __HAL_DRIVER_FIFO2REQ_USART_H__
19#define __HAL_DRIVER_FIFO2REQ_USART_H__
20
21/*============================ INCLUDES ======================================*/
22
23#include "hal/vsf_hal_cfg.h"
24
25#if VSF_HAL_USE_USART == ENABLED
26
27#if defined(__VSF_HAL_USE_FIFO2REQ_USART_CLASS_IMPLEMENT)
28# define __VSF_CLASS_IMPLEMENT__
29#endif
30
31#include "utilities/ooc_class.h"
32
33/*============================ MACROFIED FUNCTIONS ===========================*/
34/*============================ GLOBAL VARIABLES ==============================*/
35/*============================ MACROS ========================================*/
36
37#ifndef VSF_FIFO2REQ_USART_CFG_MULTI_CLASS
38# define VSF_FIFO2REQ_USART_CFG_MULTI_CLASS VSF_USART_CFG_MULTI_CLASS
39#endif
40
41#if VSF_FIFO2REQ_USART_CFG_MULTI_CLASS == ENABLED
42# define __describe_fifo2req_usart_op() .op = &vsf_fifo2req_usart_op,
43#else
44# define __describe_fifo2req_usart_op()
45#endif
46
47#define __describe_fifo2req_usart(__prefix, __name, __usart) \
48 VSF_MCONNECT(__prefix, _usart_t) __name = { \
49 __describe_fifo2req_usart_op() \
50 .usart = (vsf_usart_t *) & __usart, \
51 };
52
53#define describe_fifo2req_usart(__prefix, __name, __usart) \
54 __describe_fifo2req_usart(__prefix, __name, __usart)
55
56/*============================ TYPES =========================================*/
57
58// TODO: add usart rx idle or timeout support
59// TODO: support 9 bit mode
60
62 void * buffer;
66
68 public_member(
70 implement(vsf_usart_t)
71#endif
72 vsf_usart_t * usart;
73 )
74
75 private_member(
78
81 )
82};
83
84/*============================ INCLUDES ======================================*/
85
86#define VSF_USART_CFG_DEC_PREFIX vsf_fifo2req
87#define VSF_USART_CFG_DEC_UPCASE_PREFIX VSF_FIFO2REQ
88#define VSF_USART_CFG_DEC_EXTERN_OP ENABLED
90
91/*============================ PROTOTYPES ====================================*/
92/*============================ IMPLEMENTATION ================================*/
93
94#endif
95
96#endif
97/* EOF */
#define ENABLED
Definition __type.h:28
vsf_usart_irq_mask_t
Definition uart.h:105
Definition fifo2req_usart.h:67
#define VSF_FIFO2REQ_USART_CFG_MULTI_CLASS
Definition fifo2req_usart.h:38
#define vsf_class(__name)
Definition ooc_class.h:48
const i_spi_t vsf_spi_irq_mask_t irq_mask
Definition spi_interface.h:38
unsigned uint32_t
Definition stdint.h:9
Definition fifo2req_usart.h:61
uint32_t count
Definition fifo2req_usart.h:64
uint32_t max_count
Definition fifo2req_usart.h:63
void * buffer
Definition fifo2req_usart.h:62
Definition vsf_template_usart.h:550
Definition vsf_template_usart.h:661
vsf_adc_isr_t isr
Definition adc.h:83