STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
hotfire_ota.h
Go to the documentation of this file.
1
#pragma once
2
3
/**
4
* Ethernet OTA for hotfire boards — thin compatibility layer.
5
*
6
* The implementation now lives in the shared library
7
* ``firmware/libraries/STAR_EthernetOTA``, so every STAR board with a W5500
8
* runs the same code. This header keeps the older names working; new code
9
* should include <STAR_EthernetOTA.h> and use StarOTA::Server directly.
10
*
11
* Wire protocol is unchanged:
12
* client -> board : [4-byte big-endian size][firmware binary]
13
* board -> client: "OK\r\n", then reboot
14
*/
15
16
#include <
STAR_EthernetOTA.h
>
17
18
/** Legacy alias for the portability wrapper around EthernetServer. */
19
using
OTAEthernetServer
=
StarOTA::PortableServer
;
20
21
/**
22
* Legacy blocking handler.
23
*
24
* Prefer StarOTA::Server::poll(), which owns the listening socket and the
25
* accept step too, so callers no longer hand-roll available()/handle().
26
*/
27
inline
void
hotfire_handleOTA
(
EthernetClient
& client) {
28
// The adapter never listens (the caller owns the socket); it is here only
29
// to carry the config and run the transfer.
30
static
StarOTA::Server
adapter;
31
adapter.
handleClient
(client);
32
}
STAR_EthernetOTA.h
EthernetClient
Definition
Ethernet.h:11
StarOTA::PortableServer
Some Arduino-ESP32 cores make Server::begin() pure virtual as begin(uint16_t); others use begin().
Definition
STAR_EthernetOTA.h:114
StarOTA::Server
The OTA listener.
Definition
STAR_EthernetOTA.h:132
StarOTA::Server::handleClient
Result handleClient(EthernetClient &client)
Run the transfer on a client you accepted yourself.
Definition
STAR_EthernetOTA.cpp:87
hotfire_handleOTA
void hotfire_handleOTA(EthernetClient &client)
Legacy blocking handler.
Definition
hotfire_ota.h:27
OTAEthernetServer
Definition
hotfire_ota.h:4
firmware
Hotfire_Code
common
hotfire_ota.h
Generated by
1.15.0