未验证 提交 e73bcac8 编写于 作者: D Daniel-Foley 提交者: GitHub

Added CM4 model check to IsPi4 (#2125)

CM4 needs to be handled the same way as a pi4. Right now, due to the device model of a CM4 being "Raspberry Pi Computer Module 4" it is being treated as a pi3. This causes a problem with the pin mapping and prevents the CM4 from having it's input/output and pullup/pulldown changed on OpenPin().
上级 29d63474
......@@ -722,7 +722,7 @@ internal unsafe class RaspberryPi3LinuxDriver : GpioDriver
if (File.Exists(ModelFilePath))
{
string model = File.ReadAllText(ModelFilePath, Text.Encoding.ASCII);
if (model.Contains("Raspberry Pi 4"))
if (model.Contains("Raspberry Pi 4") || model.Contains("Raspberry Pi Compute Module 4"))
{
IsPi4 = true;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册