How to use the components with sensor fusion library

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use the components with sensor fusion library

Jump to solution
925 Views
andersonrosa
Contributor II

Hellow guys,

 

I'm starting to use the SFL with KDS3.0 and I didn't find a documentation about the components, like LED_RED. For example, if I want to turn the led red on, I think need to use LED_RED_SetVal, but I don't know how to use the arguments.

Labels (1)
0 Kudos
1 Solution
401 Views
michaelestanley
NXP Employee
NXP Employee

Anderson,

Look at mqx_tasks.c, which toggles LEDs.  Examples include:

// switch the red LED on (line low sets LED on)

LED_RED_ClrVal(NULL);

LED_GREEN_SetVal(NULL);

LED_BLUE_SetVal(NULL);

If you try to set them elsewhere, you probably want to remove them from their current positions.

Regards,

Mike

View solution in original post

0 Kudos
8 Replies
401 Views
andersonrosa
Contributor II

Thanks guys. I'm going up in my studies.

0 Kudos
401 Views
Deejay
Contributor III

Hi Anderson,

Check for the "documentation" directory under sample projects like FSFK-KL26Z or similar. This should be located where you installed the SFL for Kinetis MCUs.

pastedImage_0.png

pastedImage_1.png

Hope this helps.

Cheers,

Devan

401 Views
andersonrosa
Contributor II

Devan, help me please. This folder is not at the directory.

0 Kudos
401 Views
michaelestanley
NXP Employee
NXP Employee

Anderson,

We didn't ship any documentation under the CodeWarrior and KDS projects in the fusion kit.  Devan may be refering to documentation created via Processor Expert.

Our "human written" documentation is all in the upper "docs" directory.  The best one to start with is docs/XSFLK_UG.pdf, which is the user guide.

Mike

401 Views
Deejay
Contributor III

Hi Anderson,

Mike is correct. Thanks Mike.

Yes the folder i was referring to was generated by the Processor Expert. You need to build the sample project to get this documentation folder.

See below for example... before and after directory structures under the sample project. FSFk-KL46Z.

Directory folders before building the project

pastedImage_0.png

Directory folders after building the project

pastedImage_3.png

Cheers!

Devan

401 Views
andersonrosa
Contributor II

Thanks Devan, I found the document, but didn't help me a lot.

My problem is, I'm new in SFL, and I don't know how to use the user_task to write my application using the SFL. By the documents I need to change the user_task.c, putting my code there.

Sem título.png

But, when I remove the codes and put anything like,  from example, nothing happens.

Sem título2.png

0 Kudos
402 Views
michaelestanley
NXP Employee
NXP Employee

Anderson,

Look at mqx_tasks.c, which toggles LEDs.  Examples include:

// switch the red LED on (line low sets LED on)

LED_RED_ClrVal(NULL);

LED_GREEN_SetVal(NULL);

LED_BLUE_SetVal(NULL);

If you try to set them elsewhere, you probably want to remove them from their current positions.

Regards,

Mike

View solution in original post

0 Kudos
401 Views
andersonrosa
Contributor II

Thanks so much!

0 Kudos