Ту так(+)
(«Телесистемы»: Конференция «Микроконтроллеры и их применение»)

миниатюрный аудио-видеорекордер mAVR

Отправлено F8 19 марта 2005 г. 18:09
В ответ на: Мне хотелось бы иметь модули, которые я бы мог подключать по мере необходимости. отправлено rezident 19 марта 2005 г. 16:23

uart.h
#ifndef UART_H
#define UART_H
//В эту часть вношу все что не конфликтует
extern unsigned lond date;
extern unsigned lond time;
....................
#ifhdef UART_C
//а сюда все что конфликтует
extern struct
{
unsigned char index;
unsigned int flag;
};

#endif
#endif

uart.c
#define UART_C
#include "uart.h"
unsigned lond date;
unsigned lond time;
....................
struct
{
unsigned char index;
unsigned int flag;
};


lcd.h
#ifndef LCD_H
#define LCD_H
//В эту часть вношу все что не конфликтует
extern unsigned lond date;
extern unsigned lond time;
....................
#ifhdef LCD_C
//а сюда все что конфликтует
extern struct
{
unsigned char index;
unsigned int flag;
};

#endif
#endif

lcd.c
#define LCD_C
#include "uart.h"
unsigned lond date;
unsigned lond time;
....................
struct
{
unsigned char index;
unsigned int flag;
};

Составить ответ  |||  Конференция  |||  Архив

Ответы



Перейти к списку ответов  |||  Конференция  |||  Архив  |||  Главная страница  |||  Содержание  |||  Без кадра

E-mail: info@telesys.ru