Kernel improvements (#485)
* **New Features** * Added public accessors for querying module/device start and ready state. * **Refactor** * Internal state moved to opaque internal objects; module/device/driver initializers now explicitly initialize internal pointers. * Lifecycle handling updated to construct/destruct internal state and use accessors. * **Tests** * Tests updated to use public accessors and explicit construct/destruct lifecycle calls. * **Chores** * Test build/include paths and small metadata updated.
This commit is contained in:
committed by
GitHub
parent
1757af859c
commit
79e43b093a
@@ -17,7 +17,8 @@ struct Module device_module = {
|
||||
.name = "btt-panda-touch",
|
||||
.start = start,
|
||||
.stop = stop,
|
||||
.symbols = nullptr
|
||||
.symbols = nullptr,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ struct Module device_module = {
|
||||
.name = "cyd-2432s024c",
|
||||
.start = start,
|
||||
.stop = stop,
|
||||
.symbols = nullptr
|
||||
.symbols = nullptr,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ struct Module device_module = {
|
||||
.name = "cyd-2432s028r",
|
||||
.start = start,
|
||||
.stop = stop,
|
||||
.symbols = nullptr
|
||||
.symbols = nullptr,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ struct Module device_module = {
|
||||
.name = "cyd-2432s028rv3",
|
||||
.start = start,
|
||||
.stop = stop,
|
||||
.symbols = nullptr
|
||||
.symbols = nullptr,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ struct Module device_module = {
|
||||
.name = "cyd-2432s032c",
|
||||
.start = start,
|
||||
.stop = stop,
|
||||
.symbols = nullptr
|
||||
.symbols = nullptr,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ struct Module device_module = {
|
||||
.name = "cyd-4848s040c",
|
||||
.start = start,
|
||||
.stop = stop,
|
||||
.symbols = nullptr
|
||||
.symbols = nullptr,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ struct Module device_module = {
|
||||
.name = "cyd-8048s043c",
|
||||
.start = start,
|
||||
.stop = stop,
|
||||
.symbols = nullptr
|
||||
.symbols = nullptr,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ struct Module device_module = {
|
||||
.name = "cyd-e32r28t",
|
||||
.start = start,
|
||||
.stop = stop,
|
||||
.symbols = nullptr
|
||||
.symbols = nullptr,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ struct Module device_module = {
|
||||
.name = "cyd-e32r32p",
|
||||
.start = start,
|
||||
.stop = stop,
|
||||
.symbols = nullptr
|
||||
.symbols = nullptr,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ struct Module device_module = {
|
||||
.name = "elecrow-crowpanel-advance-35",
|
||||
.start = start,
|
||||
.stop = stop,
|
||||
.symbols = nullptr
|
||||
.symbols = nullptr,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ struct Module device_module = {
|
||||
.name = "elecrow-crowpanel-advance-50",
|
||||
.start = start,
|
||||
.stop = stop,
|
||||
.symbols = nullptr
|
||||
.symbols = nullptr,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ struct Module device_module = {
|
||||
.name = "elecrow-crowpanel-basic-28",
|
||||
.start = start,
|
||||
.stop = stop,
|
||||
.symbols = nullptr
|
||||
.symbols = nullptr,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ struct Module device_module = {
|
||||
.name = "elecrow-crowpanel-basic-35",
|
||||
.start = start,
|
||||
.stop = stop,
|
||||
.symbols = nullptr
|
||||
.symbols = nullptr,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ struct Module device_module = {
|
||||
.name = "elecrow-crowpanel-basic-50",
|
||||
.start = start,
|
||||
.stop = stop,
|
||||
.symbols = nullptr
|
||||
.symbols = nullptr,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ struct Module device_module = {
|
||||
.name = "generic-esp32",
|
||||
.start = start,
|
||||
.stop = stop,
|
||||
.symbols = nullptr
|
||||
.symbols = nullptr,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ struct Module device_module = {
|
||||
.name = "generic-esp32c6",
|
||||
.start = start,
|
||||
.stop = stop,
|
||||
.symbols = nullptr
|
||||
.symbols = nullptr,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ struct Module device_module = {
|
||||
.name = "generic-esp32p4",
|
||||
.start = start,
|
||||
.stop = stop,
|
||||
.symbols = nullptr
|
||||
.symbols = nullptr,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ struct Module device_module = {
|
||||
.name = "generic-esp32s3",
|
||||
.start = start,
|
||||
.stop = stop,
|
||||
.symbols = nullptr
|
||||
.symbols = nullptr,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ struct Module device_module = {
|
||||
.name = "guition-jc1060p470ciwy",
|
||||
.start = start,
|
||||
.stop = stop,
|
||||
.symbols = nullptr
|
||||
.symbols = nullptr,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ struct Module device_module = {
|
||||
.name = "guition-jc2432w328c",
|
||||
.start = start,
|
||||
.stop = stop,
|
||||
.symbols = nullptr
|
||||
.symbols = nullptr,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ struct Module device_module = {
|
||||
.name = "guition-jc3248w535c",
|
||||
.start = start,
|
||||
.stop = stop,
|
||||
.symbols = nullptr
|
||||
.symbols = nullptr,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ struct Module device_module = {
|
||||
.name = "guition-jc8048w550c",
|
||||
.start = start,
|
||||
.stop = stop,
|
||||
.symbols = nullptr
|
||||
.symbols = nullptr,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ struct Module device_module = {
|
||||
.name = "heltec-wifi-lora-32-v3",
|
||||
.start = start,
|
||||
.stop = stop,
|
||||
.symbols = nullptr
|
||||
.symbols = nullptr,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ struct Module device_module = {
|
||||
.name = "lilygo-tdeck",
|
||||
.start = start,
|
||||
.stop = stop,
|
||||
.symbols = nullptr
|
||||
.symbols = nullptr,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ struct Module device_module = {
|
||||
.name = "lilygo-tdisplay-s3",
|
||||
.start = start,
|
||||
.stop = stop,
|
||||
.symbols = nullptr
|
||||
.symbols = nullptr,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ struct Module device_module = {
|
||||
.name = "lilygo-tdisplay",
|
||||
.start = start,
|
||||
.stop = stop,
|
||||
.symbols = nullptr
|
||||
.symbols = nullptr,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ struct Module device_module = {
|
||||
.name = "lilygo-tdongle-s3",
|
||||
.start = start,
|
||||
.stop = stop,
|
||||
.symbols = nullptr
|
||||
.symbols = nullptr,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ Driver tlora_pager_driver = {
|
||||
.api = nullptr,
|
||||
.device_type = nullptr,
|
||||
.owner = &device_module,
|
||||
.driver_private = nullptr
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -25,7 +25,8 @@ struct Module device_module = {
|
||||
.name = "lilygo-tlora-pager",
|
||||
.start = start,
|
||||
.stop = stop,
|
||||
.symbols = nullptr
|
||||
.symbols = nullptr,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ struct Module device_module = {
|
||||
.name = "m5stack-cardputer-adv",
|
||||
.start = start,
|
||||
.stop = stop,
|
||||
.symbols = nullptr
|
||||
.symbols = nullptr,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ struct Module device_module = {
|
||||
.name = "m5stack-cardputer",
|
||||
.start = start,
|
||||
.stop = stop,
|
||||
.symbols = nullptr
|
||||
.symbols = nullptr,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ struct Module device_module = {
|
||||
.name = "m5stack-core2",
|
||||
.start = start,
|
||||
.stop = stop,
|
||||
.symbols = nullptr
|
||||
.symbols = nullptr,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ struct Module device_module = {
|
||||
.name = "m5stack-cores3",
|
||||
.start = start,
|
||||
.stop = stop,
|
||||
.symbols = nullptr
|
||||
.symbols = nullptr,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -55,8 +55,8 @@
|
||||
scl-pullup;
|
||||
};
|
||||
|
||||
// TODO: Enable speaker via I2C: https://github.com/m5stack/M5Unified/blob/a6256725481f1bc366655fa48cf03b6095e30ad1/src/M5Unified.cpp#L417
|
||||
// TODO: Enable microphone via I2C: https://github.com/m5stack/M5Unified/blob/a6256725481f1bc366655fa48cf03b6095e30ad1/src/M5Unified.cpp#L616
|
||||
// TODO: Enable speaker via ES7210 I2C: https://github.com/m5stack/M5Unified/blob/a6256725481f1bc366655fa48cf03b6095e30ad1/src/M5Unified.cpp#L417
|
||||
// TODO: Enable microphone via ES7210 I2C: https://github.com/m5stack/M5Unified/blob/a6256725481f1bc366655fa48cf03b6095e30ad1/src/M5Unified.cpp#L616
|
||||
i2s0 {
|
||||
// Note: M5Unified sets the following for speaker: magnification = 2, oversampling = 1
|
||||
// Note: M5Unified sets the following for microphone: magnification = 4
|
||||
|
||||
@@ -17,7 +17,8 @@ struct Module device_module = {
|
||||
.name = "m5stack-papers3",
|
||||
.start = start,
|
||||
.stop = stop,
|
||||
.symbols = nullptr
|
||||
.symbols = nullptr,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ struct Module device_module = {
|
||||
.name = "m5stack-stickc-plus",
|
||||
.start = start,
|
||||
.stop = stop,
|
||||
.symbols = nullptr
|
||||
.symbols = nullptr,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ struct Module device_module = {
|
||||
.name = "m5stack-stickc-plus2",
|
||||
.start = start,
|
||||
.stop = stop,
|
||||
.symbols = nullptr
|
||||
.symbols = nullptr,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ struct Module device_module = {
|
||||
.name = "m5stack-tab5",
|
||||
.start = start,
|
||||
.stop = stop,
|
||||
.symbols = nullptr
|
||||
.symbols = nullptr,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ struct Module device_module = {
|
||||
.name = "simulator",
|
||||
.start = start,
|
||||
.stop = stop,
|
||||
.symbols = nullptr
|
||||
.symbols = nullptr,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ struct Module device_module = {
|
||||
.name = "unphone",
|
||||
.start = start,
|
||||
.stop = stop,
|
||||
.symbols = nullptr
|
||||
.symbols = nullptr,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ struct Module device_module = {
|
||||
.name = "waveshare-esp32-s3-geek",
|
||||
.start = start,
|
||||
.stop = stop,
|
||||
.symbols = nullptr
|
||||
.symbols = nullptr,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ struct Module device_module = {
|
||||
.name = "waveshare-s3-lcd-13",
|
||||
.start = start,
|
||||
.stop = stop,
|
||||
.symbols = nullptr
|
||||
.symbols = nullptr,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ struct Module device_module = {
|
||||
.name = "waveshare-s3-touch-lcd-128",
|
||||
.start = start,
|
||||
.stop = stop,
|
||||
.symbols = nullptr
|
||||
.symbols = nullptr,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ struct Module device_module = {
|
||||
.name = "waveshare-s3-touch-lcd-147",
|
||||
.start = start,
|
||||
.stop = stop,
|
||||
.symbols = nullptr
|
||||
.symbols = nullptr,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ struct Module device_module = {
|
||||
.name = "waveshare-s3-touch-lcd-43",
|
||||
.start = start,
|
||||
.stop = stop,
|
||||
.symbols = nullptr
|
||||
.symbols = nullptr,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ struct Module device_module = {
|
||||
.name = "wireless-tag-wt32-sc01-plus",
|
||||
.start = start,
|
||||
.stop = stop,
|
||||
.symbols = nullptr
|
||||
.symbols = nullptr,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user