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/*============================ MACROFIED FUNCTIONS ===========================*/
38/*============================ TYPES =========================================*/
39
40#if VSF_HAL_USE_GPIO == ENABLED
41typedef struct vsf_linux_gpio_chip_t {
45#endif
46
47#if VSF_USE_INPUT == ENABLED && VSF_INPUT_CFG_REGISTRATION_MECHANISM == ENABLED
48typedef struct vsf_linux_mouse_t {
52
56#endif
57
58/*============================ GLOBAL VARIABLES ==============================*/
59/*============================ LOCAL VARIABLES ===============================*/
60/*============================ PROTOTYPES ====================================*/
61
62#if VSF_HAL_USE_USART == ENABLED
63extern int vsf_linux_fs_bind_uart(char *path, vsf_usart_t *uart);
64#endif
65#if VSF_HAL_USE_I2C == ENABLED
66extern int vsf_linux_fs_bind_i2c(char *path, vsf_i2c_t *i2c);
67#endif
68#if VSF_HAL_USE_SPI == ENABLED
69extern int vsf_linux_fs_bind_spi(char *path, vsf_spi_t *spi);
70#endif
71#if VSF_HAL_USE_GPIO == ENABLED
72extern int vsf_linux_fs_bind_gpio(char *path, vsf_linux_gpio_chip_t *gpio_chip);
73# if VSF_HW_GPIO_COUNT > 0
74extern int vsf_linux_fs_bind_gpio_hw(char *path);
75# endif
76#endif
77
78#if VSF_USE_MAL == ENABLED
79typedef struct vk_mal_t vk_mal_t;
80extern int vsf_linux_fs_bind_mal(char *path, vk_mal_t *mal);
81#endif
82
83#if VSF_USE_INPUT == ENABLED && VSF_INPUT_CFG_REGISTRATION_MECHANISM == ENABLED
85extern int vsf_linux_fs_bind_mouse(char *path, vsf_linux_mouse_t *mouse);
86# if VSF_LINUX_USE_TERMINAL_KEYBOARD == ENABLED
88# endif
89#endif
90
91#if VSF_USE_UI == ENABLED
92typedef struct vk_disp_t vk_disp_t;
93extern int vsf_linux_fs_bind_disp(char *path, vk_disp_t *disp);
94#endif
95
96extern int vsf_linux_devfs_init(void);
97
98#ifdef __cplusplus
99}
100#endif
101
102/*============================ INCLUDES ======================================*/
103
104#if VSF_LINUX_DEVFS_USE_ALSA == ENABLED
106#endif
107
108#if VSF_USE_USB_DEVICE == ENABLED
110#endif
111
112#endif // VSF_USE_LINUX && VSF_LINUX_USE_DEVFS
113#endif // __VSF_LINUX_FS_DEV_INTERNAL_H__
114/* EOF */
Definition vsf_disp.h:173
Definition vsf_input.h:114
mal class
Definition vsf_mal.h:168
unsigned char uint8_t
Definition lvgl.h:40
Definition vsf_template_gpio.h:491
Definition vsf_template_i2c.h:334
Definition vsf_linux_devfs.h:41
uint8_t port_num
Definition vsf_linux_devfs.h:42
vsf_gpio_t * ports[0]
Definition vsf_linux_devfs.h:43
Definition vsf_linux_devfs.h:48
vk_input_notifier_t notifier
Definition vsf_linux_devfs.h:49
float default_sensitivity
Definition vsf_linux_devfs.h:50
Definition vsf_linux_devfs.h:53
vk_input_notifier_t notifier
Definition vsf_linux_devfs.h:54
Definition vsf_template_spi.h:541
Definition vsf_template_usart.h:726
int vsf_linux_fs_bind_spi(char *path, vsf_spi_t *spi)
Definition vsf_linux_devfs.c:760
int vsf_linux_fs_bind_uart(char *path, vsf_usart_t *uart)
Definition vsf_linux_devfs.c:355
int vsf_linux_fs_bind_mal(char *path, vk_mal_t *mal)
Definition vsf_linux_devfs.c:847
int vsf_linux_fs_bind_terminal_keyboard(char *path, vsf_linux_terminal_keyboard_t *keyboard)
Definition vsf_linux_devfs.c:1492
int vsf_linux_devfs_init(void)
Definition vsf_linux_devfs.c:2138
int vsf_linux_fs_bind_mouse(char *path, vsf_linux_mouse_t *mouse)
Definition vsf_linux_devfs.c:1416
int vsf_linux_fs_bind_i2c(char *path, vsf_i2c_t *i2c)
Definition vsf_linux_devfs.c:533
int vsf_linux_fs_bind_gpio(char *path, vsf_linux_gpio_chip_t *gpio_chip)
Definition vsf_linux_devfs.c:2047
int vsf_linux_fs_bind_input(char *path, vk_input_notifier_t *notifier)
Definition vsf_linux_devfs.c:1364
int vsf_linux_fs_bind_disp(char *path, vk_disp_t *disp)
Definition vsf_linux_devfs.c:1856
vk_input_notifier_t notifier
Definition vsf_xboot.c:31