00001 /*** 00002 * This file is part of OpenHome, an open source home automation system. 00003 * Copyright (C) 2003 Jan Klötzke 00004 * 00005 * This program is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation; either version 2 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00018 */ 00019 00020 00033 #ifndef __LINK_H 00034 #define __LINK_H 00035 00036 #include <inttypes.h> 00037 #include "net/buffers.h" 00038 00045 struct lnk_err_t { 00046 uint16_t rx_len; 00047 uint16_t rx_crc; 00048 uint16_t rx_ovr; 00049 uint16_t rx_fe; 00050 }; 00051 00052 #ifdef __cplusplus 00053 extern "C" { 00054 #endif 00055 00056 void lnk_init(void); 00057 void lnk_process(void); 00058 int8_t lnk_requ(net_buf_t *buf, uint8_t backlog); 00059 uint8_t lnk_clear_to_send(void); 00060 void lnk_get_error_stats(struct lnk_err_t *buf); 00061 00062 #ifdef __cplusplus 00063 } 00064 #endif 00065 00066 #endif