From 41fde87ed8d1fcd593777bdfae2fa9e65006d984 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Fri, 15 May 2015 12:05:06 +0200 Subject: build: add support for out of tree modules --- ucoo/hal/adc/Module | 2 +- ucoo/hal/adc/test/Makefile | 2 +- ucoo/hal/gpio/Module | 2 +- ucoo/hal/gpio/test/Makefile | 2 +- ucoo/hal/i2c/Config | 2 +- ucoo/hal/i2c/Module | 2 +- ucoo/hal/i2c/i2c.host.cc | 10 +++++----- ucoo/hal/i2c/i2c_hard.stm32.cc | 2 +- ucoo/hal/i2c/i2c_hard.stm32.hh | 4 ++-- ucoo/hal/i2c/test/Makefile | 2 +- ucoo/hal/spi/Module | 2 +- ucoo/hal/spi/test/Makefile | 2 +- ucoo/hal/uart/Config | 2 +- ucoo/hal/uart/Module | 2 +- ucoo/hal/uart/test/Config | 2 +- ucoo/hal/uart/test/Makefile | 4 ++-- ucoo/hal/uart/uart.stm32.hh | 6 +++--- ucoo/hal/usb/Config | 2 +- ucoo/hal/usb/Module | 2 +- ucoo/hal/usb/test/Config | 2 +- ucoo/hal/usb/test/Makefile | 2 +- ucoo/hal/usb/test/test_usb.cc | 12 ++++++------ ucoo/hal/usb/usb.stm32.cc | 6 +++--- ucoo/hal/usb/usb.stm32.hh | 6 +++--- ucoo/hal/usb/usb_desc.stm32.c | 38 +++++++++++++++++++------------------- 25 files changed, 60 insertions(+), 60 deletions(-) (limited to 'ucoo/hal') diff --git a/ucoo/hal/adc/Module b/ucoo/hal/adc/Module index f633ffd..cc10647 100644 --- a/ucoo/hal/adc/Module +++ b/ucoo/hal/adc/Module @@ -1 +1 @@ -hal_adc_SOURCES = adc.host.cc adc_hard.stm32f4.cc +ucoo_hal_adc_SOURCES = adc.host.cc adc_hard.stm32f4.cc diff --git a/ucoo/hal/adc/test/Makefile b/ucoo/hal/adc/test/Makefile index fc46e0d..c6c8a3c 100644 --- a/ucoo/hal/adc/test/Makefile +++ b/ucoo/hal/adc/test/Makefile @@ -4,6 +4,6 @@ TARGETS = stm32f4 stm32f4_PROGS = test_adc test_adc_SOURCES = test_adc.cc -MODULES = hal/adc base/test hal/usb utils +MODULES = ucoo/hal/adc ucoo/base/test ucoo/hal/usb ucoo/utils include $(BASE)/build/top.mk diff --git a/ucoo/hal/gpio/Module b/ucoo/hal/gpio/Module index e5ccdec..b6f0b42 100644 --- a/ucoo/hal/gpio/Module +++ b/ucoo/hal/gpio/Module @@ -1 +1 @@ -hal_gpio_SOURCES = gpio.host.cc gpio.stm32f4.cc gpio.stm32f1.cc +ucoo_hal_gpio_SOURCES = gpio.host.cc gpio.stm32f4.cc gpio.stm32f1.cc diff --git a/ucoo/hal/gpio/test/Makefile b/ucoo/hal/gpio/test/Makefile index 68e4c1f..4a5c155 100644 --- a/ucoo/hal/gpio/test/Makefile +++ b/ucoo/hal/gpio/test/Makefile @@ -4,6 +4,6 @@ TARGETS = stm32f4 stm32f1 PROGS = test_gpio test_gpio_SOURCES = test_gpio.stm32f4.cc test_gpio.stm32f1.cc -MODULES = hal/gpio utils +MODULES = ucoo/hal/gpio ucoo/utils include $(BASE)/build/top.mk diff --git a/ucoo/hal/i2c/Config b/ucoo/hal/i2c/Config index 3871f5c..3bbcc3a 100644 --- a/ucoo/hal/i2c/Config +++ b/ucoo/hal/i2c/Config @@ -1,4 +1,4 @@ -[hal/i2c] +[ucoo/hal/i2c] # Size of slave buffer, used for both reception and transmission. slave_buffer_size = 64 # Activate debug trace. diff --git a/ucoo/hal/i2c/Module b/ucoo/hal/i2c/Module index ae93f22..872be6f 100644 --- a/ucoo/hal/i2c/Module +++ b/ucoo/hal/i2c/Module @@ -1 +1 @@ -hal_i2c_SOURCES := i2c.host.cc i2c_slave_data_buffer.cc i2c_hard.stm32.cc +ucoo_hal_i2c_SOURCES := i2c.host.cc i2c_slave_data_buffer.cc i2c_hard.stm32.cc diff --git a/ucoo/hal/i2c/i2c.host.cc b/ucoo/hal/i2c/i2c.host.cc index 4a2553b..6b3181b 100644 --- a/ucoo/hal/i2c/i2c.host.cc +++ b/ucoo/hal/i2c/i2c.host.cc @@ -23,7 +23,7 @@ // }}} #include "i2c.host.hh" -#include "config/hal/i2c.hh" +#include "config/ucoo/hal/i2c.hh" namespace ucoo { @@ -77,7 +77,7 @@ I2cHostShared::send (uint8_t addr, const char *buf, int count) { if (addr == (*i)->slave_addr_) { - assert (count <= UCOO_CONFIG_HAL_I2C_SLAVE_BUFFER_SIZE); + assert (count <= CONFIG_UCOO_HAL_I2C_SLAVE_BUFFER_SIZE); (*i)->slave_data_handler_->to_recv (buf, count); return count; } @@ -99,7 +99,7 @@ I2cHostShared::recv (uint8_t addr, char *buf, int count) { if (addr == (*i)->slave_addr_) { - assert (count <= UCOO_CONFIG_HAL_I2C_SLAVE_BUFFER_SIZE); + assert (count <= CONFIG_UCOO_HAL_I2C_SLAVE_BUFFER_SIZE); return (*i)->slave_data_handler_->to_send (buf, count); } } @@ -125,7 +125,7 @@ I2cHostShared::handle_read (mex::Msg &msg) { if (addr == (*i)->slave_addr_) { - assert (size <= UCOO_CONFIG_HAL_I2C_SLAVE_BUFFER_SIZE); + assert (size <= CONFIG_UCOO_HAL_I2C_SLAVE_BUFFER_SIZE); char buf[size]; int n = (*i)->slave_data_handler_->to_send (buf, size); mex::Msg rsp (read_mtype_); @@ -147,7 +147,7 @@ I2cHostShared::handle_write (mex::Msg &msg) if (addr == (*i)->slave_addr_) { int size = msg.len (); - assert (size <= UCOO_CONFIG_HAL_I2C_SLAVE_BUFFER_SIZE); + assert (size <= CONFIG_UCOO_HAL_I2C_SLAVE_BUFFER_SIZE); (*i)->slave_data_handler_->to_recv (msg.pop (size), size); break; } diff --git a/ucoo/hal/i2c/i2c_hard.stm32.cc b/ucoo/hal/i2c/i2c_hard.stm32.cc index 9afe241..14a4486 100644 --- a/ucoo/hal/i2c/i2c_hard.stm32.cc +++ b/ucoo/hal/i2c/i2c_hard.stm32.cc @@ -32,7 +32,7 @@ namespace ucoo { /// Local trace. -static Trace i2c_trace; +static Trace i2c_trace; /// Information on I2C hardware structure. struct i2c_hardware_t diff --git a/ucoo/hal/i2c/i2c_hard.stm32.hh b/ucoo/hal/i2c/i2c_hard.stm32.hh index 94e4259..98e4930 100644 --- a/ucoo/hal/i2c/i2c_hard.stm32.hh +++ b/ucoo/hal/i2c/i2c_hard.stm32.hh @@ -25,7 +25,7 @@ // }}} #include "ucoo/intf/i2c.hh" -#include "config/hal/i2c.hh" +#include "config/ucoo/hal/i2c.hh" namespace ucoo { @@ -68,7 +68,7 @@ class I2cHard : public I2c /// Handler called to source or sink data for slave exchanges. DataHandler *slave_data_handler_; /// Slave buffer. - char slave_buf_[UCOO_CONFIG_HAL_I2C_SLAVE_BUFFER_SIZE]; + char slave_buf_[CONFIG_UCOO_HAL_I2C_SLAVE_BUFFER_SIZE]; /// Current buffer count (bytes to send), or buffer size (available room). int buf_count_; /// Current buffer index (position to read byte to send or write received diff --git a/ucoo/hal/i2c/test/Makefile b/ucoo/hal/i2c/test/Makefile index 5046862..ca6915e 100644 --- a/ucoo/hal/i2c/test/Makefile +++ b/ucoo/hal/i2c/test/Makefile @@ -4,6 +4,6 @@ TARGETS = host stm32f4 PROGS = test_i2c test_i2c_SOURCES = test_i2c.cc -MODULES = hal/i2c utils base/test hal/usb +MODULES = ucoo/hal/i2c ucoo/utils ucoo/base/test ucoo/hal/usb include $(BASE)/build/top.mk diff --git a/ucoo/hal/spi/Module b/ucoo/hal/spi/Module index fe9737f..46a0fe2 100644 --- a/ucoo/hal/spi/Module +++ b/ucoo/hal/spi/Module @@ -1 +1 @@ -hal_spi_SOURCES := spi_soft.cc spi_hard.stm32.cc +ucoo_hal_spi_SOURCES := spi_soft.cc spi_hard.stm32.cc diff --git a/ucoo/hal/spi/test/Makefile b/ucoo/hal/spi/test/Makefile index 76b8230..eb872a0 100644 --- a/ucoo/hal/spi/test/Makefile +++ b/ucoo/hal/spi/test/Makefile @@ -4,6 +4,6 @@ TARGETS = stm32f4 PROGS = test_spi test_spi_SOURCES = test_spi.cc -MODULES = hal/spi hal/gpio utils base/test hal/usb +MODULES = ucoo/hal/spi ucoo/hal/gpio ucoo/utils ucoo/base/test ucoo/hal/usb include $(BASE)/build/top.mk diff --git a/ucoo/hal/uart/Config b/ucoo/hal/uart/Config index 0a67d63..1229b76 100644 --- a/ucoo/hal/uart/Config +++ b/ucoo/hal/uart/Config @@ -1,4 +1,4 @@ -[hal/uart] +[ucoo/hal/uart] # Size of reception buffer. rx_buffer = 32 # Size of transmission buffer. diff --git a/ucoo/hal/uart/Module b/ucoo/hal/uart/Module index a9d185e..8b1bac2 100644 --- a/ucoo/hal/uart/Module +++ b/ucoo/hal/uart/Module @@ -1 +1 @@ -hal_uart_SOURCES = uart.stm32.cc +ucoo_hal_uart_SOURCES = uart.stm32.cc diff --git a/ucoo/hal/uart/test/Config b/ucoo/hal/uart/test/Config index 4fd7571..91c7ed5 100644 --- a/ucoo/hal/uart/test/Config +++ b/ucoo/hal/uart/test/Config @@ -1,4 +1,4 @@ -[hal/uart] +[ucoo/hal/uart] rx_buffer = 32 tx_buffer = 8 diff --git a/ucoo/hal/uart/test/Makefile b/ucoo/hal/uart/test/Makefile index 6989dd2..b1e9c71 100644 --- a/ucoo/hal/uart/test/Makefile +++ b/ucoo/hal/uart/test/Makefile @@ -6,7 +6,7 @@ stm32f4_PROGS = test_uart_disc test_uart_SOURCES = test_uart.cc test_uart_disc_SOURCES = test_uart_disc.cc -MODULES = hal/uart -test_uart_disc_MODULES = $(MODULES) base/test hal/usb +MODULES = ucoo/hal/uart +test_uart_disc_MODULES = $(MODULES) ucoo/base/test ucoo/hal/usb include $(BASE)/build/top.mk diff --git a/ucoo/hal/uart/uart.stm32.hh b/ucoo/hal/uart/uart.stm32.hh index 1dd3d54..7d74946 100644 --- a/ucoo/hal/uart/uart.stm32.hh +++ b/ucoo/hal/uart/uart.stm32.hh @@ -26,7 +26,7 @@ #include "ucoo/intf/stream.hh" #include "ucoo/utils/fifo.hh" -#include "config/hal/uart.hh" +#include "config/ucoo/hal/uart.hh" namespace ucoo { @@ -64,9 +64,9 @@ class Uart : public Stream /// UART number. int n_; /// RX FIFO, filled by interrupt handler. - Fifo rx_fifo_; + Fifo rx_fifo_; /// TX FIFO, emptied by interrupt handler. - Fifo tx_fifo_; + Fifo tx_fifo_; /// Error character, inserted in case of error. char error_char_; /// Is it enabled? diff --git a/ucoo/hal/usb/Config b/ucoo/hal/usb/Config index 80341e8..0ec69c3 100644 --- a/ucoo/hal/usb/Config +++ b/ucoo/hal/usb/Config @@ -1,4 +1,4 @@ -[hal/usb] +[ucoo/hal/usb] # Theses are APBTeam IDs, given by Openmoko! vendor_id = 0x1d50 product_id = 0x6052 diff --git a/ucoo/hal/usb/Module b/ucoo/hal/usb/Module index 433c8b2..e47e0e8 100644 --- a/ucoo/hal/usb/Module +++ b/ucoo/hal/usb/Module @@ -1 +1 @@ -hal_usb_SOURCES = usb.stm32.cc usb_desc.stm32.c +ucoo_hal_usb_SOURCES = usb.stm32.cc usb_desc.stm32.c diff --git a/ucoo/hal/usb/test/Config b/ucoo/hal/usb/test/Config index 49b2f0b..a29fd20 100644 --- a/ucoo/hal/usb/test/Config +++ b/ucoo/hal/usb/test/Config @@ -1,2 +1,2 @@ -[hal/usb] +[ucoo/hal/usb] stream_nb = 1 diff --git a/ucoo/hal/usb/test/Makefile b/ucoo/hal/usb/test/Makefile index 9ef0eab..95e4648 100644 --- a/ucoo/hal/usb/test/Makefile +++ b/ucoo/hal/usb/test/Makefile @@ -4,6 +4,6 @@ TARGETS = stm32f4 PROGS = test_usb test_usb_SOURCES = test_usb.cc -MODULES = hal/usb +MODULES = ucoo/hal/usb include $(BASE)/build/top.mk diff --git a/ucoo/hal/usb/test/test_usb.cc b/ucoo/hal/usb/test/test_usb.cc index a1fe362..914e084 100644 --- a/ucoo/hal/usb/test/test_usb.cc +++ b/ucoo/hal/usb/test/test_usb.cc @@ -31,22 +31,22 @@ main (int argc, const char **argv) ucoo::UsbStreamControl usc ("APBTeam", "USB test"); ucoo::UsbStream us[] = { ucoo::UsbStream (usc, 0), -#if UCOO_CONFIG_HAL_USB_STREAM_NB >= 2 +#if CONFIG_UCOO_HAL_USB_STREAM_NB >= 2 ucoo::UsbStream (usc, 1), #endif -#if UCOO_CONFIG_HAL_USB_STREAM_NB >= 3 +#if CONFIG_UCOO_HAL_USB_STREAM_NB >= 3 ucoo::UsbStream (usc, 2), #endif }; - if (UCOO_CONFIG_HAL_USB_STREAM_NB > 1) + if (CONFIG_UCOO_HAL_USB_STREAM_NB > 1) { - for (int i = 0; i < UCOO_CONFIG_HAL_USB_STREAM_NB; i++) + for (int i = 0; i < CONFIG_UCOO_HAL_USB_STREAM_NB; i++) us[i].block (false); } char buf[6]; while (1) { - for (int i = 0; i < UCOO_CONFIG_HAL_USB_STREAM_NB; i++) + for (int i = 0; i < CONFIG_UCOO_HAL_USB_STREAM_NB; i++) { int len = us[i].read (buf + 2, sizeof (buf) - 2); if (len) @@ -54,7 +54,7 @@ main (int argc, const char **argv) buf[0] = i + '0'; buf[1] = '>'; len += 2; - if (UCOO_CONFIG_HAL_USB_STREAM_NB == 1) + if (CONFIG_UCOO_HAL_USB_STREAM_NB == 1) us[i].write (buf, len); else { diff --git a/ucoo/hal/usb/usb.stm32.cc b/ucoo/hal/usb/usb.stm32.cc index 37595e8..93f1782 100644 --- a/ucoo/hal/usb/usb.stm32.cc +++ b/ucoo/hal/usb/usb.stm32.cc @@ -31,7 +31,7 @@ #include "usb_desc.stm32.h" #if defined (TARGET_stm32f4) -# if UCOO_CONFIG_HAL_USB_DRIVER_HS +# if CONFIG_UCOO_HAL_USB_DRIVER_HS # define usb_isr otg_hs_isr # define usb_driver otghs_usb_driver # else @@ -82,7 +82,7 @@ UsbStreamControl::UsbStreamControl (const char *vendor, const char *product) strings[0] = vendor; strings[1] = product; #if defined (TARGET_stm32f4) -# if UCOO_CONFIG_HAL_USB_DRIVER_HS +# if CONFIG_UCOO_HAL_USB_DRIVER_HS rcc_periph_clock_enable (RCC_OTGHS); rcc_periph_clock_enable (RCC_GPIOB); gpio_mode_setup (GPIOB, GPIO_MODE_AF, GPIO_PUPD_NONE, @@ -103,7 +103,7 @@ UsbStreamControl::UsbStreamControl (const char *vendor, const char *product) strings, lengthof (strings), usb_control_buffer, sizeof (usb_control_buffer)); usbd_register_set_config_callback (usbdev, set_config); -#if UCOO_CONFIG_HAL_USB_DRIVER_HS +#if CONFIG_UCOO_HAL_USB_DRIVER_HS nvic_enable_irq (NVIC_OTG_HS_IRQ); #else nvic_enable_irq (NVIC_OTG_FS_IRQ); diff --git a/ucoo/hal/usb/usb.stm32.hh b/ucoo/hal/usb/usb.stm32.hh index 118e883..11ce16c 100644 --- a/ucoo/hal/usb/usb.stm32.hh +++ b/ucoo/hal/usb/usb.stm32.hh @@ -26,7 +26,7 @@ #include "ucoo/intf/stream.hh" #include "ucoo/common.hh" -#include "config/hal/usb.hh" +#include "config/ucoo/hal/usb.hh" #include @@ -54,9 +54,9 @@ class UsbStreamControl static void rx_callback (usbd_device *usbdev, uint8_t ep); private: /// Size of endpoints. - static const int ep_size_ = UCOO_CONFIG_HAL_USB_EP_SIZE; + static const int ep_size_ = CONFIG_UCOO_HAL_USB_EP_SIZE; /// Number of streams (also interfaces or pair of endpoints). - static const int stream_nb_ = UCOO_CONFIG_HAL_USB_STREAM_NB; + static const int stream_nb_ = CONFIG_UCOO_HAL_USB_STREAM_NB; /// Pointer to the one and only instance. static UsbStreamControl *instance_; /// Whether device is currently configured. diff --git a/ucoo/hal/usb/usb_desc.stm32.c b/ucoo/hal/usb/usb_desc.stm32.c index 8d6fc87..ae14d14 100644 --- a/ucoo/hal/usb/usb_desc.stm32.c +++ b/ucoo/hal/usb/usb_desc.stm32.c @@ -23,7 +23,7 @@ * }}} */ #include "usb_desc.stm32.h" -#include "config/hal/usb.hh" +#include "config/ucoo/hal/usb.hh" const struct usb_device_descriptor usb_desc_dev = { .bLength = USB_DT_DEVICE_SIZE, @@ -33,8 +33,8 @@ const struct usb_device_descriptor usb_desc_dev = { .bDeviceSubClass = 0, .bDeviceProtocol = 0, .bMaxPacketSize0 = 64, - .idVendor = UCOO_CONFIG_HAL_USB_VENDOR_ID, - .idProduct = UCOO_CONFIG_HAL_USB_PRODUCT_ID, + .idVendor = CONFIG_UCOO_HAL_USB_VENDOR_ID, + .idProduct = CONFIG_UCOO_HAL_USB_PRODUCT_ID, .bcdDevice = 0x0000, .iManufacturer = 1, .iProduct = 2, @@ -48,7 +48,7 @@ static const struct usb_endpoint_descriptor usb_desc_endp_1[] = { .bDescriptorType = USB_DT_ENDPOINT, .bEndpointAddress = 0x01, .bmAttributes = USB_ENDPOINT_ATTR_BULK, - .wMaxPacketSize = UCOO_CONFIG_HAL_USB_EP_SIZE, + .wMaxPacketSize = CONFIG_UCOO_HAL_USB_EP_SIZE, .bInterval = 0, }, { @@ -56,7 +56,7 @@ static const struct usb_endpoint_descriptor usb_desc_endp_1[] = { .bDescriptorType = USB_DT_ENDPOINT, .bEndpointAddress = 0x81, .bmAttributes = USB_ENDPOINT_ATTR_BULK, - .wMaxPacketSize = UCOO_CONFIG_HAL_USB_EP_SIZE, + .wMaxPacketSize = CONFIG_UCOO_HAL_USB_EP_SIZE, .bInterval = 0, }, }; @@ -77,7 +77,7 @@ static const struct usb_interface_descriptor usb_desc_iface_1[] = { }, }; -#if UCOO_CONFIG_HAL_USB_STREAM_NB >= 2 +#if CONFIG_UCOO_HAL_USB_STREAM_NB >= 2 static const struct usb_endpoint_descriptor usb_desc_endp_2[] = { { @@ -85,7 +85,7 @@ static const struct usb_endpoint_descriptor usb_desc_endp_2[] = { .bDescriptorType = USB_DT_ENDPOINT, .bEndpointAddress = 0x02, .bmAttributes = USB_ENDPOINT_ATTR_BULK, - .wMaxPacketSize = UCOO_CONFIG_HAL_USB_EP_SIZE, + .wMaxPacketSize = CONFIG_UCOO_HAL_USB_EP_SIZE, .bInterval = 0, }, { @@ -93,7 +93,7 @@ static const struct usb_endpoint_descriptor usb_desc_endp_2[] = { .bDescriptorType = USB_DT_ENDPOINT, .bEndpointAddress = 0x82, .bmAttributes = USB_ENDPOINT_ATTR_BULK, - .wMaxPacketSize = UCOO_CONFIG_HAL_USB_EP_SIZE, + .wMaxPacketSize = CONFIG_UCOO_HAL_USB_EP_SIZE, .bInterval = 0, }, }; @@ -114,9 +114,9 @@ static const struct usb_interface_descriptor usb_desc_iface_2[] = { }, }; -#endif /* UCOO_CONFIG_HAL_USB_STREAM_NB >= 2 */ +#endif /* CONFIG_UCOO_HAL_USB_STREAM_NB >= 2 */ -#if UCOO_CONFIG_HAL_USB_STREAM_NB >= 3 +#if CONFIG_UCOO_HAL_USB_STREAM_NB >= 3 static const struct usb_endpoint_descriptor usb_desc_endp_3[] = { { @@ -124,7 +124,7 @@ static const struct usb_endpoint_descriptor usb_desc_endp_3[] = { .bDescriptorType = USB_DT_ENDPOINT, .bEndpointAddress = 0x03, .bmAttributes = USB_ENDPOINT_ATTR_BULK, - .wMaxPacketSize = UCOO_CONFIG_HAL_USB_EP_SIZE, + .wMaxPacketSize = CONFIG_UCOO_HAL_USB_EP_SIZE, .bInterval = 0, }, { @@ -132,7 +132,7 @@ static const struct usb_endpoint_descriptor usb_desc_endp_3[] = { .bDescriptorType = USB_DT_ENDPOINT, .bEndpointAddress = 0x83, .bmAttributes = USB_ENDPOINT_ATTR_BULK, - .wMaxPacketSize = UCOO_CONFIG_HAL_USB_EP_SIZE, + .wMaxPacketSize = CONFIG_UCOO_HAL_USB_EP_SIZE, .bInterval = 0, }, }; @@ -153,9 +153,9 @@ static const struct usb_interface_descriptor usb_desc_iface_3[] = { }, }; -#endif /* UCOO_CONFIG_HAL_USB_STREAM_NB >= 3 */ +#endif /* CONFIG_UCOO_HAL_USB_STREAM_NB >= 3 */ -#if UCOO_CONFIG_HAL_USB_STREAM_NB > 3 +#if CONFIG_UCOO_HAL_USB_STREAM_NB > 3 # error "too many streams requested" #endif @@ -164,13 +164,13 @@ static const struct usb_interface usb_desc_ifaces[] = { .num_altsetting = 1, .altsetting = usb_desc_iface_1, }, -#if UCOO_CONFIG_HAL_USB_STREAM_NB >= 2 +#if CONFIG_UCOO_HAL_USB_STREAM_NB >= 2 { .num_altsetting = 1, .altsetting = usb_desc_iface_2, }, #endif -#if UCOO_CONFIG_HAL_USB_STREAM_NB >= 3 +#if CONFIG_UCOO_HAL_USB_STREAM_NB >= 3 { .num_altsetting = 1, .altsetting = usb_desc_iface_3, @@ -182,11 +182,11 @@ const struct usb_config_descriptor usb_desc_config = { .bLength = USB_DT_CONFIGURATION_SIZE, .bDescriptorType = USB_DT_CONFIGURATION, .wTotalLength = 0, - .bNumInterfaces = UCOO_CONFIG_HAL_USB_STREAM_NB, + .bNumInterfaces = CONFIG_UCOO_HAL_USB_STREAM_NB, .bConfigurationValue = 1, .iConfiguration = 0, - .bmAttributes = 0x80 | (UCOO_CONFIG_HAL_USB_SELF_POWERED ? 0x40 : 0), - .bMaxPower = UCOO_CONFIG_HAL_USB_MAX_POWER / 2, + .bmAttributes = 0x80 | (CONFIG_UCOO_HAL_USB_SELF_POWERED ? 0x40 : 0), + .bMaxPower = CONFIG_UCOO_HAL_USB_MAX_POWER / 2, .interface = usb_desc_ifaces, }; -- cgit v1.2.3