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

cdc: fix line_coding aligment #2047

Merged
merged 2 commits into from
Apr 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/class/cdc/cdc_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ typedef struct

/*------------- From this point, data is not cleared by bus reset -------------*/
char wanted_char;
cdc_line_coding_t line_coding;
TU_ATTR_ALIGNED(4) cdc_line_coding_t line_coding;

// FIFO
tu_fifo_t rx_ff;
Expand Down
4 changes: 2 additions & 2 deletions src/class/cdc/cdc_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ typedef struct {
cdc_acm_capability_t acm_capability;
uint8_t ep_notif;

cdc_line_coding_t line_coding; // Baudrate, stop bits, parity, data width
uint8_t line_state; // DTR (bit0), RTS (bit1)
uint8_t line_state; // DTR (bit0), RTS (bit1)
TU_ATTR_ALIGNED(4) cdc_line_coding_t line_coding; // Baudrate, stop bits, parity, data width

tuh_xfer_cb_t user_control_cb;

Expand Down