18#ifndef __HAL_DRIVER_VSF_DISTBUS_H__
19#define __HAL_DRIVER_VSF_DISTBUS_H__
25#if VSF_USE_DISTBUS == ENABLED && VSF_HAL_USE_DISTBUS == ENABLED
30#if VSF_HAL_DISTBUS_USE_GPIO == ENABLED && VSF_HAL_USE_GPIO == ENABLED
33#if VSF_HAL_DISTBUS_USE_I2C == ENABLED && VSF_HAL_USE_I2C == ENABLED
36#if VSF_HAL_DISTBUS_USE_SPI == ENABLED && VSF_HAL_USE_SPI == ENABLED
39#if VSF_HAL_DISTBUS_USE_USART == ENABLED && VSF_HAL_USE_USART == ENABLED
42#if VSF_HAL_DISTBUS_USE_SDIO == ENABLED && VSF_HAL_USE_SDIO == ENABLED
45#if VSF_HAL_DISTBUS_USE_ADC == ENABLED && VSF_HAL_USE_ADC == ENABLED
48#if VSF_HAL_DISTBUS_USE_DAC == ENABLED && VSF_HAL_USE_DAC == ENABLED
51#if VSF_HAL_DISTBUS_USE_PWM == ENABLED && VSF_HAL_USE_PWM == ENABLED
54#if VSF_HAL_DISTBUS_USE_I2S == ENABLED && VSF_HAL_USE_I2S == ENABLED
57#if VSF_HAL_DISTBUS_USE_USBD == ENABLED && VSF_HAL_USE_USBD == ENABLED
60#if VSF_HAL_DISTBUS_USE_USBH == ENABLED && VSF_HAL_USE_USBH == ENABLED
65#if defined(__VSF_HAL_DISTBUS_CLASS_IMPLEMENT)
66# define __VSF_CLASS_IMPLEMENT__
68#elif defined(__VSF_HAL_DISTBUS_CLASS_INHERIT__)
69# define __VSF_CLASS_INHERIT__
72# define PUBLIC_CONST const
83#ifndef VSF_HAL_DISTBUS_CFG_MTU
84# define VSF_HAL_DISTBUS_CFG_MTU 512
119#if defined(__VSF_HAL_DISTBUS_CLASS_INHERIT__) || defined(__VSF_HAL_DISTBUS_CLASS_IMPLEMENT)
120typedef enum vsf_hal_distbus_cmd_t {
121 VSF_HAL_DISTBUS_CMD_CONNECT = 0,
122 VSF_HAL_DISTBUS_CMD_DECLARE,
124 VSF_HAL_DISTBUS_CMD_ADDR_RANGE,
125} vsf_hal_distbus_cmd_t;
129#define VSF_HAL_DISTBUS_DEFINE(__TYPE) \
132 VSF_MCONNECT(vsf_hal_distbus_, __TYPE, _t) *dev; \
135#define __VSF_HAL_DISTBUS_ENUM VSF_HAL_DISTBUS_DEFINE
163#undef __VSF_HAL_DISTBUS_CLASS_IMPLEMENT
164#undef __VSF_HAL_DISTBUS_CLASS_INHERIT__
Definition vsf_distbus.h:86
Definition vsf_distbus.h:119
void vsf_hal_distbus_register(vsf_distbus_t *distbus, vsf_hal_distbus_t *hal_distbus)
Definition vsf_hal_distbus.c:129
vsf_hal_distbus_type_t
Definition driver.h:90
@ VSF_HAL_DISTBUS_DAC
Definition driver.h:98
@ VSF_HAL_DISTBUS_PWM
Definition driver.h:99
@ VSF_HAL_DISTBUS_USBH
Definition driver.h:102
@ VSF_HAL_DISTBUS_I2S
Definition driver.h:100
@ VSF_HAL_DISTBUS_pwm
Definition driver.h:113
@ VSF_HAL_DISTBUS_adc
Definition driver.h:111
@ VSF_HAL_DISTBUS_io
Definition driver.h:105
@ VSF_HAL_DISTBUS_usbd
Definition driver.h:115
@ VSF_HAL_DISTBUS_IO
Definition driver.h:91
@ VSF_HAL_DISTBUS_gpio
Definition driver.h:106
@ VSF_HAL_DISTBUS_I2C
Definition driver.h:93
@ VSF_HAL_DISTBUS_usbh
Definition driver.h:116
@ VSF_HAL_DISTBUS_sdio
Definition driver.h:110
@ VSF_HAL_DISTBUS_usart
Definition driver.h:109
@ VSF_HAL_DISTBUS_USBD
Definition driver.h:101
@ VSF_HAL_DISTBUS_GPIO
Definition driver.h:92
@ VSF_HAL_DISTBUS_ADC
Definition driver.h:97
@ VSF_HAL_DISTBUS_dac
Definition driver.h:112
@ VSF_HAL_DISTBUS_SDIO
Definition driver.h:96
@ VSF_HAL_DISTBUS_i2s
Definition driver.h:114
@ VSF_HAL_DISTBUS_i2c
Definition driver.h:107
@ VSF_HAL_DISTBUS_SPI
Definition driver.h:94
@ VSF_HAL_DISTBUS_USART
Definition driver.h:95
@ VSF_HAL_DISTBUS_spi
Definition driver.h:108
void vsf_hal_distbus_start(vsf_hal_distbus_t *hal_distbus)
Definition vsf_hal_distbus.c:138
#define PUBLIC_CONST
Definition driver.h:72
#define vsf_class(__name)
Definition ooc_class.h:48