u-blox / cellular

Cellular API, compatible with LWIP, in C for embedded platforms.
Apache License 2.0
22 stars 3 forks source link

Would "uart number" be valid for all OS and Targets? This seems too high level? #4

Open philwareublox opened 4 years ago

philwareublox commented 4 years ago

https://github.com/u-blox/cellular/blob/d2d4315335ad75e3bb7a13398817df6974fae94d/ctrl/api/cellular_ctrl.h#L213

Not sure how to do this in C, but in OOP you would 'inject' the UART dependency and manage this outside of this controller API. Other things might be using the UART, but here it seem our API creates and holds on to the UART for it's own use?

RobMeades commented 4 years ago

It's the HW block number inside the MCU chip, all chip manufacturers seem to do it this way, think of it as an enumeration. It is provided by the customer as they have to choose which UART HW block this API can use since they are in control.

philwareublox commented 4 years ago

Does this mean they can use the UART outside of this API too? Or will this API take over the UART?

From: Rob Meades [mailto:notifications@github.com] Sent: 01 April 2020 11:40 To: u-blox/cellular cellular@noreply.github.com Cc: Phil Ware Phil.Ware@u-blox.com; Author author@noreply.github.com Subject: Re: [u-blox/cellular] Would "uart number" be valid for all OS and Targets? This seems too high level? (#4)

This is an EXTERNAL email. It was sent from outside of u-blox.

It's the HW block number inside the MCU chip, all chip manufacturers seem to do it this way, think of it as an enumeration. It is provided by the customer as they have to choose which UART HW block this API can use since they are in control.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/u-blox/cellular/issues/4#issuecomment-607173313, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AE4RAN3JZHVMHD6PXUTINVDRKMKZHANCNFSM4LYXYIBA.

RobMeades commented 4 years ago

This API owns that UART HW block.