реклама на сайте
подробности

 
 
> Помогите по Си, Не могу понять undefined external
aspID
сообщение May 20 2012, 19:34
Сообщение #1


Местный
***

Группа: Свой
Сообщений: 343
Регистрация: 24-01-07
Из: Новосибирск
Пользователь №: 24 714



То ли настолько позабыл Си, то ли...

В общем, не могу понять, почему лезет undefined external:

Содержимое main.c
CODE
#define ENABLE_BIT_DEFINITIONS
#define F_CPU 4000UL //36864UL !!!

#include <intrinsics.h>
#include <ioavr.h>
#include <stdio.h>

#include "USART.h"

int main ( void )
{
__disable_interrupt ();

USART_init ( 9600U );

...


Содержимое USART.h
CODE
#include <ioavr.h>
void USART_Init( unsigned int baud );
...


Содержимое USART.c
CODE
#define ENABLE_BIT_DEFINITIONS

#include "USART.h"

void USART_Init ( unsigned int baud )
{
/* Set baud rate */
UBRRH = (unsigned char)(baud>>8);
UBRRL = (unsigned char)baud;
/* Enable receiver and transmitter */
UCSRB = (1<<RXEN)|(1<<TXEN);
/* Set frame format: 8data, 2stop bit */
UCSRC = (1<<USBS)|(3<<UCSZ0);
}

...


Go to the top of the page
 
+Quote Post



Reply to this topicStart new topic
1 чел. читают эту тему (гостей: 1, скрытых пользователей: 0)
Пользователей: 0

 


RSS Текстовая версия Сейчас: 18th July 2025 - 21:05
Рейтинг@Mail.ru


Страница сгенерированна за 0.01509 секунд с 7
ELECTRONIX ©2004-2016