프로그램 자체에서 정의되지 않은 경우 "LCD_PORT not defined"와 같은 컴파일 타임 오류가 발생합니다. 이를 위해 헤더 파일을 수정했습니다.매크로가 정의되지 않은 경우 플래시 오류는 어떻게됩니까?
.
.
.
#if LCD_IO_MODE
#ifndef LCD_PORT
#error LCD_PORT not defined //(e.g. #define LCD_PORT PORTA/B/C/D)
#endif
#define LCD_DATA0_PORT LCD_PORT /**< port for 4bit data bit 0 */
#define LCD_DATA1_PORT LCD_PORT /**< port for 4bit data bit 1 */
.
.
.
...
그러나 다음 프로그램 에서처럼 LCD_PORT를 정의한 후에도 오류가 깜박입니다.
#include <avr/io.h>
#include <lcd.h>
#define LCD_PORT PORTA
int main(void)
{
lcd_init(LCD_DISP_ON_CURSOR);
lcd_home();
lcd_puts("Hello world!!");
}
고마워요 H2CO3 :) 작동합니다 :) – Adwait