Accessing KV58F registers in an external class

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

Accessing KV58F registers in an external class

461 Views
gregoryw
Contributor II

Hi everyone,

I'm using Kinetis SDK 3.2.0 and am trying to write to register GPIOC_PTOR from a method in a source file other than main.c.

I believe I've prototyped it in the header properly.

The compiler is stating that GPIOC_PTOR is undeclared.

 

Any thoughts?

Labels (1)
2 Replies

353 Views
MarekTrmac
NXP Employee
NXP Employee

Hi Gregory,

if you include "fsl_device_registers.h", you should be able to access using:

  GPIOC->PTOR = 0;

Regards

Marek

353 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Gregory,

Please include the header file which define GPIOC_PTOR ,

in the file which use the GPIOC_PTOR .

If still can not work , please send your project to me , i will check it on my side .

Hope it helps


Have a great day,
Alice

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

0 Kudos