A question about Create Component [solved]

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
User avatar
tiny
Posts: 200
Joined: Wed Jul 08, 2009 8:29 am
Has thanked: 51 times
Been thanked: 93 times
Contact:

A question about Create Component [solved]

Post by tiny »

If I create a component with I2C function (cal_i2c), is it necessary to insert a "Master_Init" at the beginning of the function and a "Master_Uninit" at the end of the function?

Thanks in advance for the help!
Christina
Last edited by tiny on Wed Jan 24, 2018 5:26 pm, edited 1 time in total.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: A question about Create Component

Post by Benj »

Hi Christina,

Master_Init is required in your component's initialise macro before you call any other of the I2C CAL functions. The Uninit macro is not required unless you want to be able to deactivate the I2C peripheral.

User avatar
tiny
Posts: 200
Joined: Wed Jul 08, 2009 8:29 am
Has thanked: 51 times
Been thanked: 93 times
Contact:

Re: A question about Create Component

Post by tiny »

Thanks Ben, it will do just that.
Christina

Post Reply