LoginSignup
0
1

More than 5 years have passed since last update.

MSP430 > QA > Does the pointer operation for PxOUT work correctly? > the original PxOUT register was a volatile unsigned char 'variable' | 異なるMSP430でのピン使用

Last updated at Posted at 2016-01-22

Does the pointer operation for PxOUT work correctly?

volatile

この質問に関して Jens-Michael Grossさんの回答で以下(volatile)が資料を読んでも気づかなかった点だった。

the original PxOUT register was a volatile unsigned char 'variable'

異なるMSP430でのピン使用

また、異なるMSP430で同じピンの変数(か同等の機構)を使うにはどうすればいいかという質問をしている。

それに対する回答として Jens-Michael Grossさんの回答が参考になる

Most projects use a project-specific definition header file. With project-specific defines:
#define LEDPORT_OUT P1OUT
The code then uses LEDPORT_OUT instead of the specific P1OUT.
This won't work for precompiled libraries, but leads to way more efficient code.

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1