This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

direct assignment to ble_gap_conn_params_t variable

Hello Nordic support team,

Forgive me if I am asking a stupid question.

In the source file ble_conn_params.c, there is a function called ble_conn_params_init() and I found this direct assignment:

    m_preferred_conn_params = *p_init->p_conn_params;

but m_preferred_conn_params is a variable of ble_gap_conn_params_t which is a structure:

typedef struct {

uint16_t min_conn_interval;
/**< Minimum Connection Interval in 1.25 ms units, see @ref BLE_GAP_CP_LIMITS.*/

uint16_t max_conn_interval;
/**< Maximum Connection Interval in 1.25 ms units, see @ref BLE_GAP_CP_LIMITS.*/

uint16_t slave_latency;
/**< Slave Latency in number of connection events, see @ref BLE_GAP_CP_LIMITS.*/

uint16_t conn_sup_timeout;
/**< Connection Supervision Timeout in 10 ms units, see @ref BLE_GAP_CP_LIMITS.*/

} ble_gap_conn_params_t;

So why this direct assignment is possible?

Best Regards, Joseph

  • Direct assignment of a variable like is valid in C since it copies all struct fields at once, simplifying code and reducing errors from manual copying. Understanding these embedded C basics is crucial for efficient BLE development. For students or professionals tackling such complex topics, MBA Assignment Help UK can provide valuable support to grasp these concepts while managing their workloads effectively.

  • Struggling with your data mining assignments? Our expert Data Mining Assignment Help service is designed to guide students through the complexities of this field. Data mining involves extracting valuable insights from large datasets using techniques like clustering, classification, regression, and association rule mining. Our team of experienced professionals offers comprehensive support to ensure you excel in your coursework. We provide tailored assistance for assignments covering key data mining concepts, including pattern recognition, predictive modeling, and data preprocessing. Whether you're working on tools like Weka, RapidMiner, or Python libraries such as Pandas and Scikit-learn, we help you implement algorithms, analyze results, and present findings effectively. Our experts ensure your assignments are well-structured, thoroughly researched, and delivered on time, meeting academic standards.

  • The journey of thesis writing involves multiple stages, from topic selection to final submission. Without proper guidance, students often face difficulties that delay their progress. To overcome these challenges, getting help with thesis writing ensures access to expert knowledge and practical strategies. This support improves clarity, coherence, and argumentation in your thesis, enabling you to present your research findings effectively and meet your university’s requirements with confidence.

  • crazy finding this old thread from 12 years ago when i was just searching for unblocked games and nordic support answers today. that ble conn params init function has been part of the sdk forever and it works fine. joseph was probably just confused by how the compiler handles structure copying without needing a memcpy call.

Related