I have it running on all all the Pi's except the PI3 B+ because I can't get the dam PI3 B+ started as per another post that version is doing my head in at the moment.
I heavily modified Chadderz code because I am doing only baremetal and so threw all the the driver mode etc out so it is only standalone. I have done the first two articles on code project and you can see the screen dump of the 3rd one I am trying to finish with mouse and keyboard running at the bottom
https://www.codeproject.com/Articles/11 ... -Pi-Part-I
I basically have everything ready to publish except 2 problems, this one with some mice starting in absolute mode and I can't get the raspberry pi 3 B+ up at all. Having just got back from holidays I will be back on this stuff this week.
This is my notes on changes to chadderz original keyboard code as an indication, the mouse unit had similar changes. If you want the code pre-publication let me know and i will put it up on a public download site for you.
1.) Replaced all references to crazy "types.h" unit with C standard <stdint.h>
2.) Fixed up several struct issues with enum bit field packs
3.) Dispensed with other modes on driver other than stand alone as we are
baremetal the other modes are useless to us.
4.) Corrected addresses to move with different models of Pi. Now supports
Pi1, Pi2 and Pi3.
5.) Changed the "KeyBoard Address" concept to KBD_HANDLE. When we change the
processor into protected mode you can't treat that as an address because
it will be untouchable in the application layer. Also on the Pi3 it will
be 64 bit so easier to get familiar with treating it as a handle.
6.) Replaced all the internal time clocks back up to RPi-Hardware unit. We
can't have peripheral code accessing central hardware like the timer
without us being in charge if we have multitasking running.
7.) Replaced all mailbox exchanges to redirect to RPI-Hardware unit which
has memory barrier code.
8.) Fixed some crazy typecasting with union structures where we have what is
obvious unionized entries. You cant just assume pointers to pointers to
pointers will remain valid as the devices can be unplugged. So you need
pointer tests before pointer use anyhow. The whole concept was stupid as
it was setup.
9.) Dispensed with the LED SUPPORT bit field struct. It is a simple byte with
bitmasks in it. It doesn't need the portability issue of bit field packing
for such a stupidly simple thing.