This repository has been archived by the owner on Nov 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Device addition: add U_DEVICE_TRANSPORT_TYPE_UART_USB. (#1078)
When running on platforms that provide USB interfaces (e.g. Windows and Linux) the UART driver/transport may be used in all cases, this is not an issue. However, the configuration of periodic messaging out of a GNSS chip is port specific, i.e. this code has to tell the GNSS chip to emit a given message ID, say, once a second, on its UART port or on its USB port. Hence this code needs to know whether the HW transport is, under the hood, USB or UART. Previously we assumed the HW was USB on Windows/Zephyr-Posix but we could not do that on Linux since, on Linux, a Raspberry Pi, which has a couple of UARTs, I2C and SPI, may be using any one of those; for that case the customer had to use a compile-time flag U_CFG_GNSS_PORT_NUMBER to override the GNSS port number to be USB, which was cumbersome. The customer can now use U_DEVICE_TRANSPORT_TYPE_UART_USB to indicate that the GNSS connection is USB; the ability to override at compile time with U_CFG_GNSS_PORT_NUMBER remains. The cellular and short-range device code is updated so that, should a customer decide to use U_DEVICE_TRANSPORT_TYPE_UART_USB, it is treated the same way as U_DEVICE_TRANSPORT_TYPE_UART.
- Loading branch information
Showing
7 changed files
with
46 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters