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:
Jared Boone 2016-02-09 11:32:07 -08:00
parent ae93d8ee58
commit 096e961c67
4 changed files with 1 additions and 20 deletions

View File

@ -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);

View File

@ -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
/** /**

View File

@ -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:

View File

@ -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;
}; };