1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-27 18:02:17 +03:00

examples: format all .ino files

This formats all the example source files using Arduino style rules.
This commit is contained in:
Ivan Grokhotkov
2018-02-19 18:30:59 +03:00
committed by Ivan Grokhotkov
parent e226251b27
commit 61cd8d8385
88 changed files with 2730 additions and 2801 deletions

View File

@ -1,59 +1,59 @@
/*
* ESP8266 LLMNR responder sample
* Copyright (C) 2017 Stephen Warren <swarren@wwwdotorg.org>
*
* Based on:
* ESP8266 Multicast DNS (port of CC3000 Multicast DNS library)
* Version 1.1
* Copyright (c) 2013 Tony DiCola (tony@tonydicola.com)
* ESP8266 port (c) 2015 Ivan Grokhotkov (ivan@esp8266.com)
* MDNS-SD Suport 2015 Hristo Gochkov
* Extended MDNS-SD support 2016 Lars Englund (lars.englund@gmail.com)
*
* License (MIT license):
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*/
ESP8266 LLMNR responder sample
Copyright (C) 2017 Stephen Warren <swarren@wwwdotorg.org>
Based on:
ESP8266 Multicast DNS (port of CC3000 Multicast DNS library)
Version 1.1
Copyright (c) 2013 Tony DiCola (tony@tonydicola.com)
ESP8266 port (c) 2015 Ivan Grokhotkov (ivan@esp8266.com)
MDNS-SD Suport 2015 Hristo Gochkov
Extended MDNS-SD support 2016 Lars Englund (lars.englund@gmail.com)
License (MIT license):
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
/*
* This is an example of an HTTP server that is accessible via http://esp8266/
* (or perhaps http://esp8266.local/) thanks to the LLMNR responder.
*
* Instructions:
* - Update WiFi SSID and password as necessary.
* - Flash the sketch to the ESP8266 board.
* - Windows:
* - No additional software is necessary.
* - Point your browser to http://esp8266/, you should see a response. In most
* cases, it is important that you manually type the "http://" to force the
* browser to search for a hostname to connect to, rather than perform a web
* search.
* - Alternatively, run the following command from the command prompt:
* ping esp8266
* - Linux:
* - To validate LLMNR, install the systemd-resolve utility.
* - Execute the following command:
* systemd-resolve -4 -p llmnr esp8266
* - It may be possible to configure your system to use LLMNR for all name
* lookups. However, that is beyond the scope of this description.
*
*/
This is an example of an HTTP server that is accessible via http://esp8266/
(or perhaps http://esp8266.local/) thanks to the LLMNR responder.
Instructions:
- Update WiFi SSID and password as necessary.
- Flash the sketch to the ESP8266 board.
- Windows:
- No additional software is necessary.
- Point your browser to http://esp8266/, you should see a response. In most
cases, it is important that you manually type the "http://" to force the
browser to search for a hostname to connect to, rather than perform a web
search.
- Alternatively, run the following command from the command prompt:
ping esp8266
- Linux:
- To validate LLMNR, install the systemd-resolve utility.
- Execute the following command:
systemd-resolve -4 -p llmnr esp8266
- It may be possible to configure your system to use LLMNR for all name
lookups. However, that is beyond the scope of this description.
*/
#include <ESP8266WiFi.h>
#include <ESP8266LLMNR.h>