Hello. For my application, I have written several functions related to sensor interrogation and work with some periphires of the controller nRF. I split these functions into single files for more convenient work with the project. The main functions of working with BLEs are not paraktically edited and it would be convenient to put them in a separate file (from main.c). The problem is that they use the following global variables (structures):
BLE_ADVERTISING_DEF(m_advertising); BLE_BAS_DEF(m_bas); /**< Structure used to identify the battery service. */ NRF_BLE_GATT_DEF(m_gatt); /**< GATT module instance. */ NRF_BLE_QWR_DEF(m_qwr); /**< Context for the Queued Write module.*/
...
Is it possible to somehow address these variables in other files?
We have the option of passing references to these variables as input parameters of the functions used, but this is not the most convenient solution. I would like to still somehow refer to these variables from other files (by extern for example). But it is not working. Please tell me whether this is possible and how.