Very early initial support for RPi 5 based on dev branch of circle.

pull/638/head
Kevin 4 weeks ago
parent 349100d65a
commit abc132e65a
  1. 6
      src/config.txt
  2. 4
      src/kernel.cpp
  3. 8
      src/minidexed.cpp
  4. 18
      src/usbminidexedmidigadget.h
  5. 4
      submod.sh

@ -10,7 +10,7 @@ gpu_mem=16
disable_overscan=0
#
# Use 64-bit for RPi 3, 4, 400 and Zero 2, and 32-bit for all other models
# Use 64-bit for RPi 3, 4, 400, 5 and Zero 2, and 32-bit for all other models
#
[pi3]
@ -24,3 +24,7 @@ kernel=kernel8-rpi4.img
# Zero 2 W
[pi02]
arm_64bit=1
[pi5]
arm_64bit=1
kernel=kernel_2712.img

@ -68,8 +68,12 @@ bool CKernel::Initialize (void)
if (m_Config.GetUSBGadgetMode())
{
#if RASPPI==5
#warning No support for USB Gadget Mode on RPI 5 yet
#else
// Run the USB stack in USB Gadget (device) mode
m_pUSB = new CUSBMiniDexedMIDIGadget (&mInterrupt);
#endif
}
else
{

@ -103,7 +103,11 @@ CMiniDexed::CMiniDexed (CConfig *pConfig, CInterruptSystem *pInterrupt,
if (pConfig->GetUSBGadgetMode())
{
#if RASPPI==5
LOGNOTE ("USB Gadget (Device) Mode NOT supported on RPI 5");
#else
LOGNOTE ("USB In Gadget (Device) Mode");
#endif
}
else
{
@ -128,6 +132,9 @@ CMiniDexed::CMiniDexed (CConfig *pConfig, CInterruptSystem *pInterrupt,
}
else if (strcmp (pDeviceName, "hdmi") == 0)
{
#if RASPPI==5
LOGNOTE ("HDMI mode NOT supported on RPI 5.");
#else
LOGNOTE ("HDMI mode");
m_pSoundDevice = new CHDMISoundBaseDevice (pInterrupt, pConfig->GetSampleRate (),
@ -136,6 +143,7 @@ CMiniDexed::CMiniDexed (CConfig *pConfig, CInterruptSystem *pInterrupt,
// The channels are swapped by default in the HDMI sound driver.
// TODO: Remove this line, when this has been fixed in the driver.
m_bChannelsSwapped = !m_bChannelsSwapped;
#endif
}
else
{

@ -22,6 +22,23 @@
#ifndef _usbminidexedmidigadget_h
#define _usbminidexedmidigadget_h
#if RASPPI==5
#include <circle/sysconfig.h>
#include <assert.h>
#warning No support for USB Gadget Mode on RPI 5 yet
class CUSBMiniDexedMIDIGadget
{
public:
CUSBMiniDexedMIDIGadget (CInterruptSystem *pInterruptSystem)
{
}
~CUSBMiniDexedMIDIGadget (void)
{
}
};
#else
#include <circle/usb/gadget/usbmidigadget.h>
#include <circle/usb/gadget/usbmidigadgetendpoint.h>
#include <circle/sysconfig.h>
@ -82,5 +99,6 @@ protected:
return CUSBMIDIGadget::GetDescriptor(wValue, wIndex, pLength);
}
};
#endif
#endif

@ -6,13 +6,13 @@ git submodule update --init --recursive
#
# Use fixed master branch of circle-stdlib then re-update
cd circle-stdlib/
git checkout 695ab4a
git checkout 3bd135d
git submodule update --init --recursive
cd -
#
# Optional update submodules explicitly
cd circle-stdlib/libs/circle
git checkout fe09c4b
git checkout 4b3e06f
cd -
cd circle-stdlib/libs/circle-newlib
#git checkout develop

Loading…
Cancel
Save