CDC/ECM driver for mbed, based on USBDevice by mbed-official. Uses PicoTCP to access Ethernet USB device. License: GPLv2
Fork of USB_Ethernet by
pico_http_server.h
00001 /********************************************************************* 00002 PicoTCP. Copyright (c) 2012 TASS Belgium NV. Some rights reserved. 00003 See LICENSE and COPYING for usage. 00004 00005 Author: Andrei Carp <andrei.carp@tass.be> 00006 *********************************************************************/ 00007 00008 #ifndef PICO_HTTP_SERVER_H_ 00009 #define PICO_HTTP_SERVER_H_ 00010 00011 #include <stdint.h> 00012 #include "pico_http_util.h" 00013 00014 // Response codes 00015 #define HTTP_RESOURCE_FOUND 0 00016 #define HTTP_RESOURCE_NOT_FOUND 1 00017 00018 // Generic id for the server 00019 #define HTTP_SERVER_ID 0 00020 00021 /* 00022 * Server functions 00023 */ 00024 int pico_http_server_start(uint16_t port, void (*wakeup)(uint16_t ev, uint16_t conn)); 00025 int pico_http_server_accept(void); 00026 00027 /* 00028 * Client functions 00029 */ 00030 char * pico_http_getResource(uint16_t conn); 00031 int pico_http_getProgress(uint16_t conn, uint16_t * sent, uint16_t *total); 00032 00033 /* 00034 * Handshake and data functions 00035 */ 00036 int pico_http_respond(uint16_t conn, uint16_t code); 00037 int pico_http_submitData(uint16_t conn, void * buffer, int len); 00038 int pico_http_close(uint16_t conn); 00039 00040 #endif /* PICO_HTTP_SERVER_H_ */
Generated on Wed Jul 13 2022 02:20:45 by 1.7.2