What is the double week mechanism?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

What is the double week mechanism?

Jump to solution
651 Views
jun1
Contributor V

Hi.

I am using SDK_2.6.0_MKE04Z128xxx4.

Among them, there is a title on I2C-related driver sources.

What kind of mechanism do you point to specifically?   

The place marked with (<--- ???).

/*!
* brief Initializes the I2C handle which is used in transactional functions.
*
* param base I2C base pointer.
* param handle pointer to i2c_master_handle_t structure to store the transfer state.
* param callback pointer to user callback function.
* param userData user parameter passed to the callback function.
*/
void I2C_MasterTransferCreateHandle(I2C_Type *base,
i2c_master_handle_t *handle,
i2c_master_transfer_callback_t callback,
void *userData)
{
assert(NULL != handle);

uint32_t instance = I2C_GetInstance(base);

/* Zero handle. */
(void)memset(handle, 0, sizeof(*handle));

/* Set callback and userData. */
handle->completionCallback = callback;
handle->userData = userData;

/* Save the context in global variables to support the double weak mechanism. */ <--- ???
s_i2cHandle[instance] = handle;

/* Save master interrupt handler. */
s_i2cMasterIsr = I2C_MasterTransferHandleIRQ;

/* Enable NVIC interrupt. */
(void)EnableIRQ(s_i2cIrqs[instance]);
}

I am always grateful for your help.

jun.

Labels (1)
0 Kudos
1 Solution
536 Views
nxf56274
NXP Employee
NXP Employee

Hi,

pastedImage_1.png


Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

View solution in original post

0 Kudos
2 Replies
536 Views
jun1
Contributor V

Thank you very much.
The two layers are talking about interrupt flow.
I fully understood.
Have a nice day

jun.

0 Kudos
537 Views
nxf56274
NXP Employee
NXP Employee

Hi,

pastedImage_1.png


Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos