Include TCP/IP API only if enabled

This commit is contained in:
cpq 2023-04-29 11:45:28 +01:00
parent 4593332204
commit 33811a826f
2 changed files with 2 additions and 2 deletions

View File

@ -1598,6 +1598,7 @@ void mg_rpc_verr(struct mg_rpc_req *, int code, const char *fmt, va_list *);
void mg_rpc_list(struct mg_rpc_req *r);
#if MG_ENABLE_TCPIP
@ -1659,7 +1660,6 @@ struct mg_tcpip_spi {
uint8_t (*txn)(void *, uint8_t); // SPI transaction: write 1 byte, read reply
};
#if MG_ENABLE_TCPIP
#if !defined(MG_ENABLE_DRIVER_STM32H) && !defined(MG_ENABLE_DRIVER_TM4C)
#define MG_ENABLE_DRIVER_STM32 1
#else

View File

@ -1,5 +1,6 @@
#pragma once
#if MG_ENABLE_TCPIP
#include "arch.h"
#include "net.h"
#include "queue.h"
@ -61,7 +62,6 @@ struct mg_tcpip_spi {
uint8_t (*txn)(void *, uint8_t); // SPI transaction: write 1 byte, read reply
};
#if MG_ENABLE_TCPIP
#if !defined(MG_ENABLE_DRIVER_STM32H) && !defined(MG_ENABLE_DRIVER_TM4C)
#define MG_ENABLE_DRIVER_STM32 1
#else