mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-04-18 17:35:05 +00:00
* **New Features** * Time and delay utilities added (ticks, ms, µs); SD card now uses an expansion-header CS pin; HTTP downloads warn when run on the GUI task and yield to avoid blocking. * **Bug Fixes / Reliability** * Many hard-crash paths converted to guarded checks to reduce abrupt termination and improve stability. * **Tests** * Unit tests added to validate time and delay accuracy. * **Chores** * License header and build/macro updates.
36 lines
947 B
C++
36 lines
947 B
C++
#include <Tactility/service/wifi/Wifi.h>
|
|
|
|
#include <Tactility/Check.h>
|
|
#include <Tactility/CoreDefines.h>
|
|
#include <Tactility/service/ServiceManifest.h>
|
|
#include <Tactility/service/ServiceRegistration.h>
|
|
|
|
namespace tt::service::wifi {
|
|
|
|
const char* radioStateToString(RadioState state) {
|
|
switch (state) {
|
|
using enum RadioState;
|
|
case OnPending:
|
|
return TT_STRINGIFY(OnPending);
|
|
case On:
|
|
return TT_STRINGIFY(On);
|
|
case ConnectionPending:
|
|
return TT_STRINGIFY(ConnectionPending);
|
|
case ConnectionActive:
|
|
return TT_STRINGIFY(ConnectionActive);
|
|
case OffPending:
|
|
return TT_STRINGIFY(OffPending);
|
|
case Off:
|
|
return TT_STRINGIFY(Off);
|
|
}
|
|
check(false, "not implemented");
|
|
}
|
|
|
|
extern const ServiceManifest manifest;
|
|
|
|
std::shared_ptr<ServiceContext> findServiceContext() {
|
|
return findServiceContextById(manifest.id);
|
|
}
|
|
|
|
}
|