-
Notifications
You must be signed in to change notification settings - Fork 3k
[feature-nrf528xx] Extended PeripheralPins and pinmap for NRF52 series #6234
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small docygen nit, but LGTM!
static void * nordic_spi2c_owners[SPI2C_INSTANCES] = { NULL, NULL, NULL }; | ||
|
||
/** | ||
* @brief Set instance owner for the SPI/I2C peripheral. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doxygen. Define in only the header please.
|
||
#include <stdio.h> | ||
|
||
#if 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be wrapped around a #define (MBED_DEBUG, or something similar), or is this just for debugging in the feature branch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its really only for debugging this specific file if someone has to go back to the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not certain about leaving it here, I would remove it .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marcuschangarm Ok for now, but will definitely need to be changed before coming into master.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a requirement for this? I've noticed similar logging/debug code in partner's SDKs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have no control over what partners put in their SDKs, however that doesn't mean we should do such things ourselves...
The NRF52 series can map digital signals to any physical pin which makes it challenging to associate pin names with hardware instances. pinmap_ex: Keep track of which hardware instance is in use and what pins are associated with it. Currently only supports I2C and SPI, but provides a mechanism for allocating the shared I2C/SPI hardware. PeripheralPinsDefault: Optional pin map for pre-assigning hardware instances at compile time. This makes it easier to optimize hardware utilization.
Common functions for getting and setting the instance owner of a hardware peripheral. Used for reconfiguring SPI/I2C after change of ownership.
@cmonr I changed the Doxygen comments to regular comments. |
/morph build |
Build : SUCCESSBuild number : 1327 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 987 |
Test : SUCCESSBuild number : 1111 |
The NRF52 series can map digital signals to any physical pin which
makes it challenging to associate pin names with hardware instances.
pinmap_ex:
Keep track of which hardware instance is in use and what pins are
associated with it. Currently only supports I2C and SPI, but
provides a mechanism for allocating the shared I2C/SPI hardware.
PeripheralPinsDefault:
Optional pin map for pre-assigning hardware instances at compile
time. This makes it easier to optimize hardware utilization.
Helper functions for sharing hardware peripherals on NRF52
Common functions for getting and setting the instance owner of a
hardware peripheral. Used for reconfiguring SPI/I2C after change
of ownership.