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.
Dependents: oldheating gps motorhome heating
favicon/web-favicon.c@109:3e82f62c7e1f, 2019-04-29 (annotated)
- Committer:
- andrewboyson
- Date:
- Mon Apr 29 14:45:30 2019 +0000
- Revision:
- 109:3e82f62c7e1f
- Parent:
- 103:91194cc19bbb
Tidied names from http to web
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
andrewboyson | 103:91194cc19bbb | 1 | #include "http.h" |
andrewboyson | 103:91194cc19bbb | 2 | |
andrewboyson | 103:91194cc19bbb | 3 | //Use http://tomeko.net/online_tools/file_to_hex.php to convert a favicon.ico into hex readable as an array |
andrewboyson | 103:91194cc19bbb | 4 | static const char bytes[] = { |
andrewboyson | 103:91194cc19bbb | 5 | #include "favicon/web-favicon.inc" |
andrewboyson | 103:91194cc19bbb | 6 | }; |
andrewboyson | 103:91194cc19bbb | 7 | |
andrewboyson | 103:91194cc19bbb | 8 | const char* WebFaviconDate = __DATE__; |
andrewboyson | 103:91194cc19bbb | 9 | const char* WebFaviconTime = __TIME__; |
andrewboyson | 103:91194cc19bbb | 10 | const int WebFaviconSize = sizeof(bytes); |
andrewboyson | 103:91194cc19bbb | 11 | |
andrewboyson | 103:91194cc19bbb | 12 | void WebFavicon() |
andrewboyson | 103:91194cc19bbb | 13 | { |
andrewboyson | 103:91194cc19bbb | 14 | HttpOk("image/x-icon", "max-age=3600", WebFaviconDate, WebFaviconTime); |
andrewboyson | 103:91194cc19bbb | 15 | HttpAddData(bytes, WebFaviconSize); |
andrewboyson | 103:91194cc19bbb | 16 | } |