Open philwareublox opened 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.
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.
This API owns that UART HW block.
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?