I will host the driver separately in order for @drummyfish to have peace of mind. It is copyrighted by NXP but Brendon essentially said it can be used, still clarifying. It’s part of application notes / examples.
Copyrighting and licensing are two separate things, but I think I know what you mean - it was either unlicensed or it was under that ‘must only be used with NXP chips’ licence.
Personally I have no issue with the ‘NXP chip only’ licence for as long and the Pokitto is using an NXP chip, but hosting separately will probably suit everyone.
As it happens I dug out the ‘working signed CDCinf’ from the repo’s history,
and it still didn’t work because “the hash for the file is not present in the specified catalogue file”.
Incidentally, @FManga, could we add some sort of serial out emulation to the emulator?
Because if you could make localhost IP endpoints for the emu, I could make it possible to link the emu with a real device, thereby allowing multiplayer development even if you have only one hw device
You want the emulator to create a virtual COM port? I’ve no idea how to do that, though I could look in to it this weekend. I imagine OSX/Linux would require completely different implementations as well.
Or should the emulator provide its own serial-to-network bridge?
Yes I realized also this is far more complicated than what it initially sounds. A virtual COM port has to handle all the CTS/RTS/DTR handshaking and so.
But, since you’ve shown you’re capable of magic several times, possibly its a piece of cake, who knows?
#include <Pokitto.h>
#include <USBSerial.h>
Pokitto::Core game;
USBSerial pc;
int main () {
game.display.palette[0]=COLOR_BLUE;
game.display.palette[1]=COLOR_WHITE;
game.begin();
game.display.persistence=1;
game.display.setFont(fontC64);
game.display.adjustCharStep = 0; //needed for the non-proportional C64 font (normal value=1)
game.display.print("Serial test");
while (game.isRunning()) {
if (game.update()) {
if (game.buttons.aBtn()) pc.printf("A\n");
if (game.buttons.bBtn()) pc.printf("B\n");
if (pc.readable()) {
game.display.print((char)pc.getc());
//pc.printf("OK\n");
}
}
}
return 1;
}
The PokSer class is never used.
Why would you need a device driver?
Also the pc.printf calls aren’t working for me.
They work on the ArduinoIDE but not my custom program for some reason.
I’m guessing I’ve got the settings wrong.
I’ve got a baud rate of 9600, no parity bit, 8 data bits, 1 stop bit and rts enabled.
Any idea which of those is wrong?