Accessing KV58F registers in an external class

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Accessing KV58F registers in an external class

1,019件の閲覧回数
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?

ラベル(1)
2 返答(返信)

911件の閲覧回数
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

911件の閲覧回数
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 件の賞賛
返信