This library is stripped down version of NetServices library. HTTP server and client function is NOT supported.

Dependents:   imu-daq-eth

Committer:
idinor
Date:
Wed Jul 20 11:45:39 2011 +0000
Revision:
0:dcf3c92487ca

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
idinor 0:dcf3c92487ca 1
idinor 0:dcf3c92487ca 2 /*
idinor 0:dcf3c92487ca 3 Copyright (c) 2010 Donatien Garnier (donatiengar [at] gmail [dot] com)
idinor 0:dcf3c92487ca 4
idinor 0:dcf3c92487ca 5 Permission is hereby granted, free of charge, to any person obtaining a copy
idinor 0:dcf3c92487ca 6 of this software and associated documentation files (the "Software"), to deal
idinor 0:dcf3c92487ca 7 in the Software without restriction, including without limitation the rights
idinor 0:dcf3c92487ca 8 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
idinor 0:dcf3c92487ca 9 copies of the Software, and to permit persons to whom the Software is
idinor 0:dcf3c92487ca 10 furnished to do so, subject to the following conditions:
idinor 0:dcf3c92487ca 11
idinor 0:dcf3c92487ca 12 The above copyright notice and this permission notice shall be included in
idinor 0:dcf3c92487ca 13 all copies or substantial portions of the Software.
idinor 0:dcf3c92487ca 14
idinor 0:dcf3c92487ca 15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
idinor 0:dcf3c92487ca 16 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
idinor 0:dcf3c92487ca 17 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
idinor 0:dcf3c92487ca 18 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
idinor 0:dcf3c92487ca 19 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
idinor 0:dcf3c92487ca 20 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
idinor 0:dcf3c92487ca 21 THE SOFTWARE.
idinor 0:dcf3c92487ca 22 */
idinor 0:dcf3c92487ca 23 #if 0 //Dep
idinor 0:dcf3c92487ca 24
idinor 0:dcf3c92487ca 25 #include "sioMgr.h"
idinor 0:dcf3c92487ca 26
idinor 0:dcf3c92487ca 27
idinor 0:dcf3c92487ca 28 u8_t SioMgr::m_count=0;
idinor 0:dcf3c92487ca 29 SerialBuf* SioMgr::m_pSerialBufList[MAX_SERIAL_PORTS] = {NULL};
idinor 0:dcf3c92487ca 30
idinor 0:dcf3c92487ca 31 u8_t SioMgr::registerSerialIf(SerialBuf* pIf)
idinor 0:dcf3c92487ca 32 {
idinor 0:dcf3c92487ca 33 if(m_count==MAX_SERIAL_PORTS)
idinor 0:dcf3c92487ca 34 return 0;
idinor 0:dcf3c92487ca 35
idinor 0:dcf3c92487ca 36 m_pSerialBufList[m_count] = pIf;
idinor 0:dcf3c92487ca 37 m_count++;
idinor 0:dcf3c92487ca 38
idinor 0:dcf3c92487ca 39 return m_count; //We do not want a fd to be NULL, so return value is p+1
idinor 0:dcf3c92487ca 40 }
idinor 0:dcf3c92487ca 41
idinor 0:dcf3c92487ca 42 SerialBuf* SioMgr::getIf(u8_t item)
idinor 0:dcf3c92487ca 43 {
idinor 0:dcf3c92487ca 44 if (!item || item > m_count)
idinor 0:dcf3c92487ca 45 return NULL;
idinor 0:dcf3c92487ca 46
idinor 0:dcf3c92487ca 47 return m_pSerialBufList[item-1];
idinor 0:dcf3c92487ca 48 }
idinor 0:dcf3c92487ca 49 #endif