outp() inp()는 매크로이다.
정확한 시기는 모르겠지만, winAVR-20050414 버전 이후 제외된 것으로 보인다.
물론 <compat/deprecated.h> 를 사용하면 호환되도록 작동은 가능할 것으로 보이지만,
문법적으로 깔끔하지 않고, 표준 C를 따르지 않는(이 부분은 좀 이해가 안됨) 이유로 인해서
불편함을 감수하고 위의 매크로가 제외되었다고 한다.
[링크 : http://winavr.sourceforge.net/]
20091022 추가>
outp(value, PORTn); 은
PORTn = valuel 로 사용하면 된다.
예를들어,
outp(0xff, PORTA); 는
PORTA = 0xff; 로 사용한다.
정확한 시기는 모르겠지만, winAVR-20050414 버전 이후 제외된 것으로 보인다.
물론 <compat/deprecated.h> 를 사용하면 호환되도록 작동은 가능할 것으로 보이지만,
문법적으로 깔끔하지 않고, 표준 C를 따르지 않는(이 부분은 좀 이해가 안됨) 이유로 인해서
불편함을 감수하고 위의 매크로가 제외되었다고 한다.
There was a discussion a while back on the avr-gcc mailing list. Some "old stuff" has been purged. Some people are not happy about it. But the purged macros were non-standard, had confusing syntax and unclear semantics, and had been deprecated for over two years, so (IMHO) the maintainers were justified in purging them. The quick fix for legacy code is to create a new header (e.g. "legacy.h") that defines the purged macros for you. E.g., #define sbi(p,b) (p) |= (1<<(b)) #define cbi(p,b) (p) &= ~(1<<(b)) etc. Then #include "legacy.h" in legacy code as a stopgap measure to get that code to compile with the new compiler. And be sure to _NOT_ #include "legacy.h" in new code. Regards, -=Dave [링크 : http://www.embeddedrelated.com/usenet/embedded/show/25084-1.php] |
[링크 : http://winavr.sourceforge.net/]
20091022 추가>
outp(value, PORTn); 은
PORTn = valuel 로 사용하면 된다.
예를들어,
outp(0xff, PORTA); 는
PORTA = 0xff; 로 사용한다.
'embeded > AVR (ATmega,ATtiny)' 카테고리의 다른 글
7 segment font (4) | 2009.10.16 |
---|---|
winAVR 판올림 이후 AVR Studio 에서 컴파일러를 못 찾는 경우 (0) | 2009.10.09 |
ATmega128 UART 에코 서버 만들기 (echo server) (4) | 2009.10.08 |
ATmega128 USART 사용하기 (0) | 2009.10.07 |
AVR Studio에서 Fuse Bit 설정 (0) | 2009.08.05 |