|
| 1 | +/************************************************************************** |
| 2 | +* Copyright (c) 2019 by Michael Fischer (www.emb4fun.de). |
| 3 | +* All rights reserved. |
| 4 | +* |
| 5 | +* Redistribution and use in source and binary forms, with or without |
| 6 | +* modification, are permitted provided that the following conditions |
| 7 | +* are met: |
| 8 | +* |
| 9 | +* 1. Redistributions of source code must retain the above copyright |
| 10 | +* notice, this list of conditions and the following disclaimer. |
| 11 | +* |
| 12 | +* 2. Redistributions in binary form must reproduce the above copyright |
| 13 | +* notice, this list of conditions and the following disclaimer in the |
| 14 | +* documentation and/or other materials provided with the distribution. |
| 15 | +* |
| 16 | +* 3. Neither the name of the author nor the names of its contributors may |
| 17 | +* be used to endorse or promote products derived from this software |
| 18 | +* without specific prior written permission. |
| 19 | +* |
| 20 | +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 21 | +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 22 | +* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
| 23 | +* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL |
| 24 | +* THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
| 25 | +* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
| 26 | +* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS |
| 27 | +* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED |
| 28 | +* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
| 29 | +* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF |
| 30 | +* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 31 | +* SUCH DAMAGE. |
| 32 | +* |
| 33 | +*************************************************************************** |
| 34 | +* History: |
| 35 | +* |
| 36 | +* 31.05.2019 mifi First Version. |
| 37 | +**************************************************************************/ |
| 38 | +#if !defined(__ETC_H__) |
| 39 | +#define __ETC_H__ |
| 40 | + |
| 41 | +/************************************************************************** |
| 42 | +* Includes |
| 43 | +**************************************************************************/ |
| 44 | +#include <stdint.h> |
| 45 | + |
| 46 | +/************************************************************************** |
| 47 | +* Global Definitions |
| 48 | +**************************************************************************/ |
| 49 | + |
| 50 | +typedef enum _etc_ip_addr_ |
| 51 | +{ |
| 52 | + ETC_IP_ADDR = 0, |
| 53 | + ETC_IP_MASK, |
| 54 | + ETC_IP_GW, |
| 55 | + ETC_IP_DNS, |
| 56 | + ETC_IP_DNS2, |
| 57 | + ETC_IP_NTP, |
| 58 | + ETC_IP_SYSLOG, |
| 59 | + |
| 60 | + ETC_IP_MAX |
| 61 | +} ETC_IP_ADDRESS; |
| 62 | + |
| 63 | +/************************************************************************** |
| 64 | +* Macro Definitions |
| 65 | +**************************************************************************/ |
| 66 | + |
| 67 | +/************************************************************************** |
| 68 | +* Functions Definitions |
| 69 | +**************************************************************************/ |
| 70 | + |
| 71 | +void etc_Init (void); |
| 72 | + |
| 73 | +char *etc_ShortNameGet (void); |
| 74 | +char *etc_LongNameGet (void); |
| 75 | +char *etc_LocationGet (void); |
| 76 | + |
| 77 | +int etc_IPDhcpIsUsed (void); |
| 78 | +int etc_IPTnpIsES (void); |
| 79 | +int etc_IPmDNSIsUsed (void); |
| 80 | + |
| 81 | +uint32_t etc_IPAddrGet (ETC_IP_ADDRESS eAddress); |
| 82 | + |
| 83 | +int etc_TimeZoneIDGet (void); |
| 84 | +int etc_TimeZoneOffsetGet (void); |
| 85 | +int etc_TimeZoneDstGet (void); |
| 86 | +uint32_t etc_TimeNTPAddrGet (void); |
| 87 | +uint32_t etc_TimeNTPRefresh (void); |
| 88 | + |
| 89 | +#endif /* !__ETC_H__ */ |
| 90 | + |
| 91 | +/*** EOF ***/ |
0 commit comments