Conversation
| {{board}}.menu.technology.none=None | ||
| {{board}}.menu.technology.lorawan=LoRaWAN | ||
| {{board}}.menu.technology.sigfox=Sigfox | ||
| {{board}}.menu.technology.none.build.technology_flags=-DMCCI_ARDUINO_LPWAN_TECHNOLOGY_None |
There was a problem hiding this comment.
Please make this all upper case (MCCI_ARDUINO_LPWAN_TECHNOLOGY_NONE).
| # | ||
|
|
||
| # Additional menu items | ||
| menu.technology=Technology |
There was a problem hiding this comment.
For consistency, we should add this to the SAMD BSP. We don't support Sigfox on SAMD, but we'll need the symbols MCCI_ARDUINO_LPWAN_TECHNOLOGY_NONE and MCCI_ARDUINO_LPWAN_TECHNOLOGY_LORAWAN or we'll go crazy.
| {{board}}.menu.technology.none=None | ||
| {{board}}.menu.technology.lorawan=LoRaWAN | ||
| {{board}}.menu.technology.sigfox=Sigfox | ||
| {{board}}.menu.technology.none.build.technology_flags=-DMCCI_ARDUINO_LPWAN_TECHNOLOGY_None |
There was a problem hiding this comment.
As I recall, the first entry is the default. We should make LoRaWAN the default, not "none" (so current users are not irritated).
There was a problem hiding this comment.
Leave symbol names as MCCI_ARDUINO_LPWAN_TECHNOLOGY_...; that is, change ".technology." to ".lpwan." but don't change MCCI_ARDUINO_LPWAN_TECHNOLOGY_... to MCCI_ARDUINO_LPWAN_...; that is fine as it is.
| #ifdef __cplusplus | ||
| extern "C" | ||
| #endif | ||
| void stm32_interrupt_enable_forC(GPIO_TypeDef *port, uint16_t pin, void (*callback)(void), uint32_t mode); |
There was a problem hiding this comment.
I'm not really sure this is the best way to do this.
In C++ and C, void (*pfn)(void) are the same signatures. Why not just move 64..66 to line 61? (and then the one with the c-like signature would be a C API). I think that this is just a mistake in the BSP header file. It could be called then from either C or C++. You could experiment with that.
|
|
||
| ## Release History | ||
|
|
||
| - HEAD: Added support to Sigfox Technology, also added an option Technology to the menu, [#145](https://github.com/mcci-catena/Arduino_Core_STM32/issues/145). |
There was a problem hiding this comment.
Actually, the change adds a new API for registering for interrupts from pure C code. Please change to:
HEAD: Added `stm32_interrupt_enable_forC()` API for getting interrupts in pure C functions, Also added an option Technology to the menu, [#145](https://github.com/mcci-catena/Arduino_Core_STM32/issues/145)|
|
||
| The Arduino IDE allows you to select the following items. | ||
|
|
||
| - **Technology**: by default "None". based on the application select "LoRaWAN" or "Sigfox". |
There was a problem hiding this comment.
We need default to be LoRaWAN, and change from "Technology" (too generic) to "LPWAN". So this should be:
- **LPWAN**: Selects the LPWAN technology; by default, "LoRaWAN". Based on the application select "LoRaWAN", "Sigfox", or "None".| # | ||
|
|
||
| # Additional menu items | ||
| menu.technology=Technology |
There was a problem hiding this comment.
UI name should be "LPWAN", so this should be:
menu.technology=LPWAN
But probably to avoid confusion, we should say:
menu.lpwan = LPWAN
I've noted below.
|
|
||
| # | ||
| # menu.technology | ||
| {{board}}.menu.technology.none=None |
There was a problem hiding this comment.
Change to menu.lpwan.none, etc.
| * @brief This function enable the interruption on the selected port/pin from the C code | ||
| * @param port : one of the gpio port | ||
| * @param pin : one of the gpio pin | ||
| **@param callback : callback to call when the interrupt falls |
There was a problem hiding this comment.
Some English language style here.
/**
*
* @brief Connect a function to an ineerrupt on a selected GPIO port and pin.
* @param port [in] pointer to the GPIO port
* @param pin [in] the pin within the port.
* @param callback [in] function to be called on interrupt; NULL to disable.
* @param mode [in] interrupt mode constant from `stm32_hal_gpio`.
* @returns No explicit result.
*
* This API is a bridge provided for pure C code. It's identical to the C++ `stm32_interrupt_enable()`
* using the explicit `void (*)()` callback syntax, but is declared `extern "C"`.
*
*/
No description provided.