mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-10-01 01:26:06 -04:00
Remove ChibiOS registry, thread names.
Only useful for debugging, but even then not very visible or useful. Gained 256 bytes of code RAM.
This commit is contained in:
parent
ae93d8ee58
commit
096e961c67
@ -30,11 +30,6 @@
|
|||||||
|
|
||||||
class BasebandThread : public ThreadBase {
|
class BasebandThread : public ThreadBase {
|
||||||
public:
|
public:
|
||||||
BasebandThread(
|
|
||||||
) : ThreadBase { "baseband" }
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
Thread* start(const tprio_t priority);
|
Thread* start(const tprio_t priority);
|
||||||
|
|
||||||
void on_message(const Message* const message);
|
void on_message(const Message* const message);
|
||||||
|
@ -129,7 +129,7 @@
|
|||||||
* @note The default is @p TRUE.
|
* @note The default is @p TRUE.
|
||||||
*/
|
*/
|
||||||
#if !defined(CH_USE_REGISTRY) || defined(__DOXYGEN__)
|
#if !defined(CH_USE_REGISTRY) || defined(__DOXYGEN__)
|
||||||
#define CH_USE_REGISTRY TRUE
|
#define CH_USE_REGISTRY FALSE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -30,11 +30,6 @@
|
|||||||
|
|
||||||
class RSSIThread : public ThreadBase {
|
class RSSIThread : public ThreadBase {
|
||||||
public:
|
public:
|
||||||
RSSIThread(
|
|
||||||
) : ThreadBase { "rssi" }
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
Thread* start(const tprio_t priority);
|
Thread* start(const tprio_t priority);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -26,26 +26,17 @@
|
|||||||
|
|
||||||
class ThreadBase {
|
class ThreadBase {
|
||||||
public:
|
public:
|
||||||
constexpr ThreadBase(
|
|
||||||
const char* const name
|
|
||||||
) : name { name }
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual ~ThreadBase() = default;
|
virtual ~ThreadBase() = default;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
static msg_t fn(void* arg) {
|
static msg_t fn(void* arg) {
|
||||||
auto obj = static_cast<ThreadBase*>(arg);
|
auto obj = static_cast<ThreadBase*>(arg);
|
||||||
chRegSetThreadName(obj->name);
|
|
||||||
obj->run();
|
obj->run();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const char* const name;
|
|
||||||
|
|
||||||
virtual void run() = 0;
|
virtual void run() = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user