Разработка динамических сайтов
SEO услуги
Управление контекстной рекламой

Вход на хостинг

Имя пользователя:*

Пароль пользователя:*

IT-новости

20.04.2016 iPhone 2017 года поместят в водонепроницаемый корпус из стекла

Линейка iPhone в новом году серьезно поменяется. В этом уверен аналитический исследователь Мин Чи Ку......

подробнее

30.07.2015 Ищем уникальный контент для сайта

Ищем уникальный контент для сайта Без уникального контента Ваш сайт обречен на то, что его страницы......

подробнее

11.05.2015 Распространённые ошибки разработчиков сайтов

Не секрет, что в сети Интернет насчитывается миллионы сайтов, и каждый день появляются тысячси новых......

подробнее

/*

 * powerd  Catch power failure signals from a Trust Energy Protector 400/650 and notify init

 *

 * Usage:  powerd /dev/cua3 (or any other serial device)

 *

 * Author: Ciro Cattuto <ciro@stud.unipg.it>

 *

 * Version 1.0 - 31 March 1997

 *

 * This code is heavily based on the original powerd.c code by Miquel van Smoorenburg <miquels@drinkel.ow.org>.

 *

 * This program is free software; you can redistribute it and/or modify it under the terms of the GNU  General Public License

 * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

 *

 * Update for PowerCom King Pro by Fedor Lizunkov  2:5020/960@Fidonet 24 May 2000

 */

 

/* state 0 - power is good */

#define T0_SLEEP 10     /* interval between port reads,in seconds */

#define T0_INL  3       /* number of seconds IN LINE has to be 0 to cause an action */

#define T0_BAT    3     /* number of seconds BATTERY has to be 0 to cause an action */

/* state 1 - power is failing */

#define T1_SLEEP  2     /* interval between ports reads */

#define T1_INL    3     /* same as T0_INL */

#define T1_BAT    3     /* same as T0_BAT */

 

#define NUMRECEIVEDBYTES  11   /* out date size from UPS */

#define REQ_01  0x01                  /* in date to UPS (request) */

#define REQ_03  0x03                  /* in date to UPS (self test) */

#define REQ_OFF 0xbc           /* first byte for UPS off  */

 

#define LINE_FAIL 0x01

#define BATT_LOW  0x02

#define UPS_OFF   0x80

#define BATT_BAD  0x02

 

 

/* Use the new way of communicating with init. */

#define NEWINIT

 

#include <sys/types.h>

#include <sys/stat.h>

#include <sys/ioctl.h>


Предыдущая страницаОглавлениеСледующая страница
 
[001] [002] [003] [004] [005] [006] [007] [008] [009] [010] [011] [012] [013] [014] [015] [016] [017] [018] [019] [020]
[021] [022] [023] [024] [025] [026] [027] [028] [029] [030] [031] [032] [033] [034] [035] [036] [037] [038] [039] [040]
[041] [042] [043] [044] [045] [046] [047] [048] [049] [050] [051] [052] [053] [054] [055] [056] [057] [058] [059] [060]
[061] [062] [063] [064] [065] [066] [067] [068] [069] [070] [071] [072] [073] [074] [075] [076] [077] [078] [079] [080]
[081] [082] [083] [084] [085] [086] [087] [088] [089] [090] [091] [092] [093] [094] [095] [096] [097] [098] [099] [100]
[101] [102] [103] [104] [105] [106] [107] [108] [109] [110] [111] [112] [113] [114] [115] [116] [117] [118] [119] [120]
[121] [122] [123] [124] [125] [126] [127] [128] [129] [130] [131] [132] [133] [134] [135] [136] [137] [138] [139] [140]
[141] [142] [143] [144] [145] [146] [147] [148] [149] [150] [151] [152] [153]

+7 (831) 413-63-27
ООО Дельта-Технология ©2007 - 2023 год
Нижний Новгород, ул. Дальняя, 17А.
Rambler's Top100