VSF Documented
vsf_linux_devfs.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 __VSF_LINUX_FS_DEVFS_INTERNAL_H__
19#define __VSF_LINUX_FS_DEVFS_INTERNAL_H__
20
21/*============================ INCLUDES ======================================*/
22
23#include "../../../../vsf_linux_cfg.h"
24
25#if VSF_USE_LINUX == ENABLED && VSF_LINUX_USE_DEVFS == ENABLED
26
28
29// for hardware info
30#include "hal/vsf_hal.h"
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
36/*============================ MACROS ========================================*/
37
38#if VSF_USE_BTSTACK == ENABLED
39# define VSF_LINUX_BTHCI_PATH_PREFIX "/dev/ttyhci"
40#endif
41
42/*============================ MACROFIED FUNCTIONS ===========================*/
43/*============================ TYPES =========================================*/
44
45#if VSF_HAL_USE_GPIO == ENABLED
46typedef struct vsf_linux_gpio_chip_t {
50#endif
51
52#if VSF_USE_INPUT == ENABLED && VSF_INPUT_CFG_REGISTRATION_MECHANISM == ENABLED
53typedef struct vsf_linux_mouse_t {
57
61#endif
62
63#if VSF_USE_BTSTACK == ENABLED
64typedef struct vsf_linux_bthci_t {
65 const void *hci_transport_instance; // hci_transport_t
67 const void *chipset_instance; // btstack_chipset_t
68
69 void *__priv;
71#endif
72
73/*============================ GLOBAL VARIABLES ==============================*/
74/*============================ LOCAL VARIABLES ===============================*/
75/*============================ PROTOTYPES ====================================*/
76
77#if VSF_HAL_USE_USART == ENABLED
78extern int vsf_linux_fs_bind_uart(char *path, vsf_usart_t *uart);
79#endif
80#if VSF_HAL_USE_I2C == ENABLED
81extern int vsf_linux_fs_bind_i2c(char *path, vsf_i2c_t *i2c);
82#endif
83#if VSF_HAL_USE_SPI == ENABLED
84extern int vsf_linux_fs_bind_spi(char *path, vsf_spi_t *spi);
85#endif
86#if VSF_HAL_USE_GPIO == ENABLED
87extern int vsf_linux_fs_bind_gpio(char *path, vsf_linux_gpio_chip_t *gpio_chip);
88# if VSF_HW_GPIO_COUNT > 0
89extern int vsf_linux_fs_bind_gpio_hw(char *path);
90# endif
91#endif
92
93#if VSF_USE_MAL == ENABLED
94typedef struct vk_mal_t vk_mal_t;
95extern int vsf_linux_fs_bind_mal(char *path, vk_mal_t *mal);
96#endif
97
98#if VSF_USE_INPUT == ENABLED && VSF_INPUT_CFG_REGISTRATION_MECHANISM == ENABLED
100extern int vsf_linux_fs_bind_mouse(char *path, vsf_linux_mouse_t *mouse);
101# if VSF_LINUX_USE_TERMINAL_KEYBOARD == ENABLED
103# endif
104#endif
105
106#if VSF_USE_UI == ENABLED
107typedef struct vk_disp_t vk_disp_t;
108extern int vsf_linux_fs_bind_disp(char *path, vk_disp_t *disp);
109#endif
110
111#if VSF_USE_BTSTACK == ENABLED
112extern int vsf_linux_fs_bind_bthci(char *path, vsf_linux_bthci_t *bthci);
113#endif
114
115extern int vsf_linux_devfs_init(void);
116
117#ifdef __cplusplus
118}
119#endif
120
121/*============================ INCLUDES ======================================*/
122
123#if VSF_LINUX_DEVFS_USE_ALSA == ENABLED
125#endif
126
127#if VSF_USE_USB_DEVICE == ENABLED
129#endif
130
131#endif // VSF_USE_LINUX && VSF_LINUX_USE_DEVFS
132#endif // __VSF_LINUX_FS_DEV_INTERNAL_H__
133/* EOF */
Definition vsf_disp.h:175
Definition vsf_input.h:114
mal class
Definition vsf_mal.h:168
unsigned char uint8_t
Definition stdint.h:5
Definition vsf_template_gpio.h:720
I2C instance structure for multi-class support.
Definition vsf_template_i2c.h:976
Definition vsf_linux_devfs.h:64
void * hci_transport_config
Definition vsf_linux_devfs.h:66
const void * chipset_instance
Definition vsf_linux_devfs.h:67
const void * hci_transport_instance
Definition vsf_linux_devfs.h:65
void * __priv
Definition vsf_linux_devfs.h:69
Definition vsf_linux_devfs.h:46
uint8_t port_num
Definition vsf_linux_devfs.h:47
vsf_gpio_t * ports[0]
Definition vsf_linux_devfs.h:48
Definition vsf_linux_devfs.h:53
vk_input_notifier_t notifier
Definition vsf_linux_devfs.h:54
float default_sensitivity
Definition vsf_linux_devfs.h:55
Definition vsf_linux_devfs.h:58
vk_input_notifier_t notifier
Definition vsf_linux_devfs.h:59
SPI instance structure, used for SPI Multi Class support, not needed in non Multi Class mode.
Definition vsf_template_spi.h:766
USART instance structure Used for USART Multi Class support.
Definition vsf_template_usart.h:775
int vsf_linux_fs_bind_spi(char *path, vsf_spi_t *spi)
Definition vsf_linux_devfs.c:983
int vsf_linux_fs_bind_uart(char *path, vsf_usart_t *uart)
Definition vsf_linux_devfs.c:383
int vsf_linux_fs_bind_mal(char *path, vk_mal_t *mal)
Definition vsf_linux_devfs.c:1070
int vsf_linux_fs_bind_terminal_keyboard(char *path, vsf_linux_terminal_keyboard_t *keyboard)
Definition vsf_linux_devfs.c:1716
int vsf_linux_devfs_init(void)
Definition vsf_linux_devfs.c:2368
int vsf_linux_fs_bind_mouse(char *path, vsf_linux_mouse_t *mouse)
Definition vsf_linux_devfs.c:1640
int vsf_linux_fs_bind_i2c(char *path, vsf_i2c_t *i2c)
Definition vsf_linux_devfs.c:754
int vsf_linux_fs_bind_gpio(char *path, vsf_linux_gpio_chip_t *gpio_chip)
Definition vsf_linux_devfs.c:2277
int vsf_linux_fs_bind_bthci(char *path, vsf_linux_bthci_t *bthci)
Definition vsf_linux_devfs.c:571
int vsf_linux_fs_bind_input(char *path, vk_input_notifier_t *notifier)
Definition vsf_linux_devfs.c:1588
int vsf_linux_fs_bind_disp(char *path, vk_disp_t *disp)
Definition vsf_linux_devfs.c:2086
vk_input_notifier_t notifier
Definition vsf_xboot.c:31
Generated from commit: vsfteam/vsf@1c19fdc