Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: lib_Transmission
Diff: main.h
- Revision:
- 4:0e42ea16a9cb
- Parent:
- 1:59b4a81bd792
- Child:
- 7:b4b3cd7f18da
diff -r 63567efc8429 -r 0e42ea16a9cb main.h
--- a/main.h Fri Feb 12 15:39:24 2021 +0000
+++ b/main.h Wed Mar 03 13:03:12 2021 +0000
@@ -1,46 +1,19 @@
#ifndef MAIN_H
#define MAIN_H
-
-#define MBED_PROJECT "Transmission"
-#define HTTP_RETURN_OK "HTTP/1.1 200 OK\r\n"
-#define HTTP_RETURN_NO_CONTENT "HTTP/1.1 204 No Content\r\n"
+#define MBED_PROJECT "Transmission"
-#include "mbed.h" // mbed-os 6.2
-#include "favicon.h"
+#include "mbed.h"
#include "lib_Transmission.h"
-#include "kvstore_global_api.h"
-#include <map>
-
-EthernetInterface eth;
-
-enum enumHTML { HEAD, OPEN, CLOSE, BODY, SMTP };
BusOut Led(LED1, LED2, LED3);
#if MBED_MAJOR_VERSION > 5
UnbufferedSerial pc(USBTX, USBRX, 230400);
#else
-Serial pc(USBTX, USBRX, 230400);
+Serial pc(USBTX, USBRX, 230400);
#endif
-
-/* initialize */
-void setup(void);
-void init(void);
-
-/* string */
-string str_precision(float value);
-string csv_time(const bool& = true);
+EthernetInterface eth;
+USBCDC usb(false);
-/* transmission */
-void processing(string, Transmission::enum_trans_to);
-
-/* HTML */
-string html(enumHTML);
-
-/* NOTIFY */
-string notify(const string&, const string& = "");
-
-Transmission transmission(&pc, ð, &init, &processing);
-
-struct typeUc { string history; string name; string spec; string vlan; string mac; string mail[5]; }
- uc = { "DATE;TIME;SENSOR;STATUS;VALUE\n", "", "", "", "", { "", "", "", "", "" } };
+string processing(string);
+Transmission transmission(&pc, ð, &usb, &processing);
#endif
\ No newline at end of file