fdsf

Dependents:   sisk_proj_stat MQTT Hello_FXOS8700Q WireFSHandControl ... more

Committer:
grzemich
Date:
Wed Dec 07 23:47:50 2016 +0000
Revision:
0:d7bd7384a37c
dgd

Who changed what in which revision?

UserRevisionLine numberNew contents of line
grzemich 0:d7bd7384a37c 1 /**
grzemich 0:d7bd7384a37c 2 * @file
grzemich 0:d7bd7384a37c 3 * Ethernet Interface Skeleton
grzemich 0:d7bd7384a37c 4 *
grzemich 0:d7bd7384a37c 5 */
grzemich 0:d7bd7384a37c 6
grzemich 0:d7bd7384a37c 7 /*
grzemich 0:d7bd7384a37c 8 * Copyright (c) 2001-2004 Swedish Institute of Computer Science.
grzemich 0:d7bd7384a37c 9 * All rights reserved.
grzemich 0:d7bd7384a37c 10 *
grzemich 0:d7bd7384a37c 11 * Redistribution and use in source and binary forms, with or without modification,
grzemich 0:d7bd7384a37c 12 * are permitted provided that the following conditions are met:
grzemich 0:d7bd7384a37c 13 *
grzemich 0:d7bd7384a37c 14 * 1. Redistributions of source code must retain the above copyright notice,
grzemich 0:d7bd7384a37c 15 * this list of conditions and the following disclaimer.
grzemich 0:d7bd7384a37c 16 * 2. Redistributions in binary form must reproduce the above copyright notice,
grzemich 0:d7bd7384a37c 17 * this list of conditions and the following disclaimer in the documentation
grzemich 0:d7bd7384a37c 18 * and/or other materials provided with the distribution.
grzemich 0:d7bd7384a37c 19 * 3. The name of the author may not be used to endorse or promote products
grzemich 0:d7bd7384a37c 20 * derived from this software without specific prior written permission.
grzemich 0:d7bd7384a37c 21 *
grzemich 0:d7bd7384a37c 22 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
grzemich 0:d7bd7384a37c 23 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
grzemich 0:d7bd7384a37c 24 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
grzemich 0:d7bd7384a37c 25 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
grzemich 0:d7bd7384a37c 26 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
grzemich 0:d7bd7384a37c 27 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
grzemich 0:d7bd7384a37c 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
grzemich 0:d7bd7384a37c 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
grzemich 0:d7bd7384a37c 30 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
grzemich 0:d7bd7384a37c 31 * OF SUCH DAMAGE.
grzemich 0:d7bd7384a37c 32 *
grzemich 0:d7bd7384a37c 33 * This file is part of the lwIP TCP/IP stack.
grzemich 0:d7bd7384a37c 34 *
grzemich 0:d7bd7384a37c 35 * Author: Adam Dunkels <adam@sics.se>
grzemich 0:d7bd7384a37c 36 *
grzemich 0:d7bd7384a37c 37 */
grzemich 0:d7bd7384a37c 38
grzemich 0:d7bd7384a37c 39 /*
grzemich 0:d7bd7384a37c 40 * This file is a skeleton for developing Ethernet network interface
grzemich 0:d7bd7384a37c 41 * drivers for lwIP. Add code to the low_level functions and do a
grzemich 0:d7bd7384a37c 42 * search-and-replace for the word "ethernetif" to replace it with
grzemich 0:d7bd7384a37c 43 * something that better describes your network interface.
grzemich 0:d7bd7384a37c 44 */
grzemich 0:d7bd7384a37c 45
grzemich 0:d7bd7384a37c 46 #include "lwip/opt.h"
grzemich 0:d7bd7384a37c 47
grzemich 0:d7bd7384a37c 48 #if 0 /* don't build, this is only a skeleton, see previous comment */
grzemich 0:d7bd7384a37c 49
grzemich 0:d7bd7384a37c 50 #include "lwip/def.h"
grzemich 0:d7bd7384a37c 51 #include "lwip/mem.h"
grzemich 0:d7bd7384a37c 52 #include "lwip/pbuf.h"
grzemich 0:d7bd7384a37c 53 #include "lwip/sys.h"
grzemich 0:d7bd7384a37c 54 #include <lwip/stats.h>
grzemich 0:d7bd7384a37c 55 #include <lwip/snmp.h>
grzemich 0:d7bd7384a37c 56 #include "netif/etharp.h"
grzemich 0:d7bd7384a37c 57 #include "netif/ppp_oe.h"
grzemich 0:d7bd7384a37c 58
grzemich 0:d7bd7384a37c 59 /* Define those to better describe your network interface. */
grzemich 0:d7bd7384a37c 60 #define IFNAME0 'e'
grzemich 0:d7bd7384a37c 61 #define IFNAME1 'n'
grzemich 0:d7bd7384a37c 62
grzemich 0:d7bd7384a37c 63 /**
grzemich 0:d7bd7384a37c 64 * Helper struct to hold private data used to operate your ethernet interface.
grzemich 0:d7bd7384a37c 65 * Keeping the ethernet address of the MAC in this struct is not necessary
grzemich 0:d7bd7384a37c 66 * as it is already kept in the struct netif.
grzemich 0:d7bd7384a37c 67 * But this is only an example, anyway...
grzemich 0:d7bd7384a37c 68 */
grzemich 0:d7bd7384a37c 69 struct ethernetif {
grzemich 0:d7bd7384a37c 70 struct eth_addr *ethaddr;
grzemich 0:d7bd7384a37c 71 /* Add whatever per-interface state that is needed here. */
grzemich 0:d7bd7384a37c 72 };
grzemich 0:d7bd7384a37c 73
grzemich 0:d7bd7384a37c 74 /* Forward declarations. */
grzemich 0:d7bd7384a37c 75 static void ethernetif_input(struct netif *netif);
grzemich 0:d7bd7384a37c 76
grzemich 0:d7bd7384a37c 77 /**
grzemich 0:d7bd7384a37c 78 * In this function, the hardware should be initialized.
grzemich 0:d7bd7384a37c 79 * Called from ethernetif_init().
grzemich 0:d7bd7384a37c 80 *
grzemich 0:d7bd7384a37c 81 * @param netif the already initialized lwip network interface structure
grzemich 0:d7bd7384a37c 82 * for this ethernetif
grzemich 0:d7bd7384a37c 83 */
grzemich 0:d7bd7384a37c 84 static void
grzemich 0:d7bd7384a37c 85 low_level_init(struct netif *netif)
grzemich 0:d7bd7384a37c 86 {
grzemich 0:d7bd7384a37c 87 struct ethernetif *ethernetif = netif->state;
grzemich 0:d7bd7384a37c 88
grzemich 0:d7bd7384a37c 89 /* set MAC hardware address length */
grzemich 0:d7bd7384a37c 90 netif->hwaddr_len = ETHARP_HWADDR_LEN;
grzemich 0:d7bd7384a37c 91
grzemich 0:d7bd7384a37c 92 /* set MAC hardware address */
grzemich 0:d7bd7384a37c 93 netif->hwaddr[0] = ;
grzemich 0:d7bd7384a37c 94 ...
grzemich 0:d7bd7384a37c 95 netif->hwaddr[5] = ;
grzemich 0:d7bd7384a37c 96
grzemich 0:d7bd7384a37c 97 /* maximum transfer unit */
grzemich 0:d7bd7384a37c 98 netif->mtu = 1500;
grzemich 0:d7bd7384a37c 99
grzemich 0:d7bd7384a37c 100 /* device capabilities */
grzemich 0:d7bd7384a37c 101 /* don't set NETIF_FLAG_ETHARP if this device is not an ethernet one */
grzemich 0:d7bd7384a37c 102 netif->flags = NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP | NETIF_FLAG_LINK_UP;
grzemich 0:d7bd7384a37c 103
grzemich 0:d7bd7384a37c 104 /* Do whatever else is needed to initialize interface. */
grzemich 0:d7bd7384a37c 105 }
grzemich 0:d7bd7384a37c 106
grzemich 0:d7bd7384a37c 107 /**
grzemich 0:d7bd7384a37c 108 * This function should do the actual transmission of the packet. The packet is
grzemich 0:d7bd7384a37c 109 * contained in the pbuf that is passed to the function. This pbuf
grzemich 0:d7bd7384a37c 110 * might be chained.
grzemich 0:d7bd7384a37c 111 *
grzemich 0:d7bd7384a37c 112 * @param netif the lwip network interface structure for this ethernetif
grzemich 0:d7bd7384a37c 113 * @param p the MAC packet to send (e.g. IP packet including MAC addresses and type)
grzemich 0:d7bd7384a37c 114 * @return ERR_OK if the packet could be sent
grzemich 0:d7bd7384a37c 115 * an err_t value if the packet couldn't be sent
grzemich 0:d7bd7384a37c 116 *
grzemich 0:d7bd7384a37c 117 * @note Returning ERR_MEM here if a DMA queue of your MAC is full can lead to
grzemich 0:d7bd7384a37c 118 * strange results. You might consider waiting for space in the DMA queue
grzemich 0:d7bd7384a37c 119 * to become availale since the stack doesn't retry to send a packet
grzemich 0:d7bd7384a37c 120 * dropped because of memory failure (except for the TCP timers).
grzemich 0:d7bd7384a37c 121 */
grzemich 0:d7bd7384a37c 122
grzemich 0:d7bd7384a37c 123 static err_t
grzemich 0:d7bd7384a37c 124 low_level_output(struct netif *netif, struct pbuf *p)
grzemich 0:d7bd7384a37c 125 {
grzemich 0:d7bd7384a37c 126 struct ethernetif *ethernetif = netif->state;
grzemich 0:d7bd7384a37c 127 struct pbuf *q;
grzemich 0:d7bd7384a37c 128
grzemich 0:d7bd7384a37c 129 initiate transfer();
grzemich 0:d7bd7384a37c 130
grzemich 0:d7bd7384a37c 131 #if ETH_PAD_SIZE
grzemich 0:d7bd7384a37c 132 pbuf_header(p, -ETH_PAD_SIZE); /* drop the padding word */
grzemich 0:d7bd7384a37c 133 #endif
grzemich 0:d7bd7384a37c 134
grzemich 0:d7bd7384a37c 135 for(q = p; q != NULL; q = q->next) {
grzemich 0:d7bd7384a37c 136 /* Send the data from the pbuf to the interface, one pbuf at a
grzemich 0:d7bd7384a37c 137 time. The size of the data in each pbuf is kept in the ->len
grzemich 0:d7bd7384a37c 138 variable. */
grzemich 0:d7bd7384a37c 139 send data from(q->payload, q->len);
grzemich 0:d7bd7384a37c 140 }
grzemich 0:d7bd7384a37c 141
grzemich 0:d7bd7384a37c 142 signal that packet should be sent();
grzemich 0:d7bd7384a37c 143
grzemich 0:d7bd7384a37c 144 #if ETH_PAD_SIZE
grzemich 0:d7bd7384a37c 145 pbuf_header(p, ETH_PAD_SIZE); /* reclaim the padding word */
grzemich 0:d7bd7384a37c 146 #endif
grzemich 0:d7bd7384a37c 147
grzemich 0:d7bd7384a37c 148 LINK_STATS_INC(link.xmit);
grzemich 0:d7bd7384a37c 149
grzemich 0:d7bd7384a37c 150 return ERR_OK;
grzemich 0:d7bd7384a37c 151 }
grzemich 0:d7bd7384a37c 152
grzemich 0:d7bd7384a37c 153 /**
grzemich 0:d7bd7384a37c 154 * Should allocate a pbuf and transfer the bytes of the incoming
grzemich 0:d7bd7384a37c 155 * packet from the interface into the pbuf.
grzemich 0:d7bd7384a37c 156 *
grzemich 0:d7bd7384a37c 157 * @param netif the lwip network interface structure for this ethernetif
grzemich 0:d7bd7384a37c 158 * @return a pbuf filled with the received packet (including MAC header)
grzemich 0:d7bd7384a37c 159 * NULL on memory error
grzemich 0:d7bd7384a37c 160 */
grzemich 0:d7bd7384a37c 161 static struct pbuf *
grzemich 0:d7bd7384a37c 162 low_level_input(struct netif *netif)
grzemich 0:d7bd7384a37c 163 {
grzemich 0:d7bd7384a37c 164 struct ethernetif *ethernetif = netif->state;
grzemich 0:d7bd7384a37c 165 struct pbuf *p, *q;
grzemich 0:d7bd7384a37c 166 u16_t len;
grzemich 0:d7bd7384a37c 167
grzemich 0:d7bd7384a37c 168 /* Obtain the size of the packet and put it into the "len"
grzemich 0:d7bd7384a37c 169 variable. */
grzemich 0:d7bd7384a37c 170 len = ;
grzemich 0:d7bd7384a37c 171
grzemich 0:d7bd7384a37c 172 #if ETH_PAD_SIZE
grzemich 0:d7bd7384a37c 173 len += ETH_PAD_SIZE; /* allow room for Ethernet padding */
grzemich 0:d7bd7384a37c 174 #endif
grzemich 0:d7bd7384a37c 175
grzemich 0:d7bd7384a37c 176 /* We allocate a pbuf chain of pbufs from the pool. */
grzemich 0:d7bd7384a37c 177 p = pbuf_alloc(PBUF_RAW, len, PBUF_POOL);
grzemich 0:d7bd7384a37c 178
grzemich 0:d7bd7384a37c 179 if (p != NULL) {
grzemich 0:d7bd7384a37c 180
grzemich 0:d7bd7384a37c 181 #if ETH_PAD_SIZE
grzemich 0:d7bd7384a37c 182 pbuf_header(p, -ETH_PAD_SIZE); /* drop the padding word */
grzemich 0:d7bd7384a37c 183 #endif
grzemich 0:d7bd7384a37c 184
grzemich 0:d7bd7384a37c 185 /* We iterate over the pbuf chain until we have read the entire
grzemich 0:d7bd7384a37c 186 * packet into the pbuf. */
grzemich 0:d7bd7384a37c 187 for(q = p; q != NULL; q = q->next) {
grzemich 0:d7bd7384a37c 188 /* Read enough bytes to fill this pbuf in the chain. The
grzemich 0:d7bd7384a37c 189 * available data in the pbuf is given by the q->len
grzemich 0:d7bd7384a37c 190 * variable.
grzemich 0:d7bd7384a37c 191 * This does not necessarily have to be a memcpy, you can also preallocate
grzemich 0:d7bd7384a37c 192 * pbufs for a DMA-enabled MAC and after receiving truncate it to the
grzemich 0:d7bd7384a37c 193 * actually received size. In this case, ensure the tot_len member of the
grzemich 0:d7bd7384a37c 194 * pbuf is the sum of the chained pbuf len members.
grzemich 0:d7bd7384a37c 195 */
grzemich 0:d7bd7384a37c 196 read data into(q->payload, q->len);
grzemich 0:d7bd7384a37c 197 }
grzemich 0:d7bd7384a37c 198 acknowledge that packet has been read();
grzemich 0:d7bd7384a37c 199
grzemich 0:d7bd7384a37c 200 #if ETH_PAD_SIZE
grzemich 0:d7bd7384a37c 201 pbuf_header(p, ETH_PAD_SIZE); /* reclaim the padding word */
grzemich 0:d7bd7384a37c 202 #endif
grzemich 0:d7bd7384a37c 203
grzemich 0:d7bd7384a37c 204 LINK_STATS_INC(link.recv);
grzemich 0:d7bd7384a37c 205 } else {
grzemich 0:d7bd7384a37c 206 drop packet();
grzemich 0:d7bd7384a37c 207 LINK_STATS_INC(link.memerr);
grzemich 0:d7bd7384a37c 208 LINK_STATS_INC(link.drop);
grzemich 0:d7bd7384a37c 209 }
grzemich 0:d7bd7384a37c 210
grzemich 0:d7bd7384a37c 211 return p;
grzemich 0:d7bd7384a37c 212 }
grzemich 0:d7bd7384a37c 213
grzemich 0:d7bd7384a37c 214 /**
grzemich 0:d7bd7384a37c 215 * This function should be called when a packet is ready to be read
grzemich 0:d7bd7384a37c 216 * from the interface. It uses the function low_level_input() that
grzemich 0:d7bd7384a37c 217 * should handle the actual reception of bytes from the network
grzemich 0:d7bd7384a37c 218 * interface. Then the type of the received packet is determined and
grzemich 0:d7bd7384a37c 219 * the appropriate input function is called.
grzemich 0:d7bd7384a37c 220 *
grzemich 0:d7bd7384a37c 221 * @param netif the lwip network interface structure for this ethernetif
grzemich 0:d7bd7384a37c 222 */
grzemich 0:d7bd7384a37c 223 static void
grzemich 0:d7bd7384a37c 224 ethernetif_input(struct netif *netif)
grzemich 0:d7bd7384a37c 225 {
grzemich 0:d7bd7384a37c 226 struct ethernetif *ethernetif;
grzemich 0:d7bd7384a37c 227 struct eth_hdr *ethhdr;
grzemich 0:d7bd7384a37c 228 struct pbuf *p;
grzemich 0:d7bd7384a37c 229
grzemich 0:d7bd7384a37c 230 ethernetif = netif->state;
grzemich 0:d7bd7384a37c 231
grzemich 0:d7bd7384a37c 232 /* move received packet into a new pbuf */
grzemich 0:d7bd7384a37c 233 p = low_level_input(netif);
grzemich 0:d7bd7384a37c 234 /* no packet could be read, silently ignore this */
grzemich 0:d7bd7384a37c 235 if (p == NULL) return;
grzemich 0:d7bd7384a37c 236 /* points to packet payload, which starts with an Ethernet header */
grzemich 0:d7bd7384a37c 237 ethhdr = p->payload;
grzemich 0:d7bd7384a37c 238
grzemich 0:d7bd7384a37c 239 switch (htons(ethhdr->type)) {
grzemich 0:d7bd7384a37c 240 /* IP or ARP packet? */
grzemich 0:d7bd7384a37c 241 case ETHTYPE_IP:
grzemich 0:d7bd7384a37c 242 case ETHTYPE_ARP:
grzemich 0:d7bd7384a37c 243 #if PPPOE_SUPPORT
grzemich 0:d7bd7384a37c 244 /* PPPoE packet? */
grzemich 0:d7bd7384a37c 245 case ETHTYPE_PPPOEDISC:
grzemich 0:d7bd7384a37c 246 case ETHTYPE_PPPOE:
grzemich 0:d7bd7384a37c 247 #endif /* PPPOE_SUPPORT */
grzemich 0:d7bd7384a37c 248 /* full packet send to tcpip_thread to process */
grzemich 0:d7bd7384a37c 249 if (netif->input(p, netif)!=ERR_OK)
grzemich 0:d7bd7384a37c 250 { LWIP_DEBUGF(NETIF_DEBUG, ("ethernetif_input: IP input error\n"));
grzemich 0:d7bd7384a37c 251 pbuf_free(p);
grzemich 0:d7bd7384a37c 252 p = NULL;
grzemich 0:d7bd7384a37c 253 }
grzemich 0:d7bd7384a37c 254 break;
grzemich 0:d7bd7384a37c 255
grzemich 0:d7bd7384a37c 256 default:
grzemich 0:d7bd7384a37c 257 pbuf_free(p);
grzemich 0:d7bd7384a37c 258 p = NULL;
grzemich 0:d7bd7384a37c 259 break;
grzemich 0:d7bd7384a37c 260 }
grzemich 0:d7bd7384a37c 261 }
grzemich 0:d7bd7384a37c 262
grzemich 0:d7bd7384a37c 263 /**
grzemich 0:d7bd7384a37c 264 * Should be called at the beginning of the program to set up the
grzemich 0:d7bd7384a37c 265 * network interface. It calls the function low_level_init() to do the
grzemich 0:d7bd7384a37c 266 * actual setup of the hardware.
grzemich 0:d7bd7384a37c 267 *
grzemich 0:d7bd7384a37c 268 * This function should be passed as a parameter to netif_add().
grzemich 0:d7bd7384a37c 269 *
grzemich 0:d7bd7384a37c 270 * @param netif the lwip network interface structure for this ethernetif
grzemich 0:d7bd7384a37c 271 * @return ERR_OK if the loopif is initialized
grzemich 0:d7bd7384a37c 272 * ERR_MEM if private data couldn't be allocated
grzemich 0:d7bd7384a37c 273 * any other err_t on error
grzemich 0:d7bd7384a37c 274 */
grzemich 0:d7bd7384a37c 275 err_t
grzemich 0:d7bd7384a37c 276 ethernetif_init(struct netif *netif)
grzemich 0:d7bd7384a37c 277 {
grzemich 0:d7bd7384a37c 278 struct ethernetif *ethernetif;
grzemich 0:d7bd7384a37c 279
grzemich 0:d7bd7384a37c 280 LWIP_ASSERT("netif != NULL", (netif != NULL));
grzemich 0:d7bd7384a37c 281
grzemich 0:d7bd7384a37c 282 ethernetif = mem_malloc(sizeof(struct ethernetif));
grzemich 0:d7bd7384a37c 283 if (ethernetif == NULL) {
grzemich 0:d7bd7384a37c 284 LWIP_DEBUGF(NETIF_DEBUG, ("ethernetif_init: out of memory\n"));
grzemich 0:d7bd7384a37c 285 return ERR_MEM;
grzemich 0:d7bd7384a37c 286 }
grzemich 0:d7bd7384a37c 287
grzemich 0:d7bd7384a37c 288 #if LWIP_NETIF_HOSTNAME
grzemich 0:d7bd7384a37c 289 /* Initialize interface hostname */
grzemich 0:d7bd7384a37c 290 netif->hostname = "lwip";
grzemich 0:d7bd7384a37c 291 #endif /* LWIP_NETIF_HOSTNAME */
grzemich 0:d7bd7384a37c 292
grzemich 0:d7bd7384a37c 293 /*
grzemich 0:d7bd7384a37c 294 * Initialize the snmp variables and counters inside the struct netif.
grzemich 0:d7bd7384a37c 295 * The last argument should be replaced with your link speed, in units
grzemich 0:d7bd7384a37c 296 * of bits per second.
grzemich 0:d7bd7384a37c 297 */
grzemich 0:d7bd7384a37c 298 NETIF_INIT_SNMP(netif, snmp_ifType_ethernet_csmacd, LINK_SPEED_OF_YOUR_NETIF_IN_BPS);
grzemich 0:d7bd7384a37c 299
grzemich 0:d7bd7384a37c 300 netif->state = ethernetif;
grzemich 0:d7bd7384a37c 301 netif->name[0] = IFNAME0;
grzemich 0:d7bd7384a37c 302 netif->name[1] = IFNAME1;
grzemich 0:d7bd7384a37c 303 /* We directly use etharp_output() here to save a function call.
grzemich 0:d7bd7384a37c 304 * You can instead declare your own function an call etharp_output()
grzemich 0:d7bd7384a37c 305 * from it if you have to do some checks before sending (e.g. if link
grzemich 0:d7bd7384a37c 306 * is available...) */
grzemich 0:d7bd7384a37c 307 netif->output = etharp_output;
grzemich 0:d7bd7384a37c 308 netif->linkoutput = low_level_output;
grzemich 0:d7bd7384a37c 309
grzemich 0:d7bd7384a37c 310 ethernetif->ethaddr = (struct eth_addr *)&(netif->hwaddr[0]);
grzemich 0:d7bd7384a37c 311
grzemich 0:d7bd7384a37c 312 /* initialize the hardware */
grzemich 0:d7bd7384a37c 313 low_level_init(netif);
grzemich 0:d7bd7384a37c 314
grzemich 0:d7bd7384a37c 315 return ERR_OK;
grzemich 0:d7bd7384a37c 316 }
grzemich 0:d7bd7384a37c 317
grzemich 0:d7bd7384a37c 318 #endif /* 0 */