Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defining CDC_TRANSMIT_QUEUE_BUFFER_SIZE from .ino sketch #1929

Closed
mkals opened this issue Jan 23, 2023 · 1 comment · Fixed by #2165
Closed

Defining CDC_TRANSMIT_QUEUE_BUFFER_SIZE from .ino sketch #1929

mkals opened this issue Jan 23, 2023 · 1 comment · Fixed by #2165
Labels
answered question ❓ Usually converted as a discussion
Milestone

Comments

@mkals
Copy link
Contributor

mkals commented Jan 23, 2023

I'm using an STM32F4 board as a serial passthrough for programming other STM32 microprocessors. The buffer sizes set in the cdc_queue.h file are too small to allow for this application. Is there a way to set the two relevant parameters (CDC_TRANSMIT_QUEUE_BUFFER_SIZE and CDC_RECEIVE_QUEUE_BUFFER_SIZE) from the .ino sketch without modifying the library?

@fpistm fpistm added question ❓ Usually converted as a discussion answered labels Jan 23, 2023
@fpistm fpistm added this to To do in STM32 core based on ST HAL via automation Jan 23, 2023
@fpistm fpistm modified the milestone: 2.5.0 Jan 23, 2023
@fpistm
Copy link
Member

fpistm commented Jan 23, 2023

Hi,
You can try to override it using build_opt.h but basically it is not allowed to redefine it as it is not protected by #ifndef so you should have a warning about redefinition and hope the one in build_opt will be used but I guess it should be safe for you to change it in the core.

#define CDC_TRANSMIT_QUEUE_BUFFER_SIZE ((uint16_t)(CDC_QUEUE_MAX_PACKET_SIZE * 2))
#define CDC_RECEIVE_QUEUE_BUFFER_SIZE ((uint16_t)(CDC_QUEUE_MAX_PACKET_SIZE * 3))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered question ❓ Usually converted as a discussion
Projects
2 participants