WWW serwer SKM
Dependencies: SDFileSystem mbed
Fork of SKM_SERWER_WWW by
main.cpp@4:6796e73072c0, 2018-11-06 (annotated)
- Committer:
- barti19941
- Date:
- Tue Nov 06 15:21:02 2018 +0000
- Revision:
- 4:6796e73072c0
- Parent:
- 3:c05bbec8d96b
Wersja 1
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
andcor02 | 0:f682dcf80f00 | 1 | #include "mbed.h" |
barti19941 | 2:8d5a84fcf90c | 2 | #include "SDFileSystem.h" |
barti19941 | 4:6796e73072c0 | 3 | |
barti19941 | 4:6796e73072c0 | 4 | Serial pc(USBTX, USBRX); |
barti19941 | 4:6796e73072c0 | 5 | |
barti19941 | 4:6796e73072c0 | 6 | |
barti19941 | 4:6796e73072c0 | 7 | void Send_Data() |
barti19941 | 4:6796e73072c0 | 8 | { |
barti19941 | 4:6796e73072c0 | 9 | char index[]= "<!DOCTYPE html>\n<html>\n<head>\n<title>Page Title</title>\n</head>\n<body>\n<h1>Hello World!!!</h1>\n<p>My first paragraph.</p>\nMoja strona www:\n</body>\n</html>\n"; |
barti19941 | 4:6796e73072c0 | 10 | client.send(index, sizeof(index)); |
barti19941 | 4:6796e73072c0 | 11 | client_is_connected = false; |
barti19941 | 4:6796e73072c0 | 12 | } |
erigow01 | 1:623f51ea713b | 13 | |
barti19941 | 2:8d5a84fcf90c | 14 | int main() |
barti19941 | 2:8d5a84fcf90c | 15 | { |
barti19941 | 4:6796e73072c0 | 16 | pc.baud(9600); |
barti19941 | 4:6796e73072c0 | 17 | printf("Zainicjowano UART! \n"); |
barti19941 | 4:6796e73072c0 | 18 | printf("Predkosc bitowa transmisji - 9600/s.\n"); |
barti19941 | 4:6796e73072c0 | 19 | Initialize_Server(); |
barti19941 | 4:6796e73072c0 | 20 | while (1) |
barti19941 | 4:6796e73072c0 | 21 | { |
barti19941 | 4:6796e73072c0 | 22 | |
barti19941 | 4:6796e73072c0 | 23 | } |
andcor02 | 0:f682dcf80f00 | 24 | } |