[an error occurred while processing this directive]
Ответ:дык, все как в апноте (+)
(«Телесистемы»: Конференция «Микроконтроллеры и их применение»)

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

Отправлено RUAL 16 ноября 2006 г. 10:22
В ответ на: Внимательнее см. DS "Master Transmitter Mode", особенно "Table 75. Status Codes for Master Transmitter Mode" (+): отправлено argus98 16 ноября 2006 г. 10:05

/****************************************************************************
Function :unsigned char Send_start(void)
Send a START condition to the bus and wait for the TWINT get set set to
see the result. If it failed return the TWSR value, if succes return
SUCCESS.
****************************************************************************/
unsigned char Send_start(void)
{
TWCR = ((1<
Wait_TWI_int(); //Wait for TWI interrupt flag set

if((TWSR != START)&&(TWSR != REP_START))//If status other than START
return TWSR; //transmitted(0x08) or Repeated
return SUCCESS; //START transmitted(0x10)
//-> error and return TWSR.
//If success return SUCCESS
}

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

Ответы


Отправка ответа
Имя (обязательно): 
Пароль: 
E-mail: 

Тема (обязательно):
Сообщение:

Ссылка на URL: 
URL изображения: 


Rambler's Top100 Рейтинг@Mail.ru
Перейти к списку ответов  |||  Конференция  |||  Архив  |||  Главная страница  |||  Содержание