Skip to content

Add DEVICE_SERIAL_FC guards to serial HAL API #10994

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

Merged
merged 5 commits into from
Jul 15, 2019

Conversation

fkjagodzinski
Copy link
Member

@fkjagodzinski fkjagodzinski commented Jul 9, 2019

Description

Functions related to serial flow control should not be exposed if DEVICE_SERIAL_FC is not defined

  • serial_set_flow_control,
  • serial_cts_pinmap,
  • serial_rts_pinmap.

The tests-mbed_hal_fpga_ci_test_shield-uart is also updated here.
This patch should fix build errors found here: #10965 (comment).

Pull request type

[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

@0xc0170 @mprse

Release Notes

Functions related to serial flow control should not be exposed
if DEVICE_SERIAL_FC is not defined
* serial_set_flow_control,
* serial_cts_pinmap,
* serial_rts_pinmap.
@ciarmcom ciarmcom requested review from 0xc0170, mprse and a team July 9, 2019 11:00
@ciarmcom
Copy link
Member

ciarmcom commented Jul 9, 2019

@fkjagodzinski, thank you for your changes.
@mprse @0xc0170 @ARMmbed/mbed-os-hal @ARMmbed/mbed-os-maintainers please review.

Fix undefined references to serial_set_flow_control.
@fkjagodzinski fkjagodzinski marked this pull request as ready for review July 9, 2019 11:30
Copy link
Contributor

@jamesbeyond jamesbeyond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 9, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Jul 9, 2019

Test run: FAILED

Summary: 2 of 4 test jobs failed
Build number : 1
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-ARM
  • jenkins-ci/mbed-os-ci_build-IAR

Filip Jagodzinski added 2 commits July 9, 2019 16:05
After adding DEVICE_SERIAL_FC guards to serial_api.h
serial_set_flow_control is not available. In case of this
implementation, this function is a no-op and may be safely removed.
After adding DEVICE_SERIAL_FC guards to serial_api.h
serial_set_flow_control is not available. In case of this
implementation, this function is a no-op and may be safely removed.
According to comment in the implementation this target supports the
hardware flow control on UART1 peripheral.
This patch fixes build errors after adding DEVICE_SERIAL_FC guards to
hal/serial_api.h.
@fkjagodzinski
Copy link
Member Author

@0xc0170 @jamesbeyond @mprse I pushed some fixes -- build failures should be resolved now. Could you take another look and re-review?

I'm not sure about the fix for RDA5981X -- this target supports hardware flow control but only on one peripheral. Is that reasonable to add SERIAL_FC in that case?

// Only UART1 has hardware flow control on RDA5991H
MBED_ASSERT((rxflow != UART0_RX) && (txflow != UART0_TX));

@evedon
Copy link
Contributor

evedon commented Jul 12, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Jul 12, 2019

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 2
Build artifacts

@artokin artokin merged commit 9cdfe37 into ARMmbed:master Jul 15, 2019
@fkjagodzinski fkjagodzinski deleted the fix-serial_fc_guards branch July 15, 2019 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants